:root {
  color-scheme: dark;
  --ink: #071013;
  --ink-2: #0d1b20;
  --paper: #f6f2ea;
  --muted: #a9bac1;
  --line: rgba(246, 242, 234, 0.18);
  --coral: #ff6b5e;
  --cyan: #55d6d2;
  --gold: #f3c95b;
  --green: #8fd694;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.hero {
  min-height: 100vh;
  scroll-snap-align: start;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: clamp(8px, 1.25vw, 14px);
  padding: clamp(10px, 1.4vw, 18px) 0 0;
  background: #061015;
  overflow: hidden;
}

.topbar {
  width: min(1180px, calc(100vw - clamp(24px, 4vw, 56px)));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 40px;
  color: rgba(246, 242, 234, 0.92);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
  color: var(--paper);
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.navlinks a,
.resource-links a {
  border: 1px solid var(--line);
  background: rgba(246, 242, 234, 0.06);
  backdrop-filter: blur(14px);
  border-radius: 999px;
  padding: 8px 13px;
  color: rgba(246, 242, 234, 0.9);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.navlinks a:hover,
.resource-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(85, 214, 210, 0.7);
  background: rgba(85, 214, 210, 0.12);
}

.title-block {
  text-align: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 28px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  font-size: clamp(3.1rem, 8vw, 7.6rem);
  line-height: 0.84;
  font-weight: 900;
  letter-spacing: 0;
}

.subtitle {
  margin: clamp(8px, 1.1vw, 12px) 0 0;
  font-size: clamp(1rem, 1.7vw, 1.42rem);
  color: rgba(246, 242, 234, 0.9);
}

.authors,
.affiliations,
.corresponding {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.3vw, 1rem);
}

.authors sup,
.affiliations sup,
.corresponding sup {
  color: var(--cyan);
  font-size: 0.7em;
  font-weight: 850;
  margin-left: 1px;
}

.affiliations sup,
.corresponding sup { margin-right: 2px; }

.corresponding { margin-top: 1px; }

