/* ============================================================
   variables.css — Design Tokens
   Deep Space aesthetic (dark default) + body.light-mode variant
   ============================================================ */

/* ─── DARK MODE — DEFAULT ─── */
:root {

  /* ── Backgrounds ── */
  --bg:             #03030d;
  --surface:        rgba(255, 255, 255, 0.030);
  --surface-hover:  rgba(255, 255, 255, 0.060);
  --border:         rgba(255, 255, 255, 0.070);
  --border-strong:  rgba(255, 255, 255, 0.140);

  /* ── Typography ── */
  --text:           #EEEEFF;
  --text-muted:     rgba(238, 238, 255, 0.58); /* ↑ bumped from 0.42 — WCAG AA */
  --text-dim:       rgba(238, 238, 255, 0.32);

  /* ── Accent Palette ── */
  --accent-hue:     262;
  --accent:         hsl(var(--accent-hue), 72%, 71%);  /* Soft violet */
  --accent-glow:    hsla(var(--accent-hue), 72%, 71%, 0.18);
  --gold:           #D4B483;
  --aqua:           #6EE8D8;
  --rose:           #E88DAA;
  --sky:            #7EB8E8;
  --lime:           #9EE87E;

  /* ── Per-card accent tokens ── */
  --card-imagery-border:    rgba(157, 126, 238, 0.30);
  --card-imagery-glow:      rgba(157, 126, 238, 0.20);
  --card-imagery-shadow:    rgba(157, 126, 238, 0.14);

  --card-motion-border:     rgba(110, 232, 216, 0.28);
  --card-motion-glow:       rgba(110, 232, 216, 0.16);
  --card-motion-shadow:     rgba(110, 232, 216, 0.12);

  --card-webapps-border:    rgba(212, 180, 131, 0.28);
  --card-webapps-glow:      rgba(212, 180, 131, 0.16);
  --card-webapps-shadow:    rgba(212, 180, 131, 0.12);

  --card-music-border:      rgba(232, 141, 170, 0.28);
  --card-music-glow:        rgba(232, 141, 170, 0.16);
  --card-music-shadow:      rgba(232, 141, 170, 0.12);

  --card-writing-border:    rgba(126, 184, 232, 0.28);
  --card-writing-glow:      rgba(126, 184, 232, 0.16);
  --card-writing-shadow:    rgba(126, 184, 232, 0.12);

  --card-playground-border: rgba(158, 232, 126, 0.25);
  --card-playground-glow:   rgba(158, 232, 126, 0.14);
  --card-playground-shadow: rgba(158, 232, 126, 0.10);

  /* ── Font Families ── */
  --f-display: 'Oxanium', 'Segoe UI', system-ui, sans-serif;
  --f-mono:    'DM Mono', 'Courier New', monospace;
  --f-body:    'Sora', system-ui, sans-serif;

  /* ── Border Radius ── */
  --radius:      18px;
  --radius-lg:   24px;
  --radius-md:   14px;
  --radius-sm:   10px;
  --radius-xs:    6px;
  --radius-full: 9999px;

  /* ── Spacing (8px base grid) ── */
  --sp-1:   0.25rem;  /*  4px */
  --sp-2:   0.5rem;   /*  8px */
  --sp-3:   0.75rem;  /* 12px */
  --sp-4:   1rem;     /* 16px */
  --sp-6:   1.5rem;   /* 24px */
  --sp-8:   2rem;     /* 32px */
  --sp-10:  2.5rem;   /* 40px */
  --sp-12:  3rem;     /* 48px */
  --sp-16:  4rem;     /* 64px */
  --sp-20:  5rem;     /* 80px */
  --sp-24:  6rem;     /* 96px */
  --sp-32:  8rem;     /* 128px */

  /* ── Layout ── */
  --nav-height:    72px;
  --container-max: 1440px;
  --page-pad-x:    3.5rem;

  /* ── Easings ── */
  --ease-out:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-expo:  cubic-bezier(0.7, 0, 0.84, 0);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Transitions ── */
  --t-fast:          150ms ease;
  --t-base:          300ms ease;
  --t-slow:          500ms ease;
  --t-expo:          800ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;

  /* ── Shadows ── */
  --shadow-sm: 0 2px 8px  rgba(0, 0, 0, 0.30);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.50);

  /* ── Z-index Scale ── */
  --z-base:   0;
  --z-card:   10;
  --z-page:   20;
  --z-nav:    200;
  --z-modal:  500;
  --z-cursor: 9998;
  --z-max:    9999;
}

/* ─── LIGHT MODE OVERRIDES ─── */
body.light-mode {
  --bg:             #F5F3FF;
  --surface:        rgba(13, 11, 26, 0.035);
  --surface-hover:  rgba(13, 11, 26, 0.060);
  --border:         rgba(13, 11, 26, 0.090);
  --border-strong:  rgba(13, 11, 26, 0.180);

  --text:           #0D0B1A;
  --text-muted:     rgba(13, 11, 26, 0.62);
  --text-dim:       rgba(13, 11, 26, 0.38);

  --accent:         hsl(var(--accent-hue), 65%, 55%);  /* Deeper violet — AA on light bg */
  --accent-glow:    hsla(var(--accent-hue), 65%, 55%, 0.12);
  --gold:           #8A6A30;
  --aqua:           #1A8A7A;
  --rose:           #A03055;
  --sky:            #2A6A9E;
  --lime:           #3A7A1A;

  --card-imagery-border:    rgba(107, 71, 214, 0.22);
  --card-imagery-glow:      rgba(107, 71, 214, 0.10);
  --card-imagery-shadow:    rgba(107, 71, 214, 0.08);

  --card-motion-border:     rgba(26, 138, 122, 0.22);
  --card-motion-glow:       rgba(26, 138, 122, 0.10);
  --card-motion-shadow:     rgba(26, 138, 122, 0.08);

  --card-webapps-border:    rgba(138, 106, 48, 0.22);
  --card-webapps-glow:      rgba(138, 106, 48, 0.10);
  --card-webapps-shadow:    rgba(138, 106, 48, 0.08);

  --card-music-border:      rgba(160, 48, 85, 0.22);
  --card-music-glow:        rgba(160, 48, 85, 0.10);
  --card-music-shadow:      rgba(160, 48, 85, 0.08);

  --card-writing-border:    rgba(42, 106, 158, 0.22);
  --card-writing-glow:      rgba(42, 106, 158, 0.10);
  --card-writing-shadow:    rgba(42, 106, 158, 0.08);

  --card-playground-border: rgba(58, 122, 26, 0.22);
  --card-playground-glow:   rgba(58, 122, 26, 0.10);
  --card-playground-shadow: rgba(58, 122, 26, 0.08);

  --shadow-sm: 0 2px 8px  rgba(13, 11, 26, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 11, 26, 0.12);
  --shadow-lg: 0 24px 60px rgba(13, 11, 26, 0.16);
}

