:root {
  --ink: #1b1715;
  --muted: #665f59;
  --paper: #f8f5ee;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --line: #d8d0c3;
  --red: #9b1419;
  --red-dark: #641014;
  --teal: #0f6f6a;
  --blue: #244f9e;
  --green: #2d6a3f;
  --gold: #b46b17;
  --shadow: 0 24px 70px rgba(48, 32, 23, 0.13);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--red-dark);
}

.container {
  margin: 0 auto;
  max-width: 1040px;
  padding: 0 24px;
  width: 100%;
}

.site-nav {
  align-items: center;
  background: rgba(248, 245, 238, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 30;
}

@supports (backdrop-filter: blur(12px)) {
  .site-nav {
    backdrop-filter: blur(14px);
  }
}

.wordmark {
  align-items: baseline;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 0;
}

.wordmark span {
  color: var(--red);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

.wordmark small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  max-width: min(44vw, 500px);
  text-transform: uppercase;
}

.nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--red);
}

.nav-toggle {
  background: transparent;
  border: 0;
  display: none;
  height: 42px;
  padding: 9px;
  width: 42px;
}

.nav-toggle span {
  background: var(--ink);
  display: block;
  height: 2px;
  margin: 5px 0;
  width: 24px;
}

.hero-section {
  align-items: center;
  background:
    linear-gradient(180deg, #fffdf8 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  display: flex;
  min-height: calc(100svh - 46px);
  padding: 10px 0;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
}

.hero-copy {
  margin: 0 auto;
  max-width: 1040px;
  min-width: 0;
  text-align: center;
}

.eyebrow {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

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

h1,
h2 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
}

h1 {
  font-size: clamp(2.45rem, 3.2vw, 3.08rem);
  line-height: 0.98;
  margin: 0 auto 11px;
  max-width: 980px;
  overflow-wrap: break-word;
}

.title-acronym,
.title-initial {
  color: var(--red);
}

.title-word {
  display: inline;
}

.title-main {
  display: block;
  white-space: nowrap;
}

.title-tail {
  display: block;
}

.title-initial {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.08em;
}

h2 {
  font-size: 2.48rem;
  line-height: 1.02;
  margin-bottom: 18px;
  max-width: 850px;
}

h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-summary {
  color: #312b27;
  font-size: 1rem;
  line-height: 1.34;
  margin: 0 auto 9px;
  max-width: 760px;
}

.authors {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.42;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.authors a {
  font-weight: 700;
}

sup {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.68em;
  font-weight: 700;
}

.affiliations {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
  margin: 0 auto 10px;
  max-width: 760px;
}

.affiliations p {
  margin-bottom: 4px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  display: inline-flex;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  justify-content: center;
  min-height: 31px;
  padding: 0 12px;
}

.button-icon {
  background: currentColor;
  display: block;
  flex: 0 0 auto;
  height: 17px;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  width: 17px;
}

.button-icon-arxiv {
  mask-image: url("../images/omg/icons/arxiv.svg");
  -webkit-mask-image: url("../images/omg/icons/arxiv.svg");
}

.button-icon-github {
  mask-image: url("../images/omg/icons/github.svg");
  -webkit-mask-image: url("../images/omg/icons/github.svg");
}

.button-icon-cite {
  mask-image: url("../images/omg/icons/cite.svg");
  -webkit-mask-image: url("../images/omg/icons/cite.svg");
}

.button-primary {
  background: var(--ink);
  color: #fffaf4;
}

.button-primary:hover {
  background: var(--red);
  color: #fffaf4;
}

.button-secondary {
  background: var(--surface-strong);
  border-color: var(--line);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--red);
  color: var(--red);
}

.button-disabled {
  background: #eee7dc;
  border-color: #ddd2c2;
  color: #7e746a;
  cursor: not-allowed;
}

.hero-figure,
.paper-figure,
.video-frame {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-figure {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0 auto;
  max-width: 810px;
  overflow: visible;
  width: 100%;
}

.hero-figure img {
  width: 100%;
}

.section {
  padding: 72px 0;
}

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

.section-heading.compact {
  margin-bottom: 24px;
}

.teaser-section .section-heading {
  max-width: 980px;
}

@media (min-width: 1120px) {
  .teaser-section .section-heading p:not(.eyebrow) {
    white-space: nowrap;
  }
}

.section-heading p:not(.eyebrow),
.section-copy p,
.body-copy p,
.citation-grid p {
  color: #332d29;
}

.teaser-section {
  background: var(--surface);
}

.video-frame {
  aspect-ratio: 16 / 9;
}

.video-frame video {
  background: #111;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.overview-section {
  background: #f7fbf9;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.overview-grid,
.citation-grid {
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
}

.body-copy {
  font-size: 1.08rem;
}

.overview-title-line {
  display: block;
}

.overview-title-accent {
  color: var(--red);
}

.body-copy strong {
  color: var(--red);
  font-weight: 800;
}

.accent-red {
  color: var(--red);
}

.body-copy em {
  color: var(--teal);
  font-style: italic;
  font-weight: 700;
}

.body-copy p:last-child,
.section-copy p:last-child {
  margin-bottom: 0;
}

.overview-contributions {
  margin-top: 42px;
}

.contribution-list {
  display: grid;
  gap: 18px 28px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.contribution-item {
  align-content: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 44px minmax(0, 1fr);
  padding-top: 16px;
  position: relative;
}

.contribution-item::before {
  background: rgba(99, 117, 111, 0.28);
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.stat-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(99, 117, 111, 0.26);
  border-radius: 8px;
}

.contribution-item span {
  color: var(--teal);
  display: block;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.contribution-item h3 {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.contribution-item p,
.method-list p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.split-layout {
  align-items: center;
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 0.78fr) minmax(390px, 1.22fr);
}

.split-layout.reversed {
  grid-template-columns: minmax(390px, 1.2fr) minmax(0, 0.8fr);
}

.data-section {
  background: var(--surface);
}

.section-copy {
  min-width: 0;
}

.section-copy h2 {
  font-size: 2.48rem;
}

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

.stat-card {
  min-height: 116px;
  padding: 18px;
}

.stat-card strong {
  color: var(--red);
  display: block;
  font-family: var(--serif);
  font-size: 1.68rem;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-card span {
  color: var(--muted);
  display: block;
  font-weight: 700;
  line-height: 1.3;
}

.paper-figure {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0;
  overflow: visible;
}

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

.model-section {
  background: #fbfaf6;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.method-list {
  display: grid;
  gap: 18px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.method-list div {
  border-left: 4px solid var(--blue);
  min-width: 0;
  padding-left: 16px;
}

.method-list div:nth-child(2) {
  border-left-color: var(--teal);
}

.method-list div:nth-child(3) {
  border-left-color: var(--gold);
}

.method-list h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

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

.demo-gallery {
  display: grid;
  gap: 36px;
}

.demo-category {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  padding-top: 24px;
}

.demo-category-copy {
  min-width: 0;
}

.demo-kicker {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.demo-category h3 {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.5vw, 2.35rem);
  margin-bottom: 12px;
  max-width: 520px;
}

.demo-category p:not(.demo-kicker),
.demo-clip figcaption {
  color: var(--muted);
}

.demo-videos {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.demo-clip {
  margin: 0;
  min-width: 0;
}

.demo-carousel {
  gap: 12px;
}

.demo-carousel-window {
  min-width: 0;
}

.demo-slide[hidden] {
  display: none;
}

.demo-clip video {
  aspect-ratio: 16 / 9;
  background: #111;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(48, 32, 23, 0.12);
  object-fit: cover;
  width: 100%;
}

.demo-clip figcaption {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  margin-top: 8px;
  text-transform: uppercase;
}

.demo-carousel-nav {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.demo-carousel-button {
  align-items: center;
  appearance: none;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--sans);
  font-size: 1.8rem;
  height: 38px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 3px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: 38px;
}

.demo-carousel-button:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: translateY(-1px);
}

.demo-carousel-button:focus-visible,
.demo-dot:focus-visible {
  outline: 3px solid rgba(215, 65, 48, 0.28);
  outline-offset: 3px;
}

.demo-carousel-dots {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.demo-dot {
  appearance: none;
  background: #d5cabd;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 8px;
  padding: 0;
  transition: background 160ms ease, transform 160ms ease, width 160ms ease;
  width: 8px;
}

.demo-dot.is-active {
  background: var(--red);
  width: 24px;
}

.demo-category-featured .demo-clip video {
  box-shadow: var(--shadow);
}

.citation-section {
  background: #171311;
  color: #fff7ec;
}

.citation-section h2,
.citation-section .eyebrow {
  color: #fff7ec;
}

.citation-section .eyebrow {
  color: #ffc4ba;
}

.citation-grid p {
  color: #d8cec0;
}

pre {
  background: #261e1a;
  border: 1px solid #4d3b33;
  border-radius: 8px;
  color: #fff7ec;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.55;
  margin: 0;
  overflow-x: auto;
  padding: 20px;
  white-space: pre;
}

.site-footer {
  background: #100d0c;
  color: #d8cec0;
  font-size: 0.92rem;
  padding: 26px 0;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1080px) {
  .hero-grid,
  .split-layout,
  .split-layout.reversed,
  .overview-grid,
  .citation-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-summary,
  h1 {
    margin-left: auto;
    margin-right: auto;
  }

  h1 {
    font-size: clamp(2.35rem, 5vw, 2.85rem);
  }

  .hero-summary {
    font-size: 1rem;
  }

  .hero-figure {
    max-width: 760px;
  }

  .link-row {
    justify-content: center;
  }

  .contribution-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-category {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 900px) {
  .wordmark small {
    display: none;
  }

  .title-main {
    white-space: normal;
  }
}

@media (max-width: 820px) {
  body {
    font-size: 15.5px;
  }

  .site-nav {
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    min-height: 54px;
    padding: 10px 18px;
  }

  .wordmark {
    align-items: center;
  }

  .wordmark small {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    gap: 0;
    padding-top: 12px;
  }

  .nav-links.is-open {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav-links a {
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    padding: 12px 0;
  }

  .hero-section {
    min-height: auto;
    padding: 22px 0 28px;
  }

  .hero-copy {
    text-align: left;
  }

  h1 {
    font-size: clamp(1.86rem, 8.15vw, 2.35rem);
    line-height: 1.04;
    max-width: 100%;
  }

  .title-acronym {
    display: block;
  }

  .title-main {
    display: inline;
    white-space: normal;
  }

  .title-word {
    display: inline;
  }

  .title-tail {
    display: inline;
  }

  h2,
  .section-copy h2 {
    font-size: clamp(1.9rem, 8vw, 2.2rem);
    line-height: 1.08;
  }

  .hero-summary {
    font-size: 0.96rem;
  }

  .link-row {
    justify-content: flex-start;
  }

  .button {
    flex: 1 1 0;
    min-height: 34px;
    min-width: 0;
    padding: 0 8px;
  }

  .section {
    padding: 52px 0;
  }

  .contribution-list,
  .method-list,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .contribution-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .site-nav {
    padding: 9px 16px;
  }

  .wordmark span {
    font-size: 1.45rem;
  }

  h1 {
    font-size: clamp(1.68rem, 7.8vw, 1.95rem);
  }

  h2,
  .section-copy h2 {
    font-size: 1.82rem;
  }

  .authors {
    font-size: 0.95rem;
  }

  .stat-card {
    min-height: auto;
  }
}
