/* ============================================================
   LRAP — Little Red Apple Productions
   Design Direction: Cinematic editorial. A24 meets Criterion.
   Near-black with warm undertones. Typography-driven.
   Project colors: Flicker=crimson, Polaris=cerulean, 
   Nightingale=violet, K'Athar=amber, Menagerie=teal
   
   Fonts: Zodiak (display) + Satoshi (body) — both from Fontshare
   ============================================================ */

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* --- Fluid Type Scale --- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);
}

/* --- 4px Spacing --- */
:root {
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* --- LRAP Palette — Warm Noir --- */
:root {
  /* Surfaces — warm charcoal, not pure black */
  --color-bg:             #0c0b0a;
  --color-surface:        #141312;
  --color-surface-2:      #1a1918;
  --color-surface-offset: #100f0e;
  --color-divider:        #2a2826;
  --color-border:         #322f2c;

  /* Text — warm white, not blue-white */
  --color-text:           #ece8e1;
  --color-text-muted:     #918c84;
  --color-text-faint:     #8a857d;
  --color-text-inverse:   #0c0b0a;

  /* Primary — Crimson (LRAP brand) */
  --color-primary:        #c9243d;
  --color-primary-hover:  #a51d32;
  --color-primary-active: #871727;
  --color-primary-glow:   rgba(201, 36, 61, 0.12);

  /* Project Accents */
  --color-flicker:        #c9243d;
  --color-flicker-glow:   rgba(201, 36, 61, 0.10);
  --color-polaris:        #3b8bd9;
  --color-polaris-glow:   rgba(59, 139, 217, 0.10);
  --color-nightingale:    #9370db;
  --color-nightingale-glow: rgba(147, 112, 219, 0.10);
  --color-kathar:         #d4a520;
  --color-kathar-glow:    rgba(212, 165, 32, 0.10);
  --color-menagerie:      #20b2aa;
  --color-menagerie-glow: rgba(32, 178, 170, 0.10);

  /* Fonts */
  --font-display: 'Zodiak', 'Georgia', serif;
  --font-body: 'Satoshi', 'Inter', 'Helvetica Neue', sans-serif;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-interactive: 200ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);

  /* Shadows — warm-tinted */
  --shadow-sm: 0 1px 3px rgba(12, 11, 10, 0.4);
  --shadow-md: 0 4px 16px rgba(12, 11, 10, 0.5);
  --shadow-lg: 0 12px 40px rgba(12, 11, 10, 0.6);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (max-width: 768px) {
  .container { padding-inline: var(--space-4); }
}

.container--narrow { max-width: var(--content-narrow); }
.container--default { max-width: var(--content-default); }

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

/* ============================================================
   HEADER — Minimal, film-credit style
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 11, 10, 0.88);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.site-header--scrolled {
  border-bottom-color: var(--color-divider);
  box-shadow: 0 1px 0 rgba(236, 232, 225, 0.03);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  max-width: var(--content-wide);
  margin-inline: auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.site-logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.site-logo-text {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color var(--transition-interactive);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--color-text-muted);
  transition: transform 0.3s, opacity 0.3s;
  display: block;
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .header-inner { padding: var(--space-3) var(--space-4); }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(12, 11, 10, 0.96);
    backdrop-filter: blur(24px);
    padding: var(--space-6) var(--space-4);
    gap: var(--space-5);
    border-bottom: 1px solid var(--color-divider);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: var(--text-sm); letter-spacing: 0.06em; }
}

/* ============================================================
   FOOTER — Quiet, typographic
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-16) var(--space-6) var(--space-8);
  background: var(--color-bg);
}

.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
}

.footer-brand p {
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
  max-width: 300px;
  line-height: 1.6;
}

.footer-col h4,
.footer-heading {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer-col a:hover { color: var(--color-text); }

.footer-bottom {
  max-width: var(--content-wide);
  margin-inline: auto;
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p,
.footer-bottom a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer-bottom a:hover { color: var(--color-text-muted); }

@media (max-width: 768px) {
  .site-footer { padding: var(--space-10) var(--space-4) var(--space-6); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============================================================
   HERO — Cinematic, typography-forward
   ============================================================ */

.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-16) var(--space-6) var(--space-12);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to top, var(--color-bg) 0%, rgba(12,11,10,0.55) 35%, rgba(12,11,10,0.3) 65%, rgba(12,11,10,0.15) 100%),
    radial-gradient(ellipse at 20% 80%, var(--color-primary-glow) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.hero--lighter::before {
  background: 
    linear-gradient(to top, var(--color-bg) 0%, rgba(12,11,10,0.75) 35%, rgba(12,11,10,0.45) 65%, rgba(12,11,10,0.25) 100%),
    radial-gradient(ellipse at 20% 80%, var(--color-primary-glow) 0%, transparent 50%);
}

.hero--lightest::before {
  background: 
    linear-gradient(to top, var(--color-bg) 0%, rgba(12,11,10,0.55) 35%, rgba(12,11,10,0.3) 65%, rgba(12,11,10,0.15) 100%),
    radial-gradient(ellipse at 20% 80%, var(--color-primary-glow) 0%, transparent 50%);
}

/* Subtle grain overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  max-width: var(--content-wide);
  margin-inline: auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-tag {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero-tag::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--color-primary);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.0;
  margin-bottom: var(--space-8);
  max-width: 14ch;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: var(--space-8);
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================
   PROJECT CARDS — Cinematic film-poster style
   ============================================================ */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--space-5);
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out),
              border-color 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
}

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

