:root {
  --bg: #07090d;
  --bg-2: #0c1016;
  --panel: #10151d;
  --panel-2: #151b25;
  --ink: #ecebe6;
  --ink-2: #a9afba;
  --ink-3: #6c7380;
  --rule: #1f2733;
  --ssd: #ff7a2f;
  --ssd-soft: rgba(255, 122, 47, 0.14);
  --gauss: #5aa2ff;
  --gauss-soft: rgba(90, 162, 255, 0.12);
  --rad: #ffc14d;
  --rep: #b48cff;
  --score: #3ee6c1;
  --wire: rgba(236, 235, 230, 0.28);
  --wire-back: rgba(236, 235, 230, 0.07);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration-color: var(--ssd); text-underline-offset: 3px; }
a:hover { color: var(--ssd); }
img { max-width: 100%; display: block; }
b, strong { font-weight: 600; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  background: rgba(7, 9, 13, 0.6); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 54px; }
.brand { font-family: var(--serif); font-size: 26px; text-decoration: none; }
.brand span { color: var(--ssd); }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: 14px; }
.nav ul a { text-decoration: none; color: var(--ink-2); }
.nav ul a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav ul { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 96px 0 56px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 72% 50%, rgba(255,122,47,0.16), transparent 70%),
    radial-gradient(40% 40% at 15% 85%, rgba(90,162,255,0.08), transparent 70%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: center; width: 100%; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; } .hero { min-height: 0; } }
.venue {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ssd);
  border: 1px solid rgba(255,122,47,.5); border-radius: 999px; padding: 5px 14px;
}
.venue-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.venue-logo { display: inline-flex; align-items: center; background: #f4f2ee; border-radius: 12px; padding: 4px 12px; }
.venue-logo img { height: 58px; width: auto; display: block; }
@media (max-width: 560px) { .venue-logo img { height: 46px; } }
.venue::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ssd); box-shadow: 0 0 10px var(--ssd); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.hero h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 6.2vw, 76px);
  line-height: 1.0; letter-spacing: -0.01em; margin: 22px 0 18px;
}
.hero h1 em { color: var(--ssd); font-style: italic; }
.hero .sub { font-size: 20px; color: var(--ink-2); margin: 0 0 26px; max-width: 30em; }
.authors { font-size: 15.5px; margin: 0 0 4px; }
.authors sup, .affils sup { color: var(--ink-3); font-size: 10px; }
.affils { font-size: 13.5px; color: var(--ink-3); margin: 0 0 30px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-size: 15px; font-weight: 500;
  border: 1px solid var(--ink); transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.btn:hover { transform: translateY(-2px); background: var(--ssd); border-color: var(--ssd); color: #fff; }
.btn.ghost { background: rgba(255,255,255,.03); color: var(--ink); border-color: rgba(255,255,255,.16); }
.btn svg { width: 16px; height: 16px; }
.hero-viz { position: relative; width: 100%; max-width: 620px; aspect-ratio: 1; justify-self: center; }
.hero-viz svg { width: 100%; height: 100%; display: block; }
.hero-cap {
  position: absolute; left: 0; right: 0; bottom: 4%; text-align: center;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); letter-spacing: .04em;
}
.hero-cap b { color: var(--ssd); font-weight: 500; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none;
}
.scroll-cue::after { content: ""; width: 1px; height: 28px; background: linear-gradient(var(--ink-3), transparent); animation: drip 1.8s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 920px) { .scroll-cue { display: none; } }

/* ---------- sections ---------- */
section { padding: 96px 0; position: relative; }
section + section { border-top: 1px solid var(--rule); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ssd); margin: 0 0 12px; }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.05; margin: 0 0 16px; }
h2 em { color: var(--ssd); }
.lede { font-size: 19px; color: var(--ink-2); margin: 0 0 8px; }
p { margin: 0 0 14px; }
.muted { color: var(--ink-3); font-size: 14px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; margin-top: 8px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }
.stats > div { background: var(--bg-2); padding: 28px 26px; }
.stats .num { font-family: var(--serif); font-size: 64px; line-height: 1; color: var(--ink); }
.stats .num small { font-size: 28px; color: var(--ssd); margin-left: 4px; }
.stats .lbl { color: var(--ink-2); font-size: 15px; margin-top: 10px; }

details.more { margin-top: 22px; border: 1px solid var(--rule); border-radius: 14px; background: var(--bg-2); }
details.more summary {
  cursor: pointer; list-style: none; padding: 14px 18px; font-size: 14.5px; color: var(--ink-2);
  display: flex; align-items: center; gap: 10px;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; font-family: var(--mono); color: var(--ssd); width: 14px; }
details.more[open] summary::before { content: "−"; }
details.more .body { padding: 0 20px 18px; color: var(--ink-2); font-size: 15.5px; }