/* ============================================================
   reset.css — Sensible base reset
   ============================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* Custom cursor on fine-pointer (mouse) only — never on touch */
@media (pointer: fine) {
  html { cursor: none; }
  a, button, [role="button"], .card, label { cursor: none; }
}

@media (pointer: coarse) {
  a, button, [role="button"] { cursor: pointer; }
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

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

button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--text);
}

/* Keyboard navigation focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Enforce the HTML hidden attribute — prevents CSS display rules (e.g. display:flex on
   .lightbox) from creating invisible full-screen overlays that block pointer events */
[hidden] { display: none !important; }

/* ── Freeze all motion when user prefers it ── */
@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;
  }
}

/* ============================================================
   typography.css — Type system
   Fonts loaded via Google Fonts in includes/head.php:
     Oxanium 200/300/400/600  — display headings
     DM Mono  300/400         — monospace labels
     Sora     200/300/400     — body copy
   ============================================================ */

/* ── Base body copy ── */
p {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.78;
  color: var(--text-muted);
}

/* ── Heading scale ── */
h1 { font-size: clamp(4rem, 10vw, 9rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
h4 { font-size: 1.25rem; font-weight: 400; }
h5 { font-size: 1rem;    font-weight: 400; }

/* ── Font utilities ── */
.f-display { font-family: var(--f-display); }
.f-mono    { font-family: var(--f-mono);    }
.f-body    { font-family: var(--f-body);    }

/* ── Coloured eyebrow / label ── */
.label {
  font-family: var(--f-mono);
  font-size: 0.60rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}

.label-dim {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Ghost / outline text ── */
.text-ghost {
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 238, 255, 0.22);
  transition: -webkit-text-stroke-color 0.4s;
}

body.light-mode .text-ghost {
  -webkit-text-stroke-color: rgba(13, 11, 26, 0.22);
}

.text-ghost:hover {
  -webkit-text-stroke-color: rgba(157, 126, 238, 0.65);
}

body.light-mode .text-ghost:hover {
  -webkit-text-stroke-color: rgba(107, 71, 214, 0.65);
}

/* ── Colour utilities ── */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-dim    { color: var(--text-dim); }

/* ============================================================
   layout.css — Page structure, aurora background, fluid orbs
   ============================================================ */

/* ── Page wrapper (above background layers) ── */
.page {
  position: relative;
  z-index: var(--z-page);
}

/* ── Container ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--page-pad-x);
}

/* ────────────────────────────────────────────────────────────
   AURORA BACKGROUND SYSTEM
   ──────────────────────────────────────────────────────────── */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

/* Dark mode blobs */
.blob-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(110, 60, 240, 0.35) 0%, transparent 65%);
  top: -10%; left: -5%;
  filter: blur(80px);
  animation: drift1 22s ease-in-out infinite;
}
.blob-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(157, 126, 238, 0.22) 0%, transparent 65%);
  top: 20%; right: -8%;
  filter: blur(70px);
  animation: drift2 28s ease-in-out infinite;
}
.blob-3 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(60, 20, 140, 0.28) 0%, transparent 65%);
  top: 40%; left: 30%;
  filter: blur(90px);
  animation: drift3 20s ease-in-out infinite;
}
.blob-4 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(30, 160, 140, 0.30) 0%, transparent 65%);
  bottom: 5%; right: 15%;
  filter: blur(75px);
  animation: drift4 26s ease-in-out infinite;
}

/* Light mode blobs — same positions, softer palette */
body.light-mode .blob-1 {
  background: radial-gradient(circle, rgba(157, 126, 238, 0.18) 0%, transparent 65%);
}
body.light-mode .blob-2 {
  background: radial-gradient(circle, rgba(107, 71, 214, 0.12) 0%, transparent 65%);
}
body.light-mode .blob-3 {
  background: radial-gradient(circle, rgba(110, 60, 240, 0.10) 0%, transparent 65%);
}
body.light-mode .blob-4 {
  background: radial-gradient(circle, rgba(26, 138, 122, 0.12) 0%, transparent 65%);
}

/* ── Film grain overlay ── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

body.light-mode .grain { opacity: 0.015; }

/* ── Water ripple canvas ── */
.ripple-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  filter: blur(3px);
  opacity: 0.55;
  /* Hidden by default; cursor-liquid mode enables it */
  display: none;
}

/* Liquid cursor mode: show ripple with blend-controlled opacity */
body.cursor-liquid .ripple-canvas {
  display: block;
  opacity: calc(var(--fx-blend, 1) * 0.55);
}

/* In light mode, ripple uses multiply blend (screen blows out on pale bg) */
body.cursor-liquid.light-mode .ripple-canvas {
  mix-blend-mode: multiply;
  opacity: calc(var(--fx-blend, 1) * 0.35);
}

/* Hide on touch — no mouse input, no point running the simulation */
@media (pointer: coarse) {
  .ripple-canvas { display: none !important; }
}

/* ────────────────────────────────────────────────────────────
   SPRING FLUID ORBS (cursor followers)
   ──────────────────────────────────────────────────────────── */
.fluid-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  will-change: left, top;
}

.fb-1 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(157, 126, 238, 0.45) 0%, transparent 68%);
  filter: blur(55px);
  mix-blend-mode: screen;
}
.fb-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(80, 60, 200, 0.30) 0%, transparent 65%);
  filter: blur(70px);
  mix-blend-mode: screen;
}
.fb-3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(80, 200, 190, 0.28) 0%, transparent 65%);
  filter: blur(50px);
  mix-blend-mode: screen;
}

/* Light mode gradient: multiply so orbs subtly darken the pale background */
body.light-mode .fluid-blob { mix-blend-mode: multiply; }

/* Liquid cursor mode: orbs fade out proportionally via --fx-blend */
body.cursor-liquid .fluid-blob { opacity: calc(1 - var(--fx-blend, 1)); }

/* No orbs on touch */
@media (pointer: coarse) {
  .fluid-blob { display: none; }
}

