:root {
  --ink: #171717;
  --muted: #62666a;
  --line: #e3e4e5;
  --soft: #f5f6f7;
  --accent: #b92e33;
  --accent-soft: #f7e8e8;
  --blue: #2765a8;
  --white: #ffffff;
  --page: 1120px;
  --narrow: 880px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Manrope", var(--sans);
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open,
body.lightbox-open {
  overflow: hidden;
}

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

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

button {
  color: inherit;
  font: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 9px 13px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.page.narrow {
  width: min(calc(100% - 40px), var(--narrow));
}

.topbar {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid transparent;
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.topbar.scrolled {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  width: min(calc(100% - 40px), var(--page));
  height: 96px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.org-logos {
  height: 66px;
  display: inline-flex;
  align-items: center;
  gap: 17px;
}

.org-logo {
  display: block;
  object-fit: contain;
}

.org-logo-school {
  width: 64px;
  height: 59px;
}

.org-logo-divider {
  width: 1px;
  height: 41px;
  background: #d8dade;
}

.org-logo-lightspeed {
  width: 90px;
  height: 59px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: -0.08em;
}

nav {
  display: flex;
  gap: 34px;
}

nav a {
  position: relative;
  color: #45484b;
  font-size: 16px;
  font-weight: 600;
}

nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 160ms ease;
}

nav a:hover::after,
nav a.active::after {
  transform: scaleX(1);
}

.menu-button {
  width: 42px;
  height: 42px;
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-button > span {
  width: 21px;
  height: 1px;
  display: block;
  margin: 6px auto;
  background: var(--ink);
  transition: transform 160ms ease;
}

.hero {
  padding: 132px 0 88px;
  text-align: center;
}

.hero h1 {
  max-width: 1040px;
  margin: 0 auto;
  font-family: var(--display);
  font-size: clamp(38px, 5.2vw, 64px);
  font-weight: 700;
  line-height: 1.11;
  letter-spacing: -0.045em;
}

.hero h1 span {
  color: var(--accent);
}

.tagline {
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: 19px;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 20px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 500;
}

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

.authors sup {
  color: var(--muted);
  font-size: 9px;
}

.institutions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  color: var(--muted);
  font-size: 12px;
}

.institutions b {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
}

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

.pill {
  min-width: 100px;
  height: 42px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #cfd1d3;
  border-radius: 999px;
  background: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.pill:hover {
  border-color: #999da1;
  background: var(--soft);
  transform: translateY(-1px);
}

.pill-dark {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.pill-dark:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.pill svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill .hf-icon {
  font-size: 18px;
  line-height: 1;
}

.pill:nth-child(2) svg {
  fill: currentColor;
  stroke: none;
}

.teaser {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  box-shadow: 0 16px 50px rgba(23, 23, 23, 0.08);
}

.teaser img {
  width: 100%;
  border-radius: 7px;
  background: white;
}

.teaser figcaption {
  max-width: 850px;
  margin: 0 auto;
  padding: 18px 15px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.teaser figcaption strong {
  color: var(--ink);
}

.section {
  padding: 95px 0;
  border-top: 1px solid var(--line);
}

.section-tint {
  background: var(--soft);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 50px;
  text-align: center;
}

.section-heading > span {
  display: block;
  margin-bottom: 9px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 680px;
  margin: 15px auto 0;
  color: var(--muted);
  font-size: 15px;
}

.method-figure {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  cursor: zoom-in;
}

.method-figure img {
  width: 100%;
  max-height: 780px;
  object-fit: contain;
  border-radius: 7px;
  background: white;
}

.method-figure figcaption {
  padding: 15px 15px 5px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.steps {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.step {
  min-height: 245px;
  padding: 24px 21px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.step > span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
}

.step h3 {
  margin: 42px 0 10px;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.gallery-wide {
  margin: 0 0 28px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  cursor: zoom-in;
}

.gallery-wide img {
  width: 100%;
  border-radius: 7px;
  background: #111;
}

.gallery-wide figcaption {
  padding: 14px 12px 5px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.demo-showcase {
  margin: 0 0 52px;
}

.student-group {
  margin-bottom: 0;
}

.demo-group-heading {
  margin-bottom: 24px;
}

.demo-eyebrow {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.demo-group-heading h3 {
  margin: 5px 0 0;
  font-family: var(--display);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

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

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 24px rgba(20, 24, 28, 0.04);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #111315;
}

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

.comparison-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.comparison {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  cursor: zoom-in;
}

.comparison img {
  width: 100%;
  min-height: 250px;
  border-radius: 7px;
  object-fit: contain;
  background: white;
}

.comparison figcaption {
  padding: 17px 15px 10px;
}

.comparison h3 {
  margin: 0 0 7px;
  font-family: var(--display);
  font-size: 18px;
}

.comparison p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.citation {
  border-bottom: 0;
}

.bibtex {
  overflow: hidden;
  border: 1px solid #303235;
  border-radius: 12px;
  background: #181a1d;
  color: #e8eaec;
}

.bibtex-head {
  height: 49px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #323438;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bibtex-head button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #b7bbc0;
  font-family: inherit;
  font-size: 9px;
  cursor: pointer;
}

.bibtex-head button:hover {
  color: white;
}

.bibtex-head svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.bibtex pre {
  margin: 0;
  padding: 26px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.8;
}

footer {
  padding: 55px 0;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 50px;
  align-items: end;
}

.footer-brand {
  margin-bottom: 11px;
}

.footer-grid > div:first-child p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.footer-links {
  display: flex;
  gap: 19px;
  font-size: 11px;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--accent);
}

.footnote {
  margin: 0;
  color: #888c8f;
  font-size: 9px;
  line-height: 1.7;
  text-align: right;
}

.lightbox {
  position: fixed;
  z-index: 500;
  inset: 0;
  padding: 50px;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 10, 0.94);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1400px, 94vw);
  max-height: 89vh;
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: transparent;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.toast {
  position: fixed;
  z-index: 600;
  right: 20px;
  bottom: 20px;
  padding: 11px 15px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 11px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal {
  opacity: 0;
  transform: translateY(17px);
  transition:
    opacity 550ms ease,
    transform 550ms ease;
}

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

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .footnote {
    text-align: left;
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 85px;
  }

  .page,
  .page.narrow,
  .nav-wrap {
    width: min(calc(100% - 28px), var(--page));
  }

  .nav-wrap {
    height: 80px;
  }

  .menu-button {
    display: block;
  }

  nav {
    position: fixed;
    top: 80px;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 35px 22px;
    flex-direction: column;
    gap: 22px;
    background: white;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 160ms ease,
      visibility 160ms ease,
      transform 160ms ease;
  }

  nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  nav a {
    font-family: var(--display);
    font-size: 27px;
  }

  .menu-button[aria-expanded="true"] > span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] > span:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .hero {
    padding: 116px 0 65px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .demo-showcase {
    margin-top: 0;
  }

  .student-group {
    margin-bottom: 0;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .tagline {
    font-size: 16px;
  }

  .authors {
    font-size: 13px;
  }

  .institutions {
    display: block;
  }

  .institutions span {
    display: block;
  }

  .teaser {
    padding: 6px;
  }

  .section {
    padding: 72px 0;
  }

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

  .steps,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .step {
    min-height: auto;
  }

  .step h3 {
    margin-top: 27px;
  }

  .comparison img {
    min-height: 180px;
  }

  .bibtex pre {
    padding: 20px;
    font-size: 10px;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .lightbox {
    padding: 14px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
