:root {
  --indigo-900: #1a1440;
  --indigo-800: #241a5c;
  --indigo-700: #322579;
  --indigo-600: #4b39b3;
  --indigo-500: #6c56e0;
  --amber: #ffb020;
  --amber-soft: #ffca5f;
  --ink: #1b1b2b;
  --ink-soft: #4a4a63;
  --muted: #8a8aa3;
  --bg: #ffffff;
  --bg-alt: #f5f4fb;
  --line: #e7e5f2;
  --best-bg: #efeaff;
  --best-line: #6c56e0;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(30, 20, 80, 0.06);
  --shadow-md: 0 10px 34px rgba(30, 20, 80, 0.12);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo-600); text-decoration: none; }
a:hover { text-decoration: underline; }
sup { font-size: 0.62em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

/* ---------------- HERO ---------------- */
.hero {
  position: relative;
  background: radial-gradient(1200px 600px at 70% -10%, var(--indigo-600) 0%, var(--indigo-800) 45%, var(--indigo-900) 100%);
  color: #fff;
  overflow: hidden;
  padding-bottom: 52px;
}
.hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 15% 30%, rgba(255,176,32,0.16), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 980px; margin: 0 auto; padding: 56px 24px 0; text-align: center; }
.venue-logo {
  display: block;
  margin: 0 auto;
  height: 72px;
  width: auto;
  max-width: min(420px, 92%);
  background: #fff;
  padding: 10px 18px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  object-fit: contain;
}
.paper-title {
  font-size: clamp(1.55rem, 3.2vw, 2.7rem);
  font-weight: 800; line-height: 1.16; letter-spacing: -0.02em;
  margin: 22px auto 22px; max-width: 940px;
}
.authors { display: flex; flex-wrap: wrap; gap: 4px 22px; justify-content: center; font-size: 1.08rem; font-weight: 500; }
.author { color: #fff; }
.affils { margin-top: 10px; color: rgba(255,255,255,0.8); font-size: 0.98rem; }
.author-note { margin-top: 6px; color: rgba(255,255,255,0.62); font-size: 0.85rem; }

/* ---------------- LINK BAR (white) ---------------- */
.hero-links { background: #fff; padding: 34px 0 6px; }
.paper-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 0; }
.link-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 700; font-size: 0.98rem;
  box-shadow: var(--shadow-sm); transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.link-pill:hover { border-color: var(--indigo-500); color: var(--indigo-700); transform: translateY(-2px); text-decoration: none; }
.link-pill svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.link-pill em { font-style: normal; font-weight: 500; font-size: 0.78rem; color: var(--muted); }

.tldr { max-width: 780px; margin: 22px auto 0; color: var(--ink-soft); font-size: 1.14rem; font-weight: 500; text-align: center; }
.tldr .hl { font-weight: 800; color: var(--indigo-600); }

/* ---------------- SECTIONS ---------------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; text-align: center; margin: 0 0 12px; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 780px; margin: 0 auto 34px; font-size: 1.02rem; }

/* teaser sits clearly below the hero */
.teaser-section { padding-top: 64px; padding-bottom: 24px; }
.teaser-figure {
  margin: 0; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden; border: 1px solid var(--line);
}
.teaser-figure img { width: 100%; display: block; }
figcaption { padding: 16px 22px; color: var(--ink-soft); font-size: 0.9rem; background: #fff; }

/* ---------------- ABSTRACT ---------------- */
.abstract-text { font-size: 1.08rem; color: var(--ink-soft); text-align: justify; }
.abstract-text strong { color: var(--ink); }

/* ---------------- METHOD ---------------- */
.method-figure { margin: 0 0 40px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.method-figure img { width: 100%; display: block; padding: 16px 16px 0; }
.component-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.component-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 24px 60px; box-shadow: var(--shadow-sm); }
.component-tag { position: absolute; left: 20px; top: 24px; width: 28px; height: 28px; border-radius: 8px; background: var(--indigo-600); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 0.95rem; }
.component-card h3 { margin: 0 0 8px; font-size: 1.06rem; }
.component-card p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* ---------------- VIDEO (vertical, full size) ---------------- */
.video-grid { display: flex; flex-direction: column; gap: 30px; max-width: 980px; margin: 0 auto; }
.video-item { margin: 0; }
.video-item video { width: 100%; display: block; border-radius: var(--radius); box-shadow: var(--shadow-md); background: #000; }
.video-item figcaption {
  padding: 14px 4px 0; background: transparent; text-align: left;
  font-size: 0.98rem; color: var(--ink); line-height: 1.5;
}
.video-item figcaption strong,
.case-instr strong { color: var(--ink); font-weight: 700; }
.case-instr {
  max-width: 900px; margin: 18px auto 0; text-align: left;
  font-size: 0.98rem; color: var(--ink); line-height: 1.5;
}
.video-cap { margin: 22px auto 0; max-width: 900px; text-align: center; color: var(--ink-soft); font-size: 0.94rem; }

/* ---------------- CONTRIBUTIONS ---------------- */
.contrib-list { margin: 0; padding-left: 0; list-style: none; counter-reset: contrib; }
.contrib-list li {
  position: relative; padding: 18px 20px 18px 62px; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); color: var(--ink-soft); font-size: 1rem;
}
.contrib-list li::before {
  counter-increment: contrib; content: counter(contrib);
  position: absolute; left: 18px; top: 18px; width: 30px; height: 30px; border-radius: 9px;
  background: var(--indigo-600); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 0.98rem;
}
.contrib-list strong { color: var(--ink); }

.subsection-title { font-size: 1.24rem; font-weight: 800; text-align: center; margin: 46px 0 10px; letter-spacing: -0.01em; }

/* Practical Utility: one tall table on the left, three stacked on the right,
   both columns the same height. The right cards share that height in
   proportion to the native table aspect ratios (table8 : table6 : table7). */

/* ---------------- VTP SLIDER ---------------- */
.vtp-explorer.single { max-width: 980px; margin: 8px auto 0; }
.vtp-stage { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: #000; aspect-ratio: 2 / 1; }
.compare { position: absolute; inset: 0; cursor: ew-resize; touch-action: none; }
.compare-base,
.compare-top-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  user-select: none; -webkit-user-drag: none;
  pointer-events: none;
  background: #000;
}
.compare-top-img {
  clip-path: inset(0 12% 0 0);
  -webkit-clip-path: inset(0 12% 0 0);
}
.compare-divider {
  position: absolute; top: 0; bottom: 0; left: 88%;
  width: 3px; background: #fff;
  transform: translateX(-50%);
  z-index: 2; pointer-events: none;
}
.compare-handle {
  position: absolute; top: 50%; left: 88%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--indigo-700);
  display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.35); cursor: ew-resize; z-index: 3;
  font-size: 1.15rem; font-weight: 700; pointer-events: none;
}
.compare-label {
  position: absolute; bottom: 12px; z-index: 4; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: #fff;
  background: rgba(0,0,0,0.55); padding: 5px 11px; border-radius: 999px;
  pointer-events: none;
}
.label-left { left: 12px; }
.label-right { right: 12px; }

