:root {
  --bg: #fff;
  --ink: oklch(20% 0.01 80);
  --sub: oklch(45% 0.01 80);
  --line: oklch(90% 0.005 80);
  --accent: oklch(55% 0.15 300);
  --link: oklch(50% 0.14 275);
  --chip-track-bg: oklch(94% 0.005 80);
  --card-bg: #fff;
  --blue: oklch(56% 0.15 250);
  --green: oklch(54% 0.13 150);
  --orange: oklch(57% 0.15 55);
  --red: oklch(58% 0.17 25);
  --purple: oklch(55% 0.15 300);
  --gold: oklch(56% 0.15 80);
  --sky: oklch(55% 0.10 220);
  --teal: oklch(55% 0.12 190);
  --progress-track-bg: oklch(92% 0.005 80);
  --filled-line: oklch(30% 0.02 80);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(18% 0.01 80); --ink: oklch(95% 0.005 80); --sub: oklch(70% 0.01 80); --line: oklch(32% 0.01 80);
    --chip-track-bg: oklch(26% 0.01 80); --card-bg: oklch(24% 0.01 80);
    --progress-track-bg: oklch(28% 0.01 80); --filled-line: oklch(85% 0.01 80);
  }
}
:root[data-theme="dark"] {
  --bg: oklch(18% 0.01 80); --ink: oklch(95% 0.005 80); --sub: oklch(70% 0.01 80); --line: oklch(32% 0.01 80);
  --chip-track-bg: oklch(26% 0.01 80); --card-bg: oklch(24% 0.01 80);
  --progress-track-bg: oklch(28% 0.01 80); --filled-line: oklch(85% 0.01 80);
}
:root[data-theme="light"] {
  --bg: #fff; --ink: oklch(20% 0.01 80); --sub: oklch(45% 0.01 80); --line: oklch(90% 0.005 80);
  --chip-track-bg: oklch(94% 0.005 80); --card-bg: #fff;
  --progress-track-bg: oklch(92% 0.005 80); --filled-line: oklch(30% 0.02 80);
}

