:root {
  --ink: #172033;
  --muted: #5d6677;
  --blue: #3f69ba;
  --blue-dark: #23498f;
  --line: #d9dee8;
  --soft: #f5f7fa;
  --paper: #ffffff;
  --max-width: 1160px;
}

* { 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;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, select { font: inherit; }
.page-width { width: min(calc(100% - 40px), var(--max-width)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 max(24px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid rgba(217, 222, 232, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
}
.brand {
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
}
.site-header nav { display: flex; gap: 28px; }
.site-header nav a {
  color: #3f4757;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.site-header nav a:hover { color: var(--blue-dark); }

.hero { padding: 72px 0 54px; text-align: center; }
.venue, .section-label {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(3rem, 7vw, 5.4rem); line-height: 1.02; }
.paper-title {
  max-width: 930px;
  margin: 17px auto 22px;
  color: #30394a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.3vw, 1.78rem);
  line-height: 1.35;
}
.paper-actions { display: flex; justify-content: center; gap: 10px; margin-bottom: 38px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 8px 18px;
  border: 1px solid #aab4c6;
  border-radius: 4px;
  color: #283244;
  background: white;
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.button.primary { border-color: var(--blue-dark); color: white; background: var(--blue-dark); }
.button:hover { border-color: var(--blue); color: var(--blue-dark); }
.button.primary:hover { color: white; background: #183c7e; }

.teaser-figure { margin: 0; }
.figure-button { width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.teaser-figure img { width: 100%; border: 1px solid #e1e5ec; background: white; }
.teaser-figure figcaption, .paper-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .98rem;
  line-height: 1.5;
  text-align: left;
}

.motivation-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 54px;
  margin-top: 48px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.motivation-copy h2 { margin: 0 0 14px; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.18; }
.motivation-copy p:last-child { margin: 0; color: var(--muted); }
.contribution-list { margin: 0; padding: 0; list-style: none; }
.contribution-list li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 0 0 18px; }
.contribution-list li + li { padding-top: 18px; border-top: 1px solid var(--line); }
.contribution-list span { color: var(--blue); font-family: Georgia, serif; font-size: 1.05rem; font-weight: 700; }
.contribution-list p { margin: 0; color: var(--muted); }
.contribution-list strong { color: var(--ink); }

.section { padding: 66px 0; scroll-margin-top: 64px; }
.section-tint { background: var(--soft); border-block: 1px solid #e8ebf0; }
.section-heading { margin-bottom: 28px; }
.section-heading.compact { max-width: 800px; }
.section-heading h2, .efficiency-copy h2 { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
.section-heading > p:last-child, .efficiency-copy > p { margin: 0; color: var(--muted); }
.row-heading { display: flex; align-items: end; justify-content: space-between; gap: 36px; }
.row-heading > div { max-width: 770px; }

.split-view {
  --split: 50%;
  position: relative;
  width: min(100%, 960px);
  aspect-ratio: 4 / 3;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid #cbd2de;
  background: #d9d9d9;
  box-shadow: 0 12px 30px rgba(25, 36, 60, .08);
}
.split-base, .split-overlay img { width: 100%; height: 100%; object-fit: cover; }
.split-overlay { position: absolute; inset: 0 auto 0 0; width: var(--split); overflow: hidden; }
.split-overlay img { width: min(960px, calc(100vw - 40px)); max-width: none; image-rendering: auto; }
.split-line { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; background: white; box-shadow: 0 0 0 1px rgba(23,32,51,.35); transform: translateX(-1px); pointer-events: none; }
.split-line span {
  position: absolute;
  top: 50%; left: 50%;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid #aab3c2;
  border-radius: 50%;
  color: #3d4757;
  background: rgba(255,255,255,.92);
  font-size: 1.2rem;
  transform: translate(-50%, -50%);
}
.split-label { position: absolute; top: 16px; z-index: 2; padding: 4px 9px; color: white; background: rgba(18, 27, 43, .72); font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
.split-label.left { left: 16px; }
.split-label.right { right: 16px; }
.split-range { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.scene-navigation { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
.arrow-button { display: grid; place-items: center; width: 38px; height: 34px; border: 1px solid #aeb7c6; border-radius: 3px; color: #2e3b51; background: white; cursor: pointer; }
.arrow-button:hover { border-color: var(--blue); color: var(--blue-dark); }
.scene-count { min-width: 110px; color: var(--muted); font-size: .86rem; text-align: center; }

.method-select { display: grid; gap: 5px; min-width: 220px; color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.method-select select { padding: 9px 34px 9px 11px; border: 1px solid #aeb7c6; border-radius: 3px; color: var(--ink); background: white; font-size: .9rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.gif-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gif-grid figure { margin: 0; overflow: hidden; border: 1px solid #cbd2de; background: white; }
.gif-grid figcaption { padding: 8px 11px; border-bottom: 1px solid #dce1e9; color: #394458; font-size: .82rem; font-weight: 700; }
.gif-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gif-grid .ours-panel { border: 2px solid var(--blue); }
.gif-grid .ours-panel figcaption { color: var(--blue-dark); }
.comparison-navigation { margin-top: 16px; }

.efficiency-layout { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(280px, .78fr); align-items: center; gap: 54px; }
.plain-figure { margin: 0; }
.plain-figure img { width: 100%; }
.efficiency-copy p { margin-bottom: 22px; }
.metric-row { display: flex; gap: 38px; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.metric-row div { display: grid; }
.metric-row dt { color: var(--blue-dark); font-family: Georgia, serif; font-size: 2rem; line-height: 1.1; }
.metric-row dd { margin: 4px 0 0; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }

.paper-figure { margin: 30px 0 0; }
.paper-figure img { width: 100%; background: white; }
.method-figure { margin-top: 20px; }
.quantitative-figure { margin-top: 24px; }
.quantitative-figure .figure-button { padding: 22px; border: 1px solid var(--line); background: white; }
.quantitative-figure figcaption { margin-bottom: 0; }
.temporal-figure { margin-top: 48px; }

footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); background: white; font-size: .8rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; }

dialog { max-width: min(94vw, 1500px); max-height: 92vh; padding: 18px; border: 0; background: white; box-shadow: 0 24px 90px rgba(0,0,0,.28); }
dialog::backdrop { background: rgba(13, 20, 32, .78); }
dialog img { max-height: calc(92vh - 36px); margin: auto; }
#dialogClose { position: fixed; top: 18px; right: 22px; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%; color: #1f2937; background: white; font-size: 1.1rem; cursor: pointer; box-shadow: 0 3px 14px rgba(0,0,0,.2); }

@media (max-width: 850px) {
  .site-header nav { gap: 16px; }
  .site-header nav a:nth-child(2), .site-header nav a:nth-child(4) { display: none; }
  .hero { padding-top: 52px; }
  .motivation-grid, .efficiency-layout { grid-template-columns: 1fr; gap: 32px; }
  .row-heading { align-items: stretch; flex-direction: column; gap: 22px; }
  .method-select { width: min(100%, 320px); }
  .gif-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .page-width { width: min(calc(100% - 24px), var(--max-width)); }
  .site-header { height: 58px; padding-inline: 14px; }
  .site-header nav { gap: 12px; }
  .site-header nav a { font-size: .8rem; }
  .hero { padding: 40px 0; }
  h1 { font-size: 2.65rem; }
  .paper-title { font-size: 1.15rem; }
  .motivation-grid { margin-top: 34px; padding-top: 30px; }
  .section { padding: 48px 0; }
  .section-heading h2, .efficiency-copy h2 { font-size: 2rem; }
  .split-overlay img { width: calc(100vw - 24px); }
  .split-line span { width: 36px; height: 36px; }
  .gif-grid { gap: 8px; }
  .gif-grid figcaption { padding: 6px 8px; font-size: .72rem; }
  .quantitative-figure .figure-button { padding: 8px; }
  .footer-inner { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
