:root {
  color: #f8f6f0;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --accent: #d2ad59;
  --accent-soft: rgba(210, 173, 89, 0.18);
  --text: #f8f6f0;
  --muted: rgba(248, 246, 240, 0.78);
  --faint: rgba(248, 246, 240, 0.46);
  --rule: rgba(248, 246, 240, 0.14);
  --panel: rgba(255, 255, 255, 0.05);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --bg: #020202;
  --bg-soft: #0a0a0a;
  font-family: Inter, "SF Pro Display", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(210, 173, 89, 0.18), transparent 34%),
    radial-gradient(circle at 90% 12%, rgba(210, 173, 89, 0.08), transparent 28%),
    radial-gradient(circle at 50% 25%, transparent 0, rgba(0, 0, 0, 0.72) 72%);
}

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

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

button {
  font: inherit;
  cursor: pointer;
}

img,
video {
  display: block;
}

main {
  overflow: hidden;
}

.nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.35rem clamp(1.25rem, 4vw, 4rem);
  color: rgba(255, 255, 255, 0.86);
  mix-blend-mode: difference;
}

.brand,
.nav-links,
.hero-authors,
.hero-affiliations,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand-mark {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
}

.nav-links {
  gap: clamp(1rem, 2.6vw, 2.4rem);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.72);
}

.nav-links a:hover {
  color: #fff;
}

.hero-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: #000;
}

.hero-film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 16%, rgba(0, 0, 0, 0.22) 38%, transparent 72%),
    linear-gradient(106deg, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0.26) 40%, transparent 68%),
    radial-gradient(78% 64% at 22% 0%, rgba(210, 173, 89, 0.18) 0%, transparent 70%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  width: 100%;
  max-width: 1280px;
  padding: clamp(6.5rem, 11vw, 9rem) clamp(1.5rem, 5vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
}

.hero-copy h1 {
  margin: 0;
  max-width: 1120px;
  font-size: clamp(2.1rem, 4.8vw, 4.45rem);
  font-weight: 560;
  line-height: 1.03;
  letter-spacing: -0.05em;
  color: transparent;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.92) 38%, rgba(239, 230, 205, 0.84) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.34);
}

.hero-copy h1 span {
  display: inline;
  font-weight: 390;
  letter-spacing: -0.032em;
  color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(231, 210, 162, 0.72) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lede {
  margin: 0.2rem 0 0;
  max-width: 800px;
  font-size: clamp(0.98rem, 1.4vw, 1.2rem);
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.84);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55);
}

.hero-authors,
.hero-affiliations {
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-authors {
  margin-top: 0.42rem;
  font-size: clamp(0.92rem, 1.05vw, 1rem);
  color: rgba(255, 255, 255, 0.92);
}

.hero-authors li sup,
.hero-affiliations li sup {
  margin-left: 0.18rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.75);
}

.hero-affiliations {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.68);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.hero-actions a,
.citation-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero-actions a:hover:not(.is-disabled),
.citation-copy:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.9);
}

.hero-actions a.is-featured {
  border-color: rgba(210, 173, 89, 0.8);
  background: rgba(210, 173, 89, 0.18);
  box-shadow: 0 0 24px rgba(210, 173, 89, 0.16);
}

.hero-actions a.is-featured:hover {
  border-color: rgba(238, 211, 146, 0.96);
  background: rgba(210, 173, 89, 0.28);
}

.hero-actions a.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hero-actions a em {
  padding-left: 0.55rem;
  border-left: 1px solid rgba(255, 255, 255, 0.36);
  font-size: 0.66rem;
  font-style: normal;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
}

.features-section,
.abstract-section,
.method-section,
.demos-section,
.citation-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 10rem) clamp(1.25rem, 5vw, 5.5rem);
}

.eyebrow {
  margin: 0;
  font-size: clamp(0.95rem, 1.15vw, 1.15rem);
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.64);
}

.features-section,
.abstract-section,
.method-section,
.demos-section,
.citation-section {
  border-top: 1px solid var(--rule);
}

.features-grid,
.long-gallery,
.short-gallery {
  display: grid;
}

.features-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.8rem, 3vw, 3rem);
  margin-top: clamp(2rem, 5vw, 4rem);
}

.feature-card {
  padding-top: 1.35rem;
  border-top: 1px solid var(--rule);
}

