:root {
  --ink: #f4f7fb;
  --muted: #9aa9ba;
  --dim: #65778a;
  --bg: #07111f;
  --bg-deep: #040b14;
  --panel: #0c1929;
  --panel-raised: #112236;
  --line: rgba(148, 177, 202, 0.18);
  --mint: #43e6c7;
  --mint-soft: #9af3e2;
  --coral: #ff8b5e;
  --blue: #8ea7ff;
  --max: 1180px;
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -5%, rgba(67, 230, 199, 0.08), transparent 28rem),
    radial-gradient(circle at 90% 16%, rgba(142, 167, 255, 0.07), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 15px;
  color: var(--bg-deep);
  background: var(--mint);
  border-radius: 8px;
  font-weight: 800;
}

.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease, backdrop-filter 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(7, 17, 31, 0.84);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  font-size: 14px;
  letter-spacing: 0.035em;
}

.brand strong { color: var(--mint); }

.brand-mark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  width: 36px;
  height: 22px;
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  height: 1px;
  background: linear-gradient(90deg, var(--coral), var(--mint), var(--blue));
}

.brand-mark i {
  position: relative;
  z-index: 1;
  display: block;
  width: 8px;
  height: 8px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--mint);
}

.brand-mark i:first-child { background: var(--coral); }
.brand-mark i:last-child { background: var(--blue); }

.nav { display: flex; gap: 30px; }

.nav a {
  position: relative;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  transition: color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible { color: var(--ink); }

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: var(--mint);
  transition: right 160ms ease;
}

.nav a:hover::after,
.nav a:focus-visible::after { right: 0; }

.header-cta {
  justify-self: end;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.header-cta:hover { color: var(--ink); border-color: rgba(67, 230, 199, 0.5); }

.hero {
  position: relative;
  overflow: clip;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 76px);
  max-width: var(--max);
  margin: 0 auto;
  padding: 76px 0 104px;
}

.hero-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
}

.hero-glow-a { width: 340px; height: 340px; left: -250px; top: 20%; background: var(--mint); }
.hero-glow-b { width: 280px; height: 280px; right: -180px; top: 6%; background: var(--blue); }

