.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

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

.glass {
  border: 1px solid var(--line);
  background: var(--glass-bg);
  box-shadow: var(--shadow), var(--inner-glow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  isolation: isolate;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--content), calc(100% - 24px));
  margin: 12px auto 0;
  padding: 10px 16px;
  min-height: 68px;
  border-radius: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--glass-highlight);
  border-radius: 13px;
  background:
    radial-gradient(circle at 30% 22%, rgb(255 255 255 / 85%), transparent 18%),
    linear-gradient(105deg, var(--accent-from), var(--accent-mid) 52%, var(--accent-to));
  box-shadow: 0 14px 34px var(--glass-accent-shadow), var(--inner-glow);
}

.brand strong,
.panel h2,
.panel h3 {
  display: block;
  margin: 0;
}

.brand strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.brand small,
.muted,
.hint {
  color: var(--muted);
}

.brand small,
.hint {
  font-size: 12px;
}

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

.nav-links a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--glass-bg-hover);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-bg);
  color: var(--text);
  text-decoration: none;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, calc(0.55 * var(--glass-reflex-light))),
    inset 0 -1px 2px rgba(0, 0, 0, calc(0.12 * var(--glass-reflex-dark))),
    0 4px 18px var(--glass-shadow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transition: background-color 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.45, 0.64, 1), border-color 0.35s ease;
}

.button:hover {
  border-color: var(--glass-accent-border);
  background: var(--glass-bg-hover);
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(105deg, var(--accent-from), var(--accent-mid) 50%, var(--accent-to));
  color: #0b1220;
  border-color: var(--glass-accent-border);
  font-weight: 700;
  box-shadow: 0 8px 26px var(--glass-accent-shadow), var(--inner-glow);
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  flex: 0 0 auto;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  display: block;
}

.theme-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.3rem;
  border: none;
  border-radius: 9999px;
  background: var(--switcher-track);
  backdrop-filter: blur(22px) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(22px) saturate(var(--glass-saturation));
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, calc(0.55 * var(--glass-reflex-light))),
    inset 0 -1px 2px rgba(0, 0, 0, calc(0.12 * var(--glass-reflex-dark))),
    0 4px 18px var(--glass-shadow);
}

.theme-switcher::after {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: 0.3rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--switcher-thumb);
  backdrop-filter: blur(14px) saturate(var(--glass-saturation));
  -webkit-backdrop-filter: blur(14px) saturate(var(--glass-saturation));
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, calc(0.65 * var(--glass-reflex-light))),
    inset 0 -1px 2px rgba(0, 0, 0, calc(0.1 * var(--glass-reflex-dark))),
    0 2px 10px rgba(0, 0, 0, calc(0.12 * var(--glass-reflex-dark)));
  transition: transform 0.5s cubic-bezier(0.34, 1.45, 0.64, 1);
  pointer-events: none;
  z-index: 0;
}

.theme-switcher:has(.theme-switcher__input[data-option="2"]:checked)::after {
  transform: translateX(2.35rem);
}

.theme-switcher__option {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  cursor: pointer;
  border-radius: 50%;
}

.theme-switcher__input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.theme-switcher__icon {
  width: 16px;
  height: 16px;
  color: var(--switcher-icon);
  transition: color 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.theme-switcher:has(.theme-switcher__input[data-option="1"]:checked) .theme-switcher__option:first-of-type .theme-switcher__icon,
.theme-switcher:has(.theme-switcher__input[data-option="2"]:checked) .theme-switcher__option:last-of-type .theme-switcher__icon {
  color: var(--switcher-icon-active);
  transform: scale(1.08);
}

.wrap {
  width: min(var(--content), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 72px 0 36px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(105deg, var(--accent-from), var(--accent-to));
  box-shadow: 0 0 12px var(--glass-accent-shadow);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero h1 span {
  display: block;
  background: linear-gradient(105deg, var(--accent-from), var(--accent-mid) 52%, var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 640px;
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

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

.stat {
  padding: 16px 18px;
  border-radius: 20px;
}

.stat b {
  display: block;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.section {
  padding: 28px 0 8px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

.panel {
  padding: 22px;
  border-radius: var(--radius);
}

.prose {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.prose p {
  margin: 0 0 14px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.version-card {
  padding: 0;
  overflow: hidden;
}

.version-card .body {
  padding: 22px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass-bg);
  font-size: 12px;
  color: var(--muted);
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  position: relative;
  padding: 8px 0 8px 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(105deg, var(--accent-from), var(--accent-to));
}

.media-frame {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.18);
}

.media-frame video,
.media-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.media-frame video {
  background: #0a0b0e;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gallery--v2 {
  grid-template-columns: 1fr 1fr;
}

.shot {
  position: relative;
  margin: 0;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 20px;
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  transition: transform 0.45s ease;
}

.shot:hover img {
  transform: scale(1.03);
}

.shot.wide img {
  aspect-ratio: 16 / 9;
}

.shot figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.gallery--v2 .shot:first-child,
.gallery--v2 .shot:last-child {
  grid-column: 1 / -1;
}

.gallery--v2 .shot:first-child img,
.gallery--v2 .shot:last-child img {
  aspect-ratio: 16 / 8;
}

.biomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.biome {
  padding: 20px;
  border-radius: 22px;
  min-height: 168px;
}

.biome .swatch {
  width: 42px;
  height: 10px;
  margin-bottom: 14px;
  border-radius: 999px;
}

.biome h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

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

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.spec {
  padding: 18px 20px;
  border-radius: 20px;
}

.spec h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

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

.timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.road {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 36px auto 28px;
  padding: 16px 20px;
  border-radius: 22px;
  color: var(--muted);
  font-size: 13px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(1200px, 92vw);
  max-height: 86vh;
  border-radius: 18px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

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

  .stats,
  .split,
  .gallery,
  .gallery--v2,
  .biomes,
  .spec-grid,
  .timeline,
  .road {
    grid-template-columns: 1fr;
  }

  .gallery--v2 .shot:first-child {
    grid-row: auto;
  }

  .hero {
    padding-top: 48px;
  }
}
