/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-left: var(--rail-width);
  transition: padding-left 0.2s ease;
}

#main-content {
  flex: 1 0 auto;
  width: 100%;
}

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

ul, ol { list-style: none; }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent-yellow);
  outline-offset: 3px;
}

::selection {
  background: var(--accent-yellow);
  color: var(--bg-void);
}

/* ===== CSS Variables ===== */
:root {
  /* Backgrounds */
  --bg-void: #141414;
  --bg-theater: #4a1230;
  --bg-version: #0a1f3d;
  --bg-search: #3d0a14;
  --bg-card-warm: #e6a17a;
  --bg-card-cream: #f3e0c0;
  --bg-card-cool: #8a9bb5;
  --bg-card-brown: #5c3a2e;

  /* Accents & Status */
  --accent-yellow: #f2d10b;
  --accent-green: #18d17e;
  --accent-electric: #3b82f6;
  --accent-pink: #ff69b4;
  --accent-gold: #ffd700;
  --accent-silver: #c0c0c0;
  --status-new: #ff2d2d;
  --status-done: #00cc66;

  /* Text */
  --text-main: #f5f5f5;
  --text-sub: #b0b8c0;

  /* Typography */
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* Scale */
  --fs-hero: clamp(2.2rem, 5vw, 4rem);
  --fs-section: clamp(1.4rem, 2.6vw, 2rem);
  --fs-card: 1.125rem;
  --fs-body: 0.95rem;
  --fs-meta: 0.8rem;

  /* Layout */
  --rail-width: 240px;
  --content-max: 1280px;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --gap-card: 0.75rem;
  --radius: 0px;
  --sharp: 0px;

  /* Effects */
  --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow-yellow: 0 0 12px rgba(242, 209, 11, 0.5);
  --scanline: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* ===== Container & Layout ===== */
.container {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  position: relative;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-section);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section-more {
  font-size: var(--fs-meta);
  color: var(--accent-green);
  white-space: nowrap;
}

.section-more:hover { color: var(--accent-yellow); }

/* ===== Skip Link ===== */
.skip-link {
  position: fixed;
  top: -100px;
  left: var(--gutter);
  z-index: 1000;
  background: var(--accent-yellow);
  color: var(--bg-void);
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  border-radius: var(--sharp);
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 0.5rem;
}

/* ===== Header / Side Rail ===== */
.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-width);
  background: var(--bg-version);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.2s ease;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
}

.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--scanline);
  opacity: 0.6;
  pointer-events: none;
}

.header-inner {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  padding: 1.2rem 1rem;
  position: relative;
  z-index: 1;
}

/* Brand */
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.2rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: var(--bg-card-brown);
  border: 1px solid var(--accent-gold);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.brand-reel {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 4px, var(--accent-gold) 4.5px, transparent 5px),
    repeating-conic-gradient(from 0deg, var(--accent-gold) 0deg 30deg, transparent 30deg 60deg);
  animation: reel-rotate 8s linear infinite;
}

@keyframes reel-rotate {
  to { transform: rotate(360deg); }
}

.brand-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(255, 255, 255, 0.2) 2px,
    transparent 3px
  );
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--text-sub);
  margin-top: 2px;
}

/* Navigation */
.nav-rail {
  flex: 1 0 auto;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-sub);
  border-left: 2px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--accent-yellow);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link[aria-current="page"] {
  color: var(--accent-yellow);
  background: rgba(242, 209, 11, 0.08);
  border-left-color: var(--accent-yellow);
  font-weight: 600;
}

.nav-status {
  margin-top: 2rem;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-meta);
  color: var(--text-sub);
}

.nav-status b {
  color: var(--accent-green);
  font-size: 1.1em;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--status-done);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--status-done);
  flex: 0 0 auto;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Header Actions */
.header-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--accent-silver);
  color: var(--text-sub);
  font-size: 0.85rem;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.search-box:hover {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
  box-shadow: var(--shadow-glow-yellow);
}