.project-card:hover .project-card-gradient {
  filter: brightness(1.1);
}

/* Thin accent line at top of image card */
.project-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1;
}

.project-card--flicker .project-card-image::after { background: var(--color-flicker); }
.project-card--polaris .project-card-image::after { background: var(--color-polaris); }
.project-card--nightingale .project-card-image::after { background: var(--color-nightingale); }
.project-card--kathar .project-card-image::after { background: var(--color-kathar); }
.project-card--menagerie .project-card-image::after { background: var(--color-menagerie); }

.project-card-image {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s var(--ease-out), filter 0.4s var(--ease-out);
}

.project-card:hover .project-card-image img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Fallback gradient for cards without images */
.project-card-gradient {
  width: 100%;
  height: 220px;
  transition: filter 0.4s var(--ease-out);
  position: relative;
}

/* Thin accent line at top of card */
.project-card-gradient::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.project-card--flicker .project-card-gradient::after { background: var(--color-flicker); }
.project-card--polaris .project-card-gradient::after { background: var(--color-polaris); }
.project-card--nightingale .project-card-gradient::after { background: var(--color-nightingale); }
.project-card--kathar .project-card-gradient::after { background: var(--color-kathar); }
.project-card--menagerie .project-card-gradient::after { background: var(--color-menagerie); }

.project-card-body {
  padding: var(--space-5) var(--space-5) var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  width: fit-content;
}

.tag--flicker    { background: var(--color-flicker-glow); color: var(--color-flicker); }
.tag--polaris    { background: var(--color-polaris-glow); color: var(--color-polaris); }
.tag--nightingale { background: var(--color-nightingale-glow); color: var(--color-nightingale); }
.tag--kathar     { background: var(--color-kathar-glow); color: var(--color-kathar); }
.tag--menagerie  { background: var(--color-menagerie-glow); color: var(--color-menagerie); }

.project-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  font-style: italic;
  margin-bottom: var(--space-2);
  line-height: 1.2;
}

.project-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
}

.project-card-meta {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  display: flex;
  justify-content: space-between;
}

/* ============================================================
   PROJECT PAGE HERO — Full atmosphere
   ============================================================ */

.project-hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-16) var(--space-6) var(--space-10);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

.project-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.project-hero-content {
  max-width: var(--content-wide);
  margin-inline: auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.project-hero-tag {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.project-hero-tag::before {
  content: '';
  width: 24px;
  height: 1px;
}

.project-hero-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  font-style: italic;
  line-height: 1.05;
  margin-bottom: var(--space-3);
}

.project-hero-subtitle {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 600px;
}

.project-hero-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* Flicker hero gradient */
.hero--flicker {
  background-color: var(--color-bg);
}
.hero--flicker::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-bg) 0%, rgba(12,11,10,0.55) 50%, rgba(12,11,10,0.2) 100%);
  z-index: 0;
}
.hero--flicker .project-hero-tag { color: var(--color-flicker); }
.hero--flicker .project-hero-tag::before { background: var(--color-flicker); }
.hero--flicker .project-hero-title { color: var(--color-flicker); }

