/* Spinal Deformity Surgeon — history archive.
   Institutional style: dark navy bands, square corners, bold sans headings, ruled section titles.
   No external fonts or resources (CSP: 'self'). */
:root {
  --navy-950: #06101d;
  --navy-900: #0b1a2e;
  --navy-800: #112540;
  --navy-700: #1b3557;
  --navy-500: #3d5a80;
  --gold: #c8a24a;
  --gold-dark: #8a6a1f;
  --red: #9e1b2f;

  --bg: #ffffff;
  --bg-alt: #f1f3f6;
  --surface: #ffffff;
  --ink: #15191f;
  --ink-2: #3c4451;
  --muted: #5d6673;
  --line: #d5dae1;
  --line-strong: #b9c0ca;
  --link: #1b3d6b;
  --focus: #e0b84f;

  --wrap: 1200px;
  --sans: "Pretendard", "Pretendard Variable", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1522;
    --bg-alt: #111c2c;
    --surface: #132034;
    --ink: #e9edf2;
    --ink-2: #c0c8d3;
    --muted: #8e99a8;
    --line: #243349;
    --line-strong: #34465f;
    --link: #a9c4e8;
    --gold-dark: #d9b866;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 var(--sans); word-break: keep-all; overflow-wrap: anywhere; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--sans); line-height: 1.25; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--gold); color: var(--navy-950); padding: 8px 14px; font-weight: 700; z-index: 100; }
.skip:focus { top: 12px; }
.eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: .06em; color: var(--gold-dark); margin-bottom: .7em; }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 46em; }
.muted { color: var(--muted); }
.en { font-weight: 400; font-size: .86em; color: var(--muted); letter-spacing: 0; }
.period { font-size: .82rem; font-weight: 700; color: var(--gold-dark); margin-bottom: .35em; letter-spacing: .02em; }

