:root {
  --ink: #07111f;
  --ink-soft: #253247;
  --paper: #f3f1e9;
  --paper-light: #fbfaf6;
  --rule: rgba(7, 17, 31, 0.14);
  --indigo: #605bf6;
  --indigo-dark: #443edc;
  --cyan: #41d6c3;
  --lime: #d8f35a;
  --orange: #ff9b62;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; background: var(--lime); padding: 10px 16px; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  padding: 17px max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(255,255,255,.13);
  color: #fff;
  background: rgba(7,17,31,.91);
  backdrop-filter: blur(15px);
}
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 800; letter-spacing: -.04em; }
.wordmark-mark { display: flex; align-items: end; gap: 3px; width: 23px; height: 21px; transform: skewY(-12deg); }
.wordmark-mark i { display: block; flex: 1; border-radius: 2px 2px 0 0; background: var(--lime); }
.wordmark-mark i:nth-child(1) { height: 42%; }
.wordmark-mark i:nth-child(2) { height: 74%; }
.wordmark-mark i:nth-child(3) { height: 100%; }
.site-header nav { display: flex; gap: 34px; font-size: 13px; font-weight: 600; }
.site-header nav a { color: rgba(255,255,255,.68); transition: color .2s; }
.site-header nav a:hover { color: #fff; }
.nav-github { justify-self: end; font-size: 13px; font-weight: 700; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 900px;
  padding: 120px max(24px, calc((100vw - var(--max)) / 2)) 0;
  color: #fff;
  background:
    linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px),
    var(--ink);
  background-size: 54px 54px;
}
.hero-glow { position: absolute; width: 850px; height: 600px; top: -290px; left: 50%; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(96,91,246,.35), transparent 65%); pointer-events: none; }
.eyebrow, .section-index { position: relative; font-family: var(--mono); text-transform: uppercase; font-size: 11px; letter-spacing: .15em; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 10px; color: rgba(255,255,255,.61); }
.eyebrow span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 16px var(--lime); }
.hero h1 { position: relative; max-width: 1050px; margin: 26px auto 24px; font-size: clamp(66px, 8.5vw, 126px); line-height: .9; text-align: center; letter-spacing: -.075em; }
.hero h1 em { color: var(--lime); font-style: normal; }
.hero-copy { position: relative; max-width: 790px; margin: 0 auto; color: rgba(255,255,255,.68); text-align: center; font-size: 18px; line-height: 1.7; }
.hero-actions { position: relative; display: flex; justify-content: center; gap: 12px; margin: 35px 0 30px; }
.button { display: inline-flex; align-items: center; gap: 12px; padding: 13px 20px; border: 1px solid rgba(255,255,255,.18); border-radius: 4px; font-size: 13px; font-weight: 700; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { border-color: var(--lime); color: var(--ink); background: var(--lime); }
.button-secondary { color: #fff; background: rgba(255,255,255,.055); }
.paper-meta { position: relative; margin-bottom: 48px; text-align: center; font-size: 13px; line-height: 1.35; }
.paper-meta p { margin: 4px; }
.paper-meta p:last-child { color: rgba(255,255,255,.5); }

.hero-visual { position: relative; display: grid; grid-template-columns: 1fr 190px 1fr; align-items: center; min-height: 270px; max-width: 1030px; margin: 0 auto; }
.route-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.route-lines path { fill: none; stroke: rgba(216,243,90,.42); stroke-width: 1.5; stroke-dasharray: 5 7; animation: dash 10s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -96; } }
.environment { position: relative; z-index: 2; min-height: 170px; padding: 22px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; background: rgba(255,255,255,.035); backdrop-filter: blur(5px); }
.environment-label { display: block; margin-bottom: 28px; color: rgba(255,255,255,.46); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.candidate-row { display: flex; gap: 9px; }
.candidate { width: 35px; height: 35px; border: 1px solid rgba(255,255,255,.18); border-radius: 5px; background: rgba(255,255,255,.08); }
.candidate::after { content: ""; display: block; width: 13px; height: 13px; margin: 10px; border-radius: 50%; background: var(--candidate, var(--cyan)); }
.candidate.b, .candidate.e { --candidate: var(--orange); }
.candidate.c, .candidate.g { --candidate: var(--lime); }
.candidate.d { --candidate: #9b91ff; }
.candidate.f { --candidate: #6fc5ff; }
.task-lines { display: grid; gap: 7px; margin-top: 22px; }
.task-lines i { display: block; height: 2px; width: 80%; background: rgba(255,255,255,.09); }
.task-lines i:nth-child(2) { width: 58%; }.task-lines i:nth-child(3) { width: 70%; }.task-lines i:nth-child(4) { width: 42%; }
.route-core { position: relative; z-index: 3; display: grid; place-items: center; width: 126px; height: 126px; margin: auto; border-radius: 50%; background: var(--indigo); box-shadow: 0 0 70px rgba(96,91,246,.5); }
.core-orbit { position: absolute; border: 1px solid rgba(216,243,90,.28); border-radius: 50%; }
.orbit-one { inset: -19px; }.orbit-two { inset: -39px; opacity: .55; }
.core-label { text-align: center; line-height: 1.2; }
.core-label span { display: block; color: rgba(255,255,255,.5); font-family: var(--mono); font-size: 8px; letter-spacing: .15em; text-transform: uppercase; }
.core-label strong { font-size: 17px; }
.link-rail { display: grid; grid-template-columns: repeat(5, 1fr); max-width: var(--max); margin: 45px auto 0; border-top: 1px solid rgba(255,255,255,.12); border-left: 1px solid rgba(255,255,255,.12); }
.link-rail a { padding: 18px 20px; border-right: 1px solid rgba(255,255,255,.12); transition: background .2s; }
.link-rail a:hover { background: rgba(255,255,255,.06); }
.link-rail span, .link-rail strong { display: block; }
.link-rail span { color: rgba(255,255,255,.4); font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .14em; }
.link-rail strong { margin-top: 3px; font-size: 12px; }

.section { padding: 110px max(24px, calc((100vw - var(--max)) / 2)); border-bottom: 1px solid var(--rule); }
.section-index { padding-bottom: 20px; border-bottom: 1px solid var(--rule); color: #6b7280; }
.thesis-grid, .section-heading, .start-grid, .citation-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 90px; align-items: start; margin-top: 58px; }
.section h2 { margin: 0; font-size: clamp(42px, 5vw, 72px); line-height: 1.04; letter-spacing: -.055em; }
.thesis-grid > div p:first-child { margin-top: 0; }
.large-copy { font-size: 22px; line-height: 1.5; letter-spacing: -.02em; }
.thesis-grid p:not(.large-copy), .section-heading p, .start-grid p, .citation p { color: #536075; }
.paper-figure { margin: 75px 0 0; padding: 26px; border: 1px solid var(--rule); background: var(--paper-light); }
.paper-figure img { width: 100%; }
.paper-figure figcaption { margin-top: 18px; color: #6b7280; font-family: var(--mono); font-size: 10px; }

.method { color: #fff; background: #0b1627; }
.method .section-index { border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.45); }
.section-heading { align-items: end; }
.section-heading p { max-width: 500px; margin: 0 0 4px; }
.method .section-heading p { color: rgba(255,255,255,.55); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 70px; border-top: 1px solid rgba(255,255,255,.15); border-left: 1px solid rgba(255,255,255,.15); }
.steps article { min-height: 315px; padding: 20px; border-right: 1px solid rgba(255,255,255,.15); border-bottom: 1px solid rgba(255,255,255,.15); }
.step-number { color: rgba(255,255,255,.35); font-family: var(--mono); font-size: 10px; }
.step-icon { position: relative; width: 95px; height: 70px; margin: 42px 0 33px; }
.step-icon i { position: absolute; display: block; }
.observation-icon i { width: 44px; height: 13px; border: 1px solid var(--cyan); border-radius: 8px; }
.observation-icon i:nth-child(1) { top: 2px; left: 3px; }.observation-icon i:nth-child(2) { top: 27px; left: 24px; border-color: var(--orange); }.observation-icon i:nth-child(3) { top: 52px; left: 45px; border-color: var(--lime); }
.profile-icon i { width: 13px; bottom: 0; background: var(--indigo); }.profile-icon i:nth-child(1) { height: 26px; left: 5px; }.profile-icon i:nth-child(2) { height: 47px; left: 28px; background: #7c76ff; }.profile-icon i:nth-child(3) { height: 64px; left: 51px; background: var(--cyan); }.profile-icon i:nth-child(4) { height: 38px; left: 74px; background: var(--lime); }
.compare-icon i { width: 48px; height: 48px; top: 11px; border: 1px solid var(--cyan); border-radius: 50%; }.compare-icon i:nth-child(2) { left: 29px; border-color: var(--orange); }.compare-icon i:nth-child(3) { width: 6px; height: 6px; top: 32px; left: 48px; border: 0; background: var(--lime); }
.route-icon i:first-child { left: 2px; top: 33px; width: 78px; height: 1px; background: var(--lime); }.route-icon i:first-child::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 1px solid var(--lime); border-right: 1px solid var(--lime); transform: rotate(45deg); }.route-icon i:last-child { right: 4px; top: 20px; width: 27px; height: 27px; border-radius: 50%; background: var(--indigo); }
.steps h3 { margin: 0 0 10px; font-size: 19px; }
.steps p { margin: 0; color: rgba(255,255,255,.49); font-size: 13px; line-height: 1.6; }
.figure-dark { border-color: rgba(255,255,255,.12); background: #111e31; }
.figure-dark figcaption { color: rgba(255,255,255,.42); }

.results { background: #e9e6db; }
.result-heading { grid-template-columns: 1.3fr .7fr; }
.result-grid { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr; gap: 1px; margin-top: 70px; background: var(--rule); border: 1px solid var(--rule); }
.metric-card { min-height: 300px; padding: 28px; background: var(--paper-light); }
.metric-card > span { display: block; min-height: 42px; color: #687286; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.metric-card strong { display: block; margin: 20px 0 25px; font-size: clamp(55px, 6vw, 82px); line-height: 1; letter-spacing: -.075em; }
.primary-metric strong { color: var(--indigo-dark); }
.metric-card small { display: block; margin-top: 18px; color: #6b7280; }
.metric-bar { height: 5px; background: #e0dfd9; }
.metric-bar i { display: block; width: var(--value); height: 100%; background: var(--ink); }
.primary-metric .metric-bar i { background: var(--indigo); }
.delta-card { color: #fff; background: var(--indigo); }
.delta-card > span, .delta-card small { color: rgba(255,255,255,.68); }
.delta-card strong { margin-top: 58px; color: var(--lime); }
.result-note { max-width: 760px; margin: 30px 0 0 auto; color: #6b7280; font-size: 12px; }

.demo { background: var(--paper-light); }
.demo-frame-wrap { overflow: hidden; margin-top: 65px; border: 1px solid var(--rule); border-radius: 7px; background: #fff; box-shadow: 0 25px 75px rgba(14,24,41,.12); }
.demo-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 18px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 10px; }
.demo-toolbar div { display: flex; align-items: center; gap: 8px; color: #667085; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #36bd88; box-shadow: 0 0 0 3px rgba(54,189,136,.13); }
.demo-toolbar a { font-weight: 500; }
.demo-frame-wrap iframe { display: block; width: 100%; min-height: 850px; border: 0; background: #fff; }
.demo-fallback { padding: 20px; }
.demo-note { max-width: 850px; margin: 24px auto 0; color: #737b88; text-align: center; font-size: 12px; }

.start { color: #fff; background: var(--ink); }
.start .section-index { border-color: rgba(255,255,255,.13); color: rgba(255,255,255,.42); }
.start-grid p { max-width: 470px; color: rgba(255,255,255,.53); }
.start-links { display: flex; gap: 25px; margin-top: 30px; font-size: 13px; font-weight: 700; }
.start-links a { border-bottom: 1px solid rgba(255,255,255,.3); }
.terminal { overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; background: #0d1b2f; box-shadow: 0 30px 70px rgba(0,0,0,.25); }
.terminal-top { display: flex; align-items: center; gap: 6px; padding: 13px; border-bottom: 1px solid rgba(255,255,255,.1); }
.terminal-top i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.2); }
.terminal-top span { margin-left: 8px; color: rgba(255,255,255,.35); font-family: var(--mono); font-size: 9px; }
.terminal pre, .bibtex-wrap pre { overflow-x: auto; margin: 0; padding: 28px; color: #dbe5f5; font-family: var(--mono); font-size: 12px; line-height: 1.85; }
.code-muted { color: #63728b; }.code-accent, .code-string { color: var(--lime); }.code-keyword { color: #9d98ff; }

.citation { background: #dedbd0; }
.citation-grid { grid-template-columns: .7fr 1.3fr; }
.bibtex-wrap { position: relative; border: 1px solid var(--rule); background: var(--paper-light); }
.bibtex-wrap pre { color: #263247; white-space: pre-wrap; }
.copy-button { position: absolute; top: 13px; right: 13px; padding: 7px 10px; border: 1px solid var(--rule); border-radius: 3px; color: var(--ink); background: #fff; font: 10px var(--mono); cursor: pointer; }

footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; padding: 32px max(24px, calc((100vw - var(--max)) / 2)); color: rgba(255,255,255,.62); background: #050c16; font-size: 11px; }
footer p { margin: 0; text-align: center; }
footer > div:last-child { display: flex; justify-content: end; gap: 22px; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }.site-header nav { display: none; }
  .hero { padding-top: 90px; }.hero h1 { font-size: clamp(58px, 14vw, 95px); }
  .hero-visual { grid-template-columns: 1fr; gap: 70px; }.route-core { grid-row: 2; }.route-lines { display: none; }
  .link-rail { grid-template-columns: repeat(2,1fr); }
  .thesis-grid, .section-heading, .start-grid, .citation-grid { grid-template-columns: 1fr; gap: 30px; }
  .steps { grid-template-columns: repeat(2,1fr); }
  .result-grid { grid-template-columns: 1fr; }.metric-card { min-height: 240px; }
  .demo-frame-wrap iframe { min-height: 1000px; }
}

@media (max-width: 560px) {
  .site-header { padding: 14px 18px; }.nav-github { font-size: 11px; }
  .hero, .section { padding-left: 18px; padding-right: 18px; }
  .hero { min-height: 0; padding-bottom: 0; }.hero h1 { letter-spacing: -.06em; }
  .hero-copy { font-size: 15px; }.hero-actions { flex-direction: column; }.button { justify-content: center; }
  .link-rail { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }.steps article { min-height: 260px; }
  .paper-figure { margin-left: -8px; margin-right: -8px; padding: 10px; }
  .demo-frame-wrap { margin-left: -10px; margin-right: -10px; }.demo-frame-wrap iframe { min-height: 1120px; }
  footer { grid-template-columns: 1fr; text-align: center; }footer > div:last-child { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