/* ── Rule divider ── */
.rule {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.rule-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.rule-label {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ============================================================
   components.css — UI Components
   Custom cursor · Nav · Hero · Buttons · Marquee ·
   Bento grid · Glass cards · Footer
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   CUSTOM CURSOR  (fine-pointer / mouse only)
   ──────────────────────────────────────────────────────────── */
.c-dot {
  position: fixed;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: var(--z-max);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition: width 0.15s, height 0.15s, background 0.2s;
}

.c-ring {
  position: fixed;
  width: 28px; height: 28px;
  border: 1px solid rgba(157, 126, 238, 0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition:
    width      0.4s var(--ease-out-expo),
    height     0.4s var(--ease-out-expo),
    border-color 0.3s;
}

body.is-hovering .c-dot  { width: 8px; height: 8px; background: var(--gold); }
body.is-hovering .c-ring { width: 48px; height: 48px; border-color: rgba(212, 180, 131, 0.35); }

body.light-mode .c-dot  { mix-blend-mode: multiply; }
body.light-mode .c-ring { border-color: rgba(107, 71, 214, 0.35); }
body.light-mode.is-hovering .c-ring { border-color: rgba(138, 106, 48, 0.35); }

@media (pointer: coarse) {
  .c-dot, .c-ring { display: none; }
}


/* ────────────────────────────────────────────────────────────
   NAVIGATION
   ──────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.2rem var(--page-pad-x);
  transition: padding 0.4s ease, backdrop-filter 0.4s, background 0.4s;
}

/* Inner flex row: logo · links · right-cluster */
.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav.scrolled {
  padding: 1.4rem var(--page-pad-x);
  background: rgba(3, 3, 13, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

body.light-mode .nav.scrolled {
  background: rgba(245, 243, 255, 0.82);
}

/* Logo */
.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.nav-logo {
  font-family: var(--f-mono);
  font-size: calc(0.82rem + 3px);
  letter-spacing: 0.18em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: opacity 0.25s;
  flex-shrink: 0;
}

.nav-logo:hover { opacity: 0.65; }
.nav-logo .dot  { color: var(--accent); font-size: 1.2em; line-height: 1; }

/* Links */
.nav-links {
  display: flex;
  gap: 2.8rem;
}

.nav-links a {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.25s, transform 0.2s var(--ease-out);
  position: relative;
  display: inline-block;
}
.nav-links a:hover { transform: scale(1.12); }

/* Underline reveal */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a[aria-current="page"]         { color: var(--text); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after  { transform: scaleX(1); }

/* Right-side cluster */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Status indicator */
.nav-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  white-space: nowrap;
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #9D7EEE;
  box-shadow: 0 0 8px #22c55e, 0 0 14px #22c55e;
  animation: statusGlow 2.8s ease-in-out infinite;
  flex-shrink: 0;
}

/* Theme toggle + cursor toggle — shared style */
.nav-cursor-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  transition: border-color 0.25s, color 0.25s;
  white-space: nowrap;
}
.nav-cursor-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
@media (pointer: coarse) {
  .nav-cursor-btn { display: none; }
}

/* Theme toggle */
.nav-theme-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  transition: border-color 0.25s, color 0.25s;
}

.nav-theme-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  transition: all 0.3s ease;
}

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

/* Mobile drawer */
.nav-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  background: rgba(3, 3, 13, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

body.light-mode .nav-mobile-drawer {
  background: rgba(245, 243, 255, 0.96);
}

.nav-mobile-drawer.open {
  opacity: 1;
  visibility: visible;
}

.nav-mobile-drawer a {
  font-family: var(--f-display);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 200;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: color 0.25s;
}

.nav-mobile-drawer a:hover { color: var(--text); }

/* X close button inside the mobile drawer */
.drawer-close-btn {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(157, 126, 238, 0.40);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  z-index: 2;
}
.drawer-close-btn:hover {
  background: rgba(138, 92, 246, 0.20);
  border-color: var(--accent);
  color: var(--text);
}


/* ────────────────────────────────────────────────────────────
   HERO
   ──────────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10rem 2rem 6rem;
  position: relative;
}

.hero-eyebrow {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.4rem;
  opacity: 0;
  animation: riseUp 0.9s 0.3s ease both;
}

.hero-name {
  font-family: var(--f-display);
  font-weight: 200;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--text);
  opacity: 0;
  animation: riseUp 1s 0.5s ease both;
  margin-bottom: 0;
}

/* Ghost outline "BURD" */
.hero-name .ghost {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(157, 126, 238, 0.42);
  transition: -webkit-text-stroke-color 0.4s;
}

body.light-mode .hero-name .ghost {
  -webkit-text-stroke-color: rgba(13, 11, 26, 0.22);
}

.hero-name .ghost:hover {
  -webkit-text-stroke-color: rgba(157, 126, 238, 0.65);
}

body.light-mode .hero-name .ghost:hover {
  -webkit-text-stroke-color: rgba(107, 71, 214, 0.65);
}

/* Meta bar */
.hero-meta {
  margin-top: 2.8rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  animation: riseUp 1s 0.7s ease both;
  max-width: 600px;
}

.meta-rule {
  width: 36px; height: 1px;
  background: var(--border-strong);
  flex-shrink: 0;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.15rem);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  line-height: 1.75;
  text-align: left;
}

/* CTAs */
.hero-actions {
  margin-top: 3.2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: riseUp 1s 0.9s ease both;
}

/* Stats (bottom-right corner) */
.hero-stats {
  position: absolute;
  bottom: 3rem;
  right: var(--page-pad-x);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: right;
  opacity: 0;
  animation: riseUp 1s 1.1s ease both;
}

.stat-num {
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Scroll hint (bottom-centre) */
.scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: riseUp 1s 1.3s ease both;
}

.scroll-hint span {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-shaft {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: shaftPulse 2.2s ease-in-out infinite;
}


/* ────────────────────────────────────────────────────────────
   BUTTONS
   ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* All buttons share the same base: vibrant purple outlined */
.btn-primary,
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(157, 126, 238, 0.60);
  color: var(--text-muted);
}

/* Hover: purple tint — same for both variants */
.btn-primary:hover,
.btn-ghost:hover {
  background: rgba(157, 126, 238, 0.12);
  border-color: rgba(157, 126, 238, 0.50);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(157, 126, 238, 0.15);
}

/* Light mode — keep the vibrant purple border visible on light bg */
body.light-mode .btn-primary,
body.light-mode .btn-ghost {
  border-color: rgba(107, 71, 214, 0.50);
  color: var(--text-muted);
}

body.light-mode .btn-primary:hover,
body.light-mode .btn-ghost:hover {
  background: rgba(107, 71, 214, 0.08);
  border-color: rgba(107, 71, 214, 0.40);
  color: var(--accent);
  box-shadow: 0 10px 32px rgba(107, 71, 214, 0.12);
}


/* ────────────────────────────────────────────────────────────
   MARQUEE STRIP
   ──────────────────────────────────────────────────────────── */
.marquee-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
}

/* Pause on hover / focus — accessibility */
.marquee-wrap:hover .marquee-track,
.marquee-wrap:focus-within .marquee-track {
  animation-play-state: paused;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: marqueeScroll 28s linear infinite;
  width: max-content;
}

.marquee-item {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.marquee-item .sep {
  color: var(--accent);
  font-size: 0.5rem;
}


/* ────────────────────────────────────────────────────────────
   WORKS SECTION
   ──────────────────────────────────────────────────────────── */
.works {
  padding: 5rem var(--page-pad-x) 4rem;
}

.sec-intro {
  margin-bottom: 2.8rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.sec-tag {
  font-family: var(--f-mono);
  font-size: 0.60rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.sec-title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--text);
}

.sec-note {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  max-width: 220px;
  text-align: right;
  line-height: 1.6;
  flex-shrink: 0;
}


/* ────────────────────────────────────────────────────────────
   BENTO GRID
   ──────────────────────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.2rem;
}

/* 6 equal boxes — 3 per row × 2 rows */
.c-imagery    { grid-column: 1 / 5;  grid-row: 1; }
.c-motion     { grid-column: 5 / 9;  grid-row: 1; }
.c-webapps    { grid-column: 9 / 13; grid-row: 1; }
.c-music      { grid-column: 1 / 5;  grid-row: 2; }
.c-writing    { grid-column: 5 / 9;  grid-row: 2; }
.c-playground { grid-column: 9 / 13; grid-row: 2; }


/* ────────────────────────────────────────────────────────────
   GLASS CARD
   ──────────────────────────────────────────────────────────── */
.card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.4rem;
  min-height: 250px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  /* Scroll-reveal state — JS adds .in-view */
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity       0.8s var(--ease-out-expo),
    transform     0.8s var(--ease-out-expo),
    border-color  0.35s,
    box-shadow    0.35s,
    background    0.35s;
}

.card.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Inner top-left sheen */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 55%);
  pointer-events: none;
}

