:root {
  --ink: #12231d;
  --paper: #f2f0e8;
  --paper-bright: #fbfaf5;
  --acid: #d8ff66;
  --mint: #91e8c2;
  --cyan: #70c8d2;
  --coral: #ff8f70;
  --violet: #aaa0ff;
  --line: rgba(18, 35, 29, .18);
  --muted: #58665f;
  --shadow: 0 20px 70px rgba(18, 35, 29, .12);
  --mono: "DM Mono", monospace;
  --sans: "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 4px;
  background: transparent;
}
.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--coral);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  padding: 0 clamp(20px, 4vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 240, 232, .88);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--acid);
  font-size: 15px;
}
.topbar nav { display: flex; gap: 28px; }
.topbar nav a, .paper-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.topbar nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.paper-link {
  padding: 9px 15px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.language-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: 10px var(--mono);
}
.language-toggle span { opacity: .42; }
.language-toggle span.active { opacity: 1; font-weight: 700; }
.language-toggle i { opacity: .3; font-style: normal; }
.language-toggle:hover { background: var(--acid); }
.language-toggle:focus-visible,
.paper-link:focus-visible,
.primary-button:focus-visible,
.architecture-tab:focus-visible,
.source-links a:focus-visible,
footer a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

main { overflow: hidden; }
.hero {
  min-height: calc(100svh - 72px);
  padding: clamp(70px, 9vw, 140px) clamp(22px, 5vw, 90px) 32px;
  background:
    linear-gradient(rgba(18,35,29,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,35,29,.05) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
}
.hero-grid {
  max-width: 1500px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  align-items: center;
  gap: clamp(30px, 5vw, 100px);
}
.eyebrow, .kicker {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(58px, 8vw, 132px);
  line-height: .92;
  letter-spacing: -.07em;
  font-weight: 900;
}
.hero h1 span {
  display: block;
  max-width: 790px;
  margin-top: 28px;
  font-size: clamp(25px, 3vw, 48px);
  line-height: 1.16;
  letter-spacing: -.04em;
  font-weight: 500;
}
.hero-deck {
  max-width: 760px;
  margin: 34px 0 0;
  font-size: clamp(17px, 1.5vw, 22px);
  color: var(--muted);
}
.hero-deck strong { color: var(--ink); }
.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 12px;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 42px;
  padding: 16px 20px;
  border-radius: 4px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
}
.primary-button span { color: var(--acid); }

.molecule-stage {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
}
.molecule-stage svg { width: 100%; height: 100%; overflow: visible; }
.orbit ellipse { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 1; stroke-dasharray: 4 9; }
.orbit-a { animation: spin 24s linear infinite; transform-origin: center; }
.orbit-b { animation: spinReverse 18s linear infinite; transform-origin: center; }
.orbit-c { animation: spin 30s linear infinite; transform-origin: center; }
.rna { fill: none; stroke: var(--cyan); stroke-width: 13; stroke-linecap: round; stroke-dasharray: 4 17; animation: dash 10s linear infinite; }
.protein { fill: rgba(145,232,194,.13); stroke: var(--mint); stroke-width: 4; stroke-dasharray: 10 7; animation: breathe 5s ease-in-out infinite; transform-origin: center; }
.ligand line { stroke: var(--acid); stroke-width: 4; }
.ligand circle { fill: var(--acid); }
.ligand { animation: ligandFloat 4s ease-in-out infinite; transform-origin: center; }
.floating-nodes circle { fill: var(--coral); animation: pulse 3s ease-in-out infinite; }
.stage-glow { animation: pulse 4s ease-in-out infinite; }
.molecule-stage > p {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  white-space: nowrap;
  color: rgba(255,255,255,.6);
  font: 11px var(--mono);
  letter-spacing: .16em;
}
.stage-label {
  position: absolute;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  font: 10px var(--mono);
}
.label-protein { top: 18%; right: 3%; color: var(--mint); }
.label-rna { bottom: 23%; left: -3%; color: var(--cyan); }
.label-ligand { top: 48%; right: -1%; color: var(--acid); }

.hero-facts {
  max-width: 1500px;
  margin: clamp(60px, 8vw, 120px) auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-facts div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}
.hero-facts div:last-child { border-right: 0; }
.hero-facts strong { font-size: 26px; }
.hero-facts span { color: var(--muted); font-size: 12px; }

