:root {
  --ink: #07111f;
  --ink-2: #0d1b2d;
  --paper: #f4f8fb;
  --paper-blue: #e8f0f8;
  --line: rgba(9, 28, 47, .14);
  --blue: #4877ff;
  --blue-soft: #9db8ff;
  --mint: #66e3bc;
  --coral: #ff8b6b;
  --muted: #607086;
  --shadow: 0 24px 80px rgba(7, 17, 31, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.section-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: 72px; padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(244, 248, 251, .86); border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px); transition: border-color .25s, box-shadow .25s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 8px 30px rgba(7,17,31,.06); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; position: relative; display: inline-block; }
.brand-mark i { position: absolute; top: 7px; width: 12px; height: 19px; border: 3px solid var(--ink); border-radius: 4px; }
.brand-mark i:first-child { left: 2px; }
.brand-mark i:last-child { right: 2px; border-color: var(--blue); }
.brand-mark::after { content: ""; position: absolute; width: 9px; height: 3px; left: 12px; top: 15px; background: var(--mint); }
nav { display: flex; gap: 30px; }
nav a { color: #34465b; font-size: .9rem; font-weight: 650; text-decoration: none; }
nav a:hover { color: var(--blue); }

.hero { min-height: calc(100vh - 72px); padding: 72px 0 86px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.eyebrow span, .section-kicker { margin: 0; color: #385470; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; }
h1 { margin: 0; font-size: clamp(3rem, 6vw, 6rem); line-height: .93; letter-spacing: -.065em; }
h1 em { color: var(--blue); font-style: normal; }
.dek { max-width: 600px; margin: 28px 0 16px; font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 660; line-height: 1.35; letter-spacing: -.02em; }
.hero-summary { max-width: 580px; color: var(--muted); font-size: 1.03rem; }
.authors { display: flex; gap: 7px; margin: 24px 0; font-size: .95rem; }
.authors a { color: var(--blue); font-weight: 750; text-underline-offset: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; font-weight: 750; text-decoration: none; }
.button.primary { color: white; background: var(--ink); border-color: var(--ink); }
.button.primary:hover { background: var(--blue); border-color: var(--blue); }
.button.secondary { color: var(--ink); background: rgba(255,255,255,.72); }
.button.secondary:hover { color: white; background: var(--blue); border-color: var(--blue); }
.hero-visual { margin: 0; }
.figure-frame { padding: 20px; overflow: hidden; background: #dce8f5; border: 1px solid rgba(62,89,119,.14); border-radius: 22px; box-shadow: var(--shadow); }
.hero-visual img { width: 100%; aspect-ratio: 1.74; object-fit: contain; }
figcaption { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.hero-visual figcaption { padding: 16px 10px 0; }
.hero-visual figcaption b { color: var(--ink); }

.problem-band { color: white; background: var(--ink); }
.problem-grid { padding: 112px 0; display: grid; grid-template-columns: .45fr 1.1fr .9fr; gap: 58px; align-items: start; }
.problem-band .section-kicker { color: var(--mint); }
.problem-band h2, .section-heading h2 { margin: 0; font-size: clamp(2.4rem, 4vw, 4.6rem); line-height: 1.02; letter-spacing: -.05em; }
.problem-copy { padding-left: 30px; border-left: 1px solid rgba(255,255,255,.22); }
.problem-copy p { margin: 0 0 24px; color: #b9c7d9; }
.problem-copy b { color: white; }

.method-section { padding: 132px 0; }
.section-heading { max-width: 800px; }
.section-heading h2 { margin-top: 18px; }
.section-heading > p:last-child { max-width: 650px; color: var(--muted); font-size: 1.08rem; }
.anchor-grid { margin: 62px 0 74px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.anchor-card { min-height: 390px; padding: 36px; position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); }
.anchor-card.fidelity { background: #dfeafe; }
.anchor-card.perception { background: #ddf7ed; }
.card-number { position: absolute; right: 28px; top: 24px; font-size: .8rem; font-weight: 800; opacity: .52; }
.anchor-card h3 { margin: 10px 0 12px; font-size: 2rem; letter-spacing: -.035em; }
.anchor-card > p:last-child { max-width: 460px; color: #51657a; }
.card-label { margin: 34px 0 0; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.mini-icon { height: 94px; display: flex; align-items: end; }
.content-icon { gap: 9px; }
.content-icon span { width: 58px; border-radius: 8px; border: 4px solid var(--blue); }
.content-icon span:first-child { height: 64px; }
.content-icon span:last-child { height: 82px; background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(72,119,255,.16) 8px 16px); }
.texture-icon { gap: 7px; }
.texture-icon span { width: 47px; height: 70px; border: 4px solid #159a73; border-radius: 8px; transform: translateY(var(--y)); background: repeating-linear-gradient(45deg, rgba(21,154,115,.18) 0 5px, transparent 5px 10px); }
.texture-icon span:nth-child(1) { --y: 8px; }
.texture-icon span:nth-child(2) { --y: 0; }
.texture-icon span:nth-child(3) { --y: 12px; }
.wide-figure { margin: 0; padding: 20px 20px 14px; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 50px rgba(7,17,31,.08); }
.wide-figure img { width: 100%; border-radius: 10px; }
.wide-figure figcaption { padding: 16px 4px 2px; }
.wide-figure figcaption span { margin-right: 14px; color: var(--ink); font-weight: 800; }

.results-section { padding: 128px 0; background: var(--paper-blue); }
.results-heading { display: grid; grid-template-columns: .75fr 1.2fr 1fr; max-width: none; gap: 36px; align-items: start; }
.results-heading h2 { margin-top: 0; }
.results-heading > p:last-child { margin: 0; }
.metric-grid { margin: 64px 0 96px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-grid article { padding: 30px 24px 34px; border-right: 1px solid var(--line); }
.metric-grid article:first-child { padding-left: 0; }
.metric-grid article:last-child { border-right: 0; }
.metric-grid p { margin: 0; color: #4f6680; font-size: .77rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.metric-grid strong { display: block; margin: 5px 0 1px; font-size: clamp(2rem, 3.2vw, 3.7rem); line-height: 1.1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.metric-grid span { color: var(--muted); font-size: .82rem; }
.result-story { display: grid; grid-template-columns: 1.45fr .65fr; gap: 54px; align-items: center; }
.result-visual { margin: 0; padding: 14px; background: var(--ink); border-radius: 18px; box-shadow: var(--shadow); }
.result-visual img { width: 100%; border-radius: 9px; }
.result-copy h3, .application-card h3 { margin: 14px 0; font-size: 2.1rem; line-height: 1.1; letter-spacing: -.04em; }
.result-copy > p:not(.section-kicker) { color: var(--muted); }
.result-copy dl { margin: 34px 0 0; }
.result-copy dl div { padding: 18px 0; display: grid; grid-template-columns: 100px 1fr; border-top: 1px solid var(--line); align-items: baseline; }
.result-copy dt { color: var(--blue); font-size: 1.6rem; font-weight: 850; letter-spacing: -.04em; }
.result-copy dd { margin: 0; color: #52677c; font-size: .9rem; line-height: 1.4; }
.application-card { margin-top: 90px; padding: 42px; display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; color: white; background: var(--ink); border-radius: 18px; }
.application-card .section-kicker { color: var(--mint); }
.application-card h3 { margin-bottom: 0; }
.application-card > p { margin: 0; color: #becbda; align-self: center; }

.citation-section { padding: 128px 0; display: grid; grid-template-columns: .7fr 1.3fr; gap: 72px; align-items: start; }
.citation-section .section-heading h2 { font-size: clamp(2.5rem, 4vw, 4.2rem); }
.code-wrap { position: relative; overflow: hidden; background: var(--ink); border-radius: 18px; box-shadow: var(--shadow); }
.code-wrap button { position: absolute; right: 14px; top: 14px; padding: 9px 12px; color: white; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; font: inherit; font-size: .76rem; font-weight: 750; cursor: pointer; }
.code-wrap button:hover { background: var(--blue); }
pre { margin: 0; padding: 66px 32px 32px; overflow-x: auto; color: #d7e3f3; font-family: "SFMono-Regular", Consolas, monospace; font-size: .88rem; line-height: 1.7; }

footer { padding: 38px 0; color: white; background: var(--ink); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-inner p { margin: 2px 0 0; color: #8798ae; font-size: .85rem; }
.footer-inner a { color: var(--mint); text-decoration: none; font-size: .9rem; font-weight: 750; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; padding: 11px 16px; color: var(--ink); background: var(--mint); border-radius: 8px; font-size: .86rem; font-weight: 800; opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.reveal { opacity: 1; transform: none; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 900px) {
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 54px; gap: 48px; }
  .hero-visual { grid-row: 2; }
  .problem-grid, .results-heading, .citation-section { grid-template-columns: 1fr; }
  .problem-grid { gap: 28px; }
  .problem-copy { padding: 24px 0 0; border: 0; border-top: 1px solid rgba(255,255,255,.22); }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid article { border-bottom: 1px solid var(--line); }
  .metric-grid article:nth-child(2) { border-right: 0; }
  .metric-grid article:nth-child(3), .metric-grid article:nth-child(4) { border-bottom: 0; }
  .metric-grid article:first-child { padding-left: 24px; }
  .result-story { grid-template-columns: 1fr; }
  .application-card { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .section-shell { width: min(100% - 28px, 1180px); }
  .site-header { height: 64px; padding: 0 14px; }
  nav { gap: 15px; }
  nav a { font-size: .78rem; }
  nav a:nth-child(2) { display: none; }
  .brand { font-size: .9rem; gap: 7px; }
  .brand-mark { transform: scale(.86); }
  .hero { padding: 42px 0 72px; }
  .eyebrow span:last-child { display: none; }
  h1 { font-size: clamp(3.25rem, 16vw, 5rem); }
  .figure-frame { padding: 8px; border-radius: 14px; }
  .problem-grid, .method-section, .results-section, .citation-section { padding-top: 84px; padding-bottom: 84px; }
  .anchor-grid { grid-template-columns: 1fr; }
  .anchor-card { min-height: 350px; padding: 28px; }
  .wide-figure { padding: 8px 8px 12px; overflow-x: auto; }
  .wide-figure img { min-width: 720px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid article, .metric-grid article:nth-child(3) { padding-left: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-grid article:nth-child(4) { border-bottom: 0; }
  .application-card { padding: 30px 24px; }
  .citation-section { gap: 32px; }
  pre { padding: 64px 20px 24px; font-size: .76rem; }
}