.hero--polaris {
  background-color: var(--color-bg);
}
.hero--polaris::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-bg) 0%, rgba(12,11,10,0.55) 50%, rgba(12,11,10,0.2) 100%);
  z-index: 0;
}
.hero--polaris .project-hero-tag { color: var(--color-polaris); }
.hero--polaris .project-hero-tag::before { background: var(--color-polaris); }
.hero--polaris .project-hero-title { color: var(--color-polaris); }

.hero--nightingale {
  background-color: var(--color-bg);
}
.hero--nightingale::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-bg) 0%, rgba(12,11,10,0.55) 50%, rgba(12,11,10,0.2) 100%);
  z-index: 0;
}
.hero--nightingale .project-hero-tag { color: var(--color-nightingale); }
.hero--nightingale .project-hero-tag::before { background: var(--color-nightingale); }
.hero--nightingale .project-hero-title { color: var(--color-nightingale); }

.hero--kathar {
  background-color: var(--color-bg);
}
.hero--kathar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-bg) 0%, rgba(12,11,10,0.55) 50%, rgba(12,11,10,0.2) 100%);
  z-index: 0;
}
.hero--kathar .project-hero-tag { color: var(--color-kathar); }
.hero--kathar .project-hero-tag::before { background: var(--color-kathar); }
.hero--kathar .project-hero-title { color: var(--color-kathar); }

.hero--menagerie {
  background-color: var(--color-bg);
}
.hero--menagerie::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-bg) 0%, rgba(12,11,10,0.55) 50%, rgba(12,11,10,0.2) 100%);
  z-index: 0;
}
.hero--menagerie .project-hero-tag { color: var(--color-menagerie); }
.hero--menagerie .project-hero-tag::before { background: var(--color-menagerie); }
.hero--menagerie .project-hero-title { color: var(--color-menagerie); }

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
  margin-bottom: var(--space-8);
}

.section-tag {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.section-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  font-style: italic;
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  max-width: 560px;
  line-height: 1.6;
}

/* ============================================================
   CHARACTER CARDS
   ============================================================ */

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--space-5);
}

@media (max-width: 600px) {
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
  .character-avatar {
    aspect-ratio: 3/4;
  }
  .character-card-body {
    padding: var(--space-3);
  }
  .character-card h4 {
    font-size: var(--text-sm);
  }
  .character-card p {
    font-size: var(--text-xs);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .character-role {
    font-size: 9px;
  }
}

.character-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out);
}

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

.character-avatar {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: italic;
  color: var(--color-text-faint);
  position: relative;
  overflow: hidden;
}

.character-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  position: absolute;
  inset: 0;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Gradient overlay on avatar */
.character-avatar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(transparent, var(--color-surface));
}

.character-card-body {
  padding: var(--space-4) var(--space-4) var(--space-5);
}

.character-card h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  font-style: italic;
  margin-bottom: var(--space-1);
}

.character-role {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.character-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ============================================================
   BUTTONS — Understated, precise
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-interactive);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
  background: var(--color-surface);
}

/* ============================================================
   INFO GRID — World-building cards
   ============================================================ */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-4);
}

.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.info-card h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.info-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   GALLERY
   ============================================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-4);
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out);
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item-gradient {
  width: 100%;
  aspect-ratio: 16/10;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease-out);
}

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

.gallery-item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4) var(--space-4) var(--space-3);
  background: linear-gradient(transparent, rgba(12,11,10,0.85));
}

.gallery-item-label span {
  font-size: var(--text-sm);
  font-weight: 500;
  display: block;
}

.gallery-item-label small {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Tag pills for filters */
.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.tag-pill {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-faint);
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.tag-pill:hover { border-color: var(--color-text-faint); color: var(--color-text-muted); }
.tag-pill.active { border-color: var(--color-primary); color: var(--color-text); background: var(--color-primary-glow); }

/* ============================================================
   SHARED UNIVERSE BANNER
   ============================================================ */

.universe-banner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  margin-top: var(--space-8);
}

