* {
  box-sizing: border-box;
}

:root {
  --paper: #fbfaf6;
  --ink: #161616;
  --muted: #5f625e;
  --line: #d8d5cc;
  --accent: #13a878;
  --accent-blue: #2f6fdd;
  --accent-orange: #eb9a1d;
  --panel: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

.main-content {
  width: min(960px, calc(100% - 44px));
  margin: 0 auto;
  padding: 64px 0 40px;
}

.paper-header {
  margin-bottom: 26px;
}

.hero-kicker {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(48px, 9vw, 88px);
  font-weight: 700;
  line-height: 1;
}

h1 {
  max-width: 940px;
  margin: 10px 0 34px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(35px, 6.4vw, 66px);
  font-weight: 500;
  line-height: 1.08;
}

.authors {
  margin: 0 0 24px;
  color: #2d2f2e;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.75;
}

.authors p {
  margin: 0;
}

.authors sup {
  font-size: 0.72em;
}

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

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

.author-notes {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.affiliation {
  color: #111;
  font-size: 13px;
  font-weight: 600;
}

.teaser {
  margin-top: 26px;
}

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

.teaser video,
.wide-figure img,
.figure-pair img,
.video-card video {
  border: 1.5px solid #000;
  border-radius: 8px;
  background: #000;
}

.teaser video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.figure-caption,
figcaption {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.small-caps {
  font-variant: small-caps;
  letter-spacing: 0.02em;
}

.quick-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 28px 0 12px;
}

.resource-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 138px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #333;
  color: #fff;
  box-shadow: none;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
  cursor: default;
  user-select: none;
}

.resource-button:nth-child(2) {
  background: #333;
}

.resource-button:nth-child(3) {
  width: 218px;
  background: #333;
  color: #fff;
}

.resource-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 22px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.resource-button:nth-child(3) .resource-icon {
  color: #fff;
}

.release-note {
  margin: 24px 0 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.release-note strong {
  color: var(--ink);
}

.tagline {
  display: inline-block;
  margin: 52px 0 22px;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}

.section {
  margin-top: -2px;
}

.prose p {
  margin: 0 0 16px;
  font-size: 17px;
}

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

.wide-figure img {
  background: var(--panel);
}

.concept-grid,
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 10px;
}

.concept-grid article,
.stat,
.video-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

.concept-grid h3,
.video-card h3 {
  margin: 0 0 8px;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.35;
}

.concept-grid article:nth-child(1) h3 {
  color: var(--accent);
}

.concept-grid article:nth-child(2) h3 {
  color: var(--accent-blue);
}

.concept-grid article:nth-child(3) h3 {
  color: var(--accent-orange);
}

.concept-grid p,
.video-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.stat-grid {
  grid-template-columns: repeat(4, 1fr);
  margin: 28px 0 30px;
}

.stat {
  padding: 17px 14px 16px;
  text-align: center;
}

.stat span {
  display: block;
  color: var(--accent);
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(25px, 4vw, 36px);
  font-weight: 700;
  line-height: 1;
}

.stat:nth-child(2) span {
  color: var(--accent-blue);
}

.stat:nth-child(3) span {
  color: var(--accent-orange);
}

.stat p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.figure-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0 0;
}

.figure-pair figure {
  margin: 0;
}

.figure-pair img {
  background: var(--panel);
  aspect-ratio: 16 / 10.5;
  object-fit: contain;
}

.demo-note {
  margin-bottom: 16px;
  color: #d03325;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}

.demo-note p {
  margin: 0;
}

.video-gallery-section {
  width: 100vw;
  margin-left: calc((100% - 100vw) / 2);
  padding: 4px 24px 22px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 20px;
  width: min(1160px, 100%);
  margin: 0 auto;
}

.video-card {
  padding: 14px;
}

.video-card video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-card p {
  margin-top: 10px;
}

.video-card:last-child {
  grid-column: 1 / -1;
  width: min(620px, 100%);
  justify-self: center;
}

.citation {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
  color: #f6f6f6;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  margin-top: 58px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 780px) {
  .main-content {
    width: min(100% - 28px, 960px);
    padding-top: 34px;
  }

  h1 {
    margin-bottom: 24px;
  }

  .authors {
    font-size: 13px;
  }

  .quick-links {
    gap: 8px;
  }

  .resource-button {
    width: 120px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 16px;
  }

  .resource-button:nth-child(3) {
    width: 190px;
  }

  .resource-icon {
    width: 24px;
    height: 20px;
    font-size: 11px;
  }

  .concept-grid,
  .stat-grid,
  .figure-pair,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-gallery-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .video-card:last-child {
    grid-column: auto;
    width: 100%;
  }

  .tagline {
    margin-top: 40px;
    font-size: 20px;
  }

  .prose p {
    font-size: 16px;
  }

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

@media (max-width: 480px) {
  .quick-links {
    gap: 6px;
  }

  .resource-button {
    width: 74px;
    min-height: 38px;
    padding: 0 8px;
    font-size: 13px;
  }

  .resource-button:nth-child(3) {
    width: 128px;
  }

  .resource-icon {
    display: none;
  }
}
