:root {
  color-scheme: dark;
  --bg: #07111d;
  --bg-soft: #0d1725;
  --bg-elevated: rgba(10, 18, 29, 0.82);
  --panel: rgba(15, 24, 37, 0.92);
  --panel-strong: rgba(19, 30, 47, 0.98);
  --border: rgba(165, 184, 206, 0.14);
  --border-strong: rgba(247, 201, 72, 0.24);
  --text: #eef4ff;
  --muted: #9cacc2;
  --accent: #f7c948;
  --accent-strong: #ffe485;
  --accent-cyan: #67dfff;
  --danger: #ff7d6e;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1240px;
  --font-head: "Bahnschrift", "Arial Narrow", "Trebuchet MS", sans-serif;
  --font-body: "Segoe UI", "Aptos", "Trebuchet MS", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef4fb;
  --bg-soft: #dfeaf5;
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: rgba(248, 251, 255, 0.98);
  --border: rgba(38, 57, 84, 0.12);
  --border-strong: rgba(176, 122, 0, 0.2);
  --text: #0a1727;
  --muted: #58708a;
  --shadow: 0 28px 72px rgba(35, 59, 89, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(247, 201, 72, 0.16), transparent 24%),
    radial-gradient(circle at 85% 0%, rgba(103, 223, 255, 0.14), transparent 20%),
    linear-gradient(180deg, #07111d 0%, var(--bg) 44%, #04070d 100%);
  font-family: var(--font-body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 70%);
  opacity: 0.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(5, 9, 15, 0.94), rgba(5, 9, 15, 0.72));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

:root[data-theme="light"] .site-header {
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.94), rgba(247, 250, 255, 0.74));
  border-bottom-color: rgba(30, 47, 69, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, #fff8c7 0%, #f7c948 33%, #9d6803 100%);
  box-shadow: 0 12px 30px rgba(247, 201, 72, 0.3);
}

.brand__title {
  display: grid;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 800;
}

.brand__title strong {
  font-family: var(--font-head);
  font-size: 17px;
  letter-spacing: 0.2em;
}

.nav {
  flex: 1;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.nav__link {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav__link:hover,
.nav__link:focus-visible,
.nav__link--active {
  color: var(--text);
  background: rgba(247, 201, 72, 0.12);
  transform: translateY(-1px);
}

.nav__link--home {
  color: var(--text);
}

.theme-switcher {
  display: inline-flex;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(120, 143, 166, 0.1);
  border: 1px solid var(--border);
}

.theme-switcher__button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 12px;
  min-width: 52px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.theme-switcher__button[aria-pressed="true"] {
  color: #06111b;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
}

.theme-switcher__button:hover,
.theme-switcher__button:focus-visible {
  transform: translateY(-1px);
}

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

.hero__panel,
.listing-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg-elevated), var(--panel));
  box-shadow: var(--shadow);
}

.hero__panel::after,
.listing-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -22% auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 223, 255, 0.12), transparent 70%);
  filter: blur(8px);
}

.hero__content,
.listing-hero__copy,
.detail-hero__content {
  position: relative;
  z-index: 1;
  padding: clamp(26px, 4.8vw, 56px);
  display: grid;
  gap: 18px;
}

.hero h1,
.listing-hero h1,
.detail-hero h1 {
  margin: 0;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(44px, 7vw, 88px);
}

.listing-hero h1,
.detail-hero h1 {
  max-width: 14ch;
  font-size: clamp(34px, 5vw, 60px);
}

.hero p,
.listing-hero p,
.detail-hero p,
.section-head p,
.sidebar-card p,
.spotlight-card p,
.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 17px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(247, 201, 72, 0.24);
  background: rgba(247, 201, 72, 0.08);
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 800;
}

.hero__actions,
.listing-hero__meta,
.detail-hero__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.button--primary {
  color: #06111b;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  box-shadow: 0 10px 30px rgba(247, 201, 72, 0.22);
}

.button--ghost {
  color: var(--text);
  background: rgba(120, 143, 166, 0.1);
  border-color: var(--border);
}