@font-face {
  font-family: 'Pretendard Variable';
  src: url('/dev-gina/PretendardVariable.woff2') format('woff2-variations'), url('/dev-gina/PretendardVariable.woff2') format('woff2');
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', 'Apple SD Gothic Neo', 'Segoe UI', sans-serif;
}
.wrap { max-width: 900px; margin: 0 auto; padding: 0 24px 80px; }
.section-body { max-width: 640px; margin: 0 auto; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a::after { content: '↗'; display: inline-block; font-size: 0.75em; margin-left: 1px; text-decoration: none; transform: translateY(-1px); }

header { padding-top: 44px; padding-bottom: 8px; scroll-margin-top: 90px; }
.hero-center { display: flex; flex-direction: column; align-items: center; }
.hero-row { display: flex; align-items: center; gap: 22px; width: 420px; }
.avatar {
  width: 90px; height: 90px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 27.2px; line-height: 1;
}
.name { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: var(--ink); }
.role { font-size: 15.5px; font-weight: 600; color: var(--sub); margin-top: 6px; line-height: 1.5; }
.contact { font-size: 12.5px; color: var(--sub); margin-top: 8px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.contact a { color: var(--sub); }
.pitch { font-size: 13.5px; line-height: 1.8; margin: 22px auto 0; max-width: 700px; text-align: center; min-height: 73px; }
@media screen and (max-width: 719px) {
  .wrap { padding: 0 20px 80px; }
  header { padding-top: 32px; }
  .hero-row { width: 100%; }
  .avatar { width: 56px; height: 56px; font-size: 22.4px; }
  .name { font-size: 26px; }
  .role { font-size: 14px; }
  .entry-head, .edu-row { flex-wrap: wrap; }
  .entry-period, .edu-row .meta { margin-right: 0; flex-basis: 100%; white-space: normal; }
}
.pitch strong { color: var(--accent); font-weight: 700; }

section { margin-top: 88px; scroll-margin-top: 90px; }
@media (min-width: 901px) {
  #skills { margin-top: 118.12px; }
}
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-num {
  width: 30px; height: 30px; border-radius: 9px; color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; line-height: 1;
}
h2 {
  font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); margin: 0; line-height: 1.2;
}
h3 { font-size: 14px; font-weight: 700; margin: 0; }
.meta { font-size: 12px; color: var(--sub); margin-top: 2px; }
.entry { margin-top: 22px; }
.entry:first-child { margin-top: 0; }
.entry-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.entry-period { font-size: 12.5px; color: var(--sub); white-space: nowrap; flex-shrink: 0; margin-right: calc(-20px - 10ch); }
.quote { font-size: 13px; font-style: italic; color: var(--accent); margin-top: 4px; }
ul { font-size: 13px; line-height: 1.8; margin: 10px 0 0; padding-left: 18px; color: var(--ink); }
ul.plain { padding-left: 0; list-style: none; margin-top: 0; }
li + li { margin-top: 4px; }
.subhead { font-size: 11px; font-weight: 700; color: var(--sub); text-transform: uppercase; letter-spacing: .02em; margin-top: 12px; }
#projects .entry ul { margin-left: 14px; }
.tech { font-size: 11.5px; color: var(--sub); margin-top: 8px; }
.tech b { color: var(--sub); font-weight: 700; }
p { font-size: 13px; line-height: 1.8; margin: 0; }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }
@media print {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

#progress-track { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--progress-track-bg); z-index: 60; }
#progress-fill { height: 100%; background: var(--filled-line); width: 0%; transition: width .1s linear; }
#page-shell { position: relative; background: var(--bg); min-height: 100vh; }
#bottom-spacer { min-height: 55vh; }
#education h3 { display: inline; font-size: 13px; }
#education > .section-body > ul.plain > li + li { margin-top: 8px; }
#education li ul { list-style-type: disc; margin-top: 4px; }
#education li ul li + li { margin-top: 4px; }
#etc .entry ul { margin-top: 6px; }
#certs h3 { display: inline; font-size: 13px; }
#certs li + li { margin-top: 8px; }

.edu-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.edu-row .meta { margin-top: 0; white-space: nowrap; flex-shrink: 0; margin-right: calc(-20px - 10ch); }
.edu-desc { font-size: 12px; color: var(--sub); margin-top: 2px; }

.label-list { list-style: none; padding-left: 18px; margin: 10px 0 0; font-size: 13px; line-height: 1.8; }
.label-list li { position: relative; }
.label-list li + li { margin-top: 6px; }
.label-list b {
  position: absolute; right: 100%; margin-right: 14px; white-space: nowrap; text-align: right;
  color: var(--ink); font-weight: 700;
}
@media (max-width: 947px) {
  .label-list b { position: static; display: inline-block; text-align: left; margin-right: 8px; }
}
@media (max-width: 719px) {
  .label-list li { display: block; }
}

#skills .section-num { background: var(--blue); }
#stack .section-num { background: var(--green); }
#projects .section-num { background: var(--purple); }
#careers .section-num { background: var(--red); }
#oss .section-num { background: var(--teal); }
#education .section-num { background: var(--gold); }
#certs .section-num { background: var(--sky); }
#etc .section-num { background: var(--orange); }

#top-controls {
  position: fixed; top: 12px; right: 16px; z-index: 60; display: flex; gap: 8px; align-items: center;
}
.pillgroup {
  display: flex; gap: 2px; background: var(--chip-track-bg); border-radius: 9px; padding: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.pillgroup button, .pillgroup a {
  border: none; border-radius: 7px; cursor: pointer; box-sizing: border-box; height: 23px;
  background: transparent; font-family: inherit; color: var(--sub); font-weight: 700;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.pillgroup .icon-btn { padding: 0 9px; font-size: 13px; }
.pillgroup .text-btn { padding: 0 10px; font-size: 11px; }
.pillgroup .nav-link-btn { width: 66px; font-size: 11px; text-align: center; }
.pillgroup button[aria-pressed="true"] { background: var(--bg); color: var(--ink); }
.pillgroup button:focus-visible, .pillgroup a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pillgroup a::after { content: none; }

#side-nav {
  /* extra +17px = half of (button height 23px + gap 11px) — offsets the 7th item ("소개")
     this list has that Timeline's nav-rail doesn't, so both rails start at the same Y
     despite Resume's list being taller. */
  position: fixed; top: 50%; right: 18px; transform: translateY(calc(-50% + 17px)); z-index: 55;
  display: flex; flex-direction: column; align-items: flex-end; gap: 11px;
}
#side-nav button {
  text-align: left; display: flex; align-items: center; justify-content: flex-start; gap: 6px; white-space: nowrap;
  height: 23px; padding: 4px 9px; border-radius: 14px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0,0,0,.06);
  background: var(--card-bg); color: var(--ink); font-size: 10.5px; font-weight: 700;
  transition: all .2s ease;
}
#side-nav button .nav-num { opacity: .7; }
#side-nav button .section-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: currentColor; }
#side-nav button.active {
  background: var(--dot-color, var(--accent)); border-color: var(--dot-color, var(--accent)); color: #fff;
}
#side-nav button.active .section-dot { background: #fff; }
#side-nav button:hover:not(.active) { color: var(--accent); }