.interactive-stage {
  position: relative;
  width: 100vw;
  height: max(520px, 50vw);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: #020506;
  cursor: crosshair;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

#panoCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.demo-guide {
  width: min(1180px, calc(100vw - clamp(24px, 4vw, 56px)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(360px, 1.24fr) minmax(300px, 0.74fr);
  align-items: center;
  gap: clamp(12px, 1.7vw, 24px);
  border: 1px solid rgba(246, 242, 234, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(246, 242, 234, 0.07), rgba(85, 214, 210, 0.08) 48%, rgba(243, 201, 91, 0.07)),
    rgba(7, 16, 19, 0.74);
  padding: clamp(12px, 1.25vw, 16px) clamp(14px, 1.8vw, 20px);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.demo-kicker {
  margin: 0;
  display: grid;
  gap: 3px;
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.demo-kicker strong {
  color: var(--gold);
  font-size: clamp(2.15rem, 3.2vw, 3.65rem);
  line-height: 0.82;
  letter-spacing: 0;
}

.demo-kicker span:last-child {
  color: rgba(246, 242, 234, 0.72);
  font-size: clamp(0.9rem, 1.14vw, 1.06rem);
  letter-spacing: 0;
}

.demo-task { min-width: 0; }

.demo-challenge {
  margin: 0 0 8px;
  color: rgba(85, 214, 210, 0.92);
  font-size: clamp(0.7rem, 0.84vw, 0.8rem);
  font-weight: 850;
  letter-spacing: 0.04em;
}

.demo-guide h2 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(0.95rem, 1.08vw, 1.16rem);
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: 0;
}

.demo-title-affix {
  display: block;
  color: rgba(246, 242, 234, 0.92);
}

.demo-target {
  display: block;
  margin: 3px 0 4px;
  color: rgba(169, 186, 193, 0.98);
  font-size: clamp(1.55rem, 2.5vw, 2.55rem);
  line-height: 0.98;
  font-weight: 900;
}

.demo-body {
  margin: 0;
  color: rgba(246, 242, 234, 0.66);
  font-size: clamp(0.68rem, 0.78vw, 0.78rem);
  line-height: 1.34;
}


.demo-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: clamp(44px, 5vw, 70px);
  height: clamp(78px, 12vh, 132px);
  transform: translateY(-50%);
  border: 0;
  background: rgba(7, 16, 19, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 160ms ease, opacity 160ms ease, transform 160ms ease;
  opacity: 0.72;
}

.demo-nav:hover {
  background: rgba(7, 16, 19, 0.38);
  opacity: 1;
}

.demo-nav:active { transform: translateY(-50%) scale(0.96); }

.demo-nav::before {
  content: "";
  width: 0;
  height: 0;
  border-top: clamp(14px, 2.1vw, 24px) solid transparent;
  border-bottom: clamp(14px, 2.1vw, 24px) solid transparent;
}

.demo-nav-prev {
  left: 0;
  border-radius: 0 4px 4px 0;
}

.demo-nav-next {
  right: 0;
  border-radius: 4px 0 0 4px;
}

.demo-nav-prev::before {
  border-right: clamp(18px, 2.8vw, 30px) solid rgba(246, 242, 234, 0.78);
}

.demo-nav-next::before {
  border-left: clamp(18px, 2.8vw, 30px) solid rgba(246, 242, 234, 0.78);
}

.cursor-label {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  border: 1px solid rgba(246, 242, 234, 0.24);
  background: rgba(7, 16, 19, 0.78);
  backdrop-filter: blur(14px);
  color: rgba(246, 242, 234, 0.94);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 120ms ease;
}

.cursor-label.visible { opacity: 1; }

.projection-panel {
  position: absolute;
  right: clamp(16px, 3vw, 42px);
  bottom: clamp(16px, 3vw, 34px);
  width: min(36vw, 480px);
  min-width: 320px;
  z-index: 4;
  border: 1px solid rgba(246, 242, 234, 0.24);
  background: rgba(7, 16, 19, 0.84);
  backdrop-filter: blur(18px);
  padding: 12px;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  pointer-events: none;
}

.projection-panel.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.projection-header,
.readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(246, 242, 234, 0.86);
  font-size: 0.78rem;
  font-weight: 750;
}

.projection-header span:last-child {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

#projectionCanvas {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  margin: 10px 0;
  background: #111;
}

.readout span {
  white-space: nowrap;
  color: rgba(246, 242, 234, 0.78);
}

.target-label {
  margin: 10px 0 0;
  color: var(--gold);
  font-size: 0.82rem;
}

.content {
  scroll-snap-align: start;
  background: var(--paper);
  color: #132126;
}

.section {
  padding: clamp(56px, 8vw, 108px) clamp(20px, 6vw, 84px);
  border-bottom: 1px solid rgba(7, 16, 19, 0.12);
}

.intro-section,
.resources-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.section-copy { max-width: 760px; }
.section-copy.wide { max-width: 980px; }
.section-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}
.section-copy p:not(.section-kicker) {
  margin: 22px 0 0;
  color: #42535a;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
}

.idea-flow {
  display: grid;
  gap: 12px;
}

.idea-flow article,
.method-grid article,
.challenge-grid article,
.resource-links a,
.citation-section pre {
  border: 1px solid rgba(7, 16, 19, 0.14);
  background: rgba(255, 255, 255, 0.66);
}

.idea-flow article {
  padding: 20px;
  border-radius: 8px;
}

.idea-flow span {
  display: block;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.idea-flow strong {
  display: block;
  margin-top: 8px;
  color: #081417;
  font-size: clamp(1.1rem, 1.7vw, 1.55rem);
  line-height: 1.05;
}

.idea-flow p {
  margin: 10px 0 0;
  color: #5c6970;
  font-size: 0.96rem;
}

.challenge-section {
  background: #f4efe6;
}

.paper-figure {
  width: min(1180px, 100%);
  margin: clamp(30px, 4vw, 48px) auto 0;
}

.paper-figure img {
  width: 100%;
  border: 1px solid rgba(7, 16, 19, 0.13);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(7, 16, 19, 0.13);
}

.paper-figure figcaption {
  max-width: 920px;
  margin: 16px auto 0;
  color: #526268;
  font-size: clamp(0.95rem, 1.18vw, 1.08rem);
}

.challenge-grid,
.method-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(28px, 4vw, 48px);
}

.method-section { background: #fffaf2; }

.method-grid article,
.challenge-grid article {
  padding: clamp(20px, 3vw, 32px);
  min-height: 230px;
  border-radius: 8px;
}

.method-grid span,
.challenge-grid span,
.case-card span {
  color: var(--coral);
  font-weight: 900;
  font-size: 0.9rem;
}

.challenge-grid span { color: #1aa6a2; }

.method-grid h3,
.challenge-grid h3,
.case-card h3 {
  margin: 18px 0 0;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.05;
}

.method-grid p,
.challenge-grid p,
.case-card p {
  margin: 18px 0 0;
  color: #506167;
}

.pipeline-figure img { padding: clamp(8px, 1vw, 14px); }

.experiments-section {
  background: #0b171c;
  color: var(--paper);
  border-bottom-color: rgba(246, 242, 234, 0.14);
}

.experiments-section .section-copy p:not(.section-kicker) {
  color: rgba(246, 242, 234, 0.7);
}

.metric-grid article {
  border: 1px solid rgba(246, 242, 234, 0.16);
  border-radius: 8px;
  padding: clamp(18px, 2.5vw, 28px);
  background: linear-gradient(135deg, rgba(85, 214, 210, 0.13), rgba(243, 201, 91, 0.08));
}

.metric-grid span {
  display: block;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.metric-grid strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 0.9;
}

.metric-grid p {
  margin: 12px 0 0;
  color: rgba(246, 242, 234, 0.68);
}

.metric-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.metric-notes article {
  border: 1px solid rgba(246, 242, 234, 0.14);
  border-radius: 8px;
  background: rgba(246, 242, 234, 0.05);
  padding: 15px;
}

.metric-notes strong {
  display: block;
  color: var(--gold);
  font-size: 0.9rem;
}

.metric-notes p {
  margin: 7px 0 0;
  color: rgba(246, 242, 234, 0.68);
  font-size: 0.9rem;
  line-height: 1.42;
}

.results-table-wrap {
  margin-top: clamp(26px, 4vw, 46px);
  overflow-x: auto;
  border: 1px solid rgba(246, 242, 234, 0.16);
  border-radius: 8px;
  background: rgba(246, 242, 234, 0.04);
}

.results-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.results-table th,
.results-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(246, 242, 234, 0.11);
  text-align: right;
  white-space: nowrap;
}

.results-table th:first-child,
.results-table td:first-child { text-align: left; }

.results-table thead th {
  color: rgba(246, 242, 234, 0.82);
  font-weight: 850;
  background: rgba(246, 242, 234, 0.06);
}

.results-table tbody td { color: rgba(246, 242, 234, 0.76); }

.results-table .group-row td {
  color: var(--cyan);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(85, 214, 210, 0.08);
  text-align: left;
}

.results-table .best-row td {
  color: #081417;
  background: var(--gold);
  font-weight: 900;
}

.experiment-block {
  margin-top: clamp(34px, 5vw, 58px);
  border-top: 1px solid rgba(246, 242, 234, 0.14);
  padding-top: clamp(28px, 4vw, 46px);
}

.experiment-copy {
  max-width: 900px;
}

.mini-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.experiment-copy h3 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(1.55rem, 3vw, 2.75rem);
  line-height: 1.02;
}

.experiment-copy p:not(.mini-kicker) {
  margin: 16px 0 0;
  color: rgba(246, 242, 234, 0.7);
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
}

.ablation-table-wrap {
  margin-top: 22px;
  overflow-x: auto;
  border: 1px solid rgba(246, 242, 234, 0.16);
  border-radius: 8px;
  background: rgba(246, 242, 234, 0.04);
}

.ablation-table { min-width: 820px; }

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.analysis-figure {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(246, 242, 234, 0.18);
  background: #f8f9fb;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.analysis-figure img {
  width: 100%;
  background: #fff;
}

.analysis-figure figcaption {
  margin: 0;
  padding: 14px 16px 16px;
  color: #43525a;
  font-size: 0.94rem;
  line-height: 1.45;
}

.cases-section {
  background: #f6f2ea;
}

.case-carousel {
  position: relative;
  max-width: 1180px;
  margin: clamp(30px, 4vw, 50px) auto 0;
}

.case-track {
  display: block;
}

.case-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.32fr);
  overflow: hidden;
  border: 1px solid rgba(7, 16, 19, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(7, 16, 19, 0.1);
}