/* ---------- stage ---------- */
.stage { margin-top: 40px; background: var(--bg-2); border: 1px solid var(--rule); border-radius: 22px; overflow: hidden; }
.stage-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule); }
.stage-tab {
  position: relative; font: inherit; color: var(--ink-3); background: transparent; border: 0; cursor: pointer;
  padding: 16px 18px 18px; text-align: left; transition: color .2s, background .2s;
}
.stage-tab + .stage-tab { border-left: 1px solid var(--rule); }
.stage-tab:hover { color: var(--ink-2); background: rgba(255,255,255,.015); }
.stage-tab .n { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; }
.stage-tab .t { display: block; font-family: var(--serif); font-size: 28px; line-height: 1.1; margin-top: 2px; }
.stage-tab[aria-selected=true] { color: var(--ink); }
.stage-tab[aria-selected=true] .n { color: var(--ssd); }
.stage-tab .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--ssd); box-shadow: 0 0 12px var(--ssd); }
@media (max-width: 640px) { .stage-tab .t { font-size: 20px; } .stage-tab { padding: 12px; } }

.stage-body { position: relative; }
.panes { display: grid; grid-template-columns: 1fr 1fr; }
.pane { position: relative; touch-action: pan-y; cursor: grab; }
.pane-switch { display: none; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.pane-switch button {
  flex: 1; font: inherit; font-size: 14px; color: var(--ink-2); background: transparent; border: 1px solid var(--rule);
  border-radius: 999px; padding: 7px 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.pane-switch button[aria-selected=true] { color: var(--ink); border-color: var(--ink-3); background: var(--panel-2); }
@media (max-width: 760px) {
  .panes { grid-template-columns: 1fr; }
  .pane { display: none; }
  .pane.active { display: block; }
  .pane + .pane { border-left: 0; }
  .pane-switch { display: flex; }
}
.pane:active { cursor: grabbing; }
.pane + .pane { border-left: 1px solid var(--rule); }
.pane svg { display: block; width: 100%; height: auto; aspect-ratio: 600 / 520; max-height: calc(100vh - 230px); user-select: none; }
.pane-label {
  position: absolute; top: 14px; left: 16px; font-size: 13px; font-weight: 600; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px; background: rgba(7,9,13,.6);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.caption {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); pointer-events: none;
  max-width: calc(100% - 28px); width: max-content; text-align: center; font-size: 15px; line-height: 1.4;
  padding: 10px 18px; border-radius: 12px; background: rgba(7,9,13,.72); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.06); transition: opacity .25s;
}
.caption .k { color: var(--ssd); }
@media (max-width: 640px) { .caption { position: static; transform: none; max-width: none; width: auto; margin: 0; border-radius: 0; border-left: 0; border-right: 0; font-size: 15px; } }

.stage-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--rule); }
.play {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  background: var(--ink); color: var(--bg); display: inline-flex; align-items: center; justify-content: center;
}
.play svg { width: 14px; height: 14px; }
.scrub { flex: 1; min-width: 160px; height: 28px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.scrub .track { position: relative; height: 4px; width: 100%; border-radius: 4px; background: var(--rule); }
.scrub .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: var(--ssd); }
.scrub .knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,122,47,.35); }
.drift-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12.5px;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-3); transition: all .25s;
}
.pill .dot { opacity: .3; transition: all .25s; background: currentColor; }
.pill.on { border-color: currentColor; }
.pill.on .dot { opacity: 1; box-shadow: 0 0 10px currentColor; }
.pill[data-k=rad].on { color: var(--rad); }
.pill[data-k=rep].on { color: var(--rep); }
.pill[data-k=score].on { color: var(--score); }

/* ---------- equation ---------- */
.eq-strip { margin-top: 28px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .eq-strip { grid-template-columns: 1fr; } }
.eq { overflow-x: auto; padding: 22px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--rule); display: flex; align-items: center; font-size: 17px; }
.eq .katex-display { margin: 0; }
.terms { display: grid; gap: 10px; }
.term { display: flex; gap: 12px; align-items: baseline; padding: 12px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--rule); font-size: 15px; color: var(--ink-2); }
.term b { color: var(--ink); white-space: nowrap; }
.term .dot { flex: none; transform: translateY(-1px); }

.ts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 800px) { .ts { grid-template-columns: 1fr; } }
.ts-card { background: var(--bg-2); border: 1px solid var(--rule); border-radius: 18px; padding: 22px 24px; }
.ts-card h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; margin: 0 0 10px; }
.ts-card p:last-child { color: var(--ink-2); font-size: 15.5px; margin: 0; }