.button--small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-top: 8px;
}

.status-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(9, 16, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

:root[data-theme="light"] .status-card {
  background: rgba(255, 255, 255, 0.76);
}

.status-card__label {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 800;
}

.status-card__value {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modules,
.home-intro,
.spotlight-grid {
  padding: 22px 0 56px;
}

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

.section-head h2 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-head);
  font-size: 22px;
}

.section-head--compact {
  margin-bottom: 14px;
}

.module-grid,
.spotlight-grid {
  display: grid;
  gap: 18px;
}

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

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

.module-card,
.spotlight-card,
.sidebar-card,
.listing-card__body,
.detail-panel,
.source-box {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 31, 46, 0.96), rgba(11, 18, 28, 0.94));
  box-shadow: var(--shadow);
}

:root[data-theme="light"] .module-card,
:root[data-theme="light"] .spotlight-card,
:root[data-theme="light"] .sidebar-card,
:root[data-theme="light"] .listing-card__body,
:root[data-theme="light"] .detail-panel,
:root[data-theme="light"] .source-box {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.98));
}

.module-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  padding: 22px;
  display: grid;
  align-content: start;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.module-card::after,
.spotlight-card::after {
  content: "";
  position: absolute;
  inset: auto -8% -18% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 223, 255, 0.12), transparent 65%);
  filter: blur(4px);
}

.module-card:hover {
  transform: translateY(-6px);
  border-color: rgba(247, 201, 72, 0.3);
}

.module-card--home {
  cursor: pointer;
}

.module-card__tag,
.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.module-card__tag {
  padding: 8px 12px;
  background: rgba(247, 201, 72, 0.14);
  color: var(--accent-strong);
}

.badge {
  padding: 7px 10px;
}

.badge--gold {
  background: rgba(247, 201, 72, 0.14);
  color: var(--accent-strong);
}

.badge--amber {
  background: rgba(247, 170, 72, 0.12);
  color: #ffdb9d;
}

.badge--teal {
  background: rgba(103, 223, 255, 0.12);
  color: #92ecff;
}

.badge--ghost {
  background: rgba(120, 143, 166, 0.12);
  color: var(--text);
}

.module-card h3,
.spotlight-card h3,
.sidebar-card h3,
.detail-panel h3 {
  margin: 18px 0 10px;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.module-card h3 {
  font-size: 28px;
}

.spotlight-card,
.sidebar-card,
.detail-panel,
.source-box {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.spotlight-card h3,
.sidebar-card h3 {
  font-size: 24px;
}

.module-card__footer {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.module-card__meta,
.meta-pill,
.listing-footer,
.source-box__label,
.source-box__license {
  color: var(--muted);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(120, 143, 166, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.module-card__arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(247, 201, 72, 0.12);
  color: var(--accent-strong);
  transition: transform 180ms ease, background-color 180ms ease;
}

.module-card:hover .module-card__arrow,
.spotlight-card:hover .module-card__arrow {
  transform: translateX(3px);
  background: rgba(247, 201, 72, 0.18);
}

.listing-hero {
  padding: 0;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}

.listing-hero__copy {
  padding-right: 0;
}

.listing-hero__cta {
  justify-self: end;
  align-self: start;
  margin: 24px 24px 0 0;
}

.listing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  gap: 22px;
  padding: 22px 0 56px;
}

.listing-grid {
  display: grid;
  gap: 16px;
}

.listing-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.listing-card__link {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 220px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: inherit;
  overflow: hidden;
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
  box-shadow: var(--shadow);
}

.listing-card__link:hover,
.listing-card__link:focus-visible {
  transform: translateY(-5px);
  border-color: var(--border-strong);
}

.listing-card__media {
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.listing-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 260ms ease;
}

.listing-card__link:hover .listing-card__media img,
.listing-card__link:focus-visible .listing-card__media img {
  transform: scale(1.08);
}

.listing-card__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 9, 15, 0.08), rgba(5, 9, 15, 0.45)),
    linear-gradient(180deg, transparent 40%, rgba(5, 9, 15, 0.6));
}