.chapter {
  position: relative;
  padding: clamp(100px, 13vw, 200px) clamp(22px, 7vw, 120px);
}
.section-marker {
  position: absolute;
  top: 110px;
  left: clamp(22px, 3vw, 50px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
}
.section-marker span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.section-marker p {
  margin: 0;
  font-size: 10px;
  letter-spacing: .14em;
  writing-mode: vertical-rl;
}
.chapter-copy, .chapter-heading {
  max-width: 1100px;
  margin: 0 auto 70px;
}
.chapter h2, .takeaway h2, .sources h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 86px);
  line-height: 1.08;
  letter-spacing: -.055em;
}
.lead {
  max-width: 850px;
  margin: 36px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 23px);
}
.unification-grid {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}
.entity-card {
  min-height: 260px;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,.2);
}
.entity-card:last-child { border-right: 0; }
.entity-card h3 { margin: 46px 0 4px; font-size: 22px; }
.entity-card p { margin: 0; color: var(--muted); font-size: 13px; }
.entity-icon { display: block; width: 64px; height: 64px; position: relative; }
.protein-icon { border: 10px solid var(--mint); border-radius: 60% 40% 56% 44%; transform: rotate(28deg); }
.dna-icon { border-left: 4px solid var(--cyan); border-right: 4px solid var(--cyan); transform: skew(-18deg); }
.dna-icon::before { content: ""; position: absolute; inset: 8px -4px; background: repeating-linear-gradient(to bottom, transparent 0 8px, var(--cyan) 8px 11px); }
.ligand-icon { border: 4px solid var(--coral); transform: rotate(30deg); clip-path: polygon(50% 0, 95% 32%, 78% 100%, 22% 100%, 5% 32%); }
.ion-icon { border-radius: 50%; background: var(--violet); box-shadow: 24px 18px 0 -12px var(--coral), -8px 28px 0 -17px var(--cyan); }
.thesis {
  max-width: 1200px;
  margin: 60px auto 0;
  padding: clamp(30px, 5vw, 70px);
  background: var(--ink);
  color: white;
}
.thesis > span { color: var(--acid); font: 11px var(--mono); letter-spacing: .1em; }
.thesis blockquote { max-width: 980px; margin: 24px 0; font-size: clamp(28px, 4vw, 58px); line-height: 1.25; letter-spacing: -.04em; }
.thesis p { margin: 0; color: rgba(255,255,255,.6); }

.architecture-section { background: var(--ink); color: white; }
.architecture-section .kicker, .architecture-section .chapter-heading > p { color: var(--acid); }
.architecture-shell { max-width: 1320px; margin: auto; }
.architecture-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid rgba(255,255,255,.18); }
.architecture-tab {
  min-height: 116px;
  padding: 18px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: rgba(255,255,255,.5);
  text-align: left;
  cursor: pointer;
}
.architecture-tab:last-child { border-right: 0; }
.architecture-tab span, .architecture-tab small { display: block; font: 10px var(--mono); }
.architecture-tab strong { display: block; margin: 9px 0 4px; color: inherit; font-size: 17px; }
.architecture-tab.active { background: var(--acid); color: var(--ink); }
.architecture-visual { margin-top: 1px; padding: 40px; border: 1px solid rgba(255,255,255,.18); }
.architecture-visual svg { width: 100%; }
.arch-node rect { fill: rgba(255,255,255,.04); stroke: rgba(255,255,255,.18); stroke-width: 2; transition: .35s ease; }
.arch-node text { fill: rgba(255,255,255,.5); font: 12px var(--mono); letter-spacing: .08em; transition: .35s ease; }
.arch-node.active rect { fill: rgba(216,255,102,.1); stroke: var(--acid); }
.arch-node.active text { fill: var(--acid); }
.arch-arrow { fill: none; stroke: rgba(255,255,255,.3); stroke-width: 2; }
#arrow path { fill: rgba(255,255,255,.4); }
.pair-grid rect { fill: rgba(112,200,210,.16); stroke: var(--cyan); }
.triangle { fill: none; stroke: var(--violet); stroke-width: 3; }
.noise-cloud circle { fill: var(--coral); }
.denoise-arrow { fill: none; stroke: var(--acid); stroke-width: 3; }
.architecture-explain {
  min-height: 280px;
  padding: 40px;
  border: 1px solid rgba(255,255,255,.18);
  border-top: 0;
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: 30px;
  align-items: start;
}
.architecture-count { color: var(--acid); font: 11px var(--mono); }
.architecture-explain h3 { margin: 0; font-size: clamp(25px, 3vw, 44px); line-height: 1.2; }
.architecture-explain > p:not(.architecture-count), .architecture-explain li { color: rgba(255,255,255,.66); }
.architecture-explain > p { margin-top: 0; }
.architecture-explain ul { margin: 0; }