.vtp-controls-row { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 20px; }
.step-btn {
  border: 1px solid var(--line); background: #fff; color: var(--indigo-700); cursor: pointer;
  padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; font-family: inherit;
  box-shadow: var(--shadow-sm); transition: all 0.15s ease;
}
.step-btn:hover { background: var(--indigo-600); color: #fff; border-color: var(--indigo-600); }
.step-btn:disabled { opacity: 0.4; cursor: default; background: #fff; color: var(--muted); border-color: var(--line); }
.vtp-counter { min-width: 120px; text-align: center; font-size: 0.92rem; font-weight: 700; color: var(--ink-soft); }
.vtp-hint { max-width: 820px; margin: 20px auto 0; font-size: 0.88rem; color: var(--ink-soft); background: var(--bg-alt); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 16px; text-align: center; }

/* ---------------- TABLE FIGURES (paper originals) ---------------- */
.table-figure {
  margin: 0 auto 22px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; text-align: center;
}
.table-figure img { width: 100%; max-width: 100%; display: block; margin: 0 auto; }
.table-figure-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.utility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
.utility-grid > .table-figure,
.utility-stack > .table-figure {
  margin: 0;
  padding: 12px;
  display: flex;
  align-items: center;
}
.utility-grid > .table-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.utility-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  height: 100%;
}
.utility-stack > .table-figure {
  min-height: 0;
}
.utility-stack > .table-figure:nth-child(1) { flex: 292 1 0; }
.utility-stack > .table-figure:nth-child(2) { flex: 248 1 0; }
.utility-stack > .table-figure:nth-child(3) { flex: 248 1 0; }
.utility-stack > .table-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ---------------- QUALITATIVE ---------------- */
.qual-figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: #fff; }
.qual-figure img { width: 100%; display: block; padding: 12px 12px 0; }

/* ---------------- BIBTEX ---------------- */
.bibtex-wrap { position: relative; }
.bibtex-wrap pre {
  background: var(--indigo-900); color: #e8e6f7; border-radius: var(--radius);
  padding: 24px 22px; overflow-x: auto; font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem; line-height: 1.6; margin: 0; box-shadow: var(--shadow-md);
}
.copy-btn { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25); padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 0.82rem; cursor: pointer; font-family: inherit; }
.copy-btn:hover { background: rgba(255,255,255,0.22); }

/* ---------------- FOOTER ---------------- */
.footer { background: var(--indigo-900); color: rgba(255,255,255,0.78); padding: 40px 0; text-align: center; }
.footer a { color: var(--amber-soft); }
.footer p { margin: 6px 0; font-size: 0.9rem; }
.footer .muted { color: rgba(255,255,255,0.5); }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 900px) {
  .component-grid, .utility-grid, .table-figure-row { grid-template-columns: 1fr; }
  .utility-stack { height: auto; }
  .utility-stack > .table-figure { flex: none; }
  .utility-stack > .table-figure img { height: auto; }
}
@media (max-width: 520px) {
  .section { padding: 52px 0; }
  .link-pill { padding: 10px 16px; font-size: 0.92rem; }
  .vtp-controls-row { gap: 12px; }
  .step-btn { padding: 10px 14px; font-size: 0.88rem; }
}

/* reveal animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
