* {
  box-sizing: border-box;
}

:root {
  --snow: #edf4f3;
  --paper: #fbfbf7;
  --ink: #11191d;
  --ink-soft: #26363a;
  --muted: #607071;
  --line: #cedad7;
  --panel: rgba(255, 255, 255, 0.82);
  --cyan: #00a9bf;
  --cyan-deep: #006f7c;
  --magenta: #d933a0;
  --orange: #e57d22;
  --spruce: #214d3c;
  --shadow: 0 18px 46px rgba(17, 25, 29, 0.10);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(17, 25, 29, 0.024) 1px, transparent 1px) 0 0 / 92px 92px,
    linear-gradient(0deg, rgba(17, 25, 29, 0.022) 1px, transparent 1px) 0 0 / 92px 92px,
    radial-gradient(circle at 76% 8%, rgba(0, 169, 191, 0.08), transparent 26rem),
    var(--snow);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  transition: top 180ms ease;
}

.skip-link:focus {
  top: 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(16px, calc((100vw - 1700px) / 2));
  border-bottom: 1px solid rgba(17, 25, 29, 0.11);
  background: rgba(237, 244, 243, 0.90);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 36px;
  height: 18px;
  border: 2px solid var(--ink);
  border-left: 0;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.brand-mark::before {
  left: -5px;
  background: var(--orange);
}

.brand-mark::after {
  right: -6px;
  background: var(--cyan);
}

.nav-links {
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: rgba(0, 169, 191, 0.12);
  color: var(--cyan-deep);
}

main,
.site-footer {
  width: min(1760px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: clamp(38px, 5vw, 72px) 0 34px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(500px, 0.98fr);
  gap: clamp(24px, 3.4vw, 44px);
  align-items: start;
}

.hero-copy {
  min-width: 0;
  text-align: left;
}

.venue,
.section-kicker {
  margin: 0 0 14px;
  color: var(--cyan-deep);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-title {
  max-width: 100%;
  font-size: clamp(44px, 4vw, 84px);
  line-height: 0.95;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hero-subtitle {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.5;
}

h2 {
  max-width: 860px;
  font-size: clamp(34px, 3.8vw, 58px);
  line-height: 1.02;
}

h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.24;
}

.authors {
  max-width: 860px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.authors p {
  margin: 0;
}

.author-note,
.affiliation {
  color: var(--muted);
  font-size: 12px;
}

.lead {
  max-width: 900px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.56;
}

.resource-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 128px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.resource-link:hover {
  transform: translateY(-2px);
  background: var(--cyan-deep);
  border-color: var(--cyan-deep);
}

.icon {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.file-icon {
  border: 2px solid currentColor;
}

.file-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: inherit;
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid currentColor;
}

.code-icon::before,
.code-icon::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
}

.code-icon::before {
  left: 1px;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg);
}

.code-icon::after {
  right: 1px;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.hero-figure,
.wide-figure,
.comparison-layout figure,
.results-gallery figure,
.demo-grid article {
  margin: 0;
}

.hero-figure {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(17, 25, 29, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.hero-figure img,
.media-panel video,
.wide-figure img,
.comparison-layout figure img,
.results-gallery img,
.demo-grid img {
  border: 1px solid rgba(17, 25, 29, 0.16);
  background: white;
  box-shadow: var(--shadow);
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 1045 / 590;
  object-fit: contain;
  object-position: center;
  background: #f7faf9;
}

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

figcaption,
.caption {
  max-width: 980px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.stat-strip article,
.feature-grid article,
.method-grid article,
.stat-grid article,
.table-card,
.real-world-table,
.demo-grid article {
  border: 1px solid rgba(17, 25, 29, 0.12);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(17, 25, 29, 0.055);
}

.stat-strip article {
  padding: 18px 18px 16px;
}

.stat-strip strong,
.stat-grid strong {
  display: block;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  line-height: 0.95;
}

.stat-strip strong {
  color: var(--cyan-deep);
  font-size: clamp(34px, 3.8vw, 52px);
}

.stat-strip article:nth-child(2) strong,
.stat-grid article:nth-child(2) strong {
  color: var(--magenta);
}

.stat-strip article:nth-child(3) strong,
.stat-grid article:nth-child(3) strong {
  color: var(--orange);
}

.stat-strip article:nth-child(4) strong,
.stat-grid article:nth-child(4) strong {
  color: var(--spruce);
}

.stat-strip span,
.stat-grid span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.38;
}

.section-band {
  padding: clamp(52px, 7vw, 86px) 0;
}

.section-shell {
  width: 100%;
}

.teaser-band {
  padding-top: 38px;
}

.media-panel {
  margin-top: 28px;
}

.media-panel video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #081012;
}

.section-heading,
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.46fr) minmax(0, 0.54fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

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

.compact-heading {
  margin-bottom: 18px;
}

.section-intro,
.prose p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.65;
}

.prose p + p {
  margin-top: 16px;
}

.feature-grid,
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-grid article,
.method-grid article {
  min-height: 210px;
  padding: 20px;
}

.method-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 28px;
  margin-bottom: 22px;
  background: var(--ink);
  color: white;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.feature-grid article:nth-child(1) .method-index,
.method-grid article:nth-child(1) .method-index {
  background: var(--cyan-deep);
}

.feature-grid article:nth-child(2) .method-index,
.method-grid article:nth-child(2) .method-index {
  background: var(--orange);
}

.feature-grid article:nth-child(3) .method-index,
.method-grid article:nth-child(3) .method-index {
  background: var(--magenta);
}

.feature-grid p,
.method-grid p,
.demo-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.wide-figure {
  margin-top: 26px;
}

.wide-figure img {
  aspect-ratio: 16 / 7;
  object-fit: cover;
  background: #081012;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-grid article {
  padding: 18px 16px 17px;
}

.stat-grid strong {
  color: var(--cyan-deep);
  font-size: clamp(32px, 3.8vw, 48px);
}

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

.results-gallery.results-gallery-tight {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.results-gallery img {
  aspect-ratio: 16 / 12;
  object-fit: cover;
  background: white;
}

.results-figure-full img {
  object-fit: contain;
  aspect-ratio: auto;
  background: #f7faf9;
}

.results-gallery figcaption {
  max-width: none;
  margin: 10px 0 0;
  text-align: left;
  font-size: 13px;
}

.comparison-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 22px;
}

.comparison-layout figure img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #081012;
}

.table-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
}

.table-card h3 {
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: var(--ink-soft);
  font-weight: 600;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

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

.demo-grid article {
  padding: 14px;
}

.demo-grid img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.demo-grid h3 {
  margin: 16px 4px 0;
}

.demo-grid p {
  margin: 9px 4px 4px;
}

.real-world-table {
  margin-top: 22px;
  padding: 18px;
  overflow-x: auto;
}

.citation {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid rgba(17, 25, 29, 0.18);
  background: #0d1214;
  color: #e8f8f7;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  box-shadow: var(--shadow);
}

.site-footer {
  padding: 20px 0 40px;
  border-top: 1px solid rgba(17, 25, 29, 0.12);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1240px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .split-layout,
  .comparison-layout {
    grid-template-columns: 1fr;
  }

  .stat-strip,
  .stat-grid,
  .feature-grid,
  .method-grid,
  .results-gallery,
  .results-gallery.results-gallery-tight,
  .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  main,
  .site-footer {
    width: calc(100% - 24px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    justify-content: flex-start;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-title {
    font-size: clamp(32px, 8vw, 46px);
    line-height: 1.02;
  }

  h2 {
    font-size: clamp(28px, 8vw, 42px);
  }

  .authors {
    font-size: 12px;
  }

  .lead,
  .hero-subtitle,
  .section-intro,
  .prose p {
    font-size: 16px;
  }

  .resource-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 360px;
  }

  .resource-link {
    min-width: 0;
    padding-inline: 12px;
  }

  .stat-strip,
  .stat-grid,
  .feature-grid,
  .method-grid,
  .results-gallery,
  .results-gallery.results-gallery-tight,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid article,
  .method-grid article,
  .stat-grid article,
  .demo-grid article,
  .stat-strip article {
    min-height: 0;
  }

  .comparison-layout {
    gap: 16px;
  }

  th,
  td {
    padding: 10px 8px;
  }

  .citation {
    font-size: 12px;
  }
}
