:root {
  --ink: #18202a;
  --muted: #5e6977;
  --line: #dfe5ec;
  --paper: #ffffff;
  --soft: #f4f7fa;
  --accent: #006d77;
  --accent-2: #d95f02;
  --accent-soft: #e5f3f4;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  min-height: 58px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--accent);
}

.hero-section {
  background:
    linear-gradient(180deg, rgba(244, 247, 250, 0.98), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at 16% 22%, rgba(0, 109, 119, 0.12), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(217, 95, 2, 0.10), transparent 30%);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  padding: 72px 24px 46px;
  text-align: center;
}

.venue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-bottom: 18px;
  padding: 4px 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(0, 109, 119, 0.18);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  margin: 0 auto 22px;
  font-size: clamp(2.1rem, 4.6vw, 4.1rem);
  line-height: 1.06;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.authors {
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  max-width: 850px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  text-align: left;
}

.metrics-strip div {
  min-height: 112px;
  padding: 20px;
  background: #fff;
}

.metrics-strip strong {
  display: block;
  color: var(--accent);
  font-size: 2rem;
  line-height: 1.1;
}

.metrics-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  padding: 64px 24px;
}

.first-figure {
  padding-top: 38px;
}

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

.section-heading {
  max-width: 850px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-heading p {
  color: var(--muted);
  font-size: 1.08rem;
}

.paper-text p {
  color: #263240;
  font-size: 1.08rem;
}

.figure-block {
  margin: 0 auto 34px;
  text-align: center;
}

.figure-block img {
  display: block;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.teaser-figure img {
  max-width: 1120px;
}

.figure-block figcaption {
  max-width: 900px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

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

.method-grid article,
.ablation-panel,
.video-slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.method-grid article {
  padding: 22px;
}

.method-grid p,
.ablation-panel p {
  color: var(--muted);
}

.two-column-figures,
.result-panels,
.video-grid {
  display: grid;
  gap: 22px;
}

.two-column-figures,
.result-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.figure-block.compact {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.figure-block.compact img {
  width: 100%;
  height: 420px;
  max-height: 520px;
  object-fit: contain;
}

.figure-block.compact figcaption {
  min-height: 56px;
}

.result-panels .figure-block.compact,
.result-panels .ablation-panel {
  min-height: 420px;
}

.result-panels .figure-block.compact img {
  flex: 1;
  height: auto;
  min-height: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 28px 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

caption {
  padding: 16px 18px 8px;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

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

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
  text-align: left;
}

thead th {
  background: #eaf3f4;
  color: #173037;
  font-weight: 800;
}

tbody tr {
  background: #fff;
}

tbody tr:nth-child(even) {
  background: #fbfcfd;
}

tbody tr.ours {
  background: #f1f8f5;
}

.table-note {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 0.92rem;
}

.ablation-panel {
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.ablation-panel table {
  flex: 1;
  margin-top: 12px;
}

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

.video-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-slot {
  overflow: hidden;
}

.video-slot video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111820;
  object-fit: cover;
}

.video-slot h3 {
  min-height: 54px;
  margin: 0;
  padding: 14px 16px;
}

pre {
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101820;
  color: #eef7f8;
  font-size: 0.92rem;
}

.footer {
  padding: 32px 24px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer p {
  color: var(--muted);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .metrics-strip,
  .method-grid,
  .two-column-figures,
  .result-panels,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding-top: 54px;
  }

  .section {
    padding: 48px 18px;
  }

  .figure-block img {
    border-radius: 6px;
  }

  .figure-block.compact img {
    height: auto;
    max-height: none;
  }

  .figure-block.compact figcaption {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .topbar-inner {
    padding: 0 16px;
  }

  .metrics-strip div {
    min-height: 96px;
    padding: 16px;
  }

  th,
  td {
    padding: 9px 10px;
    font-size: 0.86rem;
  }
}