.eyebrow,
.kicker,
.panel-label,
.route-type {
  margin: 0;
  color: var(--mint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { display: block; width: 26px; height: 1px; background: var(--mint); }

h1,
h2,
h3,
p { overflow-wrap: anywhere; }

h1 {
  margin: 25px 0 25px;
  font-size: clamp(50px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 760;
}

h1 em {
  color: transparent;
  background: linear-gradient(95deg, var(--coral), #ffd0ad);
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}

.hero-lead {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { color: #04130f; background: var(--mint); }
.button-primary:hover { background: var(--mint-soft); }
.button-ghost { color: var(--ink); border-color: var(--line); background: rgba(255, 255, 255, 0.02); }
.button-ghost:hover { border-color: rgba(67, 230, 199, 0.45); }

.lattice-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(160deg, rgba(17, 34, 54, 0.92), rgba(6, 14, 25, 0.96));
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
}

.visual-label {
  display: flex;
  justify-content: space-between;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lattice-visual svg { display: block; width: 100%; height: auto; }
.lattice-visual .beam { stroke-dasharray: 10 8; animation: dash 16s linear infinite; }
.site > circle:first-child { fill: #0b1726; stroke: rgba(154, 243, 226, 0.3); stroke-width: 2; }
.site-b > circle:first-child { stroke: rgba(142, 167, 255, 0.26); }
.site-focus > circle:first-child { fill: rgba(67, 230, 199, 0.09); stroke: var(--mint); stroke-width: 2; }
.site text { fill: var(--dim); font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-anchor: middle; text-transform: uppercase; }
.orb { stroke: #07111f; stroke-width: 2; }
.orb-i { fill: var(--coral); }
.orb-o { fill: var(--mint); }
.orb-empty { fill: #17283b; stroke: #536579; }
.legend text { fill: var(--muted); font: 12px ui-monospace, monospace; }

.visual-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(3, 10, 18, 0.35);
}

.visual-stats div { padding: 18px 20px; border-right: 1px solid var(--line); }
.visual-stats div:last-child { border-right: 0; }
.visual-stats b { display: block; font-size: 18px; }
.visual-stats span { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }

.statement {
  padding: 92px max(24px, calc((100vw - 960px) / 2));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 11, 20, 0.45);
}

.statement p {
  margin: 0;
  font-size: clamp(25px, 3.6vw, 46px);
  line-height: 1.28;
  letter-spacing: -0.035em;
  color: #bdc7d2;
}

.statement strong { color: var(--ink); font-weight: 670; }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 126px 0;
}

.section-heading { max-width: 730px; margin-bottom: 56px; }
.section-heading h2,
.boundary-intro h2,
.physics-copy h2,
.closing h2 {
  margin: 15px 0 18px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-heading > p:last-child,
.boundary-intro > p:last-child,
.physics-copy > p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.routes { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.route { position: relative; min-height: 445px; padding: 30px; border-right: 1px solid var(--line); background: rgba(12, 25, 41, 0.58); }
.route:last-child { border-right: 0; }
.route::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; opacity: 0.8; }
.route-hardware::after { background: var(--mint); }
.route-circuit::after { background: var(--blue); }
.route-physics::after { background: var(--coral); }
.route-index { margin-bottom: 65px; color: rgba(244,247,251,.2); font: 52px/1 ui-monospace, monospace; }
.route-type { margin-bottom: 8px; }
.route-circuit .route-type { color: var(--blue); }
.route-physics .route-type { color: var(--coral); }
.route h3 { margin: 0 0 15px; font-size: 25px; letter-spacing: -0.03em; }
.route p:not(.route-type), .route li { color: var(--muted); font-size: 14px; }
.route ul { margin: 22px 0; padding-left: 18px; }
.route li { margin: 7px 0; }
.route-output { position: absolute; left: 30px; bottom: 28px; color: var(--ink); font: 11px ui-monospace, monospace; }

.physics-section { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 96px; align-items: center; }
.equation { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 4vw, 52px); letter-spacing: 0.015em; }
.equation sub { font-size: 0.55em; }
.equation sup { font-size: 0.5em; }
.equation-main { margin: 50px 0 42px; color: var(--mint-soft); }
.equation-main span { color: var(--muted); }
.equation-small { font-size: clamp(25px, 3vw, 38px); }
.symbol-list { margin: 0; }
.symbol-list div { display: grid; grid-template-columns: 70px 1fr; padding: 12px 0; border-top: 1px solid var(--line); }
.symbol-list dt { color: var(--ink); font-family: Georgia, serif; }
.symbol-list dd { margin: 0; color: var(--muted); font-size: 14px; }
.formula-panel { padding: 52px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(145deg, rgba(17, 34, 54, 0.9), rgba(7, 16, 28, 0.85)); box-shadow: 0 30px 80px rgba(0,0,0,.2); }
.formula-panel .panel-label { margin-bottom: 15px; }
.formula-divider { height: 1px; margin: 34px 0; background: var(--line); }
.formula-grid { display: grid; gap: 8px; margin-top: 20px; }
.formula-grid code { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(2,7,13,.3); font-size: 12px; }
.formula-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; }

.results-section { max-width: none; padding-left: max(24px, calc((100vw - var(--max)) / 2)); padding-right: max(24px, calc((100vw - var(--max)) / 2)); background: linear-gradient(180deg, transparent, rgba(4, 11, 20, 0.74) 12%, rgba(4, 11, 20, 0.74) 88%, transparent); }
.timing-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.timing-hero { display: flex; flex-direction: column; justify-content: center; min-height: 360px; padding: 48px; background: var(--mint); color: #03130f; }
.timing-hero p { margin: 0; font: 12px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .09em; }
.timing-hero strong { margin: 15px 0 8px; font-size: clamp(70px, 9vw, 118px); line-height: .9; letter-spacing: -.07em; }
.timing-hero strong span { margin-left: 8px; font-size: 24px; }
.timing-hero small { font-size: 12px; font-weight: 700; opacity: .72; }
.timing-list { background: rgba(12,25,41,.72); }
.timing-row { display: grid; grid-template-columns: 1fr 100px 80px; gap: 16px; align-items: center; min-height: 72px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.timing-row:last-child { border-bottom: 0; }
.timing-row span { color: var(--muted); font-size: 13px; }
.timing-row b { font-size: 13px; text-align: right; }
.timing-row i { color: var(--blue); font: normal 11px ui-monospace, monospace; text-align: right; }
.steps-panel { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(12,25,41,.58); overflow: hidden; }
.steps-header { display: flex; align-items: center; justify-content: space-between; padding: 30px 34px; border-bottom: 1px solid var(--line); }
.steps-header h3 { margin: 7px 0 0; font-size: 22px; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 11px ui-monospace, monospace; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 13px var(--mint); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: 18px 34px; border-bottom: 1px solid var(--line); text-align: right; font-size: 13px; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--dim); font: 10px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
td { color: var(--muted); }
td b { color: var(--ink); }
.table-note { margin: 0; padding: 18px 34px; color: var(--dim); font-size: 11px; }
.validation-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.validation-band > div { padding: 30px; background: var(--panel); }
.validation-band strong { display: block; margin: 10px 0 3px; color: var(--mint-soft); font: 29px Georgia, serif; }
.validation-band span { color: var(--dim); font-size: 12px; }

.boundary-section { padding-bottom: 80px; }
.boundary-intro { display: grid; grid-template-columns: 1fr 1fr; column-gap: 70px; align-items: end; margin-bottom: 50px; }
.boundary-intro .kicker { grid-column: 1 / -1; }
.boundary-intro h2 { margin-bottom: 0; }
.boundary-intro > p:last-child { padding-bottom: 7px; }
.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.boundary { padding: 38px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(12,25,41,.5); }
.boundary > span { display: inline-block; padding: 5px 10px; border-radius: 999px; font: 10px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.boundary-yes > span { color: var(--mint); background: rgba(67,230,199,.1); }
.boundary-not-yet > span { color: var(--coral); background: rgba(255,139,94,.1); }
.boundary h3 { margin: 22px 0 18px; font-size: 24px; }
.boundary ul { margin: 0; padding-left: 20px; }
.boundary li { margin: 11px 0; color: var(--muted); font-size: 14px; }
.majorana-note { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; margin-top: 22px; padding: 25px 30px; border: 1px solid rgba(142,167,255,.28); border-radius: var(--radius); background: rgba(142,167,255,.055); }
.majorana-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(142,167,255,.4); border-radius: 50%; color: var(--blue); font: 20px Georgia, serif; }
.majorana-note h3 { margin: 0 0 3px; font-size: 16px; }
.majorana-note p { margin: 0; color: var(--muted); font-size: 13px; }
.majorana-note > a { color: var(--blue); font: 11px ui-monospace, monospace; }

.code-section { padding-top: 80px; }
.reading-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.reading-list li { display: grid; grid-template-columns: 90px 1fr; padding: 26px 0; border-bottom: 1px solid var(--line); }
.reading-list li > span { color: var(--dim); font: 12px ui-monospace, monospace; }
.reading-list a { font-size: clamp(18px, 2vw, 24px); font-weight: 700; transition: color 160ms ease; }
.reading-list a:hover { color: var(--mint); }
.reading-list p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.closing { max-width: var(--max); margin: 40px auto 128px; padding: 90px; border: 1px solid var(--line); border-radius: 32px; background: radial-gradient(circle at 80% 10%, rgba(67,230,199,.13), transparent 27rem), linear-gradient(140deg, var(--panel-raised), var(--bg-deep)); }
.closing h2 { max-width: 820px; }

footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 110px; padding: 0 max(24px, calc((100vw - var(--max)) / 2)); border-top: 1px solid var(--line); color: var(--dim); font-size: 11px; }
footer p { margin: 0; }
footer > a:last-child { justify-self: end; color: var(--muted); }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms ease, transform 700ms ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes dash { to { stroke-dashoffset: -180; } }

@media (max-width: 1200px) {
  .hero, .section, .closing { margin-left: 24px; margin-right: 24px; }
  .site-header { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 90px; }
  .hero-copy { max-width: 700px; }
  .routes { grid-template-columns: 1fr; }
  .route { min-height: 380px; border-right: 0; border-bottom: 1px solid var(--line); }
  .route:last-child { border-bottom: 0; }
  .physics-section { grid-template-columns: 1fr; gap: 50px; }
  .timing-layout { grid-template-columns: 1fr; }
  .timing-hero { min-height: 300px; }
  .boundary-intro { grid-template-columns: 1fr; }
  .boundary-intro > p:last-child { margin-top: 20px; }
  .boundary-grid { grid-template-columns: 1fr; }
  .validation-band { grid-template-columns: 1fr; }
  .closing { padding: 60px; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .header-cta { padding: 8px 12px; }
  .hero { margin-left: 18px; margin-right: 18px; padding: 65px 0 75px; gap: 42px; }
  h1 { font-size: clamp(44px, 15vw, 64px); }
  .hero-lead { font-size: 16px; }
  .lattice-visual svg { min-height: 290px; object-fit: cover; }
  .visual-stats div { padding: 14px 12px; }
  .visual-stats b { font-size: 15px; }
  .visual-stats span { font-size: 8px; }
  .statement { padding-top: 65px; padding-bottom: 65px; }
  .section { margin-left: 18px; margin-right: 18px; padding: 90px 0; }
  .results-section { margin: 0; padding-left: 18px; padding-right: 18px; }
  .route { padding: 26px; }
  .formula-panel { padding: 28px; }
  .timing-hero { padding: 32px; }
  .timing-row { grid-template-columns: 1fr auto; min-height: 82px; padding: 0 20px; }
  .timing-row i { display: none; }
  .steps-header { align-items: flex-start; flex-direction: column; gap: 18px; padding: 24px; }
  th, td { padding: 15px 20px; }
  .table-note { padding: 16px 20px; }
  .boundary { padding: 28px; }
  .majorana-note { grid-template-columns: auto 1fr; }
  .majorana-note > a { grid-column: 2; }
  .reading-list li { grid-template-columns: 48px 1fr; }
  .closing { margin: 20px 18px 90px; padding: 38px 26px; }
  footer { grid-template-columns: 1fr auto; gap: 20px; padding-top: 28px; padding-bottom: 28px; }
  footer p { display: none; }
}

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