:root {
  color-scheme: light;
  --bg: #f7f8f8;
  --page-gradient-start: #ffffff;
  --surface: #ffffff;
  --surface-soft: #eef4f5;
  --ink: #101418;
  --muted: #4a5560;
  --soft: #697681;
  --line: #d7e0e4;
  --line-strong: #b7c5cb;
  --blue: #0069a8;
  --blue-dark: #084568;
  --solid-bg: #084568;
  --solid-hover: #0069a8;
  --magenta: #f02f67;
  --gold: #d89613;
  --green: #11825b;
  --button-hover: #f0f7fa;
  --code-bg: #111820;
  --code-ink: #f5f8fb;
  --logo-bg: transparent;
  --logo-filter: invert(1);
  --toggle-bg: #e8eef0;
  --toggle-active: #111820;
  --toggle-thumb: #ffffff;
  --toggle-shadow: rgba(15, 23, 28, 0.18);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e100f;
  --page-gradient-start: #151615;
  --surface: #171a18;
  --surface-soft: #202620;
  --ink: #f7f5ef;
  --muted: #d1ccc3;
  --soft: #aaa49a;
  --line: #343a34;
  --line-strong: #566158;
  --blue: #74ceef;
  --blue-dark: #74ceef;
  --solid-bg: #155d7a;
  --solid-hover: #217fa3;
  --magenta: #ff5f88;
  --gold: #e7b34a;
  --green: #6fd0a7;
  --button-hover: #232923;
  --code-bg: #080a0c;
  --code-ink: #f5f8fb;
  --logo-bg: transparent;
  --logo-filter: none;
  --toggle-bg: #2a302b;
  --toggle-active: #74ceef;
  --toggle-thumb: #f7f5ef;
  --toggle-shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans", Arial, sans-serif;
  background:
    linear-gradient(180deg, var(--page-gradient-start) 0%, var(--bg) 30rem),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
  transition: background-color 180ms ease, color 180ms ease;
}

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

a:hover {
  text-decoration: underline;
}

.section {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 2.4rem 0;
}

.hero {
  position: relative;
  text-align: center;
  padding-top: 4rem;
  padding-bottom: 1.4rem;
}

.theme-toggle {
  position: absolute;
  left: 0;
  top: 4.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0;
  background: var(--toggle-bg);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 10px 28px var(--toggle-shadow);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--blue);
}

.theme-toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 7.25rem;
  height: 2.25rem;
}

.theme-label {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  color: var(--muted);
  transition: color 160ms ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 0.22rem;
  left: 0.24rem;
  width: calc(50% - 0.32rem);
  height: calc(100% - 0.44rem);
  border-radius: 999px;
  background: var(--toggle-thumb);
  box-shadow: 0 4px 12px var(--toggle-shadow);
  transition: transform 180ms ease, background-color 160ms ease;
}

.theme-toggle[aria-pressed="false"] .theme-label:first-child,
.theme-toggle[aria-pressed="true"] .theme-label:nth-child(2) {
  color: var(--toggle-active);
}

.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  transform: translateX(calc(100% + 0.2rem));
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--ink);
}

h1 {
  font-size: 2.7rem;
  max-width: 31ch;
  margin: 0 auto;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 1.9rem;
  margin-bottom: 0.9rem;
  text-align: center;
}

h3 {
  font-size: 1.08rem;
}

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

.eyebrow {
  color: var(--magenta);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}

.venue {
  margin-top: 0.95rem;
  font-weight: 800;
  color: var(--green);
}

.authors {
  margin: 1rem auto 0;
  max-width: 95ch;
  color: var(--ink);
  font-size: 1rem;
}

.authors a {
  color: var(--blue-dark);
  font-weight: 700;
}

.affiliations {
  margin-top: 0.55rem;
  font-size: 0.94rem;
}

.aff-line {
  display: block;
}

.hero-logos {
  position: absolute;
  right: 0;
  top: 4.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
}

.hero-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.2rem;
  border-radius: 6px;
  background: var(--logo-bg);
  opacity: 0.9;
  transition: background-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.hero-logos a:hover {
  opacity: 1;
  transform: translateY(-1px);
  text-decoration: none;
}

.hero-logos img {
  height: 40px;
  width: auto;
  max-width: min(18vw, 170px);
  object-fit: contain;
  filter: var(--logo-filter);
  transition: filter 160ms ease;
}

.actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.54rem 0.9rem;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
  background: var(--button-hover);
  text-decoration: none;
}

.btn-solid {
  background: var(--solid-bg);
  border-color: var(--solid-bg);
  color: #fff;
}

.btn-solid:hover {
  background: var(--solid-hover);
  border-color: var(--solid-hover);
  color: #fff;
}

.lead {
  margin: 1.25rem auto 0;
  max-width: 88ch;
  color: var(--muted);
  font-size: 1.03rem;
}

.hero-media {
  margin: 1.6rem auto 0;
  width: min(960px, 100%);
}

.hero-media img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.body,
.abstract {
  color: var(--muted);
  font-size: 1rem;
}

.abstract {
  max-width: 94ch;
  margin: 0 auto;
  text-align: justify;
}

.bullets {
  margin: 0.9rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.bullets li {
  margin: 0.45rem 0;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 1.4rem;
  align-items: start;
}

.figure {
  margin: 0;
}

.wide-figure {
  margin-top: 1.05rem;
}

.media,
.media-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.media img,
.media-wrap iframe {
  width: 100%;
  display: block;
  background: var(--surface);
}

.media img {
  height: auto;
}

.media-wrap iframe {
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.summary-video-wrap {
  max-width: 920px;
  margin: 0 auto;
  background: #0d1114;
}

figcaption {
  margin-top: 0.5rem;
  color: var(--soft);
  font-size: 0.9rem;
}

.cards {
  display: grid;
  gap: 0.85rem;
}

.cards.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 1rem;
  min-height: 100%;
}

.card-title {
  margin-bottom: 0.35rem;
}

.metric-card {
  border-top: 4px solid var(--magenta);
}

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

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

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

.metric {
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.metric sup {
  font-size: 0.72rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.results-table th,
.results-table td {
  padding: 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.results-table th {
  color: var(--ink);
  font-weight: 800;
  background: var(--surface-soft);
}

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

.citation-head {
  max-width: 940px;
  margin: 0 auto 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

pre {
  margin: 0 auto;
  max-width: 940px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-ink);
  overflow: auto;
  padding: 1rem;
  line-height: 1.45;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

footer {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  text-align: center;
  color: var(--soft);
  border-top: 1px solid var(--line);
}

footer p + p {
  margin-top: 0.35rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  h1 {
    font-size: 2.1rem;
  }

  .hero-logos {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 1.1rem;
  }

  .theme-toggle {
    position: static;
    margin: 0 auto 1rem;
  }

  .two-col,
  .feature-grid,
  .cards.three,
  .cards.four {
    grid-template-columns: 1fr;
  }

  .citation-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .section {
    width: min(100% - 1.4rem, 1120px);
    padding: 1.8rem 0;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .theme-toggle-track {
    width: 6.6rem;
    height: 2.15rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .actions {
    gap: 0.45rem;
  }

  .btn {
    min-height: 2.25rem;
    padding: 0.48rem 0.72rem;
  }

  .hero-media img,
  .media,
  .media-wrap,
  .card,
  .table-wrap,
  pre {
    border-radius: 6px;
  }
}
