:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f0f4f8;
  --text: #1f2937;
  --muted: #667085;
  --faint: #8b98a8;
  --border: #d9e1ea;
  --navy: #162b49;
  --blue: #2f6fae;
  --green: #2f855a;
  --orange: #b86118;
  --shadow: 0 10px 28px rgba(22, 43, 73, 0.08);
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Google Sans", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.site-nav {
  width: min(960px, calc(100% - 32px));
  min-height: 54px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
}

.nav-links a {
  color: var(--muted);
  border-radius: 5px;
  padding: 6px 9px;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
  background: #e9f1fb;
}

.title-hero {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 44px;
}

.hero-copy {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.venue,
.section-kicker,
.stage-label {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.publication-title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.15rem, 4vw, 3rem);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: 0;
}

.paper-full-title {
  max-width: 760px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: clamp(0.92rem, 1.3vw, 1.08rem);
  font-weight: 500;
  line-height: 1.35;
}

.authors {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px 18px;
}

.author-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 18px;
}

.authors a {
  color: var(--text);
  font-weight: 620;
  text-decoration: none;
}

.authors a:hover {
  color: var(--blue);
}

.author-notes {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 14px;
}

sup {
  color: var(--blue);
  font-size: 0.68em;
}

.institutions {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 16px;
}

.actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid #c6d1de;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 730;
  text-decoration: none;
}

.button.primary {
  color: #ffffff;
  background: var(--navy);
  border-color: var(--navy);
}

.button.secondary {
  color: var(--navy);
  background: #ffffff;
}

.section,
.teaser-section {
  padding: 58px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.teaser-section {
  background: var(--surface);
}

.content {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
}

.content-wide,
.content-figure {
  width: min(920px, calc(100% - 32px));
}

.content-reading {
  width: min(800px, calc(100% - 32px));
}

h2 {
  margin: 0 0 20px;
  color: var(--navy);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 740;
  line-height: 1.2;
  text-align: center;
}

h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.02rem;
  line-height: 1.28;
}

.abstract-copy {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.abstract-copy p {
  margin: 0;
}

.abstract-copy p + p {
  margin-top: 16px;
}

.abstract-copy strong {
  color: var(--navy);
}

.metric-band {
  color: #ffffff;
  background: var(--navy);
  padding: 28px 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  padding: 8px 0;
  text-align: center;
}

.metric span {
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 820;
  line-height: 1;
}

.metric p {
  max-width: 180px;
  margin: 7px auto 0;
  color: #dbe7f4;
  font-size: 0.86rem;
}

.paper-figure {
  width: min(560px, 100%);
  margin: 18px auto 0;
}

.teaser-section .content-figure {
  width: min(960px, calc(100% - 32px));
}

.teaser-figure {
  width: min(920px, 100%);
}

.qualitative-figure {
  width: min(920px, 100%);
}

.method-figure {
  width: min(920px, 100%);
}

.qualitative-figure {
  margin-top: 42px;
}

.video-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.video-task {
  margin-top: 28px;
}

.video-task + .video-task {
  margin-top: 42px;
}

.task-heading {
  margin: 0;
  color: var(--navy);
  font-size: 1.16rem;
  font-weight: 780;
  text-align: center;
}

.task-title {
  margin: 5px 0 0;
  color: var(--navy);
  font-size: 1.02rem;
  font-weight: 760;
  text-align: center;
}

.video-panel {
  min-width: 0;
}

.video-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.video-heading h3 {
  margin: 0;
}

.video-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 720;
  white-space: nowrap;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.video-overlay {
  position: absolute;
  inset: 12px 12px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.video-time,
.success-mark {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.success-mark {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.video-frame.is-success .success-mark {
  opacity: 1;
  transform: translateY(0);
  color: #ecfdf3;
  background: rgba(47, 133, 90, 0.9);
  border-color: rgba(255, 255, 255, 0.28);
}

.video-caption {
  max-width: 720px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: center;
}

.figure-scroll {
  overflow-x: auto;
}

.figure-scroll img {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.paper-figure figcaption {
  max-width: 680px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: center;
}

.stage-grid {
  display: grid;
  gap: 16px;
}

.stage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 26px;
}

.stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 22px rgba(22, 43, 73, 0.04);
}

.section-alt .stage {
  background: #fbfcfe;
}

.stage p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.stage p + p {
  margin-top: 11px;
}

.table-block {
  margin-top: 28px;
}

.table-block + .table-block {
  margin-top: 40px;
}

.table-heading {
  max-width: 800px;
  margin-bottom: 11px;
}

.table-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.table-scroll {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

th,
td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2) {
  text-align: left;
}

thead th {
  color: var(--navy);
  background: var(--surface-soft);
  font-weight: 800;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(4n + 1),
tbody tr:nth-child(4n + 2) {
  background: #fbfcfe;
}

tbody tr.ours {
  color: #173f32;
  background: #edf8f2;
  font-weight: 750;
}

.muted {
  color: var(--faint);
  font-style: italic;
}

.bibtex {
  position: relative;
  background: #0f172a;
  color: #dbe7f4;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.bibtex pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.7;
}

.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 32px;
  color: #ffffff;
  background: #1f2937;
  border: 1px solid #334155;
  border-radius: 5px;
  font-weight: 730;
  cursor: pointer;
}

.copy-button:hover {
  background: #334155;
}

.site-footer {
  padding: 32px 16px;
  color: var(--muted);
  background: #ffffff;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 4px;
}

@media (max-width: 860px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-inner {
    padding: 40px 0 36px;
  }

  .metric-grid,
  .stage-grid {
    grid-template-columns: 1fr;
  }

  .figure-scroll img {
    min-width: 560px;
  }

  .figure-scroll {
    padding-bottom: 4px;
  }

  .paper-figure figcaption {
    text-align: left;
  }

  .video-caption {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .section,
  .teaser-section {
    padding: 46px 0;
  }

  .publication-title {
    font-size: clamp(2.15rem, 12vw, 3rem);
  }

  .paper-full-title {
    font-size: 0.98rem;
  }

  .nav-links a {
    padding: 5px 7px;
    font-size: 0.82rem;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