.case-card[data-case-slide] {
  display: none;
}

.case-card[data-case-slide].active {
  display: grid;
}

.case-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-right: 1px solid rgba(7, 16, 19, 0.1);
}

.case-card div {
  padding: clamp(20px, 3vw, 34px);
  align-self: start;
}

.case-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: clamp(42px, 4.6vw, 58px);
  height: clamp(74px, 8vw, 104px);
  transform: translateY(-50%);
  border: 0;
  background: rgba(7, 16, 19, 0.26);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.78;
  transition: background 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.case-nav:hover {
  background: rgba(7, 16, 19, 0.44);
  opacity: 1;
}

.case-nav:active { transform: translateY(-50%) scale(0.96); }

.case-nav::before {
  content: "";
  width: 0;
  height: 0;
  border-top: clamp(12px, 1.8vw, 18px) solid transparent;
  border-bottom: clamp(12px, 1.8vw, 18px) solid transparent;
}

.case-nav-prev {
  left: 0;
  border-radius: 0 4px 4px 0;
}

.case-nav-next {
  right: 0;
  border-radius: 4px 0 0 4px;
}

.case-nav-prev::before { border-right: clamp(16px, 2.3vw, 24px) solid rgba(255, 255, 255, 0.9); }
.case-nav-next::before { border-left: clamp(16px, 2.3vw, 24px) solid rgba(255, 255, 255, 0.9); }