/* utility bar + header */
.utility { background: var(--navy-950); color: #9aa7b8; font-size: .76rem; }
.utility-inner { display: flex; justify-content: space-between; gap: 12px; min-height: 30px; align-items: center; }
.utility-inner span:last-child { display: none; }
@media (min-width: 720px) { .utility-inner span:last-child { display: inline; } }
.site-header { background: var(--navy-900); color: #fff; border-bottom: 4px solid var(--gold); }
.header-inner { display: flex; align-items: center; gap: 0 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; margin-right: auto; padding: 18px 0; }
.brand strong { display: block; font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.brand small { display: block; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: #a8b4c4; font-weight: 600; }
.logo-mark { width: 34px; height: 34px; fill: var(--gold); flex: none; }
.nav-toggle { display: none; }
/* Desktop: logo row, then a full-width menu row with search on the right. */
.site-nav { display: flex; align-items: stretch; gap: 16px; width: 100%; border-top: 1px solid var(--navy-700); min-height: 52px; }
.site-nav ul { margin-left: -12px !important; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.site-nav li { display: flex; }
.site-nav a { display: flex; align-items: center; padding: 0 12px; text-decoration: none; color: #e4e9f0; font-size: .92rem; font-weight: 700; border-bottom: 4px solid transparent; margin-bottom: -4px; }
.site-nav a:hover { color: #fff; background: var(--navy-800); }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: #fff; }
.search-mini { display: flex; align-self: center; margin-left: auto; border: 1px solid var(--navy-500); background: var(--navy-950); }
.search-mini input { border: 0; background: transparent; padding: 8px 12px; width: 140px; font: inherit; font-size: .86rem; color: #fff; }
.search-mini input::placeholder { color: #8c99ab; }
.search-mini input:focus { outline: none; }
.search-mini:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.search-mini button { border: 0; background: var(--gold); color: var(--navy-950); font: inherit; font-size: .82rem; font-weight: 800; padding: 0 14px; cursor: pointer; }
@media (max-width: 1120px) {
  .js .nav-toggle { display: inline-flex; align-items: center; border: 1px solid var(--navy-500); background: transparent; color: #fff; padding: 9px 16px; font: inherit; font-weight: 700; cursor: pointer; }
  .site-nav { flex-direction: column; align-items: stretch; padding-bottom: 16px; gap: 12px; border-top: 0; }
  .site-nav ul { margin-left: 0 !important; }
  .search-mini { margin-left: 0; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; border-top: 1px solid var(--navy-700); }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--navy-700); margin: 0; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--navy-700); box-shadow: inset 4px 0 0 var(--gold); padding-left: 14px; }
  .search-mini { align-self: stretch; }
  .search-mini input { width: 100%; flex: 1; }
}

/* buttons */
.btn { display: inline-block; padding: 13px 24px; font-weight: 800; font-size: .92rem; text-decoration: none; border: 2px solid var(--navy-800); margin: 0 8px 8px 0; letter-spacing: .01em; }
.btn.primary { background: var(--navy-800); color: #fff; }
.btn.primary:hover { background: var(--navy-700); }
.btn.ghost { color: var(--navy-800); background: transparent; }
.btn.ghost:hover { background: var(--bg-alt); }
@media (prefers-color-scheme: dark) { .btn.ghost { color: #fff; border-color: #fff; } .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--navy-950); } }
.hero .btn.primary { background: var(--gold); border-color: var(--gold); color: var(--navy-950); }
.hero .btn.primary:hover { background: #d8b45c; }
.hero .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.hero .btn.ghost:hover { background: var(--navy-800); border-color: #fff; }

/* hero */
.hero { background: var(--navy-800); color: #dfe6ef; padding: 56px 0 48px; border-bottom: 1px solid var(--navy-700); }
.hero h1 { color: #fff; max-width: 16em; }
.hero .lead { color: #c3cedb; }
.hero .eyebrow { color: var(--gold); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.4fr .6fr; } .hero { padding: 84px 0 72px; } }
.hero-figure { display: flex; justify-content: center; }
.hero-art { width: min(260px, 60vw); height: auto; }
.hero-art .axis { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 4 6; }
.hero-art .ghost .v { fill: none; stroke: var(--navy-500); stroke-width: 1.2; }
.hero-art .curve .v { fill: #e8edf3; }
.hero-art .node { fill: var(--gold); }

/* sections */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); position: relative; }
.section-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 3px; background: var(--gold); }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); }
.section-head a { font-weight: 700; }

.era-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.era-card a { display: block; height: 100%; padding: 22px 22px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.era-card a:hover { background: var(--bg-alt); }
.era-card a:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.era-card h3 { margin-bottom: .25em; }
.era-card p:last-child { color: var(--ink-2); font-size: .92rem; margin: 0; }

.milestones { list-style: none; padding: 0; margin: 0; display: grid; }
@media (min-width: 900px) { .milestones { grid-template-columns: repeat(2, 1fr); column-gap: 48px; } }
.milestones li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 96px 1fr; gap: 4px 16px; }
.milestones .year { font-weight: 800; color: var(--navy-700); font-variant-numeric: tabular-nums; grid-row: span 2; }
@media (prefers-color-scheme: dark) { .milestones .year { color: var(--gold); } }
.milestones h3 { margin: 0; }
.milestones p { color: var(--ink-2); margin: 0; font-size: .94rem; }

.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card-grid.four { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--navy-800); padding: 20px 20px 22px; position: relative; }
@media (prefers-color-scheme: dark) { .card { border-top-color: var(--navy-500); } }
.card:hover { border-top-color: var(--gold); }
.card h3 { margin-bottom: .2em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card:hover h3 a, .link-card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.card[hidden] { display: none; }
.card-meta { font-size: .78rem; color: var(--muted); margin-bottom: .7em; }
.badge { font-weight: 800; color: var(--gold-dark); margin-right: 6px; }
.badge::after { content: "|"; color: var(--line-strong); margin-left: 8px; font-weight: 400; }
.pioneer-card .en { margin: 0 0 .7em; font-size: .82rem; }
.pioneer-card .role { margin: 0; color: var(--ink-2); font-size: .93rem; padding-top: .7em; border-top: 1px solid var(--line); }
.link-card { display: block; text-decoration: none; color: var(--ink); }
.link-card p { color: var(--ink-2); font-size: .93rem; }
.link-card .more { font-weight: 800; color: var(--link); font-size: .86rem; }

.emblem { background: var(--navy-900); color: #d6dee8; }
.emblem h2 { color: #fff; }
.emblem-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 720px) { .emblem-grid { grid-template-columns: 140px 1fr; } }
.emblem-mark { border-right: 0; }
@media (min-width: 720px) { .emblem-mark { border-right: 1px solid var(--navy-700); padding-right: 28px; } }
.emblem-mark .logo-mark { width: 110px; height: 110px; fill: var(--gold); }
.emblem p { max-width: 50em; font-size: 1.02rem; margin: 0; }

/* page hero / body */
.page-hero { background: var(--navy-800); color: #c9d3df; padding: 28px 0 36px; }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.page-hero .lead { color: #c3cedb; margin-bottom: 0; }
.page-hero .eyebrow { color: var(--gold); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 22px; font-size: .8rem; color: #9fb0c4; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--navy-500); }
.crumbs a { color: #c9d3df; }
.page-body { padding-top: 40px; padding-bottom: 80px; }
.page-body.narrow { max-width: 860px; }
.with-toc { display: grid; gap: 40px; }
@media (min-width: 960px) { .with-toc { grid-template-columns: 240px 1fr; } .toc { position: sticky; top: 24px; align-self: start; } }
.toc { border-top: 3px solid var(--navy-800); background: var(--bg-alt); padding: 16px 20px 18px; }
.toc h2 { font-size: .86rem; letter-spacing: .04em; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; font-size: .93rem; }
.toc li { border-bottom: 1px solid var(--line); }
.toc li:last-child { border-bottom: 0; }
.toc a { display: block; padding: 7px 0; color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.toc a.is-current { color: var(--ink); font-weight: 800; box-shadow: inset 3px 0 0 var(--gold); padding-left: 10px; }
.doc { min-width: 0; }
.doc-section { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.doc-section:last-of-type { border-bottom: 0; }
.doc-section h2 { padding-bottom: .4em; border-bottom: 2px solid var(--ink); }
.points { padding-left: 1.2em; }
.points li { margin-bottom: .45em; }
.points li::marker { color: var(--gold-dark); }
.history-note { background: var(--bg-alt); border-left: 4px solid var(--navy-700); padding: 14px 18px; color: var(--ink-2); font-size: .94rem; }
.history-note strong { color: var(--ink); margin-right: 8px; }
.notice { border: 1px solid var(--line); border-left: 4px solid var(--red); padding: 14px 18px; color: var(--ink-2); font-size: .9rem; background: var(--surface); }

.table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
caption { text-align: left; padding: 12px 14px; font-weight: 800; color: var(--ink); border-bottom: 1px solid var(--line); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy-800); color: #fff; font-size: .82rem; font-weight: 700; white-space: nowrap; border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--bg-alt); }
tbody th { font-weight: 800; color: var(--ink); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
.gen-table td:last-child { min-width: 16em; }

.figure { margin: 8px 0 24px; padding: 20px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.figure-svg { width: min(340px, 100%); height: auto; }
.figure-svg .v { fill: var(--bg-alt); stroke: var(--ink-2); stroke-width: 1.2; }
.figure-svg .v.end { fill: var(--surface); stroke: var(--gold-dark); stroke-width: 2.2; }
.figure-svg .ep { stroke: var(--navy-500); stroke-width: 2; stroke-dasharray: 5 4; }
.figure-svg .lbl { fill: var(--muted); font: 13px var(--sans); }
.figure-svg .lbl.strong { fill: var(--ink); font-weight: 800; font-size: 15px; }

/* filters */
.filter ul { list-style: none; display: flex; flex-wrap: wrap; padding: 0; margin: 0 0 32px; border-bottom: 1px solid var(--line-strong); }
.filter a { display: inline-block; padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-size: .9rem; font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.filter a:hover { color: var(--ink); background: var(--bg-alt); }
.filter a.is-active { color: var(--ink); border-bottom-color: var(--navy-800); }
@media (prefers-color-scheme: dark) { .filter a.is-active { border-bottom-color: var(--gold); } }

/* timeline */
.era { margin-bottom: 56px; }
.era[hidden] { display: none; }
.era-head { margin-bottom: 8px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.era-head p { max-width: 52em; }
.era-head h2 { margin-bottom: .3em; }
.era-head p:last-child { color: var(--ink-2); margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
@media (min-width: 720px) { .timeline li { grid-template-columns: 140px 1fr; gap: 24px; } }
.timeline li.key .year { color: var(--red); }
.timeline li.key .year::after { content: "주요"; display: inline-block; margin-left: 8px; font-size: .7rem; font-weight: 800; color: #fff; background: var(--red); padding: 1px 6px; vertical-align: 2px; }
@media (prefers-color-scheme: dark) { .timeline li.key .year { color: #f08a99; } }
.timeline li:target { background: var(--bg-alt); box-shadow: inset 4px 0 0 var(--gold); padding-left: 12px; }
.timeline .year { font-weight: 800; color: var(--navy-700); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .timeline .year { color: var(--gold); } }
.timeline h3 { margin-bottom: .25em; }
.timeline p { color: var(--ink-2); margin: 0 0 .3em; font-size: .95rem; }
.tl-links { display: flex; gap: 16px; font-size: .84rem; font-weight: 700; }
.timeline.compact li { padding: 10px 0; }
.timeline.compact h3 { font-size: 1rem; margin: 0; }

/* profile */
.profile { display: grid; gap: 40px; }
@media (min-width: 900px) { .profile { grid-template-columns: 300px 1fr; } .facts { position: sticky; top: 24px; align-self: start; } }
.facts { border: 1px solid var(--line); border-top: 4px solid var(--navy-800); background: var(--surface); padding: 4px 20px; }
.facts dl { margin: 0; }
.facts div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border: 0; }
.facts dt { font-size: .76rem; color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; font-weight: 700; }
.profile-main section { margin-bottom: 32px; }
.profile-main h2 { font-size: 1.3rem; padding-bottom: .4em; border-bottom: 2px solid var(--ink); }
.refs { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 12px; font-size: .9rem; }
.refs h3 { font-size: .92rem; }
.refs ul { padding-left: 1.2em; margin: 0; }
.refs a { color: var(--ink-2); }
.pager { grid-column: 1 / -1; border-top: 2px solid var(--ink); padding-top: 20px; }
.pager ul { list-style: none; display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; padding: 0; margin: 0; align-items: center; }
.pager .next { text-align: right; }
.pager a { text-decoration: none; font-weight: 800; color: var(--ink); }
.pager a:hover { text-decoration: underline; }
.pager small { display: block; font-weight: 600; color: var(--muted); font-size: .76rem; }

/* glossary */
.glossary-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 28px; }
.glossary-tools label { font-weight: 800; }
.glossary-tools input, .search-big input { font: inherit; padding: 11px 14px; border: 1px solid var(--line-strong); border-bottom: 2px solid var(--ink-2); background: var(--surface); color: var(--ink); min-width: 0; flex: 1; max-width: 440px; }
.glossary { display: grid; gap: 0 32px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin: 0; }
.glossary > div { border-bottom: 1px solid var(--line); padding: 16px 0; }
.glossary > div[hidden] { display: none; }
.glossary > div:target { background: var(--bg-alt); box-shadow: inset 4px 0 0 var(--gold); padding-left: 12px; }
.glossary dt { font-weight: 800; font-size: 1.04rem; }
.glossary dd { margin: 4px 0 0; color: var(--ink-2); font-size: .93rem; }
.empty { color: var(--muted); }

/* references */
.ref-group { margin-bottom: 36px; }
.ref-group h2 { font-size: 1.15rem; padding-bottom: .4em; border-bottom: 2px solid var(--ink); }
.ref-list { padding-left: 1.6em; }
.ref-list li { margin-bottom: .6em; font-size: .94rem; }
.ref-list li:target { background: var(--bg-alt); box-shadow: -8px 0 0 var(--bg-alt), inset 3px 0 0 var(--gold); }

/* search */
.search-big { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 28px; }
.search-big label { width: 100%; font-weight: 800; }
.search-big .btn { margin: 0; }
.results { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.results li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.results h2 { font-size: 1.12rem; margin-bottom: .3em; }
.results p:last-child { color: var(--ink-2); margin: 0; font-size: .95rem; }

/* footer */
.site-footer { background: var(--navy-900); border-top: 4px solid var(--gold); padding: 48px 0 0; font-size: .88rem; color: #b3bfce; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 36px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { font-weight: 800; font-size: 1.08rem; color: #fff; }
.site-footer h2 { font-size: .78rem; letter-spacing: .08em; color: #fff; padding-bottom: 8px; border-bottom: 1px solid var(--navy-700); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #c9d3df; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-note { background: var(--navy-950); max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 16px; color: #8e9bad; font-size: .8rem; }
.footer-note p { margin: 0; max-width: 64em; }
@media (min-width: 1264px) { .footer-note { padding-left: calc((100% - var(--wrap)) / 2 + 32px); padding-right: calc((100% - var(--wrap)) / 2 + 32px); } }

@media print {
  .utility, .site-header, .site-footer, .filter, .toc, .pager, .search-mini { display: none !important; }
  body { background: #fff; color: #000; }
  .page-hero, .hero { background: #fff; color: #000; }
  .page-hero h1, .hero h1 { color: #000; }
}

@media (max-width: 719px) {
  .filter ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .filter ul::-webkit-scrollbar { display: none; }
  .filter a { white-space: nowrap; }
}
