:root {
  --bg: #f5f7fb;
  --paper: #ffffff;
  --ink: #111827;
  --text: #263241;
  --muted: #64748b;
  --subtle: #8b98aa;
  --line: #dde5ef;
  --line-strong: #c7d3e1;
  --blue: #2f5cff;
  --blue-dark: #17348f;
  --blue-soft: #eef3ff;
  --teal: #0f766e;
  --teal-soft: #e7f6f3;
  --amber: #b7791f;
  --amber-soft: #fff4d8;
  --rose: #b42318;
  --rose-soft: #fff1f0;
  --purple: #6d5bd0;
  --purple-soft: #f0edff;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
  --soft-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(47, 92, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.020) 1px, transparent 1px),
    linear-gradient(180deg, #f8fafc 0%, #f2f6fb 44%, #ffffff 100%);
  background-size: 36px 36px, 36px 36px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.62;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.page {
  padding-bottom: 42px;
}

.container {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}

.container.narrow {
  width: min(1040px, calc(100% - 48px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(221, 229, 239, 0.88);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(1200px, calc(100% - 48px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  flex: 0 0 auto;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #475569;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 720;
}

.nav-links a:hover {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 54px;
  color: #ffffff;
  background-image:
    linear-gradient(103deg, rgba(15, 23, 42, 0.96) 0%, rgba(20, 44, 76, 0.92) 52%, rgba(15, 23, 42, 0.76) 100%),
    url("assets/dataset_pipeline.png");
  background-size: cover;
  background-position: center top;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 7px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--amber), var(--purple));
}

.hero .container {
  position: relative;
  z-index: 1;
}

.top-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 16px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.top-badge {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #dbeafe;
}

.section-kicker {
  border: 1px solid rgba(47, 92, 255, 0.18);
  background: #ffffff;
  color: var(--blue-dark);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 560;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  max-width: 940px;
  font-size: 3.55rem;
}

h2 {
  margin-bottom: 16px;
  color: var(--ink);
  text-align: center;
  font-size: 2.35rem;
}

h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.25;
}

p {
  font-size: 1rem;
}

.authors {
  max-width: 980px;
  margin: 18px 0 6px;
  color: #e5e7eb;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.8;
}

.authors a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 2px;
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
  white-space: nowrap;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.authors a::before {
  content: "";
  width: 0.98em;
  height: 0.98em;
  flex: 0 0 0.98em;
  background: url("assets/scholar.png") center / contain no-repeat;
}

.authors a:hover,
.authors a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.75);
}

.affiliation {
  max-width: 820px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 1.02rem;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.link-row a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.link-row a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.40);
}

.link-row .primary-link {
  border-color: transparent;
  background: #ffffff;
  color: var(--ink);
}

.link-row .primary-link:hover {
  background: #f8fafc;
}

.link-row .placeholder-link {
  border-style: dashed;
}

