:root {
  --bg: #f7f8f6;
  --paper: #ffffff;
  --paper-soft: #fbfcfb;
  --ink: #121a22;
  --ink-soft: #263540;
  --muted: #667480;
  --line: #dfe6e3;
  --line-strong: #c8d4d0;
  --table-head: #eff4f2;
  --table-group: #dfeae6;
  --ours-bg: #fff7f4;
  --hero-button: rgba(255, 255, 255, 0.14);
  --teal: #087568;
  --teal-soft: #e7f3f0;
  --coral: #c84f42;
  --blue: #246ea8;
  --amber: #b97908;
  --navy: #0a151d;
  --shadow: 0 20px 54px rgba(10, 24, 34, 0.12);
  --soft-shadow: 0 10px 30px rgba(10, 24, 34, 0.07);
}

body[data-theme="dark"] {
  --bg: #081116;
  --paper: #101b22;
  --paper-soft: #0c171d;
  --ink: #edf5f3;
  --ink-soft: #d6e2df;
  --muted: #a4b7b3;
  --line: #21333a;
  --line-strong: #315058;
  --table-head: #15272e;
  --table-group: #12332f;
  --ours-bg: #231a19;
  --hero-button: rgba(255, 255, 255, 0.12);
  --teal: #4bc6b5;
  --teal-soft: #102824;
  --coral: #ff836f;
  --blue: #77bdf0;
  --amber: #e5b04b;
  --navy: #f4fbf9;
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.38);
  --soft-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 34px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(223, 230, 227, 0.95);
  backdrop-filter: blur(16px);
}

body[data-theme="dark"] .site-header {
  background: rgba(8, 17, 22, 0.9);
  border-bottom-color: rgba(49, 80, 88, 0.82);
}

.brand {
  color: var(--teal);
  font-size: 15px;
  font-weight: 850;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

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

body[data-theme="dark"] .nav-links {
  color: #d6e2df;
}

.nav-links a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

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

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(10, 24, 34, 0.06);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--teal);
  border-color: var(--teal);
}

.theme-toggle-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6c762 0 48%, #24333d 50% 100%);
  box-shadow: inset 0 0 0 1px rgba(10, 24, 34, 0.16);
}

body[data-theme="dark"] .theme-toggle-icon {
  background: radial-gradient(circle at 62% 38%, #101b22 0 34%, transparent 35%), #d9f1eb;
}

.hero {
  position: relative;
  min-height: 64vh;
  display: grid;
  align-items: end;
  padding: 88px 30px 42px;
  overflow: hidden;
  background-image: url("assets/hero-cake.jpg");
  background-position: center 46%;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 14, 20, 0.76), rgba(6, 14, 20, 0.47) 58%, rgba(6, 14, 20, 0.62));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1130px, 100%);
  margin: 0 auto;
  color: #fff;
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.paper-meta span {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #d9fff3;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.authors sup {
  font-size: 12px;
  line-height: 0;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: 56px;
  line-height: 1.02;
  font-weight: 880;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 26px 0 4px;
  color: #f6fbff;
  font-size: 18px;
  font-weight: 760;
}