/* Glow bloom — expands behind border on hover */
.card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius) + 1px);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: -1;
  background: var(--_glow, transparent);
  filter: blur(20px);
}

.card:hover { background: var(--surface-hover); }
.card:hover::after { opacity: 1; }

/* Per-card accent wiring via CSS custom properties */
.c-imagery {
  --_border: var(--card-imagery-border);
  --_glow:   var(--card-imagery-glow);
  --_shadow: var(--card-imagery-shadow);
  --_hue:    var(--accent);
}
.c-motion {
  --_border: var(--card-motion-border);
  --_glow:   var(--card-motion-glow);
  --_shadow: var(--card-motion-shadow);
  --_hue:    var(--aqua);
}
.c-webapps {
  --_border: var(--card-webapps-border);
  --_glow:   var(--card-webapps-glow);
  --_shadow: var(--card-webapps-shadow);
  --_hue:    var(--gold);
}
.c-music {
  --_border: var(--card-music-border);
  --_glow:   var(--card-music-glow);
  --_shadow: var(--card-music-shadow);
  --_hue:    var(--rose);
}
.c-writing {
  --_border: var(--card-writing-border);
  --_glow:   var(--card-writing-glow);
  --_shadow: var(--card-writing-shadow);
  --_hue:    var(--sky);
}
.c-playground {
  --_border: var(--card-playground-border);
  --_glow:   var(--card-playground-glow);
  --_shadow: var(--card-playground-shadow);
  --_hue:    var(--lime);
}

.card:hover {
  border-color: var(--_border);
  box-shadow: 0 24px 60px var(--_shadow), inset 0 0 0 1px var(--_border);
}

/* Ambient glow blob inside card */
.card-glow-blob {
  position: absolute;
  width: 220px; height: 220px;
  top: -60px; right: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--_hue), transparent 70%);
  opacity: 0;
  filter: blur(50px);
  pointer-events: none;
  transition: opacity 0.5s;
}

.card:hover .card-glow-blob { opacity: 0.10; }

/* Accent hairline at card top */
.card-line {
  position: absolute;
  top: 0; left: 2.4rem; right: 2.4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--_hue), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover .card-line { opacity: 0.4; }

/* Card content */
.card-icon {
  font-size: 1.7rem;
  margin-bottom: 1.6rem;
  display: block;
  line-height: 1;
  user-select: none;
}
.card-icon svg {
  color: var(--accent);
  display: block;
}

.card-eyebrow {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.7rem;
}

.card-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 0.9rem;
}

.card-body {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.78;
  max-width: 380px;
}

/* Arrow indicator */
.card-arrow {
  position: absolute;
  bottom: 1.8rem;
  right: 1.8rem;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.35s var(--ease-out-expo);
  flex-shrink: 0;
}

.card:hover .card-arrow {
  border-color: var(--_border);
  color: var(--text);
  transform: rotate(45deg) scale(1.1);
}

/* All 6 cards share the same vertical layout */

/* Stagger delays for bento reveal */
.c-imagery    { transition-delay: 0s;    }
.c-motion     { transition-delay: 0.08s; }
.c-webapps    { transition-delay: 0.16s; }
.c-music      { transition-delay: 0.24s; }
.c-writing    { transition-delay: 0.32s; }
.c-playground { transition-delay: 0.40s; }


/* ────────────────────────────────────────────────────────────
   FOOTER
   ──────────────────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: var(--z-page);
  padding: 3rem var(--page-pad-x);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.footer-logo em { color: var(--accent); font-style: normal; }

.footer-copy {
  font-family: var(--f-display);
  font-weight: 200;
  letter-spacing: 0.04em;
  font-size: 1rem;
  color: var(--text-dim);
}

.footer-tag {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

/* ============================================================
   INTERIOR PAGE COMPONENTS
   page-hero · about · tools · contact · gallery · players ·
   project grid · writing · lightboxes · chatbot CTA
   ============================================================ */

