:root {
  --ink: #121210;
  --paper: #f4f1e8;
  --warm: #ebe3d2;
  --panel: #fffaf0;
  --muted: #5e5a50;
  --line: #d8cfbd;
  --red: #be442f;
  --green: #336e62;
  --gold: #be8621;
  --black: #090908;
  --shadow: 0 22px 62px rgba(27, 23, 14, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(20px, 4vw, 64px);
  color: #fffaf0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
}

.site-header.is-solid {
  color: var(--ink);
  background: rgba(244, 241, 232, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
nav,
.button,
.eyebrow,
.section-label,
figcaption,
footer,
h4 {
  font-family: "Courier New", monospace;
}

.brand {
  font-size: 18px;
  font-weight: 700;
}

nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 92vh;
  color: #fffaf0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 5, 4, 0.9), rgba(5, 5, 4, 0.26), rgba(5, 5, 4, 0.74)),
    url("assets/figures/hero-motion-poster.jpg") center / cover;
}

.hero-video,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(5, 5, 4, 0.9), rgba(5, 5, 4, 0.28), rgba(5, 5, 4, 0.74)),
    linear-gradient(0deg, rgba(5, 5, 4, 0.9), rgba(5, 5, 4, 0.04) 60%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1060px, calc(100% - 42px));
  margin: 0 auto;
  padding: clamp(150px, 22vh, 230px) 0 190px;
}

.eyebrow,
.section-label {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 15px;
  line-height: 1.3;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(78px, 13vw, 180px);
  line-height: 0.86;
  font-weight: 400;
}

.hero-copy {
  max-width: 840px;
  margin-bottom: 34px;
  font-size: clamp(26px, 3.1vw, 42px);
  line-height: 1.12;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 118px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid rgba(255, 250, 240, 0.72);
  border-radius: 3px;
  font-size: 14px;
  text-transform: uppercase;
}

.button.primary {
  background: var(--red);
  border-color: var(--red);
}

.metrics {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(5, 5, 4, 0.82);
  border-top: 1px solid rgba(255, 250, 240, 0.22);
}

.metrics div {
  padding: 24px clamp(22px, 4vw, 58px);
  border-right: 1px solid rgba(255, 250, 240, 0.16);
}

.metrics strong {
  display: block;
  color: var(--gold);
  font-family: "Courier New", monospace;
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 400;
}

.metrics strong.metric-word {
  font-size: clamp(24px, 2.8vw, 36px);
  white-space: nowrap;
}

.metrics span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 250, 240, 0.78);
  font-size: 17px;
}

.section {
  padding: clamp(72px, 9vw, 128px) clamp(20px, 5vw, 74px);
}

.overview,
.method,
.demos {
  background: var(--paper);
}

.results,
.citation {
  background:
    linear-gradient(90deg, rgba(190, 134, 33, 0.09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(51, 110, 98, 0.07) 1px, transparent 1px),
    var(--warm);
  background-size: 48px 48px;
}

.section-head {
  width: min(1320px, 100%);
  margin: 0 auto 44px;
}

.section-head.compact {
  margin-bottom: 30px;
}

.section-head h2 {
  max-width: 1040px;
  margin-bottom: 0;
  font-size: clamp(44px, 5.8vw, 82px);
  line-height: 0.98;
  font-weight: 400;
}

.section-note,
.section-head > p:not(.section-label) {
  max-width: 820px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.5;
}

.overview-grid {
  width: min(1320px, 100%);
  margin: 0 auto 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
}

.overview-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 23px;
  line-height: 1.45;
}

.teaser-row,
.method-panels,
.hb-grid,
.video-grid {
  width: min(1320px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.teaser-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

figure {
  margin: 0;
}

.teaser-row figure,
.hb-grid article,
.video-grid article,
.method-panels article,
.paper-figure,
.architecture-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

figcaption a {
  color: var(--red);
  white-space: nowrap;
}

.method-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 24px;
}

.method-panels article {
  padding: 32px;
}

.method-panels span {
  display: block;
  margin-bottom: 28px;
  color: var(--red);
  font-family: "Courier New", monospace;
  font-size: 18px;
}

.method-panels h3 {
  max-width: 560px;
  margin-bottom: 16px;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.02;
  font-weight: 400;
}

.method-panels p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.architecture-panel {
  width: min(1320px, 100%);
  margin: 0 auto 24px;
}

.image-rail,
.paper-figure .figure-scroll {
  overflow-x: auto;
  background: #fff;
}

.image-rail img {
  width: max(1180px, 100%);
  max-width: none;
}

.paper-figure {
  width: min(1320px, 100%);
  margin: 0 auto 28px;
}

.iqm-evidence {
  width: min(1320px, 100%);
  margin: 0 auto 30px;
  display: grid;
  gap: 28px;
}

.iqm-evidence .paper-figure {
  width: 100%;
  margin: 0;
}

.paper-figure img {
  width: 100%;
  background: #fff;
}

.main-figure img {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.result-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.result-block .paper-figure {
  margin-bottom: 0;
}

.runtime-figure {
  margin-top: 28px;
}

.runtime-figure img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #fff;
}

.demo-title {
  width: min(1320px, 100%);
  margin: 40px auto 18px;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.05;
  font-weight: 400;
}

.hb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.hb-grid h4,
.video-grid h4 {
  margin: 0;
  padding: 15px 16px;
  font-size: 15px;
  line-height: 1.35;
}

.hb-grid img,
.hb-grid video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #111;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

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

.video-grid video,
.video-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}

.video-grid.four video,
.video-grid.four img {
  aspect-ratio: 4 / 3;
}

.citation pre {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 26px;
  overflow-x: auto;
  background: var(--black);
  color: #f7e7bd;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1.55;
}

footer {
  display: flex;
  gap: 22px;
  padding: 34px clamp(20px, 5vw, 74px);
  background: var(--black);
  color: #fffaf0;
  font-size: 14px;
}

footer a {
  color: var(--gold);
}

@media (max-width: 980px) {
  nav {
    display: none;
  }

  .hero-inner {
    padding: 145px 0 300px;
  }

  .metrics,
  .overview-grid,
  .teaser-row,
  .method-panels,
  .hb-grid,
  .video-grid,
  .video-grid.four {
    grid-template-columns: 1fr;
  }

  .metrics div {
    padding: 14px 22px;
  }

  .section-head h2 {
    font-size: clamp(38px, 11vw, 58px);
  }

  .overview-grid p,
  .method-panels p,
  .section-note,
  .section-head > p:not(.section-label) {
    font-size: 19px;
  }

  .image-rail img {
    width: 980px;
  }

  .runtime-figure img {
    height: auto;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 900px;
  }

  h1 {
    font-size: 70px;
  }

  .hero-copy {
    font-size: 23px;
  }

  .button {
    width: 100%;
  }

  figcaption {
    display: block;
  }

  figcaption a {
    display: inline-block;
    margin-top: 8px;
  }
}