/* Print-only resume — separate DOM (#print-resume in index.html), never rendered on screen.
   Screen keeps the timeline-style colored/spacious layout untouched; paper gets its own
   editorial composition (refresh.cv-inspired structure, not its CSS/markup). */
#print-resume { display: none; }

@media print {
  @page { size: A4; margin: 18mm; }

  #progress-track, #page-shell { display: none !important; }

  #print-resume {
    display: block !important;
    color: oklch(20% 0.01 80);
    background: #fff;
  }
  #print-resume * { box-shadow: none !important; }
  #print-resume a { color: inherit; text-decoration: none; }

  .pr-header { text-align: left; }
  .pr-header h1 { font-size: 52px; font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
  .pr-role { font-size: 13pt; margin-top: 6px; }
  .pr-contact { font-size: 11pt; margin-top: 12px; display: flex; gap: 16px; }
  .pr-summary { font-size: 11.5pt; line-height: 1.5; margin-top: 16px; }

  .pr-section { margin-top: 34px; break-inside: avoid; page-break-inside: avoid; }
  .pr-section-flow { break-inside: auto; page-break-inside: auto; }
  .pr-section-flow h2 { break-after: avoid; page-break-after: avoid; }
  .pr-section-flow .pr-entry { break-inside: auto; page-break-inside: auto; }
  .pr-section h2 {
    font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 16px;
    padding-bottom: 6px; border-bottom: 1.5px solid oklch(20% 0.01 80);
  }

  .pr-label-list { margin: 0; padding-left: 0; list-style: none; }
  .pr-label-list li { font-size: 11pt; line-height: 1.5; margin-top: 8px; display: flex; }
  .pr-label-list li:first-child { margin-top: 0; }
  .pr-label-list b {
    display: inline-block; flex-shrink: 0; width: 130px; text-align: right; padding-right: 12px; font-weight: 700;
  }

  .pr-entry { margin-top: 24px; break-inside: avoid; page-break-inside: avoid; }
  .pr-entry:first-child { margin-top: 0; }
  .pr-entry h3 { font-size: 11.5pt; font-weight: 700; margin: 0; }
  .pr-entry-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .pr-entry-period { font-size: 10.5pt; color: oklch(45% 0.01 80); white-space: nowrap; flex-shrink: 0; }
  .pr-quote { font-size: 10pt; font-style: italic; color: oklch(45% 0.12 264); margin: 4px 0 0; }
  .pr-meta { font-size: 10.5pt; margin-top: 3px; }
  .pr-subhead { font-size: 8.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-top: 9px; color: oklch(45% 0.01 80); }
  .pr-section-flow .pr-entry ul { margin-left: 12px; }
  .pr-entry ul { font-size: 10.5pt; line-height: 1.4; margin: 6px 0 0; padding-left: 16px; }
  .pr-entry li + li { margin-top: 4px; }
  .pr-tech { font-size: 10pt; margin-top: 9px; }

  .pr-plain { list-style: none; padding-left: 0; margin: 0; }
  .pr-plain li { font-size: 11pt; line-height: 1.5; }
  .pr-plain > li { margin-top: 11px; }
  .pr-plain > li:first-child { margin-top: 0; }
  .pr-plain h3 { font-size: 11.5pt; }
  .pr-plain .edu-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .pr-plain .edu-row .meta { margin: 0; white-space: nowrap; flex-shrink: 0; font-size: 10.5pt; }
  .pr-plain .edu-desc { font-size: 10.5pt; color: oklch(35% 0.01 80); margin-top: 2px; }
  .pr-plain li ul { list-style-type: disc; margin-top: 4px; }
  .pr-plain li ul li + li { margin-top: 4px; }

  .pr-etc p { font-size: 11pt; line-height: 1.5; margin: 0; }
  .pr-etc .pr-entry { margin-top: 14px; }
  .pr-etc ul { font-size: 10.5pt; line-height: 1.5; margin-top: 6px; padding-left: 17px; }
  .pr-etc li + li { margin-top: 4px; }
}

@media (max-width: 900px) {
  #side-nav { display: none; }
}
