@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Mono:wght@300;400;500&display=swap');

:root {
  --bg:       #040608;
  --bg-mid:   #080c12;
  --bg-card:  rgba(255,255,255,.025);
  --electric: #00d4ff;
  --elec-dim: #0090b8;
  --white:    #f0f4f8;
  --silver:   #c0ccd8;
  --muted:    #607080;
  --border:   rgba(0,212,255,.1);
  --border2:  rgba(255,255,255,.06);
  --cyan-glow: 0 0 24px rgba(0,212,255,.15);
  --amber:    #c8a040;
  --amber-lt: #e8c060;
  --red:      #c04040;
  --red-lt:   #e06060;
  --green:    #40a860;
  --green-lt: #60c880;
  --violet:   #7858c0;
  --violet-lt:#9878e0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  color: var(--silver);
  font-size: 14.5px;
  line-height: 1.8;
  letter-spacing: -.01em;
}

/* Blueprint grid */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.015) 1px, transparent 1px);
  background-size: 12px 12px;
}

/* ── HEADER ── */
.site-header {
  background: linear-gradient(168deg, #02030500 0%, #050810 30%, #0a1018 60%, #0d1422 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden; position: relative;
}

.site-header::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--electric) 40%, var(--electric) 60%, transparent 100%);
  opacity: .3;
}

.header-inner {
  max-width: 1020px; margin: auto;
  padding: 68px 44px 60px;
  position: relative; z-index: 1;
  display: flex; gap: 48px; align-items: center;
}

.header-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10px; font-weight: 500; letter-spacing: 4px; text-transform: uppercase;
  color: var(--electric); margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.header-eyebrow::before { content: '//'; margin-right: -4px; }

.header-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(62px, 10vw, 118px);
  font-weight: 800; line-height: .85;
  letter-spacing: -4px; color: var(--white);
  margin-bottom: 22px;
  text-transform: uppercase;
}

.header-subtitle {
  font-size: 13.5px; font-weight: 300; letter-spacing: .02em;
  color: var(--muted); max-width: 500px; line-height: 1.72;
}

.header-svg { width: 150px; flex-shrink: 0; opacity: .12; }

/* ── NAV ── */
.topic-nav {
  background: rgba(4,6,8,.95); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100; backdrop-filter: blur(16px);
}
.topic-nav-inner {
  max-width: 1020px; margin: auto; padding: 0 44px;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.topic-nav-inner::-webkit-scrollbar { display: none; }
.nav-pill {
  flex-shrink: 0; padding: 13px 16px;
  font-family: 'DM Mono', monospace;
  font-size: 10.5px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .2s; white-space: nowrap;
  background: none; border-top: none; border-left: none; border-right: none;
}
.nav-pill:hover, .nav-pill.active { color: var(--electric); border-bottom-color: var(--electric); text-shadow: 0 0 12px rgba(0,212,255,.4); }

/* ── LAYOUT ── */
.main { max-width: 1020px; margin: auto; padding: 56px 44px 90px; position: relative; z-index: 1; }
.section { margin-bottom: 68px; opacity: 0; transform: translateY(26px); transition: opacity .65s, transform .65s; }
.section.visible { opacity: 1; transform: none; }

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px; font-weight: 500; letter-spacing: 4px; text-transform: uppercase;
  color: var(--electric); margin-bottom: 12px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 700; color: var(--white); margin-bottom: 18px;
  text-transform: uppercase; letter-spacing: -.5px;
}

p { color: var(--silver); margin-bottom: 14px; font-family: 'DM Mono', monospace; font-size: 14px; }
p strong { color: var(--white); }
p em { color: var(--silver); font-style: normal; text-decoration: underline; text-decoration-color: var(--elec-dim); }

/* ── SKELETON DIAGRAM SPLIT ── */
.skel-layout { display: grid; grid-template-columns: 160px 1fr; gap: 32px; margin-top: 24px; align-items: start; }
.skel-fig { position: relative; }

.skel-region {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px;
  margin-bottom: 10px; cursor: pointer;
  transition: all .2s; position: relative;
}
.skel-region:hover, .skel-region.active {
  border-color: var(--electric); background: rgba(0,212,255,.05);
  box-shadow: var(--cyan-glow);
}
.sr-label {
  font-family: 'Syne', sans-serif;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--electric); margin-bottom: 4px;
}
.sr-count { font-family: 'DM Mono', monospace; font-size: 20px; font-weight: 500; color: var(--white); line-height: 1; }
.sr-name { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── CARDS ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 24px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border2); border-radius: 12px; padding: 22px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(0,212,255,.25); box-shadow: var(--cyan-glow); }