/* ── Section wrapper ───────────────────────────────────── */
.section { padding: var(--sp-16) 0; }

/* ── Page hero ─────────────────────────────────────────── */
.page-hero {
  padding: calc(var(--sp-32) * 1.5) 0 var(--sp-16);
}
.page-title {
  font-family: var(--f-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: var(--sp-4) 0 var(--sp-6);
}
.page-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 54ch;
  line-height: 1.7;
}

/* ── Horizontal rule ───────────────────────────────────── */
.rule {
  height: 1px;
  background: var(--border);
  margin: 0 auto var(--sp-16);
}

/* ── Section heading ───────────────────────────────────── */
.section-heading {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  margin-bottom: var(--sp-6);
}
.sec-intro--center { text-align: center; }
.sec-intro--center .sec-body { margin-inline: auto; }

/* ────────────────────────────────────────────────────────
   ABOUT PAGE
   ──────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--sp-12);
  align-items: start;
}
.about-photo {
  padding: 0;
  overflow: visible;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  /* Flip card container — override card defaults */
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  min-height: unset;
  perspective: 1200px;
  cursor: pointer;
}
.about-photo::before,
.about-photo::after { display: none; }
.about-photo:hover  { background: transparent; box-shadow: none; }

/* Flip inner — rotates on hover */
.flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.75s var(--ease-out-expo);
  border-radius: var(--radius-lg);
}
.about-photo:hover .flip-inner,
.about-photo:focus .flip-inner {
  transform: rotateY(180deg);
}

/* Shared face styles */
.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: inherit;
  overflow: hidden;
}

/* Front face: portrait photo */
.flip-front {
  background: var(--surface);
  border: 1px solid var(--border);
}
.flip-front img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Back face: hobbies — glass morphism */
.flip-back {
  transform: rotateY(180deg);
  /* Dark glass panel — semi-transparent with heavy blur for legibility */
  background: rgba(3, 3, 18, 0.87);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(138, 92, 246, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  gap: var(--sp-5);
  text-align: center;
}
/* Light mode: invert to a bright glass panel */
body.light-mode .flip-back {
  background: rgba(240, 238, 255, 0.90);
  border: 1px solid rgba(138, 92, 246, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.flip-back-title {
  font-family: var(--f-mono);
  font-size: calc(0.6rem + 3px);   /* +3 px per design spec */
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.hobby-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3) var(--sp-4);
  width: 100%;
}
.hobby-list li {
  font-family: var(--f-mono);
  font-size: calc(0.68rem + 3px);  /* +3 px per design spec */
  letter-spacing: 0.06em;
  color: var(--text);
  text-align: left;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hobby-list li svg {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.9;
}
.about-text p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-5);
}
.about-actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-8);
}

/* Quote lightbox */
.lightbox-content--quote {
  max-width: 520px;
}
.quote-card {
  width: 100%;
}
.quote-text {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text);
  margin: var(--sp-4) 0 var(--sp-3);
  font-style: italic;
}
.quote-author {
  font-family: var(--f-mono);
  font-size: 0.85rem;
}

/* Tools grid — 3 columns desktop */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-8);
}

/* Team card image — 5:4 aspect ratio */
.team-card {
  padding: 0;
  overflow: hidden;
}
.team-card .card-line {
  display: none; /* replaced by image top-edge */
}
.team-img-wrap {
  aspect-ratio: 5 / 4;
  overflow: hidden;
  width: 100%;
}
.team-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.team-card:hover .team-img-wrap img {
  transform: scale(1.04);
}
.team-card .card-body {
  padding: var(--sp-5) var(--sp-5) var(--sp-6);
  margin: 0 9px;
  border-top: 1px solid var(--border);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--sp-12);
  align-items: start;
}
.contact-info p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-6);
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.contact-icon {
  width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: var(--sp-1) var(--sp-2);
}
.contact-link {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.contact-link:hover { color: var(--accent); }

/* Contact form */
.contact-form-wrap { padding: var(--sp-8); }
.form-group {
  margin-bottom: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.form-label {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-label span { color: var(--accent); }
.form-input,
.form-textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 0.95rem;
  padding: var(--sp-3) var(--sp-4);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-submit   { margin-top: var(--sp-4); }

/* Honeypot */
.website-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 1px;
  width: 1px;
  opacity: 0;
}

/* Form messages */
.form-message {
  border-radius: var(--radius-sm);
  font-family: var(--f-mono);
  font-size: 0.8rem;
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-5);
}
.form-message--success { background: rgba(94,234,212,0.12); color: var(--aqua); border: 1px solid var(--aqua); }
.form-message--error   { background: rgba(232,141,170,0.12); color: var(--rose); border: 1px solid var(--rose); }

/* ────────────────────────────────────────────────────────
   GALLERY (imagery.php)
   ──────────────────────────────────────────────────────── */
.gallery-section { padding-top: 0; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

.gallery-item {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-fast);
}
.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(157,126,238,0.18);
}
.gallery-img-wrap {
  overflow: hidden;
  aspect-ratio: 5 / 4;
}
.gallery-img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.gallery-item:hover .gallery-img-wrap img { transform: scale(1.04); }
.gallery-caption {
  padding: var(--sp-4) var(--sp-5);
  margin: 0 9px;
}
.gallery-title {
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* ────────────────────────────────────────────────────────
   MEDIA PLAYERS (motion.php + music.php)
   ──────────────────────────────────────────────────────── */
.media-player-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-6);
  align-items: start;
}

/* Stage */
.media-stage {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-6);
}

/* Video viewport */
.media-viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.media-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  color: var(--text-dim);
}
.media-placeholder span { font-size: 2rem; opacity: 0.4; }
.media-placeholder p    { font-size: 0.85rem; }

/* Album art */
.album-art-wrap {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.album-art-placeholder { color: var(--text-dim); font-size: 2.5rem; }
.album-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s var(--ease-out);
}
.album-clickable { cursor: pointer; }

/* Info */
.media-info { text-align: center; }
.media-now-playing {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 9px 0;   /* 9px breathing room above and below */
}
.media-artist {
  font-size: 0.8rem;
  margin-top: var(--sp-1);
}

/* Controls */
.media-controls {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
}
.media-btn { min-width: 5rem; }

/* Prev / Next arrow buttons: scale the Unicode arrows up to match
   the visual size of the "Play" label at its uppercase tracking */