.hero-abstract {
  max-width: 960px;
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.abstract-label {
  margin-bottom: 7px;
  color: #99f6e4;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-abstract p {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.94rem;
  line-height: 1.6;
}

.intro-panel {
  position: relative;
  margin-top: -28px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  min-height: 112px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.stat-card:nth-child(2) {
  border-top-color: var(--teal);
}

.stat-card:nth-child(3) {
  border-top-color: var(--amber);
}

.stat-card:nth-child(4) {
  border-top-color: var(--purple);
}

.stat-number {
  display: block;
  color: var(--ink);
  font-size: 1.88rem;
  font-weight: 900;
  line-height: 1.05;
}

.stat-label {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 720;
}

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

.section-lead {
  max-width: 900px;
  margin: 0 auto 26px;
  color: var(--muted);
  text-align: center;
}

.overview-section {
  padding-top: 58px;
}

.lead {
  max-width: 980px;
  margin: 0 auto 24px;
  color: var(--ink);
  text-align: center;
  font-size: 1.45rem;
  font-weight: 760;
  line-height: 1.42;
  text-wrap: balance;
}

.explanation-block {
  max-width: 990px;
  margin: 0 auto;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--soft-shadow);
  text-align: left;
}

.explanation-block p {
  margin: 0;
  color: #334155;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 38px;
}

.summary-card {
  min-height: 216px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  text-align: left;
}

.summary-card:nth-child(2) {
  border-left-color: var(--teal);
}

.summary-card:nth-child(3) {
  border-left-color: var(--amber);
}

.summary-card h3 {
  margin-bottom: 10px;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.project-figure {
  margin: 30px 0 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  text-align: left;
}

.project-figure img {
  width: 100%;
  display: block;
  border-radius: 4px;
}

.motivation-figure {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.motivation-figure img {
  height: auto;
}

.wide-figure {
  width: 100%;
}

.visualization-figure {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

figcaption {
  max-width: 1080px;
  margin: 14px auto 2px;
  padding: 0 6px 4px;
  color: var(--muted);
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.62;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 4px;
}

.method-card {
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  text-align: left;
}

.method-card:nth-child(2) {
  border-top-color: var(--teal);
}

.method-card:nth-child(3) {
  border-top-color: var(--amber);
}

.method-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.results-section {
  padding-top: 78px;
}

.result-highlights {
  margin: 30px auto 34px;
  display: grid;
  grid-template-columns: 1.22fr repeat(3, 1fr);
  gap: 14px;
}

.metric-card {
  min-height: 158px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  text-align: left;
}

.metric-card:nth-child(3) {
  border-top-color: var(--purple);
}

.metric-card:nth-child(4) {
  border-top-color: var(--amber);
}

.metric-card.hero-metric {
  border-color: rgba(17, 24, 39, 0.12);
  border-top-color: #ffffff;
  background: linear-gradient(135deg, #111827 0%, #17348f 58%, #0f766e 100%);
  color: #ffffff;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: 2.65rem;
  font-weight: 920;
  line-height: 1;
}

.metric-sub {
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.hero-metric .metric-label,
.hero-metric .metric-sub {
  color: rgba(255, 255, 255, 0.78);
}

.hero-metric .metric-value {
  color: #ffffff;
}

.result-card {
  margin: 34px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
}

.result-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  text-align: left;
}

.result-card-header h3 {
  margin-bottom: 6px;
  font-size: 1.32rem;
}

.result-card-header p {
  max-width: 830px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.scroll-hint {
  display: none;
  max-width: 960px;
  margin: 0 auto 8px;
  color: var(--subtle);
  text-align: center;
  font-size: 0.9rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.result-table {
  width: max-content;
  min-width: 1740px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.compact-results .result-table {
  min-width: 1080px;
}

.result-table th,
.result-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.result-table th {
  text-align: center;
  vertical-align: middle;
}

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

.result-table thead th:first-child,
.result-table thead th:nth-child(2),
.result-table thead th:nth-child(3) {
  text-align: center;
}

.result-table thead th {
  background: #f3f6fa;
  color: var(--ink);
  font-weight: 850;
}

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

.result-table tr.ours {
  background: var(--teal-soft);
  color: #123c39;
  font-weight: 850;
}

.result-table .group-row td {
  background: #edf7f5;
  color: var(--ink);
  text-align: center;
  font-weight: 850;
}

.table-wrap.scrollable th:first-child,
.table-wrap.scrollable td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #ffffff;
  box-shadow: 1px 0 0 var(--line);
}

.table-wrap.scrollable thead th:first-child {
  z-index: 3;
  background: #f3f6fa;
}

.table-wrap.scrollable tr.ours td:first-child,
.table-wrap.scrollable .group-row td:first-child {
  background: var(--teal-soft);
}

pre {
  margin: 20px 0 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: #101827;
  color: #e8edf7;
  box-shadow: var(--soft-shadow);
  text-align: left;
  font-size: 0.92rem;
}

.footer {
  padding-top: 36px;
  color: var(--subtle);
  text-align: center;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .nav-shell {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    padding: 54px 0 46px;
  }

  h1 {
    font-size: 2.95rem;
  }

  h2 {
    font-size: 2.05rem;
  }

  .stats-row,
  .result-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .scroll-hint {
    display: block;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 96px;
  }

  .container,
  .container.narrow,
  .nav-shell {
    width: min(100% - 32px, 1160px);
  }

  .nav-shell {
    min-height: 90px;
    gap: 4px;
    padding: 9px 0;
  }

  .brand {
    width: 100%;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
  }

  .nav-links a {
    padding: 6px 4px;
    text-align: center;
    font-size: 0.66rem;
  }

  .hero {
    padding: 34px 0 20px;
  }

  h1 {
    font-size: 2rem;
    line-height: 1.12;
  }

  h2 {
    font-size: 1.78rem;
  }

  .top-badge {
    font-size: 0.68rem;
  }

  .authors {
    margin-top: 14px;
    font-size: 0.92rem;
  }

  .affiliation {
    margin-bottom: 18px;
    font-size: 0.94rem;
  }

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

  .link-row a {
    min-height: 38px;
    padding: 8px 6px;
    font-size: 0.76rem;
  }

  .hero-abstract {
    margin-top: 18px;
    padding: 16px;
    max-height: 210px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hero-abstract p {
    font-size: 0.88rem;
    line-height: 1.54;
  }

  .stats-row,
  .result-highlights {
    grid-template-columns: 1fr;
  }

  .lead {
    font-size: 1.14rem;
  }

  .explanation-block,
  .summary-card {
    padding: 18px;
  }

  .summary-grid {
    gap: 12px;
  }

  .stat-card,
  .metric-card,
  .method-card,
  .summary-card {
    min-height: auto;
  }

  .result-card-header {
    display: block;
  }

  .pill {
    margin-top: 12px;
  }

  .result-table {
    min-width: 1680px;
    font-size: 0.78rem;
  }

  .compact-results .result-table {
    min-width: 1040px;
  }

  .section {
    padding-top: 56px;
  }

  .project-figure {
    padding: 8px;
    margin-bottom: 34px;
  }

  figcaption {
    font-size: 0.92rem;
  }

  pre {
    font-size: 0.82rem;
  }
}
