:root {
  color-scheme: light;
  --ink: #18202b;
  --muted: #647082;
  --paper: #ffffff;
  --soft: #f5f7fa;
  --soft-blue: #edf4fb;
  --line: #d9e1ea;
  --line-strong: #b6c3d1;
  --blue: #2457a6;
  --teal: #0f766e;
  --orange: #b45309;
  --shadow: 0 18px 45px rgba(32, 43, 58, 0.08);
  --radius: 8px;
  --content: min(820px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(217, 225, 234, 0.85);
  backdrop-filter: blur(12px);
}

.site-nav {
  width: var(--content);
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 650;
  color: #405065;
}

.nav-links a {
  padding: 8px 0;
}

.nav-links a:hover,
.brand:hover {
  color: var(--teal);
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, #fbfcfe 0%, #ffffff 72%);
}

.hero-inner {
  width: var(--content);
  min-height: 360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 76px 0 84px;
}

.hero-copy {
  max-width: 920px;
  text-align: center;
}

.project-label,
.section-kicker {
  margin: 0 0 14px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: #111827;
  font-size: 72px;
  line-height: 0.98;
  font-weight: 850;
  letter-spacing: 0;
}

.paper-full-title {
  max-width: 840px;
  margin: 22px auto 0;
  color: #334155;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 650;
}

.authors {
  margin: 22px 0 0;
  color: var(--ink);
  font-weight: 620;
}

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

.author-row + .author-row {
  margin-top: 7px;
}

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

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

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

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

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

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

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

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

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

.button[aria-disabled="true"] {
  opacity: 0.82;
  pointer-events: none;
}

.button.secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

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

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

.content {
  width: var(--content);
  margin: 0 auto;
}

.content-citation {
  width: var(--content);
}

h2 {
  margin: 0 auto 24px;
  color: #172033;
  font-size: clamp(1.34rem, 2.1vw, 1.78rem);
  line-height: 1.2;
  font-weight: 740;
  letter-spacing: 0;
  text-align: center;
}

h3 {
  margin: 0;
  color: #172033;
  font-size: 0.98rem;
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: 0;
}

p {
  margin: 0;
}

.abstract-copy {
  display: grid;
  gap: 18px;
  color: #2f3b4c;
  font-size: 1.08rem;
}

.paper-figure {
  margin: 0;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.detail-frame {
  max-width: 820px;
}

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

.figure-scroll img {
  width: 100%;
  min-width: 0;
  height: auto;
}

.teaser-figure .figure-scroll img {
  min-width: 0;
}

.teaser-figure .figure-scroll {
  max-width: 660px;
  margin: 0 auto;
}

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

.paper-figure figcaption strong {
  color: #2c3748;
}

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

.method-grid article,
.result-table-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 25px rgba(29, 43, 60, 0.05);
}

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

.method-grid article h3 {
  text-align: center;
}

.method-grid p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.table-results {
  display: grid;
  gap: 24px;
}

.result-table-block {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.result-table-block h3 {
  margin-bottom: 12px;
  text-align: center;
}

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

.result-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.86rem;
}

.main-result-table {
  min-width: 0;
}

.compact-table .result-table {
  min-width: 0;
}

.result-table th,
.result-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

.result-table thead th {
  background: #f8fafc;
  color: #465568;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.group-row td {
  background: #f2f5f8;
  color: #445165;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.muted-row td {
  color: #7a8493;
}

.ours-row td {
  background: var(--soft-blue);
  color: #16324f;
  font-weight: 800;
}

.table-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.58;
  text-align: center;
}

.result-figure {
  margin-top: 4px;
  max-width: 100%;
}

.result-figure .figure-scroll {
  max-width: 620px;
  margin: 0 auto;
}

.result-figure .figure-scroll img {
  min-width: 0;
}

.citation-section {
  padding: 92px 0 108px;
}

.citation-title {
  margin: 0 0 30px;
  color: #162a4d;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.08;
  font-weight: 820;
  letter-spacing: 0;
  text-align: center;
}

.bibtex-panel {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(180deg, #0d1630 0%, #111b33 100%);
  box-shadow: 0 24px 54px rgba(13, 24, 45, 0.18);
}

.bibtex-panel pre {
  margin: 0;
  padding: 54px 34px 34px;
  overflow-x: auto;
}

.bibtex-panel code {
  display: block;
  color: #e6edf8;
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
  font-size: 0.9rem;
  line-height: 1.62;
  white-space: pre;
}

.copy-button {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 70px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #3b4a67;
  border-radius: 7px;
  background: #26344f;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.copy-button:hover {
  background: #2c3b59;
}

.copy-button:disabled {
  cursor: default;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #111827;
  color: #cbd5e1;
}

.site-footer .container {
  width: var(--content);
  margin: 0 auto;
  padding: 28px 0;
}

.site-footer p {
  font-size: 14px;
  text-align: center;
}

@media (max-width: 820px) {
  :root {
    --content: min(100vw - 28px, 820px);
  }

  .site-nav {
    min-height: 58px;
  }

  .nav-links {
    gap: 12px;
    overflow-x: auto;
    font-size: 13px;
  }

  .hero-inner {
    min-height: 310px;
    padding: 58px 0 64px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .paper-full-title {
    font-size: 22px;
  }

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

  h2 {
    font-size: 24px;
  }

  .abstract-copy {
    font-size: 16px;
  }

  .method-grid,
  .result-table-block {
    padding: 18px;
  }

  .citation-section {
    padding: 70px 0 88px;
  }

  .citation-title {
    font-size: 32px;
    margin-bottom: 24px;
  }

  .bibtex-panel pre {
    padding: 50px 20px 24px;
  }

  .bibtex-panel code {
    font-size: 15px;
    line-height: 1.58;
  }

  .copy-button {
    top: 12px;
    right: 12px;
    min-width: 64px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.76rem;
  }
}

@media (max-width: 520px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
  }

  .hero h1 {
    font-size: 42px;
  }

  .paper-full-title {
    font-size: 20px;
  }

  .figure-scroll img,
  .teaser-figure .figure-scroll img,
  .result-figure .figure-scroll img {
    min-width: 0;
  }

  .citation-title {
    font-size: 28px;
  }

  .bibtex-panel pre {
    padding: 48px 16px 22px;
  }

  .bibtex-panel code {
    font-size: 14px;
  }
}