.search-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  place-items: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.nav-toggle:hover {
  border-color: var(--accent-yellow);
  background: rgba(242, 209, 11, 0.1);
}

.toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  transition: background 0.15s ease;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-void);
  border-top: 2px solid var(--bg-theater);
  position: relative;
  flex-shrink: 0;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-yellow) 0%, var(--bg-theater) 40%, var(--bg-version) 100%);
}

.footer-inner {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding: 3rem var(--gutter) 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand .brand-name {
  display: inline-block;
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.footer-desc {
  color: var(--text-sub);
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 32em;
}

.footer-col h4,
.footer-contact h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-yellow);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.footer-col li {
  margin-bottom: 0.55rem;
}

.footer-col a,
.footer-contact a {
  color: var(--text-sub);
  font-size: 0.9rem;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.footer-col a:hover,
.footer-contact a:hover {
  color: var(--accent-green);
  padding-left: 4px;
}

.footer-contact p {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-addr {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-sub);
  opacity: 0.7;
  margin-top: 0.8rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-sub);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--sharp);
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-yellow);
  color: var(--bg-void);
}

.btn-primary:hover {
  box-shadow: 0 0 16px rgba(242, 209, 11, 0.5);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-main);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--sharp);
  line-height: 1.6;
  border: 1px solid transparent;
}

.badge-new {
  background: var(--status-new);
  color: #fff;
  border-color: #fff;
}

.badge-done {
  background: var(--status-done);
  color: #000;
  border-color: #000;
}

.badge-hd {
  background: var(--accent-gold);
  color: #000;
}

.badge-exclusive {
  background: var(--accent-pink);
  color: #000;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-sub);
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--gap-card);
  margin-bottom: 1.5rem;
}

.card {
  background: var(--bg-card-cream);
  color: var(--bg-void);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}

.card:nth-child(even) {
  background: var(--bg-card-warm);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.card-cover {
  aspect-ratio: 3 / 4;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.1) 0px, rgba(0,0,0,0.1) 2px, transparent 2px, transparent 6px),
    linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 60%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  position: relative;
}

.card-cover .badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
}

.card-body {
  padding: 0.7rem 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-card);
  font-weight: 600;
  line-height: 1.3;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: rgba(0, 0, 0, 0.6);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Card Grid on dark zones needing different card bg */
.card-cool {
  background: var(--bg-card-cool);
  color: var(--bg-version);
}

.card-brown {
  background: var(--bg-card-brown);
  color: var(--text-main);
}

/* ===== Bento Grid ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(100px, auto);
  grid-auto-flow: dense;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.bento-card,
.bento-tile {
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--bg-card-cream);
  color: var(--bg-void);
  border: 1px solid var(--accent-silver);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 100px;
}

.bento-card:hover,
.bento-tile:hover {
  box-shadow: var(--shadow-card);
}

/* Span patterns for bento */
.bento-card.span-2,
.bento-tile.span-2 {
  grid-column: span 2;
}

.bento-card.span-row-2,
.bento-tile.span-row-2 {
  grid-row: span 2;
}

.bento-card.full-width {
  grid-column: 1 / -1;
}

/* ===== Magnetic Tiles ===== */
.magnetic-tile {
  position: relative;
  padding: 1rem;
  background: var(--accent-yellow);
  color: #000;
  border-radius: var(--radius);
  transition: filter 0.2s ease, transform 0.2s ease;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.magnetic-tile:nth-child(2n) {
  background: var(--accent-green);
}

.magnetic-tile:nth-child(3n) {
  background: var(--accent-pink);
  color: #000;
}

.magnetic-tile:nth-child(4n) {
  background: var(--accent-electric);
  color: #fff;
}

.magnetic-tile:hover {
  filter: saturate(1.4) brightness(1.05);
  transform: translateY(-2px);
}

.magnetic-tile .tile-area {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.magnetic-tile .tile-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.8;
  align-self: flex-end;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2em 0.6em;
  color: #fff;
}

/* ===== List Rows ===== */
.list-rows {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.list-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, transform 0.15s ease;
}

.list-row:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateX(4px);
}