.card-tag {
  display: inline-block; padding: 3px 10px; border-radius: 3px;
  font-family: 'DM Mono', monospace;
  font-size: 9.5px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase;
  background: rgba(0,212,255,.1); color: var(--electric); margin-bottom: 12px; border: 1px solid var(--border);
}
.card-tag-amber  { background: rgba(200,160,64,.1); color: var(--amber-lt); border-color: rgba(200,160,64,.2); }
.card-tag-green  { background: rgba(64,168,96,.1); color: var(--green-lt); border-color: rgba(64,168,96,.2); }
.card-tag-red    { background: rgba(192,64,64,.1); color: var(--red-lt); border-color: rgba(192,64,64,.2); }
.card-tag-violet { background: rgba(120,88,192,.1); color: var(--violet-lt); border-color: rgba(120,88,192,.2); }

.card-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--white); margin-bottom: 8px; }
.card-body { font-size: 13px; color: var(--muted); line-height: 1.65; font-family: 'DM Mono', monospace; }

/* ── ARTICULATION TYPES ── */
.artic-table { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 13px; font-family: 'DM Mono', monospace; }
.artic-table th { text-align: left; padding: 11px 16px; font-size: 9.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--electric); border-bottom: 1px solid var(--border); font-weight: 500; }
.artic-table td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: top; color: var(--muted); }
.artic-table tr:hover td { background: rgba(0,212,255,.03); }
.artic-table td:first-child { color: var(--white); font-weight: 500; }

/* ── PATHO TABLE ── */
.patho-table { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 13px; font-family: 'DM Mono', monospace; }
.patho-table th { text-align: left; padding: 11px 16px; font-size: 9.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--electric); border-bottom: 1px solid var(--border); font-weight: 500; }
.patho-table td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: top; color: var(--muted); }
.patho-table tr:hover td { background: rgba(0,212,255,.03); }
.patho-table td:first-child { color: var(--white); font-weight: 500; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 10.5px; font-weight: 500; font-family: 'DM Mono', monospace; border: 1px solid; }
.badge-elec   { background: rgba(0,212,255,.1); color: var(--electric); border-color: var(--border); }
.badge-amber  { background: rgba(200,160,64,.1); color: var(--amber-lt); border-color: rgba(200,160,64,.2); }
.badge-red    { background: rgba(192,64,64,.1); color: var(--red-lt); border-color: rgba(192,64,64,.2); }
.badge-green  { background: rgba(64,168,96,.1); color: var(--green-lt); border-color: rgba(64,168,96,.2); }
.badge-violet { background: rgba(120,88,192,.1); color: var(--violet-lt); border-color: rgba(120,88,192,.2); }

.highlight-box { background: rgba(0,212,255,.05); border: 1px solid var(--border); border-radius: 10px; padding: 20px 24px; margin: 24px 0; }
.highlight-box strong { color: var(--electric); }

/* ── STATS ── */
.stats-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 52px; }
.stat-pill {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px 24px;
  display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 130px;
  position: relative; overflow: hidden;
}
.stat-pill::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--electric); }
.stat-num { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; color: var(--electric); line-height: 1; text-shadow: 0 0 20px rgba(0,212,255,.3); }
.stat-label { font-size: 11px; color: var(--muted); font-family: 'DM Mono', monospace; }

/* ── GROWTH TIMELINE ── */
.timeline { margin-top: 24px; display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--border); padding-left: 24px; margin-left: 8px; }
.t-item { padding: 14px 0; position: relative; }
.t-item::before { content: ''; position: absolute; left: -31px; top: 20px; width: 10px; height: 10px; border-radius: 50%; background: var(--electric); box-shadow: 0 0 8px rgba(0,212,255,.5); }
.t-age { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: var(--electric); margin-bottom: 4px; }
.t-event { font-size: 13px; color: var(--silver); }
.t-detail { font-size: 12px; color: var(--muted); margin-top: 3px; }

footer { text-align: center; padding: 28px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--border); position: relative; z-index: 1; font-family: 'DM Mono', monospace; }

@media (max-width: 680px) {
  .header-inner { flex-direction: column; padding: 40px 22px; gap: 20px; }
  .header-svg { display: none; }
  .main { padding: 30px 22px 60px; }
  .topic-nav-inner { padding: 0 22px; }
  .skel-layout { grid-template-columns: 1fr; }
}