#prevBtn,
#nextBtn {
  font-size: 1.15rem;
  letter-spacing: 0;   /* arrows don't need tracking */
}

/* Progress bar */
.media-progress { display: flex; flex-direction: column; gap: var(--sp-2); }
.progress-bar {
  position: relative;
  height: 4px;
  background: var(--surface-hover);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.1s linear;
}
.progress-times {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Playlist sidebar / below-player panel */
.media-playlist { padding: 0; }
.media-playlist .card-body { padding: 12px var(--sp-5) var(--sp-5); } /* 12px top = gap between border and label */
/* 9px gap from card border to "Video Listing" / "Track Listing" label */
.media-playlist .card-tag  { margin: 9px 0 0 9px; }

.playlist {
  list-style: none;
  padding: 0;
  margin: var(--sp-4) 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px;
}
.playlist-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
}
.playlist-item:hover  { background: var(--surface-hover); }
.playlist-item.active {
  background: var(--accent-glow);
  color: var(--accent);
}
.playlist-num   { flex-shrink: 0; font-family: var(--f-mono); font-size: 0.7rem; }
.playlist-title { font-size: 0.88rem; line-height: 1.4; }
.playlist-ext-link {
  margin-left: auto;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color var(--transition-fast);
}
.playlist-ext-link:hover { color: var(--accent); }

/* Per-track thumbnail in playlist */
.playlist-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

/* Stacked layout — motion + music: player full-width on top, playlist beneath */
.media-player-layout--stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
/* Stage fills the full container so the video / art is as large as possible */
.media-player-layout--stack .media-stage {
  width: 100%;
}
/* Playlist spans full width below the player */
.media-player-layout--stack .media-playlist {
  width: 100%;
}

/* ── Music-specific: 600 px album art, centred narrow column ── */
/* Stage and playlist both constrained to the same width so the
   track list sits flush under the album art with equal margins */
.media-player-layout--music .media-stage,
.media-player-layout--music .media-playlist {
  max-width: 648px;   /* 600px art + 24px card padding × 2 */
  margin-left:  auto;
  margin-right: auto;
}
/* Album art: 600 px square, shrinks on small screens */
.media-player-layout--music .album-art-wrap {
  width:     600px;
  height:    600px;
  max-width: 100%;    /* shrinks gracefully on narrow viewports */
}

/* Lyrics panel */
.lyrics-panel { margin-top: var(--sp-6); }
.lyrics-content {
  color: var(--text-muted);
  line-height: 1.9;
  white-space: pre-wrap;
  font-size: 0.95rem;
}

/* ────────────────────────────────────────────────────────
   PROJECT GRID (writing.php · web-apps.php)
   ──────────────────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-6);
  margin-top: var(--sp-6);
}

/* Web Apps page — fixed 2-column layout */
.project-grid--apps {
  grid-template-columns: repeat(2, 1fr);
}

/* Writing page — fixed 2-column layout */
.project-grid--writing {
  grid-template-columns: repeat(2, 1fr);
}

.project-card { display: flex; flex-direction: column; overflow: hidden; }
.project-card--link { text-decoration: none; color: inherit; }
.project-card--link:hover { color: inherit; }
.project-card--soon { opacity: 0.55; pointer-events: none; }

.project-thumb {
  aspect-ratio: 5 / 4;
  overflow: hidden;
}
.project-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.project-card:hover .project-thumb img { transform: scale(1.04); }

/* Writing page: document pages are portrait — show full image, anchored top */
.writing-section .project-thumb {
  aspect-ratio: 3 / 4;     /* portrait document ratio — A4/Letter approximation */
  overflow: hidden;
}
.writing-section .project-thumb img {
  object-fit: cover;        /* fills the portrait frame with minimal cropping */
  object-position: top;     /* always show title / top of page first */
  height: 100%;
  width: 100%;
}

/* Writing doc lightbox: portrait pages should fill height, not width-stretch */
.doc-image {
  max-width: 100%;
  width: auto;
  max-height: calc(100vh - 180px);
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-md);
  object-fit: contain;
  transition: opacity 0.2s var(--ease-out);
}

.project-badge {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  background: rgba(0,0,0,0.7);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 2px var(--sp-2);
  font-size: 0.65rem;
  backdrop-filter: blur(4px);
}