.universe-banner h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  font-style: italic;
  margin-bottom: var(--space-2);
}

.universe-banner p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   ABOUT — Profile
   ============================================================ */

.profile-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-8);
  align-items: start;
}

.profile-image {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-image .initials {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: italic;
  color: var(--color-text-faint);
}

.profile-bio h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  font-style: italic;
  margin-bottom: var(--space-2);
}

.profile-bio .role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.profile-bio p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

@media (max-width: 768px) {
  .profile-section { grid-template-columns: 1fr; }
  .profile-image { max-width: 200px; }
}

/* ============================================================
   CHAPTER LISTING
   ============================================================ */

.chapter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.chapter-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: background var(--transition-interactive),
              border-color var(--transition-interactive);
}

.chapter-item:hover {
  background: var(--color-surface-2);
  border-color: var(--color-text-faint);
}

.chapter-number {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  color: var(--color-text-faint);
  min-width: 2rem;
}

/* ============================================================
   SEASON ARC
   ============================================================ */

.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: var(--space-4);
}

.season-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  position: relative;
}

.season-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.season-card h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  font-style: italic;
  margin-bottom: var(--space-1);
}

.season-card .season-num {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-2);
}

.season-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ============================================================
   DIVIDER
   ============================================================ */

.divider {
  border: none;
  height: 1px;
  background: var(--color-divider);
  margin-block: var(--space-10);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.32s; }

/* ============================================================
   PULL QUOTE
   ============================================================ */

.pull-quote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-text);
  border-left: 2px solid var(--color-primary);
  padding-left: var(--space-6);
  margin-block: var(--space-8);
  max-width: 600px;
  line-height: 1.4;
}

.pull-quote cite {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  margin-top: var(--space-3);
}

/* ============================================================
   LOCATION CARDS (Nightingale)
   ============================================================ */

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: var(--space-4);
}

.location-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out);
}

.location-card:hover {
  transform: translateY(-2px);
}

.location-card-gradient {
  width: 100%;
  height: 180px;
}

.location-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.location-card-body {
  padding: var(--space-4);
}

.location-card h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  font-style: italic;
  margin-bottom: var(--space-1);
}

.location-card .location-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.location-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ============================================================
   MOBILE-FIRST OVERRIDES
   ============================================================ */

@media (max-width: 600px) {

  /* Hero sections — shorter, tighter */
  .hero {
    min-height: 50vh;
    padding: var(--space-20) var(--space-4) var(--space-8);
  }

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-actions {
    flex-direction: column;
    gap: var(--space-3);
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Project hero — taller to show image */
  .project-hero {
    min-height: 60vh;
    padding: var(--space-12) var(--space-4) var(--space-6);
  }

  .project-hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .project-hero-subtitle {
    font-size: var(--text-base);
  }

  .project-hero-desc {
    font-size: var(--text-sm);
  }

  /* Project cards on homepage — single column, compact */
  .project-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .project-card-image {
    height: 180px;
  }

  /* Gallery — 2 column */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .gallery-item img {
    aspect-ratio: 4/3;
  }

  .gallery-item-label {
    padding: var(--space-2) var(--space-3);
  }

  .gallery-item-label span {
    font-size: var(--text-xs);
  }

  .gallery-item-label small {
    display: none;
  }

  /* Tag pills — scrollable row */
  .tag-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-2);
    gap: var(--space-2);
  }

  .tag-pill {
    flex-shrink: 0;
    font-size: 0.6875rem;
    padding: var(--space-1) var(--space-3);
  }

  /* Section headers */
  .section-title {
    font-size: var(--text-xl);
  }

  /* About page profile */
  .profile-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-image {
    max-width: 200px;
    margin: 0 auto;
  }

  /* Universe banner */
  .universe-banner {
    padding: var(--space-5);
  }

  .universe-banner h3 {
    font-size: var(--text-lg);
  }

  .universe-banner p {
    font-size: var(--text-sm);
  }

  /* Footer — stack columns */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-col h4,
  .footer-heading {
    margin-bottom: var(--space-2);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
  }

  /* Location cards — 1 column */
  .location-grid {
    grid-template-columns: 1fr;
  }

  /* Sections — less padding */
  .section {
    padding-block: var(--space-10);
  }
}