/* ---------- why ---------- */
.why { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; margin-top: 32px; }
@media (max-width: 900px) { .why { grid-template-columns: 1fr; } }
.why-card { background: var(--bg-2); border: 1px solid var(--rule); border-radius: 20px; padding: 20px; }
.why-card #annulus-svg { width: 100%; height: auto; display: block; }
.row { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.row output { font-family: var(--mono); color: var(--ink); min-width: 4.5em; text-align: right; }
input[type=range] { flex: 1; accent-color: var(--ssd); min-width: 0; }
.why ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.why li { display: flex; gap: 14px; align-items: baseline; font-size: 17px; }
.why li .ix { font-family: var(--mono); font-size: 12px; color: var(--gauss); border: 1px solid rgba(90,162,255,.4); border-radius: 6px; padding: 1px 6px; flex: none; }

/* ---------- results ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--rule); margin: 26px 0 10px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: 14px; color: var(--ink-2); background: transparent; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.seg button[aria-selected=true] { background: var(--ink); color: var(--bg); }
.dumbbell { background: var(--bg-2); border: 1px solid var(--rule); border-radius: 20px; padding: 18px 22px 10px; }
.dumbbell #db-svg { width: 100%; height: auto; display: block; overflow: visible; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); margin: 10px 0 0; }
.legend > span { display: inline-flex; align-items: center; gap: 7px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 14px; margin: 14px 0 6px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 14px; text-align: right; white-space: nowrap; }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
thead th { font-weight: 500; font-size: 12.5px; color: var(--ink-3); border-bottom: 1px solid var(--rule); }
tbody tr + tr td { border-top: 1px solid var(--rule); }
tbody tr.ssd td { background: var(--ssd-soft); color: var(--ink); }
tbody tr.ssd td:first-child { color: var(--ssd); font-weight: 600; }
td b { color: var(--ssd); }
.ablation td:nth-child(3) { text-align: left; }
details.more h4 { color: var(--ink); font-size: 15px; margin: 18px 0 4px; font-weight: 600; }

/* ---------- figures ---------- */
.figs { display: grid; gap: 28px; margin-top: 32px; }
figure { margin: 0; }
figure img { border-radius: 14px; background: #fff; width: 100%; }
figcaption { font-size: 14.5px; color: var(--ink-2); margin-top: 10px; }
figcaption b { color: var(--ink); }

/* ---------- team ---------- */
.avatars { display: inline-flex; margin: 0 0 12px; text-decoration: none; }
.avatars img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); margin-left: -10px; transition: transform .2s; }
.avatars img:first-child { margin-left: 0; }
.avatars:hover img { transform: translateY(-3px); }
.avatars:hover img:nth-child(2) { transition-delay: .03s; } .avatars:hover img:nth-child(3) { transition-delay: .06s; }
.avatars:hover img:nth-child(4) { transition-delay: .09s; } .avatars:hover img:nth-child(5) { transition-delay: .12s; }
.people { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 36px; }
@media (max-width: 900px) { .people { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .people { grid-template-columns: repeat(2, 1fr); } }
.person { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.person img {
  width: 100%; max-width: 168px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; margin-bottom: 12px;
  box-shadow: 0 0 0 1px var(--rule), 0 0 0 6px var(--bg), 0 0 0 7px transparent;
  transition: box-shadow .3s, transform .3s;
}
.person:hover img { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--ssd), 0 0 0 6px var(--bg), 0 0 32px 6px rgba(255,122,47,.35); }
.person b { font-size: 16px; }
.person span { font-size: 13.5px; color: var(--ink-3); }
.orgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 48px; }
@media (max-width: 760px) { .orgs { grid-template-columns: repeat(2, 1fr); } }
.org {
  height: 120px; border-radius: 18px; background: #f4f2ee; display: flex; align-items: center; justify-content: center;
  padding: 18px; transition: transform .3s, box-shadow .3s;
}
.org:hover { transform: translateY(-4px); box-shadow: 0 12px 32px -8px rgba(255,122,47,.35); }
.org img { max-width: 100%; width: auto; object-fit: contain; }

/* ---------- bibtex ---------- */
pre.bib {
  position: relative; background: var(--bg-2); color: var(--ink); border: 1px solid var(--rule); border-radius: 16px;
  padding: 22px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; margin: 20px 0 0;
}
.copy { position: absolute; top: 12px; right: 12px; font: inherit; font-family: var(--sans); font-size: 12px; background: var(--panel-2); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: 5px 11px; cursor: pointer; }
.copy:hover { border-color: var(--ssd); }
footer { padding: 36px 0 56px; font-size: 13.5px; color: var(--ink-3); border-top: 1px solid var(--rule); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
  body { font-size: 16px; }
  .stage-ctrl { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .venue::before, .scroll-cue::after { animation: none; }
}
.authors a, .affils a, .person b a, .person span a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--ink-3); }
.authors a:hover, .affils a:hover, .person b a:hover, .person span a:hover { color: var(--ssd); border-color: var(--ssd); }