.listing-card__badge-row {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 1;
}

.listing-card__body {
  padding: 20px;
  background: linear-gradient(180deg, rgba(18, 27, 41, 0.98), rgba(11, 18, 27, 0.98));
}

:root[data-theme="light"] .listing-card__body {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
}

.listing-card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.listing-card__body h3 {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.listing-card__body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.listing-card__footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent-strong);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.listing-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}

.sidebar-card--accent {
  border-color: rgba(247, 201, 72, 0.25);
  background:
    linear-gradient(180deg, rgba(247, 201, 72, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(20, 31, 46, 0.96), rgba(11, 18, 28, 0.94));
}

:root[data-theme="light"] .sidebar-card--accent {
  background:
    linear-gradient(180deg, rgba(247, 201, 72, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.98));
}

.listing-footer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.listing-footer__source,
.listing-footer__license {
  margin: 0;
}

.listing-footer__license {
  margin-top: 4px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  margin-top: 28px;
}

.back-link {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
}

.detail-hero__eyebrow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-hero__visual {
  position: relative;
  min-height: 100%;
  padding: 22px;
  display: grid;
  align-items: stretch;
}

.cover {
  margin: 0;
  min-height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.18));
  box-shadow: var(--shadow);
}

.cover img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 22px;
  padding: 22px 0 56px;
}

.detail-article,
.detail-aside {
  display: grid;
  gap: 16px;
}

.detail-article__lead {
  display: grid;
  gap: 10px;
}

.detail-article__lead h2 {
  margin: 0;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  font-size: 32px;
}

.prose {
  display: grid;
  gap: 16px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.8;
}

.prose p {
  margin: 0;
}

.detail-panel p:first-child {
  margin-top: 0;
}

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

.feature-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.feature-list li {
  padding-left: 4px;
}

.detail-panel--source {
  display: grid;
  gap: 12px;
}

.source-box {
  display: grid;
  gap: 10px;
  align-content: start;
}

.source-box--gallery {
  gap: 14px;
}

.source-box__label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 800;
}

.source-box__value {
  margin: 0;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  font-size: 24px;
}

.source-box__license {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.detail-gallery {
  display: grid;
  gap: 12px;
}

.gallery-card {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  min-height: 160px;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.spotlight-card {
  min-height: 240px;
  display: grid;
  align-content: start;
}

.spotlight-card:hover,
.sidebar-card:hover,
.detail-panel:hover,
.source-box:hover {
  border-color: rgba(247, 201, 72, 0.24);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pagination__link {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(120, 143, 166, 0.08);
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.pagination__link:hover,
.pagination__link:focus-visible,
.pagination__link.is-active {
  transform: translateY(-1px);
  border-color: rgba(247, 201, 72, 0.28);
  background: rgba(247, 201, 72, 0.12);
}

.listing-hero__meta .meta-pill,
.detail-hero__meta .meta-pill {
  font-size: 12px;
}

.page-enter {
  animation: page-enter 520ms ease both;
}

.fade-in {
  animation: fade-in 520ms ease both;
}

.delay-1 {
  animation-delay: 80ms;
}

.delay-2 {
  animation-delay: 160ms;
}

.delay-3 {
  animation-delay: 240ms;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .site-header__inner {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

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

  .listing-layout,
  .detail-grid,
  .listing-hero,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .listing-hero__cta {
    justify-self: start;
    margin: 0 0 24px 24px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(calc(100% - 24px), var(--container));
  }

  .hero {
    padding-top: 22px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(40px, 12vw, 60px);
  }

  .listing-hero h1,
  .detail-hero h1 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .hero p,
  .listing-hero p,
  .detail-hero p,
  .section-head p,
  .sidebar-card p,
  .spotlight-card p,
  .module-card p,
  .prose {
    font-size: 15px;
  }

  .status-grid,
  .module-grid,
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .listing-card__link {
    grid-template-columns: 1fr;
  }

  .listing-card__media {
    min-height: 180px;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }
}
