:root {
  color-scheme: dark;
}

/* =============================
   BASE THEME COLORS
   ============================= */
body.theme-default {
  background: #0d0d0d;
  color: #f0f0f0;
}

body.theme-default::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 20%, rgba(245, 209, 90, 0.06), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(255, 215, 0, 0.05), transparent 50%),
    #0d0d0d;
}

body.theme-default:focus-within {
  scroll-behavior: smooth;
}

main {
  flex: 1 0 auto;
}

body[data-header-mounted='true'] > main {
  padding-top: var(--header-offset, 0px);
}

/* =============================
   STRUCTURE
   ============================= */
.page-shell {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.container {
  width: min(1200px, 100% - 2rem);
  margin-inline: auto;
}

.flow > * + * {
  margin-top: var(--space-md);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* =============================
   TEXT STYLES
   ============================= */
.badge {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #f5d15a;
}

.text-muted,
.meta {
  color: #b5b5b5;
}

.meta {
  font-size: var(--font-size-sm);
}

/* =============================
   SURFACES & CONTAINERS
   ============================= */
.surface {
  background: #151515;
  border: 1px solid rgba(245, 209, 90, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 10px rgba(245, 209, 90, 0.15);
  transition: box-shadow 0.3s ease;
}

.surface:hover {
  box-shadow: 0 4px 25px rgba(245, 209, 90, 0.25);
}

.media-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(245, 209, 90, 0.2);
  background: #111;
}

/* =============================
   ELEMENTS
   ============================= */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 209, 90, 0.3);
  background: rgba(245, 209, 90, 0.05);
  color: #f5d15a;
  transition: all 0.3s ease;
}

.pill.is-active {
  border-color: #f5d15a;
  background: rgba(245, 209, 90, 0.15);
  box-shadow: 0 0 15px rgba(245, 209, 90, 0.3);
  color: #fff;
}

.section {
  padding-block: var(--space-section);
}

.section:not(:last-of-type) {
  border-bottom: 1px solid rgba(245, 209, 90, 0.05);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #f5d15a, #fff6c3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =============================
   GRID & MEDIA RATIOS
   ============================= */
.media-ratio {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.media-ratio::before {
  content: '';
  display: block;
  padding-top: var(--ratio, 56.25%);
}

.media-ratio > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.sr-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* =============================
   ICON BUTTON
   ============================= */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 209, 90, 0.3);
  background: rgba(245, 209, 90, 0.08);
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  color: #f5d15a;
  transition: all 0.3s ease;
}

.icon-btn:hover {
  box-shadow: 0 0 10px rgba(245, 209, 90, 0.4);
  transform: translateY(-2px);
}

.icon-btn svg {
  width: 1rem;
  height: 1rem;
}

/* =============================
   SCROLL RAIL
   ============================= */
.sr-rail {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-sm);
}

.sr-rail > * {
  scroll-snap-align: start;
}

/* =============================
   RESPONSIVE
   ============================= */
@media (max-width: 720px) {
  .container {
    width: min(100%, 100% - 1.5rem);
  }

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