.feature-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.feature-card h3 {
  margin: 0.6rem 0 0.7rem;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.feature-card h3 {
  font-size: clamp(1.35rem, 2.05vw, 1.9rem);
  font-weight: 490;
}

.feature-card p:last-child,
.abstract-body p,
.citation-credits {
  line-height: 1.68;
  color: var(--muted);
}

.abstract-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
}

.abstract-body {
  width: min(100%, 980px);
  max-width: 980px;
  padding: clamp(1.35rem, 2.2vw, 1.9rem) clamp(1.3rem, 2.4vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025)),
    radial-gradient(circle at top, rgba(210, 173, 89, 0.06), transparent 36%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 24px 70px -42px rgba(0, 0, 0, 0.82);
  font-size: clamp(1.04rem, 1.38vw, 1.18rem);
  text-align: left;
}

.abstract-body p {
  margin: 0;
  text-wrap: pretty;
}

.abstract-emph {
  padding: 0 0.08em;
  color: var(--text);
  background: linear-gradient(transparent 65%, rgba(210, 173, 89, 0.28) 65% 100%);
  font-weight: 660;
}

.abstract-teaser {
  width: min(100%, 1120px);
  margin-top: clamp(1.5rem, 3vw, 2.4rem);
}

.abstract-teaser figcaption {
  text-align: center;
}

.method-lede {
  max-width: 900px;
  margin: clamp(1.2rem, 2.6vw, 1.8rem) auto 0;
  text-align: center;
  font-size: clamp(1rem, 1.24vw, 1.1rem);
  line-height: 1.68;
  color: var(--muted);
}

.method-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
}

.method-point {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 1.35rem 1.35rem 1.4rem;
  background:
    radial-gradient(circle at top, rgba(210, 173, 89, 0.08), transparent 38%),
    linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 30px 80px -42px rgba(0, 0, 0, 0.85);
}

.method-point-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.method-point h3 {
  margin: 0.68rem 0 0.75rem;
  font-size: clamp(1.2rem, 1.75vw, 1.55rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.method-point p:last-child {
  margin: 0;
  line-height: 1.66;
  color: var(--muted);
}

.figure-stack {
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
}

.figure-card,
.citation-block {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(circle at top, rgba(210, 173, 89, 0.08), transparent 32%),
    linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 30px 80px -42px rgba(0, 0, 0, 0.85);
}

.figure-card {
  border-radius: 16px;
  overflow: hidden;
}

.figure-card img {
  width: 100%;
  height: auto;
}

.paper-figure {
  background:
    radial-gradient(circle at top, rgba(210, 173, 89, 0.1), transparent 34%),
    linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.035));
}

.figure-media {
  padding: clamp(0.8rem, 1.8vw, 1.15rem);
  background:
    linear-gradient(180deg, rgba(247, 242, 230, 0.98), rgba(240, 233, 217, 0.98)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.95), rgba(244, 237, 223, 0.88));
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.paper-figure img {
  border: 1px solid rgba(24, 18, 10, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 10px 26px -18px rgba(0, 0, 0, 0.34);
  background: #fff;
}

.figure-card figcaption {
  padding: 1rem 1.15rem 1.15rem;
  font-size: clamp(0.95rem, 1.08vw, 1.04rem);
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.78);
}

.cap-label {
  margin-right: 0.25em;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}

.figure-card-large {
  margin-bottom: clamp(1.4rem, 2.6vw, 2.2rem);
}

.gallery-block + .gallery-block {
  margin-top: clamp(4rem, 8vw, 7rem);
}

.gallery-eyebrow {
  margin-bottom: clamp(1.6rem, 3.5vw, 2.6rem);
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.demos-section > .gallery-block:first-of-type > .gallery-eyebrow {
  border-top: none;
  padding-top: 0;
}

.long-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.6rem, 3vw, 2.3rem);
}

.short-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.4vw, 2rem);
}

.video-card,
.video-card-compact {
  margin: 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #0a0a0a;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.48s ease, transform 1.1s ease;
}

.video-frame:hover video,
.video-frame:focus-within video,
.video-frame.is-revealed video {
  opacity: 0.7;
  transform: scale(1.01);
}