.case-counter {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  border: 1px solid rgba(7, 16, 19, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #132126;
  padding: 7px 11px;
  font-size: 0.82rem;
  font-weight: 850;
  box-shadow: 0 10px 26px rgba(7, 16, 19, 0.12);
}

.resources-section { background: #fffaf2; }

.resource-links {
  display: grid;
  gap: 12px;
}

.resource-links a {
  border-radius: 8px;
  padding: 18px 20px;
  color: #102025;
  background: rgba(255, 255, 255, 0.74);
}

.resource-links span {
  display: block;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.resource-links strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  overflow-wrap: anywhere;
}

.citation-section { background: #f1eee7; }
.citation-section pre {
  overflow-x: auto;
  padding: 22px;
  color: #132126;
  font-size: 0.92rem;
  border-radius: 8px;
}

@media (max-width: 860px) {
  .hero { padding: 12px 0 0; gap: 10px; }
  .topbar { align-items: flex-start; }
  .navlinks { gap: 6px; }
  .navlinks a { padding: 7px 10px; font-size: 0.85rem; }
  .interactive-stage { height: 58vh; min-height: 430px; }
  .demo-guide {
    grid-template-columns: 1fr;
    gap: 8px;
    width: calc(100vw - 24px);
    padding: 12px;
  }
  .demo-kicker strong { font-size: 2.25rem; }
  .demo-guide h2 { font-size: 0.92rem; }
  .demo-target { font-size: 1.38rem; }
  .demo-challenge { font-size: 0.68rem; }
  .demo-body { font-size: 0.72rem; }
  .demo-nav { width: 38px; height: 76px; }
  .projection-panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    min-width: 0;
    padding: 10px;
  }
  #projectionCanvas { max-height: 36vh; }
  .intro-section,
  .resources-section,
  .method-grid,
  .challenge-grid,
  .metric-grid,
  .metric-notes,
  .analysis-grid,
  .case-card { grid-template-columns: 1fr; }
  .section { padding: 48px 18px; }
  .case-card img { border-right: 0; border-bottom: 1px solid rgba(7, 16, 19, 0.1); }
  .case-nav { width: 36px; height: 72px; }
  .case-counter { top: 10px; right: 10px; }
}