.affiliation {
  max-width: 1060px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.corresponding-note {
  display: inline-block;
  margin-left: 8px;
  color: #d9fff3;
  font-weight: 800;
}

.resource-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.resource-buttons a,
.citation-block button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  background: var(--hero-button);
  color: #fff;
  font-weight: 820;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.resource-buttons a:first-child {
  background: #ffffff;
  color: #0a151d;
  border-color: #ffffff;
}

.resource-buttons a:hover,
.resource-buttons a:focus-visible {
  transform: translateY(-1px);
  background: #ffffff;
  color: #0a151d;
  border-color: #ffffff;
}

.hero-summary {
  max-width: 660px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  width: min(540px, 100%);
  margin-top: 22px;
}

.hero-stats div {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-stats strong {
  display: block;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.hero-stats span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.photo-credit {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
}

.photo-credit a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section {
  scroll-margin-top: 72px;
  padding: 66px 28px;
}

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

.section-inner.wide {
  width: min(1240px, 100%);
}

.section-inner.narrow {
  width: min(980px, 100%);
}

.intro-band {
  padding: 38px 28px 44px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.lead {
  max-width: 890px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 23px;
  line-height: 1.42;
  text-align: center;
}

.key-points,
.method-grid,
.metric-grid,
.capability-list,
.contribution-strip {
  display: grid;
  gap: 16px;
}

.key-points {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.key-points div,
.method-step,
.metric,
.capability-list div,
.contribution-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(10, 24, 34, 0.045);
}

.key-points div,
.capability-list div,
.contribution-strip div {
  padding: 20px;
}

.point-kicker {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.key-points strong,
.capability-list strong,
.contribution-strip b {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 18px;
}

.key-points span:not(.point-kicker),
.capability-list span,
.contribution-strip span {
  color: var(--muted);
}

.section-heading {
  margin-bottom: 26px;
}

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

h2 {
  max-width: 880px;
  margin: 0;
  color: var(--navy);
  font-size: 38px;
  line-height: 1.13;
  font-weight: 850;
}

.body-text {
  max-width: 910px;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 18px;
}

.contribution-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.contribution-strip div {
  box-shadow: none;
  background: var(--paper-soft);
}

.figure-section {
  background: var(--teal-soft);
}

.examples-band {
  background: var(--teal-soft);
}

.method-band {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.figure-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 44px rgba(10, 24, 34, 0.1);
}

.figure-frame img {
  width: 100%;
  background: var(--paper);
}

.figure-frame figcaption {
  padding: 16px 18px;
  color: #556472;
  font-size: 15px;
  border-top: 1px solid var(--line);
}

body[data-theme="dark"] .figure-frame figcaption {
  color: var(--muted);
}

.dark-frame {
  background: #070b0f;
  border-color: #1f2b35;
}

.dark-frame figcaption {
  color: #dfe9ef;
  border-color: #25313d;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 0;
}

.case-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(10, 24, 34, 0.08);
}

.case-visual {
  height: clamp(245px, 24vw, 320px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.case-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.case-body {
  padding: 22px;
}

.case-kicker {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.case-body h3 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 22px;
}

.case-body p:not(.case-kicker) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.reasoning-pairs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.reasoning-pairs div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}

.reasoning-pairs dt {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.reasoning-pairs dd {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.35;
}

.method-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 34px;
}

.method-step {
  position: relative;
  min-height: 208px;
  padding: 22px;
  box-shadow: none;
}

.method-step span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.method-step:nth-child(2) span {
  background: var(--blue);
}

.method-step:nth-child(3) span {
  background: var(--amber);
}

.method-step:nth-child(4) span {
  background: var(--coral);
}

.method-step::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 4px;
  background: var(--teal);
}

.method-step:nth-child(2)::after {
  background: var(--blue);
}

.method-step:nth-child(3)::after {
  background: var(--amber);
}

.method-step:nth-child(4)::after {
  background: var(--coral);
}

h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.2;
}

.method-step p {
  margin: 0;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--soft-shadow);
}

.table-wrap.compact {
  margin-top: 20px;
  box-shadow: none;
}

.performance-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

.performance-table th {
  padding: 11px 14px;
  background: var(--table-head);
  color: var(--ink-soft);
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.performance-table td {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: middle;
}

.performance-table td:nth-child(4),
.performance-table td:nth-child(5),
.performance-table td:nth-child(6),
.performance-table th:nth-child(4),
.performance-table th:nth-child(5),
.performance-table th:nth-child(6) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.performance-table .ours td {
  background: var(--ours-bg);
}

.performance-table .group-row td {
  padding: 9px 14px;
  background: var(--table-group);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.performance-table .ours td:nth-child(3),
.performance-table .ours td:nth-child(4),
.performance-table .ours td:nth-child(5),
.performance-table .ours td:nth-child(6) {
  color: var(--coral);
  font-weight: 900;
}

.compact .performance-table {
  min-width: 640px;
}

.compact .performance-table th,
.compact .performance-table td {
  padding: 9px 12px;
}

.benchmark-band {
  background: linear-gradient(180deg, var(--paper-soft) 0%, var(--teal-soft) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.benchmark-spotlight {
  display: grid;
  grid-template-columns: minmax(280px, 0.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.benchmark-narrative {
  min-width: 0;
}

.benchmark-narrative h2 {
  max-width: 430px;
}

.benchmark-narrative p:not(.eyebrow) {
  max-width: 470px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.benchmark-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
}

.benchmark-metrics div {
  min-width: 0;
  padding: 12px 10px;
  border-top: 3px solid var(--teal);
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(10, 24, 34, 0.055);
  overflow: hidden;
}

.benchmark-metrics div:nth-child(2) {
  border-color: var(--blue);
}

.benchmark-metrics div:nth-child(3) {
  border-color: var(--amber);
}

.benchmark-metrics strong {
  display: block;
  color: var(--navy);
  font-size: 23px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.benchmark-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

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

.benchmark-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
}

.benchmark-actions a:first-child {
  background: var(--teal);
  color: #fff;
}

.benchmark-actions a:hover,
.benchmark-actions a:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(8, 117, 104, 0.14);
}

.benchmark-showcase {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 46px rgba(10, 24, 34, 0.1);
}

.benchmark-showcase img {
  width: 100%;
  background: #fff;
}

.benchmark-showcase figcaption {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  color: #5b6974;
  font-size: 14px;
}

body[data-theme="dark"] .benchmark-showcase figcaption {
  color: var(--muted);
}

.capability-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.capability-list div {
  box-shadow: none;
}

.citation-block {
  display: grid;
  gap: 12px;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 22px;
  border: 1px solid #1d2a35;
  border-radius: 8px;
  background: #0a151d;
  color: #edf6f3;
  font-size: 14px;
  line-height: 1.52;
}

.citation-block button {
  justify-self: start;
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  cursor: pointer;
}

.citation-block button:hover,
.citation-block button:focus-visible {
  transform: translateY(-1px);
  background: #095f55;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  padding: 28px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
}

.footer span:first-child {
  color: var(--teal);
  font-weight: 900;
}

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

  .header-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

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

  .theme-toggle {
    align-self: flex-start;
  }

  .hero {
    min-height: 68vh;
    padding-top: 84px;
  }

  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 34px;
  }

  .key-points,
  .method-grid,
  .metric-grid,
  .capability-list,
  .contribution-strip,
  .case-grid,
  .benchmark-spotlight {
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .benchmark-metrics {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .section {
    padding: 52px 16px;
  }

  .hero {
    padding: 82px 16px 48px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 28px;
  }

  .lead {
    font-size: 20px;
    text-align: left;
  }

  .resource-buttons a {
    width: 100%;
  }

  .hero-stats div,
  .benchmark-metrics div {
    padding: 12px 14px;
  }

  .benchmark-actions a {
    width: 100%;
    justify-content: center;
  }

  .case-body {
    padding: 16px;
  }

  .reasoning-pairs {
    grid-template-columns: 1fr;
  }

  .bar-line {
    grid-template-columns: 88px minmax(0, 1fr) 46px;
    gap: 8px;
  }

  .metric strong {
    font-size: 40px;
  }
}
