:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #172033;
  --muted: #5d6b82;
  --line: #dfe7f2;
  --primary: #244c8f;
  --primary-dark: #19396d;
  --chip-bg: #eef4ff;
  --chip-text: #163f83;
  --shadow: 0 16px 42px rgba(26, 45, 80, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.72;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding-left: 1.1rem; }
li + li { margin-top: 0.42rem; }

.site-header {
  background: linear-gradient(135deg, #0e1a2f 0%, #14233d 58%, #1d3764 100%);
  color: #fff;
  padding: 1rem 1.4rem 2rem;
}
.nav {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.85rem;
  color: rgba(255,255,255,.76);
  font-size: 0.9rem;
}
.nav-links a:hover { color: #fff; }

.hero {
  max-width: 1120px;
  margin: 1.6rem auto 0;
}
.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.4rem;
  align-items: stretch;
}
.hero-copy {
  padding: 1.5rem 0 0.8rem;
}
.eyebrow {
  margin: 0 0 .55rem;
  color: #b9d8ff;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.65rem, 3.1vw, 2.55rem);
  line-height: 1.32;
  letter-spacing: -0.045em;
}
.hero-desc {
  max-width: 760px;
  margin: 1rem 0 0;
  color: rgba(255,255,255,.76);
  font-size: 0.98rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.25rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .58rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  font-size: .9rem;
  font-weight: 800;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.button.ghost { background: rgba(255,255,255,.08); color: #fff; }
.button.dark { background: #172033; color: #fff; border-color: #172033; }

.profile-card {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 24px;
  padding: 1.25rem;
  display: grid;
  justify-items: center;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.profile-photo {
  width: 104px;
  height: 130px;
  object-fit: cover;
  border-radius: 18px;
  border: 3px solid rgba(255,255,255,.82);
  background: #fff;
}
.profile-card h2 {
  margin: .75rem 0 0;
  font-size: 1.28rem;
  letter-spacing: -0.04em;
}
.profile-card p {
  margin: .15rem 0 0;
  color: rgba(255,255,255,.72);
  font-size: .9rem;
}
.contact-list {
  width: 100%;
  margin: 1rem 0 0;
  display: grid;
  gap: .55rem;
}
.contact-list div {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: baseline;
  text-align: left;
  gap: .5rem;
  padding-top: .55rem;
  border-top: 1px solid rgba(255,255,255,.15);
}
.contact-list dt {
  color: rgba(255,255,255,.56);
  font-size: .78rem;
  font-weight: 800;
}
.contact-list dd {
  margin: 0;
  color: #fff;
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.2rem 1.4rem 0;
}
.section-title {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  margin-bottom: 1.15rem;
}
.section-title span {
  color: var(--primary);
  font-weight: 900;
  letter-spacing: -0.03em;
}
.section-title h2 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: -0.045em;
}
.section-desc {
  margin: -0.5rem 0 1rem;
  color: var(--muted);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.about-card {
  display: grid;
  grid-template-columns: 136px minmax(0,1fr);
  gap: 1.5rem;
  padding: 1.6rem;
  align-items: start;
}
.about-photo-wrap { display: flex; justify-content: center; }
.about-photo {
  width: 116px;
  height: 146px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}
.about-text p { margin: 0; color: #2f4058; }
.about-text p + p { margin-top: .82rem; }

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: .9rem;
}
.skill-card { padding: 1.2rem; }
.skill-card h3,
.info-card h3,
.career-card h3,
.project-card h3 {
  margin: 0;
  letter-spacing: -0.035em;
  line-height: 1.35;
}
.plain-list {
  list-style: none;
  padding: 0;
  margin: .85rem 0 0;
  color: #34445d;
  font-size: .95rem;
}
.plain-list li + li { margin-top: .35rem; }

.stack-list, .project-list {
  display: grid;
  gap: 1rem;
}
.info-card, .career-card, .project-card, .education-card, .contact-card {
  padding: 1.45rem;
}
.card-head, .project-head {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: flex-start;
  margin-bottom: .9rem;
}
.card-head p, .project-head p {
  margin: .25rem 0 0;
  color: var(--muted);
}
time {
  color: var(--muted);
  white-space: nowrap;
  font-size: .92rem;
}
.info-card ul, .career-card ul, .project-card ul {
  color: #263850;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: .82rem;
  font-weight: 900;
  margin-bottom: .65rem;
}
.tag.muted { background: #eef1f6; color: #606c7d; }
.career-card h4, .project-card h4 {
  margin: 0 0 .75rem;
  color: #1e3558;
  font-size: 1rem;
  letter-spacing: -0.025em;
}
.project-card.featured {
  background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%);
  border-color: #cfddf1;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1rem;
}
.chips span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: .83rem;
  font-weight: 900;
}
.education-card { display: grid; gap: .7rem; }
.education-row {
  display: grid;
  grid-template-columns: 160px 180px 1fr;
  gap: 1rem;
  align-items: center;
  color: #334155;
}
.education-row + .education-row {
  padding-top: .7rem;
  border-top: 1px solid var(--line);
}
.contact-section { padding-bottom: 3.4rem; }
.contact-card {
  text-align: center;
  background: #172033;
  color: #fff;
}
.contact-card h2 { margin: 0; letter-spacing: -0.04em; }
.contact-card p { margin: .6rem 0 0; color: rgba(255,255,255,.72); }
.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1rem;
}
.footer {
  padding: 1.4rem;
  color: var(--muted);
  text-align: center;
  font-size: .9rem;
}

@media (max-width: 920px) {
  .hero-main { grid-template-columns: 1fr; }
  .profile-card { max-width: 420px; justify-self: start; }
  .skill-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .site-header { padding: .9rem 1rem 1.55rem; }
  .nav { align-items: flex-start; }
  .nav-links { display: none; }
  .hero { margin-top: 1rem; }
  .hero-copy { padding-top: .6rem; }
  .hero h1 { font-size: 1.55rem; }
  .hero-desc { font-size: .92rem; }
  .section { padding: 2.55rem 1rem 0; }
  .about-card { grid-template-columns: 1fr; }
  .about-photo-wrap { justify-content: flex-start; }
  .skill-grid { grid-template-columns: 1fr; }
  .card-head, .project-head { display: grid; gap: .35rem; }
  time { white-space: normal; }
  .education-row { grid-template-columns: 1fr; gap: .15rem; }
  .button { width: 100%; }
  .profile-card { width: 100%; }
}


/* HTML print export */
.button { cursor: pointer; font-family: inherit; }
@page { size: A4; margin: 14mm; }
@media print {
  html { scroll-behavior: auto; }
  body {
    background: #fff !important;
    color: #111827 !important;
    font-size: 10pt;
    line-height: 1.55;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  a { color: #111827 !important; text-decoration: none !important; }
  .site-header {
    background: #fff !important;
    color: #111827 !important;
    padding: 0 0 8mm !important;
    border-bottom: 1px solid #d8dee8;
  }
  .nav,
  .hero-actions,
  .contact-actions,
  .footer,
  .print-button { display: none !important; }
  .hero { max-width: none; margin: 0; }
  .hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 55mm;
    gap: 8mm;
    align-items: start;
  }
  .hero-copy { padding: 0 !important; }
  .eyebrow { color: #244c8f !important; margin-bottom: 2mm; font-size: 9pt; }
  .hero h1 {
    color: #111827 !important;
    font-size: 19pt !important;
    line-height: 1.28 !important;
    letter-spacing: -0.03em;
  }
  .hero-desc { color: #374151 !important; font-size: 10pt; margin-top: 4mm; }
  .profile-card {
    background: #fff !important;
    color: #111827 !important;
    border: 1px solid #d8dee8 !important;
    box-shadow: none !important;
    border-radius: 10px;
    padding: 5mm;
  }
  .profile-photo { width: 34mm; height: 43mm; border-radius: 8px; border-color: #d8dee8; }
  .profile-card h2, .profile-card p, .contact-list dd, .contact-list dt { color: #111827 !important; }
  .profile-card p, .contact-list dt { color: #4b5563 !important; }
  .contact-list { gap: 2mm; margin-top: 3mm; }
  .contact-list div { grid-template-columns: 1fr; gap: 0.5mm; padding-top: 2mm; border-top-color: #e5e7eb; }
  .section { max-width: none; margin: 0; padding: 8mm 0 0; }
  .section-title { margin-bottom: 4mm; }
  .section-title h2 { font-size: 15pt; }
  .section-title span { color: #244c8f !important; }
  .section-desc { color: #4b5563 !important; }
  .card {
    box-shadow: none !important;
    border: 1px solid #d8dee8 !important;
    border-radius: 10px !important;
    background: #fff !important;
  }
  .about-card { grid-template-columns: 28mm minmax(0,1fr); gap: 5mm; padding: 5mm; }
  .about-photo { width: 25mm; height: 32mm; border-radius: 8px; }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; }
  .info-grid, .career-grid, .project-grid { grid-template-columns: 1fr !important; gap: 4mm; }
  .info-card, .career-card, .project-card, .education-card, .contact-card, .skill-card { padding: 5mm; }
  .info-card, .career-card, .project-card, .education-card, .skill-card, .about-card { break-inside: avoid; page-break-inside: avoid; }
  .card-head, .project-head { margin-bottom: 3mm; }
  .tag, .chips span { background: #eef4ff !important; color: #163f83 !important; }
  time { color: #374151 !important; }
  .contact-section { padding-bottom: 0; }
  .contact-card { background: #fff !important; color: #111827 !important; text-align: left; }
  .contact-card p { color: #374151 !important; }
  .education-row { grid-template-columns: 36mm 42mm 1fr; gap: 4mm; }
}