.prompt-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: clamp(0.85rem, 1.9vw, 1.45rem);
  background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.28) 20%, rgba(0, 0, 0, 0.75) 62%, rgba(0, 0, 0, 0.92) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.46s ease, backdrop-filter 0.46s ease;
}

.video-frame:hover .prompt-overlay,
.video-frame:focus-within .prompt-overlay,
.video-frame.is-revealed .prompt-overlay {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(2px);
}

.prompt-eyebrow {
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.52s ease, transform 0.52s ease;
}

.prompt-text,
.video-meta {
  margin: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.18, 0.7, 0.2, 1) 0.08s, transform 0.6s cubic-bezier(0.18, 0.7, 0.2, 1) 0.08s;
}

.prompt-text {
  font-family: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(0.82rem, 0.96vw, 0.98rem);
  font-style: italic;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
}

.video-meta {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.video-frame:hover .prompt-eyebrow,
.video-frame:focus-within .prompt-eyebrow,
.video-frame.is-revealed .prompt-eyebrow,
.video-frame:hover .prompt-text,
.video-frame:focus-within .prompt-text,
.video-frame.is-revealed .prompt-text,
.video-frame:hover .video-meta,
.video-frame:focus-within .video-meta,
.video-frame.is-revealed .video-meta {
  opacity: 1;
  transform: translateY(0);
}

.expand-btn,
.prompt-toggle-btn,
.lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  transition: opacity 0.22s ease, background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.expand-btn {
  position: absolute;
  top: clamp(0.55rem, 1.1vw, 0.9rem);
  right: clamp(0.55rem, 1.1vw, 0.9rem);
  z-index: 3;
  width: 2rem;
  height: 2rem;
  padding: 0;
  opacity: 0.62;
}

.video-frame:hover .expand-btn,
.video-frame:focus-within .expand-btn,
.hero-shell:hover .hero-expand {
  opacity: 1;
}

.expand-btn:hover,
.prompt-toggle-btn:hover,
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.92);
  transform: scale(1.05);
}

.hero-expand {
  top: clamp(4.5rem, 7vw, 5.5rem);
  right: clamp(1rem, 2vw, 1.6rem);
  width: 2.35rem;
  height: 2.35rem;
  opacity: 0.84;
}

.prompt-toggle-btn {
  display: none;
  position: absolute;
  bottom: clamp(0.55rem, 1.8vw, 0.9rem);
  left: clamp(0.55rem, 1.8vw, 0.9rem);
  z-index: 3;
  gap: 0.35rem;
  padding: 0.32rem 0.6rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.citation-section {
  padding-bottom: clamp(4rem, 7vw, 6rem);
}

.citation-eyebrow {
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}

.citation-block {
  position: relative;
  border-radius: 8px;
  padding: 1.4rem 1.5rem;
}

.citation-block pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  line-height: 1.6;
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
}

.citation-copy {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.72rem;
  padding: 0.35rem 0.85rem;
}

.citation-credits {
  margin-top: clamp(1rem, 2vw, 1.6rem);
  font-size: 0.8rem;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 3rem);
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
}

.lightbox-stage {
  position: relative;
  width: 100%;
  max-width: min(96vw, 1600px);
  max-height: calc(100vh - clamp(2rem, 6vw, 6rem));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

.lightbox-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.lightbox-close {
  position: fixed;
  top: clamp(1rem, 2.8vw, 2.4rem);
  right: clamp(1rem, 2.8vw, 2.4rem);
  z-index: 101;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
}

[hidden] {
  display: none !important;
}

@media (hover: none) {
  .prompt-toggle-btn {
    display: inline-flex;
  }

  .video-frame.is-revealed .prompt-toggle-btn {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 1100px) {
  .features-grid,
  .method-points,
  .long-gallery,
  .short-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }

  .hero-copy {
    gap: 0.7rem;
    padding: 5.5rem 1.25rem 2rem;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(1.55rem, 6vw, 2.35rem);
    overflow-wrap: anywhere;
  }

  .hero-lede {
    max-width: 100%;
    font-size: 0.95rem;
  }

  .features-section,
  .abstract-section,
  .method-section,
  .demos-section,
  .citation-section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .citation-copy {
    position: static;
    margin-bottom: 1rem;
  }

  .citation-block {
    padding: 1.2rem;
  }

  .hero-expand {
    display: none;
  }
}
