:root {
  --white: #ffffff;
  --ink: #171814;
  --muted: #65685e;
  --line: #dcdcd4;
  --blue: #415dd8;
  --font-sans: "Manrope", sans-serif;
  --font-mono: "DM Mono", monospace;
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.landing {
  position: relative;
  display: flex;
  min-height: 100svh;
  padding-bottom: 88px;
  flex-direction: column;
}

.research-toggle {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  place-content: center;
  gap: 5px;
}

.research-toggle i {
  display: block;
  width: 23px;
  height: 2px;
  background: var(--ink);
}

.research-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.research-toggle-landing {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 5;
}

.research-backdrop {
  position: fixed;
  z-index: 39;
  inset: 0;
  background: rgba(20, 22, 18, 0.14);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.research-drawer {
  position: fixed;
  z-index: 40;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(350px, 86vw);
  padding: 26px;
  background: var(--white);
  box-shadow: 14px 0 36px rgba(28, 31, 24, 0.12);
  transform: translateX(-105%);
  transition: transform 220ms ease;
}

body.research-open {
  overflow: hidden;
}

body.research-open .research-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.research-open .research-drawer {
  transform: translateX(0);
}

.research-drawer-header {
  display: flex;
  padding-bottom: 20px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.research-drawer-header p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
}

.research-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.research-links {
  display: grid;
  margin-top: 18px;
  gap: 8px;
}

.research-links a {
  display: grid;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  gap: 5px;
}

.research-links a:hover,
.research-links a:focus-visible {
  border-color: var(--blue);
  background: #f7f8ff;
}

.research-links strong {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.research-links span {
  display: flex;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.45;
  justify-content: space-between;
  gap: 8px;
}

.research-links b {
  color: var(--ink);
  font-weight: 500;
}

.landing-crop {
  width: min(1180px, calc(100% - 48px));
  margin: 22px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #d3d2c7;
  aspect-ratio: 1007 / 273;
}

.landing-crop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 76%;
}

.project-bar {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
  transition: opacity 180ms ease, transform 220ms ease;
}

.project-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.project-bar-inner {
  display: flex;
  min-height: 70px;
  padding: 10px 0;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.research-toggle-bar {
  position: absolute;
  top: 50%;
  left: 22px;
  transform: translateY(-50%);
}

.project-bar-copy {
  min-width: 0;
}

.project-bar-title,
.project-bar-authors {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-bar-title {
  font-size: 0.78rem;
  font-weight: 600;
}

.project-bar-title strong {
  margin-right: 9px;
  color: var(--blue);
}

.project-bar-authors {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
}

.project-bar-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.project-bar-right {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.project-bar-actions button {
  display: inline-flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f4f4f0;
  color: #8a8c84;
  font: 700 0.72rem var(--font-sans);
  cursor: not-allowed;
}

.project-bar-actions button span {
  padding-left: 7px;
  border-left: 1px solid #d3d4cd;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.masthead {
  padding: clamp(38px, 6vh, 72px) 0 24px;
  text-align: center;
}

.section-label {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.masthead h1 {
  margin: 0 0 4px;
  font-size: clamp(4rem, 10vw, 8rem);
  letter-spacing: -0.08em;
  line-height: 0.95;
}

.subtitle {
  max-width: 850px;
  margin: 18px auto 30px;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.subtitle span {
  display: block;
}

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.25rem;
  text-decoration: none;
  transform: translateX(-50%);
  place-items: center;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  background: var(--ink);
  color: var(--white);
  transform: translateX(-50%) translateY(3px);
}

body.has-entered-content .scroll-cue {
  opacity: 0;
  pointer-events: none;
}

.authors,
.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.project-actions {
  display: flex;
  margin-top: 24px;
  justify-content: center;
  gap: 10px;
}

.project-actions button {
  display: inline-flex;
  min-height: 42px;
  padding: 0 16px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f4f0;
  color: #8a8c84;
  font: 700 0.8rem var(--font-sans);
  cursor: not-allowed;
}

.project-actions button span {
  padding-left: 9px;
  border-left: 1px solid #d3d4cd;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.authors {
  gap: 5px 18px;
  font-size: 0.93rem;
  font-weight: 700;
}

.authors a {
  color: inherit;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.authors a:hover,
.authors a:focus-visible {
  color: var(--blue);
  text-decoration-color: currentColor;
}

.affiliations {
  margin-top: 8px;
  gap: 5px 24px;
  color: var(--muted);
  font-size: 0.8rem;
}

sup {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.65em;
}

figure {
  margin: 0;
}

.pdf-figure {
  background: transparent;
}

.figure-link,
.pdf-figure img {
  display: block;
  width: 100%;
}

.pdf-platform {
  min-width: 0;
}

.pdf-figure figcaption {
  padding: 12px 8px 4px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.intro-grid {
  display: grid;
  padding-top: 100px;
  align-items: start;
  gap: clamp(40px, 6vw, 80px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#content {
  scroll-margin-top: 0;
}

.video-stack {
  display: grid;
  gap: clamp(52px, 4vw, 72px);
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
}

.video-player-veg {
  aspect-ratio: 1920 / 1052;
}

.video-player-cart {
  aspect-ratio: 1920 / 1064;
}

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

.video-fullscreen {
  position: absolute;
  inset: 0;
  display: grid;
  border: 0;
  background: rgba(20, 22, 18, 0);
  color: rgba(255, 255, 255, 0);
  cursor: pointer;
  opacity: 0;
  place-items: center;
  transition: background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.video-fullscreen svg {
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid currentColor;
  border-radius: 8px;
  filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.35));
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.video-player:hover .video-fullscreen,
.video-fullscreen:focus-visible {
  background: rgba(20, 22, 18, 0.28);
  color: rgba(255, 255, 255, 0.94);
  opacity: 1;
}

@media (hover: none) {
  .video-fullscreen {
    background: rgba(20, 22, 18, 0.18);
    color: rgba(255, 255, 255, 0.94);
    opacity: 1;
  }
}

.video-stack figcaption {
  display: flex;
  padding: 12px 5px 4px;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8rem;
}

.video-stack figcaption span {
  color: var(--muted);
  text-align: right;
}

.method,
.overview-section,
.platform {
  padding-top: 110px;
}

.section-label {
  margin: 0 0 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.prose {
  max-width: 100%;
}

.prose h2,
.platform > h2 {
  margin: 0 0 30px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  letter-spacing: -0.065em;
  line-height: 1.04;
}

.intro-grid .prose h2 {
  font-size: clamp(2.1rem, 3.7vw, 3.5rem);
}

.intro-grid .prose p {
  font-size: 0.93rem;
  line-height: 1.7;
}

.prose p {
  margin: 0 0 18px;
  color: #383b34;
  font-size: 1.03rem;
  line-height: 1.75;
  text-align: justify;
  text-justify: inter-word;
}

.method-writeup {
  display: grid;
  width: 100%;
  margin: 44px auto 0;
  gap: 44px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.method-writeup article > span {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.method-writeup h2 {
  margin: 10px 0 14px;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  letter-spacing: -0.045em;
}

.method-writeup p {
  margin: 0;
  color: #44473f;
  font-size: 0.94rem;
  line-height: 1.7;
  text-align: justify;
  text-justify: inter-word;
}

.platform > h2 {
  max-width: 940px;
  margin-inline: auto;
  font-size: clamp(2.1rem, 3.7vw, 3.5rem);
  text-align: center;
}

.platform-grid {
  display: grid;
  margin-top: 42px;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-photo img {
  display: block;
  width: 100%;
  height: auto;
}

footer {
  margin-top: 110px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
  text-align: center;
}

footer p {
  margin: 2px 0;
}

footer a {
  color: inherit;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .masthead {
    padding-top: 38px;
  }

  .landing-crop {
    width: min(100% - 24px, 1180px);
    margin-top: 12px;
    border-radius: 7px;
  }

  .research-toggle-landing {
    top: 14px;
    left: 14px;
  }

  .research-toggle {
    width: 28px;
    height: 28px;
  }

  .research-toggle-bar {
    left: 14px;
  }

  .project-bar-inner {
    min-height: 0;
    padding: 9px 0;
    gap: 12px;
  }

  .project-bar-title {
    font-size: 0.67rem;
  }

  .project-bar-authors {
    font-size: 0.58rem;
  }

  .project-bar-actions button {
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.65rem;
  }

  .project-bar-actions button span {
    display: none;
  }


  .intro-grid,
  .method-writeup,
  .platform-grid {
    grid-template-columns: 1fr;
  }

  .video-stack figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .video-stack figcaption span {
    text-align: left;
  }

  .intro-grid,
  .method,
  .overview-section,
  .platform {
    padding-top: 80px;
  }
}
