:root {
  --bg: #f5f0e8;
  --bg-deep: #efe6d8;
  --surface: rgba(255, 255, 255, 0.76);
  --ink: #17202c;
  --muted: #586171;
  --accent: #245f7a;
  --accent-strong: #193f58;
  --line: rgba(23, 32, 44, 0.12);
  --shadow: 0 24px 60px rgba(23, 32, 44, 0.12);
  --shadow-soft: 0 14px 40px rgba(23, 32, 44, 0.08);
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(171, 205, 223, 0.42), transparent 32%),
    radial-gradient(circle at 85% 8%, rgba(242, 210, 180, 0.52), transparent 20%),
    linear-gradient(180deg, #faf7f2 0%, var(--bg) 42%, var(--bg-deep) 100%);
}

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

a {
  color: inherit;
}

[id] {
  scroll-margin-top: 6rem;
}

.page-glow {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.page-glow-left {
  top: -10rem;
  left: -8rem;
  background: rgba(175, 208, 221, 0.48);
}

.page-glow-right {
  top: 10rem;
  right: -8rem;
  background: rgba(237, 199, 170, 0.4);
}

.hero-shell,
main {
  position: relative;
  z-index: 1;
}

.section-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.content-shell {
  width: min(calc(100% - 2rem), 1080px);
}

.hero-shell {
  padding: 1.25rem 0 2.5rem;
}

.top-nav {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto 2rem;
  padding: 0.95rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 44px rgba(23, 32, 44, 0.16);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 1rem;
  z-index: 20;
}

.brand-mark {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 0.78rem;
  border-radius: 999px;
  transition: color 180ms ease, background-color 180ms ease;
}

.nav-links a:hover {
  color: var(--accent-strong);
  background: rgba(36, 95, 122, 0.11);
}

.hero-stack {
  display: grid;
  gap: 1.6rem;
}

.hero-copy {
  padding: 1.5rem 0 0.2rem;
  text-align: center;
  width: min(100%, 1360px);
  margin: 0 auto;
}

.hero-copy h1,
.section-header h2,
.subsection-card h3 {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.03em;
  margin: 0;
}

.hero-copy h1 {
  font-size: clamp(2.25rem, 4.15vw, 3.25rem);
  line-height: 1.02;
  max-width: min(100%, 1080px);
  margin-left: auto;
  margin-right: auto;
}

.hero-meta {
  margin-top: 1.35rem;
}

.authors-line {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.14rem;
  line-height: 1.7;
}

.cta-row {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(36, 95, 122, 0.16);
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(23, 32, 44, 0.14);
}

.hero-tldr {
  max-width: 58rem;
  margin: 1.35rem auto 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.82;
}

.body-card,
.media-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.media-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  box-shadow: var(--shadow);
}

.hero-media {
  width: min(100%, 840px);
  margin: 0 auto;
}

.hero-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 22px;
  background: #ece8e2;
}

.content-section {
  padding: 2.1rem 0 0.8rem;
}

.section-header {
  max-width: 50rem;
  margin-bottom: 1.1rem;
}

.section-header-centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-title-simple {
  margin: 0;
  font-size: clamp(1.22rem, 1.75vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.prose-card,
.figure-card,
.subsection-card {
  padding: 1.1rem;
}

.prose-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.figure-card img,
.figure-card video {
  width: 100%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.figure-card figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  text-align: left;
}

.subsection-card h3 {
  font-size: 1.35rem;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

#experiments > .section-header {
  margin-bottom: 0;
}

#experiments > * + * {
  margin-top: 1rem;
}

#real-world {
  width: min(100%, 38rem);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.subsection-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.libero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

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

.libero-grid .video-card {
  margin: 0;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.libero-grid .video-card video {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 14px;
  background: #ece8e2;
}

.libero-grid .video-card figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
  word-break: break-word;
}

.worldmodel-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

#world-model {
  width: min(100%, 54rem);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

#world-model .worldmodel-list {
  width: min(100%, 48rem);
  margin: 0 auto;
}

.worldmodel-list .video-card {
  margin: 0;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.worldmodel-list .video-card video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 14px;
  background: #ece8e2;
}

.worldmodel-list .video-card figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
  word-break: break-word;
}

.video-carousel {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 auto;
}

#real-world .video-carousel {
  width: calc(100% - 4.5rem);
}

.carousel-window {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 280ms ease;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.carousel-slide video {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 18px;
  background: #ece8e2;
  box-shadow: inset 0 0 0 1px rgba(23, 32, 44, 0.06);
}

.carousel-slide figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent-strong);
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  z-index: 2;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.carousel-prev {
  left: -1rem;
}

.carousel-next {
  right: -1rem;
}

#real-world .carousel-prev {
  left: -2.25rem;
}

#real-world .carousel-next {
  right: -2.25rem;
}

.carousel-arrow:hover {
  transform: translateY(calc(-50% - 1px));
  box-shadow: 0 18px 42px rgba(23, 32, 44, 0.14);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  border: 0;
  background: rgba(36, 95, 122, 0.18);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.carousel-dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

@media (max-width: 980px) {
  .libero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero-shell {
    padding-top: 0.8rem;
  }

  .top-nav {
    padding: 0.9rem 1rem;
    align-items: flex-start;
    border-radius: 28px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-copy h1 {
    font-size: 2rem;
  }

  .hero-tldr,
  .prose-card p,
  .figure-card figcaption {
    font-size: 0.98rem;
  }

  .video-carousel {
    width: 100%;
  }

  #real-world .video-carousel {
    width: 100%;
  }

  #real-world .carousel-prev {
    left: -0.8rem;
  }

  #real-world .carousel-next {
    right: -0.8rem;
  }

  .carousel-arrow {
    top: 50%;
  }

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

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