.diffusion-lab {
  max-width: 1320px;
  margin: 120px auto 0;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  border: 1px solid rgba(255,255,255,.18);
}
.diffusion-copy { padding: clamp(30px, 5vw, 70px); }
.diffusion-copy h3 { margin: 0; font-size: clamp(30px, 4vw, 58px); line-height: 1.15; }
.diffusion-copy > p:not(.kicker) { color: rgba(255,255,255,.6); }
.diffusion-demo { position: relative; min-height: 500px; background: #0a1511; display: grid; place-items: center; overflow: hidden; }
.diffusion-demo::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(216,255,102,.14), transparent 55%); }
.diffusion-demo svg { position: relative; width: 90%; }
.noise-panel > rect, .hairpin-panel > rect { fill: rgba(255,255,255,.025); stroke: rgba(255,255,255,.18); stroke-width: 1.5; }
.noise-panel text, .hairpin-panel text, .denoise-flow text {
  fill: rgba(255,255,255,.58);
  font: 11px var(--mono);
  letter-spacing: .08em;
}
.noise-particles circle { fill: var(--coral); transform-box: fill-box; transform-origin: center; animation: atomDrift 3.8s ease-in-out infinite alternate; }
.noise-particles circle:nth-child(3n+2) { fill: var(--cyan); animation-delay: -.9s; animation-duration: 4.5s; }
.noise-particles circle:nth-child(3n) { fill: var(--violet); animation-delay: -1.8s; animation-duration: 3.2s; }
.denoise-flow path { fill: none; stroke: var(--acid); stroke-width: 3; stroke-linecap: round; }
.denoise-flow path:first-child { stroke-dasharray: 7 9; animation: flowRight 1.1s linear infinite; }
.denoise-flow text { fill: var(--acid); font-size: 9px; }
.hairpin-backbone { fill: none; stroke: var(--cyan); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 9px rgba(112,200,210,.22)); }
.base-pairs line { stroke: rgba(216,255,102,.64); stroke-width: 3; stroke-dasharray: 4 5; }
.rna-residues circle { fill: var(--acid); stroke: #0a1511; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: residuePulse 2.8s ease-in-out infinite; }
.rna-residues circle:nth-child(even) { fill: var(--mint); animation-delay: -.8s; }
.demo-caption { position: absolute; bottom: 24px; font: 10px var(--mono); letter-spacing: .14em; color: rgba(255,255,255,.5); }

.paper-figure { background: var(--paper-bright); box-shadow: var(--shadow); }
.figure-wide { max-width: 1400px; margin: 0 auto; padding: 20px; transform: translateY(70px); position: relative; z-index: 2; }
.figure-meta { display: flex; justify-content: space-between; gap: 20px; padding: 8px 6px 18px; font: 10px var(--mono); letter-spacing: .1em; color: var(--muted); }
.paper-figure img { width: 100%; background: white; }
.figure-reading { display: grid; grid-template-columns: 220px 1fr; gap: 30px; padding: 28px 12px 12px; border-top: 1px solid var(--line); }
.figure-reading h3, .figure-reading p { margin: 0; }
.paper-figure details { padding: 18px 24px; border-top: 1px solid var(--line); }
.paper-figure summary { cursor: pointer; font-weight: 700; }

.evidence-section { padding-top: 230px; }
.evidence-cards { max-width: 1320px; margin: 0 auto 90px; display: grid; grid-template-columns: repeat(3, 1fr); }
.evidence-card { padding: 38px; border: 1px solid var(--line); border-right: 0; }
.evidence-card:last-child { border-right: 1px solid var(--line); }
.evidence-card > span, .evidence-card small { font: 10px var(--mono); letter-spacing: .08em; color: var(--muted); }
.evidence-card h3 { margin: 42px 0 12px; font-size: 28px; }
.evidence-card small { display: block; margin-top: 28px; }
.evidence-section > .paper-figure { max-width: 1320px; margin: auto; padding: 18px; }
.examples-grid { max-width: 1320px; margin: 100px auto 0; display: grid; grid-template-columns: 1.25fr .75fr; gap: 70px; align-items: center; }
.examples-grid .paper-figure { padding: 16px; }
.examples-copy h3 { margin: 0; font-size: clamp(30px, 4vw, 56px); line-height: 1.18; }
.examples-copy p { color: var(--muted); }
.examples-copy .caution { padding: 20px; border-left: 4px solid var(--coral); background: rgba(255,143,112,.1); color: var(--ink); }

.confidence-section { background: #d9e5de; }
.confidence-grid { max-width: 1320px; margin: auto; display: grid; grid-template-columns: .7fr 1.3fr; gap: 70px; align-items: center; }
.confidence-grid .paper-figure { padding: 15px; }
.confidence-legend { margin-top: 50px; }
.confidence-legend > div { display: grid; grid-template-columns: 22px 100px 1fr; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.confidence-legend p { margin: 0; color: var(--muted); font-size: 13px; }
.score-dot { width: 14px; height: 14px; border-radius: 50%; }
.score-dot.low { background: var(--coral); }
.score-dot.mid { background: var(--cyan); }
.score-dot.high { background: #226aa3; }
.warning { max-width: 1320px; margin: 70px auto 0; display: flex; gap: 24px; padding: 25px 30px; border: 1px solid var(--ink); }
.warning > span { font-size: 30px; }
.warning p { margin: 4px 0 0; color: var(--muted); }

.limits-section { background: #181a18; color: white; }
.limits-section .section-marker, .limits-section .kicker { color: var(--coral); }
.limits-layout { max-width: 1320px; margin: auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 65px; align-items: start; }
.limits-layout .paper-figure { padding: 15px; color: var(--ink); }
.limit-list article { display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding: 28px 0; border-top: 1px solid rgba(255,255,255,.16); }
.limit-list article > span { color: var(--coral); font: 12px var(--mono); }
.limit-list h3 { margin: 0 0 8px; font-size: 22px; }
.limit-list p { margin: 0; color: rgba(255,255,255,.58); }

.takeaway {
  padding: clamp(90px, 14vw, 200px) clamp(22px, 8vw, 140px);
  background: var(--acid);
}
.takeaway h2 { max-width: 1200px; }
.takeaway-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin: 70px 0 40px; }
.takeaway-flow span { padding: 15px 18px; border: 1px solid var(--ink); border-radius: 999px; font-weight: 700; }
.takeaway-flow i { font-style: normal; font-size: 24px; }
.takeaway > p:last-child { max-width: 950px; font-size: 20px; }

.sources { padding: clamp(80px, 10vw, 150px) clamp(22px, 8vw, 140px); display: grid; grid-template-columns: .5fr 1.5fr; gap: 70px; }
.sources h2 { font-size: clamp(42px, 5vw, 70px); }
.source-links { border-top: 1px solid var(--line); }
.source-links a {
  display: grid;
  grid-template-columns: 50px 1fr 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.source-links a:hover strong { text-decoration: underline; }
.source-links span, .source-links small { color: var(--muted); font: 11px var(--mono); }
footer { padding: 30px clamp(22px, 5vw, 80px); display: flex; justify-content: space-between; border-top: 1px solid var(--line); font: 10px var(--mono); letter-spacing: .08em; }

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

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }
@keyframes dash { to { stroke-dashoffset: -210; } }
@keyframes breathe { 50% { transform: scale(1.035) rotate(2deg); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes ligandFloat { 50% { transform: translateY(-12px) rotate(8deg); } }
@keyframes atomDrift { to { transform: translate(7px, -8px) scale(.82); opacity: .62; } }
@keyframes flowRight { to { stroke-dashoffset: -32; } }
@keyframes residuePulse { 50% { transform: scale(1.18); filter: brightness(1.15); } }

@media (max-width: 980px) {
  .topbar nav { display: none; }
  .hero-grid, .diffusion-lab, .examples-grid, .confidence-grid, .limits-layout, .sources { grid-template-columns: 1fr; }
  .hero-grid { gap: 70px; }
  .molecule-stage { width: min(100%, 620px); margin: auto; }
  .section-marker { position: static; align-items: flex-start; flex-direction: row; margin-bottom: 45px; }
  .section-marker p { writing-mode: initial; }
  .chapter-copy, .chapter-heading { margin-left: 0; }
  .unification-grid { grid-template-columns: repeat(2, 1fr); }
  .entity-card:nth-child(2) { border-right: 0; }
  .entity-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .architecture-explain { grid-template-columns: 1fr; }
  .evidence-cards { grid-template-columns: 1fr; }
  .evidence-card { border-right: 1px solid var(--line); border-bottom: 0; }
  .evidence-card:last-child { border-bottom: 1px solid var(--line); }
  .figure-reading { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 72px; }
  .topbar { height: 62px; padding: 0 16px; }
  .brand > span:last-child { display: none; }
  .paper-link { font-size: 11px; padding: 7px 10px; }
  .language-toggle { padding: 7px 9px; }
  .hero { padding-inline: 18px; }
  .hero h1 { font-size: 54px; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
  .hero-facts div:nth-child(2) { border-right: 0; }
  .hero-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .chapter { padding-inline: 18px; }
  .unification-grid { grid-template-columns: 1fr; }
  .entity-card { min-height: 210px; border-right: 0; border-bottom: 1px solid var(--line); }
  .entity-card:last-child { border-bottom: 0; }
  .architecture-tabs { grid-template-columns: repeat(2, 1fr); }
  .architecture-tab:nth-child(2) { border-right: 0; }
  .architecture-tab:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.18); }
  .architecture-visual { padding: 12px; overflow-x: auto; }
  .architecture-visual svg { width: 820px; }
  .diffusion-demo { min-height: 360px; }
  .figure-wide { margin-inline: 12px; }
  .confidence-legend > div { grid-template-columns: 22px 1fr; }
  .confidence-legend p { grid-column: 2; }
  .source-links a { grid-template-columns: 34px 1fr; }
  .source-links small { grid-column: 2; }
  footer { flex-direction: column; gap: 12px; }
}

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