:root {
  --ink: #15233b;
  --ink-soft: #536175;
  --navy: #17345d;
  --navy-deep: #0d203b;
  --blue: #2f80c9;
  --cyan: #16a6bd;
  --orange: #e8752b;
  --paper: #ffffff;
  --surface: #f4f7fa;
  --line: #dce4ec;
  --line-strong: #b9c7d6;
  --radius: 14px;
  --shadow: 0 16px 40px rgba(21, 35, 59, 0.09);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
}

code {
  border-radius: 5px;
  background: rgba(23, 52, 93, 0.08);
  color: var(--navy);
  font-size: 0.9em;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  color: var(--paper);
  background: var(--navy-deep);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container.is-wide-desktop {
  max-width: 1280px;
}

.publication-header {
  overflow: hidden;
  color: var(--paper);
  background:
    linear-gradient(115deg, rgba(22, 166, 189, 0.16), transparent 34%),
    linear-gradient(180deg, var(--navy-deep), var(--navy));
}

.publication-header::before,
.publication-header::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.publication-header::before {
  width: 34rem;
  height: 34rem;
  top: -25rem;
  right: -8rem;
}

.publication-header::after {
  width: 22rem;
  height: 22rem;
  bottom: -18rem;
  left: -5rem;
}

.publication-header .hero-body {
  position: relative;
  z-index: 1;
  padding: 4.75rem 1.5rem 4rem;
}

.review-label,
.section-kicker {
  margin-bottom: 0.85rem;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.review-label {
  color: #82e4ef;
}

.publication-title.title {
  max-width: 980px;
  margin: 0 auto 1rem;
  color: var(--paper);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.publication-subtitle {
  max-width: 760px;
  margin: 0 auto 1.75rem;
  color: #d7e4f1;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 500;
}

.publication-authors {
  color: var(--paper);
  font-size: 1.08rem;
  font-weight: 650;
}

.publication-venue {
  margin-top: 0.3rem;
  color: #b9caDC;
  font-size: 0.96rem;
  font-weight: 500;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2.3rem;
}

.section-nav a {
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #edf5fb;
  font-size: 0.88rem;
  font-weight: 650;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.section-nav a:hover,
.section-nav a:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.section {
  padding: 5.25rem 1.5rem;
}

.section-first {
  padding-top: 4.5rem;
}

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

.section-heading {
  max-width: 760px;
  margin-bottom: 2.25rem;
}

.section-heading.is-centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-heading .title.is-3 {
  margin-bottom: 0.65rem;
  color: var(--ink);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-summary {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.abstract-copy {
  padding-left: 1.5rem;
  border-left: 3px solid var(--cyan);
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.paper-figure {
  margin: 0;
}

.paper-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.paper-figure figcaption,
.figure-caption {
  max-width: 920px;
  margin: 1.15rem auto 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  text-align: center;
}

.teaser-video-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #06111f;
  box-shadow: var(--shadow);
}

.teaser-video {
  display: block;
  width: 100%;
  max-height: 620px;
  background: #06111f;
  object-fit: contain;
}

.video-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(13, 32, 59, 0.78);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.experiment-block {
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--line);
}

.experiment-header {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 1.2rem;
  align-items: start;
  margin-bottom: 1.3rem;
}

.task-number {
  padding-top: 0.3rem;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.experiment-header .title.is-4 {
  margin-bottom: 0.2rem;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 750;
}

.experiment-header p {
  color: var(--ink-soft);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.method-card {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(21, 35, 59, 0.05);
}

.method-card.is-ours {
  border-color: rgba(22, 166, 189, 0.7);
  box-shadow: 0 10px 30px rgba(22, 166, 189, 0.12);
}

.method-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0.2rem 0.75rem;
}

.method-card-header h4 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.method-card-header > span {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 650;
}

.ours-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  color: #087e90;
  background: rgba(22, 166, 189, 0.12);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 0.12rem;
}

.rollout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.rollout {
  min-width: 0;
  margin: 0;
}

.rollout-switcher {
  position: relative;
}

.rollout-options {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 96px;
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(13, 32, 59, 0.58);
  backdrop-filter: blur(6px);
}

.rollout-option {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0.38rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.rollout-option span,
.rollout-option small {
  display: block;
}

.rollout-option span {
  font-size: 0.75rem;
  font-weight: 800;
}

.rollout-option small {
  margin-top: 0.02rem;
  color: var(--ink-soft);
  font-size: 0.64rem;
}

.rollout-option:hover,
.rollout-option:focus-visible {
  border-color: var(--blue);
}

.rollout-option.is-active {
  border-color: var(--blue);
  color: var(--paper);
  background: var(--navy);
}

.rollout-option.is-active small {
  color: #c9d9e7;
}

.method-card.is-ours .rollout-option.is-active {
  border-color: #087e90;
  background: #087e90;
}

.rollout video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #06111f;
  object-fit: contain;
}

.rollout figcaption {
  padding: 0.45rem 0.15rem 0.05rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-align: center;
}

.results-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(21, 35, 59, 0.06);
}

.results-table {
  margin: 0;
  font-size: 0.96rem;
}

.results-table thead th {
  border-color: var(--line);
  color: var(--ink);
  background: #edf3f8;
}

.results-table td,
.results-table th {
  padding: 1rem 1.1rem;
  border-color: var(--line);
  vertical-align: middle;
}

.results-table .ours-row th,
.results-table .ours-row td {
  color: #087e90;
  font-weight: 800;
}

.results-table .ours-row {
  background: rgba(22, 166, 189, 0.07);
}

.table-note {
  margin-top: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.ablation-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
}

.ablation-stat {
  display: grid;
  justify-items: center;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.ablation-stat.is-ours {
  border-color: rgba(22, 166, 189, 0.7);
  background: rgba(22, 166, 189, 0.08);
}

.ablation-stat span {
  color: var(--ink);
  font-weight: 800;
}

.ablation-stat strong {
  margin: 0.25rem 0;
  color: var(--navy);
  font-size: 2.6rem;
  line-height: 1.1;
}

.ablation-stat.is-ours strong {
  color: #087e90;
}

.ablation-stat small,
.ablation-note {
  color: var(--ink-soft);
}

.ablation-arrow {
  color: var(--blue);
  font-size: 1.8rem;
  font-weight: 800;
}

.ablation-note {
  max-width: 760px;
  margin: 1rem auto 0;
  font-size: 0.9rem;
  text-align: center;
}

.footer {
  padding: 2.75rem 1.5rem;
  color: #6d7a8b;
  background: #f7f9fb;
  font-size: 0.9rem;
}

.template-credit {
  margin-top: 0.35rem;
}

.scroll-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 20;
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 50%;
  color: var(--paper);
  background: var(--navy);
  box-shadow: 0 8px 24px rgba(13, 32, 59, 0.28);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.scroll-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top:hover,
.scroll-to-top:focus-visible {
  background: var(--blue);
}

@media (max-width: 900px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 600px) {
  .publication-header .hero-body {
    padding: 3.5rem 1rem 3rem;
  }

  .section {
    padding: 4rem 1rem;
  }

  .section-nav {
    gap: 0.45rem;
  }

  .section-nav a {
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
  }

  .rollout-switcher {
    position: relative;
  }

  .rollout-options {
    top: 0.35rem;
    right: 0.35rem;
    width: 90px;
    gap: 0.25rem;
    padding: 0.22rem;
  }

  .rollout-option {
    padding: 0.35rem 0.4rem;
    text-align: center;
  }

  .ablation-comparison {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .ablation-arrow {
    transform: rotate(90deg);
  }

  .experiment-header {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .results-table td,
  .results-table th {
    padding: 0.8rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
