@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #0c1b3a;
  --muted: #5f6b7f;
  --paper: #f8fafc;
  --white: #ffffff;
  --line: #dce3ec;
  --blue: #2563eb;
  --blue-dark: #173f9e;
  --violet: #6548e8;
  --teal: #159a7b;
  --teal-soft: #eaf8f4;
  --violet-soft: #f0edff;
  --shadow: 0 24px 70px rgba(23, 45, 89, 0.1);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", "Inter", "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: .38;
  background-image: radial-gradient(#b9c7dc 0.7px, transparent 0.7px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, #000, transparent 68%);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { color: inherit; font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

main { width: min(1420px, calc(100% - 48px)); margin: 0 auto; padding: 0 0 96px 258px; }
.section-anchor { scroll-margin-top: 32px; }
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 88px 0 64px; text-align: center; }
h1 { max-width: 1080px; margin: 0; font-size: clamp(41px, 5.2vw, 68px); font-weight: 800; letter-spacing: -.052em; line-height: 1.08; }
h1 span { color: var(--blue); }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 18px; max-width: 1040px; margin-top: 29px; font-size: 17px; font-weight: 700; }
.authors span { white-space: nowrap; }
.authors sup, .affiliations sup { color: var(--violet); font-size: .62em; font-weight: 800; line-height: 0; }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 17px; max-width: 1060px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.email { margin-top: 5px; color: var(--blue-dark); font-family: "DM Mono", monospace; font-size: 11px; text-decoration: none; }
.email:hover { text-decoration: underline; }
.hero-links { display: flex; gap: 11px; margin: 25px 0 42px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 142px; padding: 11px 19px; border: 1px solid #afbdd2; border-radius: 9px; text-decoration: none; font-size: 13px; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(28, 52, 104, .14); }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { color: white; background: linear-gradient(135deg, var(--blue), var(--violet)); border-color: transparent; }
.button-ghost { background: rgba(255,255,255,.74); }
.button-disabled { cursor: not-allowed; opacity: .65; }
.button-disabled:hover { transform: none; box-shadow: none; }

.paper-figure { margin: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.paper-figure img { width: 100%; }
.paper-figure figcaption { padding: 14px 20px 17px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; line-height: 1.55; text-align: left; }
.paper-figure figcaption strong { color: var(--ink); }
.section { padding: 108px 0 14px; }
.section-heading { display: flex; align-items: baseline; gap: 15px; margin-bottom: 29px; }
.section-heading > span, .gallery-heading > div:first-child > span { color: #8c9ab1; font-family: "DM Mono", monospace; font-size: 13px; font-weight: 500; }
h2 { margin: 0; font-size: clamp(31px, 4vw, 47px); letter-spacing: -.04em; line-height: 1.14; }
.section-lede { max-width: 760px; margin: -12px 0 34px 30px; color: var(--muted); font-size: 15px; }
.abstract-grid { padding: clamp(30px, 5vw, 52px); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(23, 45, 89, .07); }
.abstract-copy p { margin: 0 0 16px; color: #39465d; font-size: 15px; text-align: justify; }
.abstract-copy p:last-child { margin-bottom: 0; }
.abstract-copy strong { color: var(--ink); }

.motivation-layout { display: grid; grid-template-columns: .8fr 1.35fr; gap: 22px; align-items: stretch; }
.issue-list { display: grid; gap: 16px; }
.issue { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 27px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: var(--radius); }
.issue > div:last-child > span { color: var(--blue); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; text-transform: uppercase; }
.issue h3 { margin: 5px 0 8px; font-size: 19px; letter-spacing: -.025em; line-height: 1.3; }
.issue p { margin: 0; color: var(--muted); font-size: 13px; }
.issue-icon { flex: 0 0 auto; width: 46px; height: 46px; padding: 9px; color: var(--blue); background: #eef4ff; border: 1px solid #bdcff8; border-radius: 12px; }
.voxel-icon { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.voxel-icon i { display: block; background: currentColor; border-radius: 1px; opacity: .82; }
.structure-icon { position: relative; }
.structure-icon b { position: absolute; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.structure-icon b:nth-child(1) { top: 9px; left: 18px; }
.structure-icon b:nth-child(2) { top: 26px; left: 9px; }
.structure-icon b:nth-child(3) { top: 27px; right: 8px; }
.structure-icon b:nth-child(4) { top: 21px; left: 19px; }
.structure-icon::before { content: ""; position: absolute; inset: 13px 11px 11px; border: 1.5px solid currentColor; transform: rotate(30deg); }
.ablation-figure { display: flex; flex-direction: column; justify-content: center; padding: 18px 18px 0; }
.ablation-figure img { margin: auto; }
.ablation-figure figcaption { margin: 14px -18px 0; }

.method-figure { padding: 22px 22px 0; }
.method-figure figcaption { margin: 16px -22px 0; }
.method-blocks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 21px; }
.method-block { display: grid; grid-template-columns: auto 1fr; gap: 21px; min-height: 280px; padding: 30px; border: 1px solid; border-radius: var(--radius); }
.method-block.vvg { background: #edf5ff; border-color: #c9daf5; }
.method-block.sfif { background: var(--violet-soft); border-color: #d5cbfb; }
.method-label { display: grid; place-items: center; width: 53px; height: 53px; color: white; background: var(--blue); border-radius: 13px; font-family: "DM Mono", monospace; font-size: 13px; font-weight: 500; }
.sfif .method-label { background: var(--violet); }
.method-block h3 { margin: 2px 0 10px; font-size: 21px; line-height: 1.3; }
.method-block p { margin: 0; color: var(--muted); font-size: 13px; }
.method-block ul { display: grid; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; color: #33425c; font-size: 12px; font-weight: 700; }
.method-block li::before { content: "✓"; margin-right: 8px; color: var(--blue); }
.sfif li::before { color: var(--violet); }
.rope-figure { width: 78%; margin: 22px auto 0; padding: 18px 18px 0; }
.rope-figure figcaption { margin: 12px -18px 0; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-grid article { min-width: 0; padding: 23px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; }
.metric-grid article:nth-child(2n) { border-color: #bfdfd5; }
.metric-grid span { display: block; min-height: 35px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.metric-grid strong { display: block; margin: 7px 0 7px; color: var(--blue); font-size: clamp(30px, 3.5vw, 43px); letter-spacing: -.06em; line-height: 1; }
.metric-grid article:nth-child(2n) strong { color: var(--teal); }
.metric-grid small { color: var(--muted); font-size: 10px; }
.comparison-figure { margin-top: 20px; padding: 18px 18px 0; }
.comparison-figure figcaption { margin: 14px -18px 0; }

.gallery-heading { justify-content: space-between; align-items: center; }
.gallery-heading > div:first-child { display: flex; align-items: baseline; gap: 15px; }
.gallery-tabs { display: inline-flex; padding: 4px; background: #e9eef6; border-radius: 10px; }
.gallery-tabs button { padding: 8px 14px; background: transparent; border: 0; border-radius: 7px; cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 800; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.gallery-tabs button.active { color: var(--blue-dark); background: white; box-shadow: 0 3px 10px rgba(23,45,89,.11); }
.gallery-frame { position: relative; margin: 0; padding: 22px; overflow: hidden; background: #0a0f1a; border: 1px solid #1d2a3e; border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 70px rgba(32, 70, 136, .18); }
.gallery-frame img { width: min(760px, 100%); max-height: 880px; margin: 0 auto; object-fit: contain; transition: opacity .18s ease, transform .18s ease; }
.gallery-frame img.switching { opacity: 0; transform: translateY(6px); }
.gallery-frame figcaption { position: absolute; z-index: 1; left: 35px; bottom: 31px; padding: 7px 10px; color: #dbe6f8; background: rgba(8,14,25,.78); border: 1px solid #30415c; border-radius: 7px; font-family: "DM Mono", monospace; font-size: 10px; }

footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; margin-top: 116px; padding-top: 25px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
footer p { margin: 0; }
footer a { text-decoration: none; font-weight: 700; }
footer > div { display: flex; gap: 18px; }
.footer-brand { color: var(--ink); font-size: 20px; font-weight: 800; letter-spacing: -.04em; }
.footer-brand span { color: var(--blue); }

.toc { position: fixed; z-index: 20; top: 50%; left: max(16px, calc(50vw - 720px)); width: 226px; padding: 20px; overflow: hidden; background: linear-gradient(150deg, rgba(244,248,253,.95), rgba(240,241,252,.92)); border: 1px solid rgba(113, 132, 165, .22); border-radius: 17px; box-shadow: 0 20px 48px rgba(29, 51, 91, .12); transform: translateY(-50%); backdrop-filter: blur(12px); }
.toc::after { content: ""; position: absolute; width: 140px; height: 140px; left: -42px; bottom: -50px; opacity: .2; background-image: radial-gradient(var(--blue) 1px, transparent 1px); background-size: 9px 9px; mask-image: radial-gradient(circle, black, transparent 68%); }
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; margin-bottom: 35px; font-size: 18px; font-weight: 800; letter-spacing: -.045em; text-decoration: none; }
.brand > span > span { color: var(--blue); }
.brand svg { width: 32px; height: 32px; fill: none; stroke: var(--blue-dark); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.toc-label { margin: 0 0 9px; color: #78859b; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.toc nav { position: relative; z-index: 1; display: grid; gap: 4px; }
.toc nav a { display: grid; grid-template-columns: 26px 1fr; align-items: center; padding: 9px 10px; color: #53617a; border-radius: 9px; font-size: 12px; font-weight: 700; text-decoration: none; transition: color .2s ease, background .2s ease, transform .2s ease; }
.toc nav a span { color: #a0abbd; font-family: "DM Mono", monospace; font-size: 9px; }
.toc nav a:hover, .toc nav a.active { color: var(--blue-dark); background: rgba(255,255,255,.86); transform: translateX(3px); }
.toc nav a.active span { color: var(--blue); }
.toc-foot { position: relative; z-index: 1; margin: 30px 5px 0; color: #8a96a9; font-size: 9px; line-height: 1.5; }
.nav-toggle { display: none; }

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

@media (max-width: 1120px) {
  main { width: min(980px, calc(100% - 40px)); padding-left: 218px; }
  .toc { left: 15px; width: 188px; }
  .toc nav a { grid-template-columns: 23px 1fr; padding-inline: 8px; font-size: 11px; }
  .toc-foot { display: none; }
  .motivation-layout { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  main { width: min(100% - 32px, 740px); padding-left: 0; }
  .toc { top: 0; left: 0; width: 282px; height: 100vh; padding: 42px 30px; border-radius: 0 18px 18px 0; transform: translate(-110%, 0); transition: transform .25s ease; }
  .toc.open { transform: translate(0, 0); }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 4px; position: fixed; z-index: 30; top: 16px; left: 16px; width: 43px; height: 43px; padding: 11px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 8px 20px rgba(29,51,91,.12); }
  .nav-toggle span:not(.sr-only) { width: 100%; height: 2px; background: var(--ink); border-radius: 2px; }
  .hero { min-height: auto; padding-top: 102px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .method-blocks { grid-template-columns: 1fr; }
  .rope-figure { width: 100%; }
}
@media (max-width: 620px) {
  main { width: min(100% - 24px, 540px); }
  h1 { font-size: 38px; }
  .authors { gap: 3px 13px; font-size: 15px; }
  .affiliations { font-size: 11px; }
  .method-figure { padding: 10px 10px 0; border-radius: 14px; }
  .method-figure figcaption { margin: 11px -10px 0; }
  .section { padding-top: 84px; }
  .section-heading { gap: 10px; }
  .section-lede { margin-left: 0; }
  .abstract-grid { padding: 25px; }
  .abstract-copy p { text-align: left; }
  .issue { padding: 22px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid span { min-height: 0; }
  .gallery-heading { align-items: flex-start; gap: 18px; flex-direction: column; }
  .gallery-frame { padding: 10px; }
  .gallery-frame figcaption { position: static; margin-top: 10px; text-align: center; }
  footer { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
