:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #111318;
  --muted: #5f6874;
  --soft: #eef2f5;
  --line: #d8dee6;
  --accent: #c66a1f;
  --accent-dark: #9f4e11;
  --green: #23815f;
  --blue: #2868b7;
  --shadow: rgba(18, 28, 38, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  font-weight: 900;
  text-decoration: none;
}

.site-nav nav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav nav a {
  text-decoration: none;
}

.site-nav nav a:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 82vh;
  overflow: hidden;
  background: #000000;
}

.hero picture,
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero img {
  object-fit: cover;
  object-position: center;
  opacity: 0.82;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.62) 38%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.36) 0%, rgba(0, 0, 0, 0) 36%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  padding: clamp(88px, 13vh, 150px) 0 56px;
  margin-left: max(28px, calc((100vw - 1180px) / 2));
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffb16e;
}

.hero h1 {
  margin: 0;
  font-size: clamp(58px, 10vw, 118px);
  line-height: 0.92;
  font-weight: 950;
}

.hero-subtitle {
  max-width: 660px;
  margin: 24px 0 0;
  font-size: clamp(19px, 2.3vw, 28px);
  line-height: 1.24;
  font-weight: 620;
}

.hero-authors {
  max-width: 760px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.88);
}

.author-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  font-size: clamp(15px, 1.55vw, 19px);
  line-height: 1.35;
  font-weight: 760;
}

.author-list span {
  white-space: nowrap;
}

.hero-authors sup {
  font-size: 0.62em;
  line-height: 0;
}

.author-affiliation {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.70);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 620;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-actions a,
.hero-actions span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 6px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.hero-actions a:first-child {
  background: var(--accent);
  border-color: var(--accent);
}

.hero-actions span {
  color: rgba(255, 255, 255, 0.66);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
  max-width: 680px;
  margin: 34px 0 0;
}

.hero-metrics div {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.38);
}

.hero-metrics dt {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1;
  font-weight: 930;
  white-space: nowrap;
}

.hero-metrics dd {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  line-height: 1.32;
}

section {
  scroll-margin-top: 72px;
}

.section-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.intro-section,
.dataset-section,
.results-section,
.bibtex-section {
  padding: 72px 0;
}

.intro-section,
.bibtex-section {
  background: var(--surface);
}

.intro-grid,
.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

h2 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1;
  font-weight: 920;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.section-heading p,
.intro-grid > p,
.results-grid p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
}

.wide-figure {
  margin: 28px 0 0;
}

.wide-figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px var(--shadow);
}

.dataset-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(28px, 4vw, 44px);
  padding: clamp(26px, 3.5vw, 40px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(61, 116, 202, 0.08), rgba(255, 255, 255, 0) 24%, rgba(255, 255, 255, 0) 76%, rgba(89, 151, 213, 0.08));
}

.dataset-stats div {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 112px;
  padding: 0 clamp(24px, 3.4vw, 48px);
  border-left: 1px solid var(--line);
}

.dataset-stats div:first-child {
  padding-left: 0;
  border-left: 0;
}

.dataset-stats div:last-child {
  padding-right: 0;
}

.dataset-stats strong {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 1.2vw, 14px);
  color: var(--blue);
  line-height: 0.92;
  font-weight: 930;
}

.dataset-stats div:nth-child(2) strong {
  color: var(--accent);
}

.dataset-stats div:nth-child(3) strong {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  color: #5b9bd6;
}

.dataset-stats .stat-number {
  font-size: clamp(52px, 6.4vw, 82px);
  font-weight: 950;
}

.dataset-stats .stat-name {
  max-width: 9ch;
  font-size: clamp(25px, 3vw, 42px);
  font-weight: 920;
}

.dataset-stats div:nth-child(3) .stat-name {
  max-width: 100%;
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1;
}

.dataset-stats .stat-values {
  color: var(--ink);
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.14;
  font-weight: 900;
  font-style: italic;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.visualization-section {
  padding: 72px 0 56px;
  background: #eef2f5;
}

.visualization-frame-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 18px 42px var(--shadow);
}

.visualization-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 640px;
  min-height: 640px;
  border: 0;
}

.real-system-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
  width: min(1180px, calc(100% - 40px));
  margin: 16px auto 0;
}

.real-system-gallery figure {
  margin: 0;
}

.real-system-gallery img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.fallback-preview {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.results-section {
  background: var(--bg);
}

.result-bars {
  display: grid;
  gap: 18px;
  align-self: center;
}

.bar-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 64px;
  gap: 14px;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
}

.bar-row div {
  height: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
}

.bar-row i {
  display: block;
  height: 100%;
  background: var(--accent);
}

.bar-row:nth-child(2) i {
  background: var(--blue);
}

.bar-row:nth-child(3) i {
  background: #8c96a3;
}

.bar-row:nth-child(4) i {
  background: #a4acb6;
}

.benchmark-figure {
  grid-column: 1 / -1;
  margin-top: 8px;
  margin-bottom: 0;
}

.benchmark-figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px var(--shadow);
}

pre {
  overflow-x: auto;
  margin: 24px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111318;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px max(28px, calc((100vw - 1180px) / 2));
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
}

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

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

  .hero {
    min-height: 78vh;
  }

  .hero img {
    object-position: center;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-left: 16px;
    padding-top: 96px;
  }

  .hero-metrics,
  .intro-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    max-width: 100%;
  }

  .dataset-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 20px 0;
  }

  .dataset-stats div {
    gap: 8px;
    min-height: 98px;
    padding: 0 14px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .dataset-stats div:first-child {
    padding-left: 0;
    border-top: 0;
    border-left: 0;
  }

  .dataset-stats strong {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .dataset-stats .stat-number {
    font-size: clamp(36px, 8vw, 52px);
  }

  .dataset-stats .stat-name {
    max-width: none;
    font-size: clamp(17px, 4vw, 25px);
    line-height: 1;
  }

  .dataset-stats div:nth-child(3) .stat-name {
    font-size: clamp(16px, 3.5vw, 22px);
  }

  .dataset-stats .stat-values {
    font-size: clamp(12px, 2.4vw, 16px);
    line-height: 1.18;
  }

  .visualization-frame-wrap iframe {
    height: 1240px;
    min-height: 1240px;
  }

  .real-system-gallery {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 96px minmax(0, 1fr) 54px;
    gap: 10px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero-actions a,
  .hero-actions span {
    width: 100%;
    justify-content: center;
  }

  .section-inner {
    width: calc(100% - 28px);
  }

  .visualization-frame-wrap,
  .real-system-gallery {
    width: calc(100% - 28px);
  }

  .dataset-stats {
    grid-template-columns: 1fr;
    padding: 8px 0;
    background: none;
  }

  .dataset-stats div {
    min-height: 0;
    padding: 22px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .dataset-stats div:first-child {
    border-top: 0;
  }

  .dataset-stats strong {
    align-items: baseline;
    flex-flow: row wrap;
    gap: 10px;
  }

  .dataset-stats .stat-number {
    font-size: 46px;
  }

  .dataset-stats .stat-name {
    font-size: 24px;
  }

  .dataset-stats .stat-values {
    font-size: 16px;
  }

  .intro-section,
  .dataset-section,
  .results-section,
  .bibtex-section,
  .visualization-section {
    padding: 52px 0;
  }
}
