:root {
  --bg: #07110f;
  --bg-soft: #0b1714;
  --surface: #10201c;
  --surface-2: #142722;
  --ink: #f2f0e8;
  --muted: #9aaca5;
  --line: rgba(217, 238, 228, 0.14);
  --lime: #c9ff52;
  --mint: #64f2bf;
  --coral: #ff8066;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 78px;
  padding: 0 4vw;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; }
.brand-mark { width: 12px; height: 12px; border: 1px solid var(--lime); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 6px var(--lime); }
.site-header nav { display: flex; gap: 30px; }
.site-header nav a, .header-link { text-decoration: none; color: #d4ded9; transition: color .2s ease; }
.site-header nav a:hover, .header-link:hover { color: var(--lime); }
.header-link { justify-self: end; }

.hero {
  position: relative;
  min-height: 94vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: center;
  gap: 8vw;
  padding: 150px 8vw 90px;
  isolation: isolate;
  background:
    radial-gradient(circle at 72% 45%, rgba(100,242,191,.13), transparent 28%),
    radial-gradient(circle at 15% 75%, rgba(201,255,82,.08), transparent 34%),
    var(--bg);
}
.hero-grid {
  position: absolute; inset: 0; z-index: -2;
  opacity: .23;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(7,17,15,.25), transparent 55%, rgba(7,17,15,.18));
}
.hero-orbit { position: absolute; border: 1px solid rgba(201,255,82,.16); border-radius: 50%; z-index: -1; }
.orbit-one { width: 650px; height: 650px; right: -210px; top: 10%; animation: orbit 18s linear infinite; }
.orbit-two { width: 360px; height: 360px; right: 8%; top: 28%; border-color: rgba(100,242,191,.18); animation: orbit 12s linear infinite reverse; }
@keyframes orbit { to { transform: rotate(360deg); } }

