:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #5f6b7a;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  --radius-lg: 10px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

pre,
code {
  font-family: "SFMono-Regular", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
  overflow-x: hidden;
}

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

.logo {
  display: block;
  width: min(280px, 75%);
  margin: 0 auto 16px;
}

.hero h1 {
  max-width: 980px;
  margin: 0 auto 14px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.authors {
  margin: 0 0 8px;
  color: var(--muted);
}

.authors span {
  margin: 0 6px;
}

.affiliation {
  margin: 0 0 16px;
  color: var(--muted);
}

.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 108px;
  padding: 8px 10px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.links a:hover {
  text-decoration: none;
  background: rgba(37, 99, 235, 0.05);
  color: var(--accent);
  transform: translateY(-1px);
}

.link-icon {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.section-nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 10px;
  overflow-x: auto;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  border-left: none;
  border-right: none;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.section-nav::-webkit-scrollbar {
  display: none;
}

.section-nav a {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 2px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.section-nav a:hover {
  background: transparent;
  color: var(--text);
  text-decoration: none;
  box-shadow: none;
  transform: none;
}

.section-nav a:focus-visible {
  outline: none;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.section {
  margin-top: 26px;
  padding: 26px 24px;
  border: none;
  border-radius: 0;
  background: var(--panel);
  box-shadow: none;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.section h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.section p,
.section li {
  color: var(--muted);
}

.section-intro {
  margin-top: 0;
}

#demo .section-intro,
#demo .caption {
  text-align: center;
}

.image-panel {
  padding: 8px 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.image-panel img,
.teaser-image,
.method-image,
.viz-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.teaser-image {
  max-width: 920px;
}

.method-image {
  max-width: 820px;
}

.caption {
  margin: 10px 2px 0;
  font-size: 0.95rem;
}

.takeaways {
  margin: 0;
  padding-left: 20px;
}

.takeaways li + li {
  margin-top: 10px;
}

.viz-shell {
  position: relative;
  padding: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: none;
  border-right: none;
  border-radius: 0;
  background: transparent;
}

.viz-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 42px;
}

.viz-page {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.viz-image {
  max-width: 980px;
}

.viz-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.10);
  color: #334155;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.viz-nav-left {
  left: 10px;
}

.viz-nav-right {
  right: 10px;
}

.video-shell {
  position: relative;
  width: min(100%, 980px);
  margin: 8px auto 0;
  padding: 0;
  aspect-ratio: 2850 / 1334;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #000000;
}

.demo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  min-width: 0;
  border: none;
  background: #000000;
  object-fit: contain;
}

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

.table-block {
  padding: 18px 18px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.table-block h3 {
  margin-bottom: 12px;
  color: var(--text);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: none;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  overflow: hidden;
}

.wide-table {
  min-width: 980px;
}

.result-table th,
.result-table td {
  padding: 11px 13px;
  border-bottom: 1px solid #e8edf3;
  text-align: left;
  font-size: 0.93rem;
  vertical-align: middle;
}

.result-table th {
  position: sticky;
  top: 0;
  background: #f7f9fc;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.result-table thead tr:first-child th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.result-table thead tr:last-child th {
  font-size: 0.88rem;
}

.result-table td:first-child,
.result-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
}

.result-table thead th:first-child {
  z-index: 2;
  background: #f7f9fc;
}

.result-table tbody tr:nth-child(even) {
  background: #fcfdff;
}

.result-table tbody tr:hover {
  background: #f6f9ff;
}

.result-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

.result-table td:not(:first-child),
.result-table th:not(:first-child) {
  text-align: center;
}

.result-table tbody tr:last-child td {
  border-bottom: none;
}

.result-table .ours {
  background: linear-gradient(180deg, #f4f8ff 0%, #edf4ff 100%);
  font-weight: 700;
}

.result-table .ours td:first-child {
  color: var(--accent);
}

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

.finding-card {
  padding: 18px;
  border-left: 4px solid var(--accent);
  border-radius: 0;
  background: transparent;
}

.finding-card p {
  margin: 0;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
}

@media (max-width: 800px) {
  .page {
    width: min(100% - 20px, 1120px);
    padding-top: 16px;
  }

  .section {
    padding: 22px 18px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .finding-grid {
    grid-template-columns: 1fr;
  }

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

  .viz-scroll {
    padding-left: 28px;
    padding-right: 28px;
  }
}
