:root {
  color-scheme: light;
  --ink: #101412;
  --paper: #f4efe6;
  --paper-soft: #ebe3d7;
  --muted: #6e6a62;
  --line: rgba(16, 20, 18, 0.14);
  --aqua: #58dfcf;
  --gold: #e7c36f;
  --dark: #07100e;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  background: var(--paper);
  overflow-x: hidden;
}

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

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

section[id] {
  scroll-margin-top: 86px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px clamp(22px, 4vw, 72px);
  color: #fff8eb;
  background: linear-gradient(180deg, rgba(4, 8, 7, 0.56), transparent);
  pointer-events: none;
}

.brand,
.site-header nav {
  pointer-events: auto;
}

.brand img {
  width: 150px;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: none;
  box-shadow: none;
}

.site-header nav {
  display: flex;
  gap: clamp(16px, 2.6vw, 38px);
  align-items: center;
  padding: 11px 18px;
  border: 1px solid rgba(255, 248, 235, 0.18);
  border-radius: 999px;
  color: rgba(255, 248, 235, 0.82);
  background: rgba(4, 8, 7, 0.36);
  backdrop-filter: blur(14px);
  font-size: 0.94rem;
  font-weight: 700;
}

.site-header nav a:hover {
  color: #fff;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff8eb;
  background: var(--dark);
}

.hero-reel {
  position: absolute;
  inset: 0;
}

.hero-reel::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background:
    linear-gradient(180deg, rgba(4, 8, 7, 0.24), transparent 22%),
    radial-gradient(ellipse at 50% 50%, rgba(4, 8, 7, 0.03), rgba(4, 8, 7, 0.2) 62%, rgba(4, 8, 7, 0.48)),
    linear-gradient(180deg, rgba(4, 8, 7, 0.02), rgba(4, 8, 7, 0.36));
}

.hero-reel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(1.06) contrast(1.02) brightness(1.04);
  transition: opacity 1200ms ease;
}

.hero-reel video.is-active {
  opacity: 1;
}

.hero-title {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 72px));
  padding: clamp(84px, 10vh, 132px) 0 48px;
  text-align: center;
}

.hero-title::before {
  position: absolute;
  inset: 24% 50% auto auto;
  z-index: -1;
  width: min(980px, 86vw);
  height: 360px;
  content: "";
  transform: translateX(50%);
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.22) 54%, transparent 76%);
  filter: blur(16px);
}

h1,
h2 {
  margin: 0;
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3.6rem, 6vw, 6.1rem);
  line-height: 1;
  white-space: nowrap;
}

.subtitle {
  margin: 18px 0 34px;
  color: rgba(255, 248, 235, 0.92);
  font-size: clamp(1.65rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1;
}

.authors {
  max-width: min(1240px, 98vw);
  margin: 0 auto 12px;
  color: rgba(255, 248, 235, 0.96);
  font-size: clamp(0.98rem, 1.13vw, 1.16rem);
  font-weight: 700;
  line-height: 1.55;
}

.authors span {
  display: inline-block;
  margin: 0 0.58em;
  white-space: nowrap;
}

.authors a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.22em;
}

.authors a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.affiliations {
  max-width: 980px;
  margin: 0 auto;
  color: rgba(255, 248, 235, 0.7);
  font-size: 0.94rem;
  line-height: 1.6;
}

.affiliations span {
  display: block;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid rgba(255, 248, 235, 0.34);
  border-radius: 999px;
  color: #fff8eb;
  background: rgba(255, 248, 235, 0.08);
  font-weight: 800;
}

.button.primary {
  color: #07100e;
  border-color: transparent;
  background: linear-gradient(135deg, var(--aqua), var(--gold));
}

.strip {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 4vw, 72px);
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.stats span {
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  text-align: center;
}

.stats strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2.4rem, 4.1vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 0.9;
}

.paper-section,
.results-section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(36px, 7vw, 86px) 0;
}

.promo-section {
  padding-top: clamp(30px, 5vw, 58px);
}

.section-intro {
  display: block;
  max-width: 760px;
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 800;
}

.section-intro h2 {
  color: var(--ink);
  margin: 0;
  font-size: clamp(1.65rem, 3.1vw, 3.05rem);
  line-height: 1.04;
}

.section-intro p {
  max-width: none;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  font-weight: 700;
  line-height: 1.58;
  white-space: nowrap;
}

.video-frame,
.paper-figure,
.comparison-cell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
  box-shadow: 0 18px 56px rgba(26, 20, 12, 0.12);
}

.video-frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.figure-stack {
  display: grid;
  gap: 34px;
}

.paper-figure {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.paper-figure figcaption {
  max-width: 820px;
  margin: 0 auto;
  padding: 14px 18px 16px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.method-section .paper-figure:first-child {
  max-width: min(1080px, 100%);
}

.paper-figure.wide {
  max-width: min(1120px, 100%);
}

.efficiency-figure {
  max-width: min(1120px, 100%);
}

.paper-figure img {
  width: auto;
  max-width: 100%;
  max-height: none;
  height: auto;
}

.results-section {
  padding-top: clamp(26px, 5vw, 64px);
}

.method-header,
.comparison-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.method-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 0;
  color: var(--muted);
  background: rgba(244, 239, 230, 0.9);
  backdrop-filter: blur(14px);
  font-size: 0.86rem;
  font-weight: 800;
}

.comparison-list {
  display: grid;
  gap: 10px;
}

.comparison-cell {
  background: #0a0d0c;
  box-shadow: none;
}

.comparison-cell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.bibtex-section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) 0 42px;
}

.bibtex-box {
  margin: 0;
  padding: clamp(18px, 2.4vw, 30px);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0f0d;
  color: #fff8eb;
  box-shadow: 0 18px 56px rgba(26, 20, 12, 0.12);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.78rem, 1.04vw, 0.98rem);
  line-height: 1.72;
}

.site-footer {
  display: flex;
  width: min(var(--max), calc(100% - 40px));
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 32px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer img {
  width: 124px;
}

.site-footer a {
  color: var(--ink);
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (max-width: 900px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    flex-wrap: wrap;
  }

  h1,
  .authors,
  .section-intro p {
    white-space: normal;
  }

  .stats,
  .method-header,
  .comparison-row {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 18px;
  }

  .brand img {
    width: 132px;
  }

  h1 {
    font-size: clamp(3.7rem, 17vw, 5rem);
  }

  .subtitle {
    font-size: 1.45rem;
  }

  .hero-title {
    width: min(100% - 28px, 1240px);
  }
}