.hero-content { max-width: 760px; animation: rise .8s both; }
.eyebrow, .kicker { margin: 0 0 26px; color: var(--mint); font: 400 12px/1.4 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.eyebrow span { color: var(--lime); }
h1 { margin: 0; max-width: 750px; font-size: clamp(64px, 8.5vw, 142px); line-height: .86; letter-spacing: -.075em; font-weight: 700; }
.hero-copy { max-width: 625px; margin: 36px 0 0; color: #bac9c3; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.65; }
.hero-actions { display: flex; gap: 14px; margin-top: 40px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; text-decoration: none; font-size: 13px; font-weight: 700; }
.button-primary { color: #10160d; background: var(--lime); }
.button-primary:hover { background: #ddff89; }
.button-quiet { border: 1px solid var(--line); color: #d4ded9; }
.button-quiet:hover { border-color: var(--mint); }

.hero-signal { align-self: end; width: min(100%, 520px); margin-bottom: 3vh; border-top: 1px solid var(--mint); background: rgba(8,22,18,.72); backdrop-filter: blur(12px); animation: rise .8s .16s both; }
.signal-topline { display: flex; justify-content: space-between; padding: 16px 0; color: var(--muted); font: 400 11px var(--mono); text-transform: uppercase; }
.status { color: var(--mint); }
.status i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); }
.signal-wave { height: 154px; display: flex; align-items: end; gap: 6px; padding: 12px 0 20px; border-bottom: 1px solid var(--line); }
.signal-wave span { flex: 1; height: var(--h); background: linear-gradient(to top, rgba(100,242,191,.05), var(--mint)); transform-origin: bottom; animation: pulse 2.7s ease-in-out infinite alternate; }
.signal-wave span:nth-child(3n) { animation-delay: -.9s; }
.signal-wave span:nth-child(4n) { animation-delay: -1.5s; }
@keyframes pulse { to { transform: scaleY(.55); opacity: .5; } }
.signal-line { margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); color: #bdcac5; font: 400 11px/1.3 var(--mono); }
.signal-line span { display: inline-block; width: 48px; color: #647970; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.metric-strip { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-strip div { min-height: 158px; display: flex; flex-direction: column; justify-content: center; padding: 30px 4vw; border-right: 1px solid var(--line); }
.metric-strip div:last-child { border: 0; }
.metric-strip strong { font-size: clamp(32px,4vw,58px); line-height: 1; letter-spacing: -.05em; }
.metric-strip span { margin-top: 10px; color: var(--muted); font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }

.section { padding: 130px 8vw; }
.section-intro { display: grid; grid-template-columns: .6fr 1.4fr 1fr; gap: 4vw; align-items: start; margin-bottom: 80px; }
.section-intro h2, .paper-heading h2 { margin: 0; font-size: clamp(42px, 5.4vw, 78px); line-height: .98; letter-spacing: -.055em; }
.section-intro > p:last-child, .paper-heading > p { margin: 4px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }

.run-chart { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; min-height: 280px; margin-bottom: 68px; border-bottom: 1px solid var(--line); background: var(--line); }
.chart-column { position: relative; display: flex; flex-direction: column; justify-content: end; min-height: 280px; padding: 24px; background: var(--bg); cursor: pointer; transition: background .2s ease; }
.chart-column:hover, .chart-column.active { background: var(--bg-soft); }
.chart-bar { width: 100%; height: var(--bar); min-height: 10px; margin-bottom: 20px; background: linear-gradient(to top, rgba(201,255,82,.12), var(--lime)); transform-origin: bottom; animation: bar-in .8s both; }
@keyframes bar-in { from { transform: scaleY(0); } }
.chart-column strong { font: 500 25px var(--mono); }
.chart-column small { display: block; margin-top: 7px; color: var(--muted); font: 400 11px/1.4 var(--mono); }

.trace-workbench { display: grid; grid-template-columns: 310px minmax(0,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.run-list { border-right: 1px solid var(--line); padding: 20px 0; }
.run-button { width: 100%; padding: 20px 22px; border: 0; color: var(--muted); background: transparent; text-align: left; cursor: pointer; border-left: 2px solid transparent; }
.run-button span { display: block; margin-bottom: 8px; color: #60766c; font: 400 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.run-button strong { display: block; color: inherit; font-size: 14px; }
.run-button:hover { color: var(--ink); }
.run-button.active { border-left-color: var(--lime); color: var(--ink); background: rgba(201,255,82,.04); }
.trace-panel { min-width: 0; padding: 42px; background: var(--bg-soft); }
.trace-header { display: flex; justify-content: space-between; gap: 24px; }
.trace-domain { margin: 0 0 8px; color: var(--mint); font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.trace-header h3 { margin: 0; font-size: clamp(25px,3vw,40px); letter-spacing: -.04em; }
.trace-actions { display: flex; gap: 9px; flex-shrink: 0; }
.trace-actions a { height: 36px; padding: 0 13px; display: inline-flex; align-items: center; border: 1px solid var(--line); text-decoration: none; font: 400 10px var(--mono); text-transform: uppercase; }
.trace-actions a:hover { border-color: var(--lime); color: var(--lime); }
.trace-observation { max-width: 720px; margin: 22px 0 30px; color: var(--muted); line-height: 1.65; }
.usage-grid { display: grid; grid-template-columns: repeat(4,1fr); margin: 0 0 34px; border: 1px solid var(--line); }
.usage-grid div { padding: 17px; border-right: 1px solid var(--line); }
.usage-grid div:last-child { border: 0; }
.usage-grid dt { color: var(--muted); font: 400 9px var(--mono); text-transform: uppercase; }
.usage-grid dd { margin: 8px 0 0; font: 500 20px var(--mono); }
.view-tabs { display: flex; gap: 25px; border-bottom: 1px solid var(--line); }
.view-tabs button { padding: 0 0 13px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font: 400 11px var(--mono); cursor: pointer; }
.view-tabs button[aria-selected="true"] { color: var(--lime); border-bottom-color: var(--lime); }
.trace-body { min-height: 330px; max-height: 620px; overflow: auto; padding: 28px 0; scrollbar-color: #416257 transparent; }
.reasoning-item { position: relative; margin: 0 0 12px 18px; padding: 17px 20px; border-left: 1px solid var(--mint); background: rgba(100,242,191,.035); color: #d0ddd8; font: 300 13px/1.65 var(--mono); white-space: pre-wrap; }
.reasoning-item::before { content: ""; position: absolute; left: -4px; top: 23px; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.trace-pre { margin: 0; color: #c6d3ce; font: 300 12px/1.7 var(--mono); white-space: pre-wrap; word-break: break-word; }

.paper-section { background: #edf0e8; color: #101713; }
.paper-heading { display: grid; grid-template-columns: .55fr 1.45fr 1fr; gap: 4vw; align-items: start; }
.paper-heading .kicker { color: #357a62; }
.paper-heading > p { color: #56645e; }
.text-link { grid-column: 3; margin-top: 10px; color: #1a6c50; font: 500 12px var(--mono); text-decoration: none; }
.comparison { margin-top: 76px; border-top: 1px solid #aab5af; }
.comparison-row { display: grid; grid-template-columns: .6fr 1.2fr 1.2fr; border-bottom: 1px solid #c5cdc9; }
.comparison-row span { padding: 20px 22px; border-right: 1px solid #c5cdc9; font-size: 14px; line-height: 1.55; }
.comparison-row span:last-child { border: 0; }
.comparison-row span:first-child { color: #53645d; font: 400 11px/1.6 var(--mono); text-transform: uppercase; }
.comparison-head { background: #14231e; color: #eaf1ed; }
.comparison-head span:first-child { color: var(--mint); }
.comparison code, .source-notes code { font-family: var(--mono); }
.finding-grid { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 80px; border-top: 1px solid #b8c2bd; }
.finding-grid article { min-height: 320px; padding: 28px 25px; border-right: 1px solid #b8c2bd; }
.finding-grid article:last-child { border: 0; }
.finding-grid article > span { color: #498a70; font: 400 11px var(--mono); }
.finding-grid h3 { margin: 70px 0 14px; font-size: 21px; letter-spacing: -.025em; }
.finding-grid p { margin: 0; color: #5a6862; font-size: 14px; line-height: 1.7; }
.disclosure-note { display: grid; grid-template-columns: 64px 1fr; gap: 24px; margin-top: 50px; padding: 28px; color: #ffe9e4; background: #6e2e25; }
.note-mark { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #ff9a84; border-radius: 50%; font: 500 20px var(--mono); }
.disclosure-note strong { font-size: 17px; }
.disclosure-note p { max-width: 950px; margin: 7px 0 0; color: #ffc8bb; line-height: 1.65; }

.method-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 8vw; align-items: center; }
.method-steps { counter-reset: method; }
.method-steps > div { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.method-steps b { color: var(--mint); font: 400 12px var(--mono); }
.method-steps p { margin: 0; color: var(--muted); line-height: 1.6; }
.method-steps strong { color: var(--ink); }
.code-window { border: 1px solid var(--line); background: #050c0a; box-shadow: 0 28px 80px rgba(0,0,0,.24); }
.code-title { display: flex; align-items: center; gap: 7px; height: 43px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.code-title span { width: 8px; height: 8px; border-radius: 50%; background: #375048; }
.code-title span:first-child { background: var(--coral); }
.code-title em { margin-left: auto; color: #60786e; font: normal 10px var(--mono); }
.code-window pre { margin: 0; padding: 34px; overflow-x: auto; color: #c9e3d8; font: 300 12px/1.9 var(--mono); }
.code-window a { display: block; padding: 16px 34px; border-top: 1px solid var(--line); color: var(--lime); font: 400 11px var(--mono); text-decoration: none; }
.source-notes { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 100px; background: var(--line); }
.source-notes > div { padding: 30px; background: var(--bg); }
.source-notes h3 { margin: 0 0 14px; font-size: 18px; }
.source-notes p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.references { padding: 90px 8vw; border-top: 1px solid var(--line); background: var(--bg-soft); }
.references h2 { margin: 0 0 35px; font-size: 28px; }
.references ol { max-width: 1040px; margin: 0; padding-left: 22px; color: var(--muted); }
.references li { padding: 10px 0 10px 14px; line-height: 1.7; }
.references a { color: var(--mint); text-underline-offset: 3px; }
footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 120px; padding: 30px 4vw; border-top: 1px solid var(--line); color: var(--muted); font: 400 11px var(--mono); }
footer p { margin: 0; text-align: center; }
footer > a { justify-self: end; color: var(--lime); text-decoration: none; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 140px; }
  .hero-signal { align-self: auto; margin-top: 40px; }
  .section-intro, .paper-heading { grid-template-columns: 1fr; }
  .section-intro > p:last-child, .paper-heading > p, .text-link { max-width: 680px; grid-column: 1; }
  .trace-workbench { grid-template-columns: 1fr; }
  .run-list { display: grid; grid-template-columns: repeat(4,1fr); border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .run-button { min-width: 180px; }
  .finding-grid { grid-template-columns: repeat(2,1fr); }
  .finding-grid article:nth-child(2) { border-right: 0; }
  .method-layout { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-header { min-height: 64px; padding: 0 20px; }
  .header-link { font-size: 0; }
  .header-link::after { content: "SOURCE ↘"; font-size: 10px; }
  .hero { min-height: 0; padding: 120px 22px 70px; gap: 20px; }
  h1 { font-size: clamp(58px, 20vw, 82px); }
  .hero-copy { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-signal { width: 100%; }
  .metric-strip { grid-template-columns: repeat(2,1fr); }
  .metric-strip div { min-height: 120px; padding: 24px 20px; }
  .metric-strip div:nth-child(2) { border-right: 0; }
  .metric-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section { padding: 90px 22px; }
  .section-intro { margin-bottom: 55px; }
  .run-chart { grid-template-columns: repeat(8, 150px); overflow-x: auto; }
  .trace-panel { padding: 28px 20px; }
  .trace-header { flex-direction: column; }
  .usage-grid { grid-template-columns: repeat(2,1fr); }
  .usage-grid div:nth-child(2) { border-right: 0; }
  .usage-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .comparison { overflow-x: auto; }
  .comparison-row { min-width: 780px; }
  .finding-grid { grid-template-columns: 1fr; }
  .finding-grid article { min-height: auto; border-right: 0; border-bottom: 1px solid #b8c2bd; }
  .finding-grid h3 { margin-top: 35px; }
  .disclosure-note { grid-template-columns: 1fr; }
  .source-notes { grid-template-columns: 1fr; }
  .code-window pre { padding: 24px 20px; font-size: 10px; }
  .references { padding: 70px 22px; }
  footer { grid-template-columns: 1fr; gap: 18px; padding: 30px 22px; text-align: center; }
  footer .brand, footer > a { justify-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