/* ────────────────────────────────────────────────────────
   SHARED LIGHTBOX  (imagery · résumé · writing)
   ──────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(3,3,13,0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}
.lightbox.is-open { opacity: 1; }

.lightbox-close {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  width: 2.5rem;
  height: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  line-height: 1;
  z-index: 2;
}
.lightbox-close:hover { background: var(--surface-hover); border-color: var(--accent); }

/* Gallery lightbox: close button lives inside the image wrap, top-left */
.lightbox-img-wrap {
  position: relative; /* stacking context for the close button */
}
.lightbox-img-wrap .lightbox-close {
  top:   var(--sp-3);
  left:  var(--sp-3);
  right: auto;        /* cancel the default right-side offset */
  /* Slightly frosted so it reads against any image colour */
  background: rgba(3, 3, 18, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.lightbox-img-wrap .lightbox-close:hover {
  background: rgba(138, 92, 246, 0.55);
  border-color: var(--accent);
  color: #fff;
}

.lightbox-content {
  display: flex;
  gap: var(--sp-6);
  max-width: 1000px;
  width: 100%;
  max-height: calc(100vh - var(--sp-16));
}

.lightbox-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.lightbox-img-wrap img {
  max-width: 100%;
  max-height: calc(100vh - var(--sp-24));
  object-fit: contain;
  border-radius: inherit;
  transition: opacity 0.2s var(--ease-out);
}

.lightbox-info {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.lightbox-title {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 600;
}
.lightbox-desc { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; flex: 1; }

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.lightbox-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: var(--sp-2) var(--sp-4);
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.lightbox-btn:hover:not(:disabled)  { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.lightbox-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.lightbox-counter { font-family: var(--f-mono); font-size: 0.8rem; color: var(--text-dim); margin: auto; }

/* Gallery lightbox — stacked: image on top, info + nav below */
.lightbox-content--gallery {
  flex-direction: column;
  max-width: 1100px;
  max-height: calc(100vh - var(--sp-16));
}
.lightbox-content--gallery .lightbox-img-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-height: 68vh;
}
.lightbox-content--gallery .lightbox-img-wrap img {
  max-height: 68vh;
  width: 100%;
}
.lightbox-content--gallery .lightbox-info {
  width: 100%;
  flex-direction: row;
  align-items: center;
  gap: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.lightbox-content--gallery .lightbox-title {
  font-size: 1.05rem;
  flex-shrink: 0;
}
.lightbox-content--gallery .lightbox-desc {
  flex: 1;
  font-size: 0.83rem;
}
.lightbox-content--gallery .lightbox-controls {
  flex-shrink: 0;
  margin-left: auto;
}

/* Doc lightbox close button — top-left inside card */
.doc-lightbox-content {
  position: relative; /* stacking context for close button */
}
.doc-lightbox-content .lightbox-close {
  top:   var(--sp-3);
  left:  var(--sp-3);
  right: auto;
  background: rgba(3, 3, 18, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.doc-lightbox-content .lightbox-close:hover {
  background: rgba(138, 92, 246, 0.55);
  border-color: var(--accent);
  color: #fff;
}

/* Doc lightbox — portrait page viewer */
.doc-lightbox-content {
  max-width: min(800px, 90vw);
  width: 100%;
  max-height: calc(100vh - 80px);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
}
.doc-lightbox-body  {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  flex: 1;
  min-height: 0;
}
.doc-pagination { width: 100%; justify-content: center; }
.doc-image {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 180px);
  display: block;
  border-radius: var(--radius-md);
  object-fit: contain;
  transition: opacity 0.2s var(--ease-out);
}

/* ────────────────────────────────────────────────────────
   CHATBOT CTA  (index.php)
   ──────────────────────────────────────────────────────── */
.chatbot-cta { padding: var(--sp-8) 0 var(--sp-16); }
.chatbot-cta-inner {
  max-width: 851px;
  margin: 0 auto;
  padding: var(--sp-14) var(--sp-14);
  text-align: center;
}
.chatbot-cta-heading {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: var(--sp-3) 0 var(--sp-4);
}
.chatbot-cta-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: var(--sp-7);
  line-height: 1.7;
}

/* ────────────────────────────────────────────────────────
   DISPLAY PANEL (nav — desktop)
   ──────────────────────────────────────────────────────── */
.nav-display-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.nav-display-btn:hover,
.nav-display-btn[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}
.display-icon { font-size: 0.9rem; }

/* Panel container */
.display-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: var(--page-pad-x);
  width: 300px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 9px;
  margin: 9px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: var(--z-nav);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.display-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* "Display" heading inside panel */
.display-heading {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0;
  text-align: center;
}

/* Individual slider row */
.display-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.display-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.display-row-name {
  font-family: var(--f-mono);
  font-size: 0.88rem;
  color: var(--text);
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 2px;
}
.display-row-ends {
  display: flex;
  gap: var(--sp-3);
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
}

/* Slider row with left/right style labels */
.display-slider-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.display-slider-row .display-slider {
  flex: 1;
}
.display-end-label {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Range slider base styles */
.display-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--border-strong);
  outline: none;
  cursor: pointer;
  transition: background var(--t-fast);
}
.display-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 6px var(--accent-glow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.display-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 6px var(--accent-glow);
  cursor: pointer;
}
.display-slider:hover::-webkit-slider-thumb,
.display-slider:focus::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Color slider — rainbow track */
.display-slider--color {
  background: linear-gradient(to right,
    hsl(0,72%,68%), hsl(40,72%,68%), hsl(80,72%,68%), hsl(120,72%,68%),
    hsl(160,72%,68%), hsl(200,72%,68%), hsl(240,72%,68%), hsl(262,72%,68%),
    hsl(290,72%,68%), hsl(320,72%,68%), hsl(360,72%,68%));
}

/* ============================================================
   animations.css — @keyframes
   All durations/iterations respect prefers-reduced-motion
   via the global rule in reset.css
   ============================================================ */

/* ── Aurora blob drift ── */
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(4%, 6%) scale(1.08); }
  66%      { transform: translate(-2%, 4%) scale(0.96); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-6%, 4%) scale(1.06); }
  66%      { transform: translate(3%, -6%) scale(1.1); }
}

@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(8%, -8%) scale(1.12); }
}

@keyframes drift4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(-6%, -4%) scale(1.15); }
  70%      { transform: translate(4%, 6%) scale(0.92); }
}

/* ── Hero entrance ── */
@keyframes riseUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll shaft pulse ── */
@keyframes shaftPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1);    transform-origin: top; }
  50%      { opacity: 1;   transform: scaleY(1.15); }
}