.row-index {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-yellow);
  width: 2.5em;
  flex: 0 0 auto;
  text-align: center;
}

.list-row .row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.list-row .row-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-row .row-sub {
  font-size: var(--fs-meta);
  color: var(--text-sub);
}

.list-row .row-meta {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ===== Index Bar ===== */
.index-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.index-letter,
.index-year {
  display: grid;
  place-items: center;
  min-width: 2em;
  padding: 0.3em 0.5em;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-sub);
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.index-letter:hover,
.index-year:hover,
.index-letter[aria-current="true"],
.index-year[aria-current="true"] {
  color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--accent-gold);
}

.index-year {
  font-size: 0.75rem;
}

/* ===== Tabs ===== */
.tabs {
  margin-bottom: 1.5rem;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tab-trigger {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-sub);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.tab-trigger:hover {
  color: var(--accent-yellow);
}

.tab-trigger[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-yellow);
  border-color: rgba(255, 255, 255, 0.2);
  margin-bottom: -1px;
}

.tab-panel[hidden] {
  display: none;
}

/* ===== Table ===== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.data-table th {
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent-silver);
  text-transform: uppercase;
}

.data-table td {
  color: var(--text-main);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-yellow) 0%, var(--accent-green) 100%);
  opacity: 0.6;
}

.timeline-item {
  position: relative;
  padding: 0.8rem 0 0.8rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.55rem;
  top: 1.2rem;
  width: 12px;
  height: 12px;
  background: var(--bg-void);
  border: 3px solid var(--accent-yellow);
  border-radius: 50%;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-green);
}

.timeline-content {
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

/* ===== Hero Cover ===== */
.hero-cover {
  background: linear-gradient(135deg, var(--bg-theater) 0%, var(--bg-version) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--scanline);
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--accent-gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-lead {
  max-width: 42em;
  color: var(--text-sub);
  font-size: 1.05rem;
}

.hero-side {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.8rem;
  min-width: 220px;
  padding-left: 2rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

/* ===== Scroll Progress ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-yellow), var(--accent-green));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  :root {
    --rail-width: 0px;
  }

  body {
    padding-left: 0;
    padding-top: 0;
  }

  .site-header {
    inset: 0 0 auto 0;
    width: 100%;
    max-height: 64px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: row;
    align-items: center;
    overflow: visible;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
  }

  .site-brand {
    margin-bottom: 0;
    border-bottom: 0;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .brand-sub {
    display: none;
  }

  .nav-rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(80vw, 300px);
    background: var(--bg-version);
    padding: 2rem 1.2rem 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 120;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
  }

  .nav-rail[data-open] {
    transform: translateX(0);
  }

  .nav-status {
    margin-top: 1rem;
  }

  .header-actions {
    flex-direction: row;
    margin-top: 0;
    align-items: center;
  }

  .search-box {
    padding: 0.45rem 0.8rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .drawer-overlay {
    display: block;
  }

  .drawer-overlay:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
  }

  .drawer-overlay[hidden] {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1rem;
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-card.span-2,
  .bento-tile.span-2 {
    grid-column: span 2;
  }

  .bento-card.full-width {
    grid-column: 1 / -1;
  }

  .hero-cover {
    grid-template-columns: 1fr;
  }

  .hero-side {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-row {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .row-meta {
    width: 100%;
    padding-left: 3.5rem;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  .brand-reel {
    animation: none;
  }

  .status-dot {
    animation: none;
  }

  .card:hover,
  .bento-card:hover,
  .bento-tile:hover,
  .magnetic-tile:hover,
  .list-row:hover,
  .btn:hover {
    transform: none;
  }
}

/* ===== Utility Helpers ===== */
.text-mono {
  font-family: var(--font-mono);
}

.text-sub {
  color: var(--text-sub);
}

.text-gold {
  color: var(--accent-gold);
}

.text-green {
  color: var(--accent-green);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