/* ── Status dot heartbeat ── */
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ── Status dot: smooth green glow pulse ── */
@keyframes statusGlow {
  0%, 100% { opacity: 1;   box-shadow: 0 0 8px #22c55e, 0 0 14px #22c55e; }
  50%      { opacity: 0.5; box-shadow: 0 0 4px #22c55e; }
}

/* ── Marquee ── */
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Generic fade-in-up (section reveals) ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Subtle scale-in (lightbox, modals) ── */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================================
   responsive.css — Mobile-first breakpoints
   Designed on desktop, scaled down gracefully
   ============================================================ */

/* ── TABLET  ≤ 1024px ── */
@media (max-width: 1024px) {
  :root { --page-pad-x: 2rem; }

  /* Hide stats — cleaner hero on smaller viewports */
  .hero-stats { display: none; }

  /* Collapse bento to 2 columns × 3 rows — symmetric */
  .bento { grid-template-columns: repeat(2, 1fr); }

  .c-imagery    { grid-column: 1; grid-row: 1; }
  .c-motion     { grid-column: 2; grid-row: 1; }
  .c-webapps    { grid-column: 1; grid-row: 2; }
  .c-music      { grid-column: 2; grid-row: 2; }
  .c-writing    { grid-column: 1; grid-row: 3; }
  .c-playground { grid-column: 2; grid-row: 3; }

  .sec-intro       { flex-direction: column; align-items: flex-start; }
  .sec-note        { text-align: left; max-width: 100%; }

  /* Nav */
  .nav-links { gap: 2rem; }
  .nav-status { display: none; }
}

/* ── MOBILE  ≤ 768px ── */
@media (max-width: 768px) {
  :root {
    --page-pad-x: 1.25rem;
    --nav-height:  60px;
  }

  /* Nav */
  .nav { padding: 1.4rem var(--page-pad-x); }
  .nav.scrolled { padding: 1rem var(--page-pad-x); }

  .nav-links,
  .nav-status,
  .nav-theme-btn,
  .nav-display-btn { display: none; }

  .nav-hamburger { display: flex; }

  /* Hero */
  .hero {
    padding: 8rem 1.5rem 5rem;
    text-align: center;
  }

  .hero-meta {
    flex-direction: column;
    gap: 1rem;
  }

  .meta-rule    { display: none; }
  .hero-sub     { text-align: center; }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .scroll-hint { display: none; }

  /* Bento → single column */
  .bento { grid-template-columns: 1fr; gap: 1rem; }

  .c-imagery,
  .c-motion,
  .c-webapps,
  .c-music,
  .c-writing,
  .c-playground {
    grid-column: 1;
    grid-row: auto;
  }

  .c-playground     { min-height: 200px; }

  .card-content-row {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  /* Works section */
  .works { padding: 3rem var(--page-pad-x) 5rem; }

  /* Footer */
  footer {
    padding: 2rem var(--page-pad-x);
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .sec-note { display: none; }
}

/* ── SMALL MOBILE  ≤ 480px ── */
@media (max-width: 480px) {
  :root { --page-pad-x: 1rem; }

  .hero-eyebrow { font-size: 0.58rem; }

  .card        { padding: 1.8rem; min-height: 200px; }
  .card-title  { font-size: 1.6rem; }
  .card-body   { font-size: 0.95rem; }

  .btn { padding: 0.75rem 1.4rem; font-size: 0.6rem; }
}

/* ══════════════════════════════════════════════════════
   INTERIOR PAGE RESPONSIVE OVERRIDES
   ══════════════════════════════════════════════════════ */

/* ── Tablet ≤ 1024px ── */
@media (max-width: 1024px) {
  /* About */
  .about-grid   { grid-template-columns: 1fr; }
  .about-photo  { max-width: 360px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }

  /* Media player — legacy grid collapses to single column on tablet */
  .media-player-layout:not(.media-player-layout--stack) { grid-template-columns: 1fr; }
  /* Stacked playlist: no height cap — it's a full-width grid below the player */
  .media-player-layout--stack .media-playlist { max-height: none; overflow-y: visible; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }

  /* Lightbox */
  .lightbox-content { flex-direction: column; max-height: 92vh; overflow-y: auto; }
  .lightbox-info    { width: 100%; }

  /* Gallery lightbox on tablet — stack info vertically again */
  .lightbox-content--gallery .lightbox-info {
    flex-direction: column;
    gap: var(--sp-3);
  }
  .lightbox-content--gallery .lightbox-controls { margin-left: 0; }
}

/* ── Mobile ≤ 768px ── */
@media (max-width: 768px) {
  .section { padding: var(--sp-10) 0; }

  /* Page hero */
  .page-hero    { padding: calc(var(--sp-24)) 0 var(--sp-10); }
  .page-subtitle{ font-size: 0.95rem; }

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

  /* Project grid */
  .project-grid,
  .project-grid--apps,
  .project-grid--writing { grid-template-columns: 1fr; }

  /* Tools */
  .tools-grid   { grid-template-columns: repeat(2, 1fr); }

  /* Album art */
  .album-art-wrap { width: 160px; height: 160px; }

  /* Chatbot CTA */
  .chatbot-cta-inner { padding: var(--sp-8) var(--sp-6); }

  /* ── Lightbox — base ── */
  .lightbox        { padding: var(--sp-3); align-items: center; }
  .lightbox-content{ max-height: 92vh; overflow-y: auto; }
  .doc-lightbox-content { padding: var(--sp-4); }

  /* ── Gallery lightbox on mobile ── */
  .lightbox-content--gallery {
    max-height: 92vh;
    gap: var(--sp-3);
  }
  /* Image wrap: cap height so vertical images never overflow */
  .lightbox-content--gallery .lightbox-img-wrap {
    max-height: 62vh;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
  }
  /* Image itself: contain within wrap, auto width so portrait shots
     are narrow rather than stretched */
  .lightbox-content--gallery .lightbox-img-wrap img {
    width: auto;
    max-width: 100%;
    max-height: 62vh;
    object-fit: contain;
    margin: 0 auto;          /* centre portrait images horizontally */
    display: block;
  }
  /* Info bar: stack vertically, compact spacing */
  .lightbox-content--gallery .lightbox-info {
    flex-direction: column;
    gap: var(--sp-2);
    padding-top: var(--sp-3);
    align-items: flex-start;
  }
  .lightbox-content--gallery .lightbox-controls {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .lightbox-content--gallery .lightbox-title { font-size: 0.95rem; }
  .lightbox-content--gallery .lightbox-desc  { display: none; } /* reclaim vertical space */
}

/* ── GPU relief on mobile — disable expensive aurora blurs ── */
@media (max-width: 768px) {
  /* Shrink blobs to device width and cut blur radius — large blurs
     force an oversized compositing surface on phones */
  .blob-1 { width: 100vw; height: 100vw; filter: blur(40px); }
  .blob-2 { width: 80vw;  height: 80vw;  filter: blur(30px); }
  .blob-3 { width: 90vw;  height: 90vw;  filter: blur(40px); }
  .blob-4 { width: 70vw;  height: 70vw;  filter: blur(30px); }

  /* Replace nav backdrop-filter with a solid-ish background */
  .site-header.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(3, 3, 13, 0.92);
  }
  body.light-mode .site-header.scrolled {
    background: rgba(245, 243, 255, 0.96);
  }
}

/* ── Honour prefers-reduced-motion beyond reset.css ──
   reset.css freezes durations; this also kills the blobs entirely
   so the GPU doesn't composite a still oversized filter layer. ── */
@media (prefers-reduced-motion: reduce) {
  .aurora-blob { animation: none; display: none; }
  .fluid-blob  { display: none; }
}

/* ── Small mobile ≤ 480px ── */
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .about-actions { flex-direction: column; }
  .media-controls { gap: var(--sp-2); }
  .media-btn { min-width: 4rem; font-size: 0.6rem; }
  .tools-grid { grid-template-columns: 1fr; }

  /* Lightbox: edge-to-edge on small phones */
  .lightbox { padding: var(--sp-2); }
  .lightbox-content--gallery { max-height: 95vh; }
  .lightbox-content--gallery .lightbox-img-wrap,
  .lightbox-content--gallery .lightbox-img-wrap img {
    max-height: 68vh;
  }
}

