/* ==========================================================================
   mtyas.com - The Modular Sound Atelier Design System
   Fluid Responsive • Creative & Original • Acoustic-Electronic Atmosphere
   Matthew Tyas: Composer, Modular Synthesist, Upright Pianist & Creative Coder
   ========================================================================== */

:root {
  /* Autumn Woodland & Warm Atelier Surface Palette */
  --bg-primary: #0f0d0b;                /* Deep peat charcoal / bark */
  --bg-surface: #171410;                /* Warm dark timber */
  --bg-surface-glass: rgba(23, 20, 16, 0.78);
  --bg-panel: #1c1813;                  /* Rich smoked walnut panel */
  --bg-panel-glass: rgba(28, 24, 19, 0.86);
  --bg-card: #221d17;                   /* Warm dark oak / autumn forest floor */
  --bg-card-glass: rgba(34, 29, 23, 0.78);
  --bg-card-hover: #2b251d;             /* Lit amber wood on hover */
  --bg-elevated: #362e24;               /* Elevated timber plate */
  --bg-timber: #2a2016;

  /* Autumn Ambient Accents & Warm Embers */
  --accent-amber: #f5be75;              /* Glowing warm amber honey */
  --accent-amber-light: #fed7aa;        /* Warm parchment highlight */
  --accent-amber-glow: rgba(245, 190, 117, 0.38);

  /* Warm Terracotta & Burnished Copper replacing electric blue */
  --accent-cyan: #e07a38;               /* Warm burnished copper / autumn leaf */
  --accent-cyan-light: #ffedd5;         /* Soft peach cream */
  --accent-cyan-glow: rgba(224, 122, 56, 0.38);

  /* Autumn Palette Extensions */
  --accent-terracotta: #d95c26;         /* Rich autumn leaf terracotta */
  --accent-terracotta-glow: rgba(217, 92, 38, 0.38);
  --accent-gold: #f59e0b;               /* Golden harvest */
  --accent-rust: #b45309;               /* Deep forest rust */
  --accent-cedar: #9a3412;              /* Warm Pyrenees cedar */
  --accent-moss: #84cc16;               /* Forest moss green */
  --accent-mint: #84cc16;
  --accent-mint-glow: rgba(132, 204, 22, 0.35);
  --accent-purple: #c084fc;
  --accent-purple-glow: rgba(192, 132, 252, 0.30);
  --accent-red: #ea580c;                /* Autumn ember */

  /* Autumn Chamfers & Precision Borders */
  --border-subtle: rgba(255, 245, 230, 0.08);
  --border-medium: rgba(255, 245, 230, 0.14);
  --border-bright: rgba(245, 190, 117, 0.40);
  --border-cyan: rgba(224, 122, 56, 0.40);
  --border-amber: rgba(245, 190, 117, 0.45);
  --border-terracotta: rgba(217, 92, 38, 0.40);

  /* Warm Autumn Typography */
  --text-primary: #fdfbf7;              /* Warm ivory white */
  --text-secondary: #dcd0bf;            /* Warm linen */
  --text-muted: #a69885;                /* Muted sandstone */
  --text-dim: #756a5c;                  /* Weathered wood bark */

  /* Font Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Fluid Typographic Scales via clamp() */
  --fluid-h1: clamp(2.3rem, 5vw + 0.5rem, 4rem);
  --fluid-h2: clamp(1.65rem, 3.2vw + 0.3rem, 2.4rem);
  --fluid-h3: clamp(1.2rem, 2vw + 0.2rem, 1.6rem);
  --fluid-body: clamp(0.95rem, 0.25vw + 0.88rem, 1.05rem);

  /* Elevation & High-End Autumn Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.55);
  --shadow-panel: 0 16px 40px -10px rgba(0, 0, 0, 0.70), 0 0 1px 1px rgba(255, 245, 230, 0.06), inset 0 1px 0 rgba(255, 245, 230, 0.1);
  --shadow-glow-amber: 0 0 25px var(--accent-amber-glow);
  --shadow-glow-cyan: 0 0 25px var(--accent-cyan-glow);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fluid-body);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(217, 119, 6, 0.11) 0%, transparent 60%),
    radial-gradient(circle 800px at 85% 15%, rgba(180, 83, 9, 0.10) 0%, transparent 50%),
    radial-gradient(circle 600px at 15% 85%, rgba(132, 204, 22, 0.05) 0%, transparent 50%),
    var(--bg-primary);
  background-attachment: fixed;
  overflow-x: hidden;
  padding-bottom: 140px; /* Space for the floating audiophile console */
  position: relative;
}

/* Subtle organic grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 0);
  background-size: 28px 28px;
  z-index: 1;
  opacity: 0.6;
}

/* Top Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-terracotta));
  z-index: 1100;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--accent-terracotta-glow);
}

/* ==========================================================================
   Typography & Accents
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

h1 { font-size: var(--fluid-h1); }
h2 { font-size: var(--fluid-h2); }
h3 { font-size: var(--fluid-h3); }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--accent-amber);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  color: #fde68a;
  text-shadow: 0 0 8px var(--accent-amber-glow);
}

.mono {
  font-family: var(--font-mono);
}

.glow-amber {
  color: var(--accent-amber);
  text-shadow: 0 0 12px var(--accent-amber-glow);
}

.glow-cyan {
  color: var(--accent-cyan);
  text-shadow: 0 0 12px var(--accent-cyan-glow);
}

/* Gradient Text Highlight */
.gradient-text-gold {
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-amber) 75%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  width: 100%;
  position: relative;
  z-index: 2;
}

.section {
  padding: clamp(1.75rem, 3.2vw, 2.5rem) 0;
  position: relative;
  z-index: 2;
}

.section-header {
  margin-bottom: 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--fluid-h2);
}

.section-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   Navigation Bar (Floating Studio Console Island)
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 13, 11, 0.84);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 245, 230, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  padding: 0.75rem 0;
  transition: all 0.3s ease;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: -0.015em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-brand:hover {
  opacity: 0.9;
  text-shadow: 0 0 12px rgba(245, 190, 117, 0.3);
}

.brand-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-amber);
  box-shadow: 0 0 10px var(--accent-amber);
  animation: pulse-led 3s infinite alternate ease-in-out;
}

@keyframes pulse-led {
  0% { opacity: 0.6; transform: scale(0.9); box-shadow: 0 0 4px var(--accent-amber); }
  100% { opacity: 1; transform: scale(1.1); box-shadow: 0 0 14px var(--accent-amber), 0 0 4px #fff; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  background: rgba(22, 18, 14, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.2rem 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 245, 230, 0.07);
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-decoration: none;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #ffffff;
  background: rgba(245, 190, 117, 0.12);
  border-color: rgba(245, 190, 117, 0.28);
  font-weight: 600;
  box-shadow: 0 0 14px rgba(245, 190, 117, 0.12);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent-amber);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-amber);
}

.nav-link.active .nav-badge {
  background: rgba(245, 190, 117, 0.22);
  color: #fde68a;
  border-color: rgba(245, 190, 117, 0.4);
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 245, 230, 0.08);
  color: var(--text-muted);
}

.door-key-link {
  color: var(--text-muted);
  opacity: 0.45;
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
}

.door-key-link:hover {
  opacity: 1;
  color: var(--accent-amber);
  background: rgba(245, 190, 117, 0.1);
  transform: rotate(45deg);
}

/* ==========================================================================
   Tactile Hardware Bilingual Switcher (EN / FR)
   ========================================================================== */
.lang-switch-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7);
  user-select: none;
  flex-shrink: 0;
}

.lang-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  cursor: pointer;
}

.lang-label.active {
  color: #fff;
  text-shadow: 0 0 8px rgba(245, 190, 117, 0.6);
}

.lang-toggle-btn {
  background: #1c1813;
  border: 1px solid #453728;
  border-radius: var(--radius-full);
  width: 40px;
  height: 22px;
  padding: 2px;
  position: relative;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  outline: none;
  transition: all 0.2s ease;
}

.lang-toggle-btn:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 2px;
}

.toggle-track {
  display: block;
  width: 100%;
  height: 100%;
}

.toggle-switch-arm {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #94a3b8);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7), inset 0 1px 1px #fff;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}

.lang-toggle-btn.fr-active .toggle-switch-arm {
  transform: translateX(18px);
  background: linear-gradient(145deg, #f5be75, #d97706);
}

.toggle-led {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  position: absolute;
  top: 8px;
  transition: all 0.25s ease;
}

.lang-toggle-btn.en-active .toggle-led {
  right: 5px;
  background: var(--accent-amber);
  box-shadow: 0 0 6px var(--accent-amber);
}

.lang-toggle-btn.fr-active .toggle-led {
  left: 5px;
  background: var(--accent-terracotta);
  box-shadow: 0 0 6px var(--accent-terracotta);
}

/* ==========================================================================
   Studio Status / Weather Ticker Bar
   ========================================================================== */
.studio-ticker-bar {
  background: rgba(14, 12, 10, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 245, 230, 0.05);
  padding: 0.35rem 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  overflow: hidden;
  position: relative;
  z-index: 50;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.25s ease, background 0.3s ease;
}

.studio-ticker-bar:hover {
  border-bottom-color: rgba(245, 190, 117, 0.25);
  background: rgba(18, 15, 12, 0.85);
}

.studio-ticker-bar.ticker-flash {
  animation: tickerFlash 0.55s ease;
}

@keyframes tickerFlash {
  0% { background: rgba(245, 190, 117, 0.22); }
  100% { background: rgba(14, 12, 10, 0.72); }
}

.studio-ticker-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
}

.ticker-dice-btn {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  color: var(--text-dim);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ticker-dice-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fef3c7;
}

.ticker-dice-icon {
  font-size: 0.8rem;
  opacity: 0.7;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.ticker-dice-btn:hover .ticker-dice-icon {
  opacity: 1;
  transform: rotate(60deg);
}

.ticker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 8px var(--accent-mint);
  flex-shrink: 0;
  animation: pulseGreen 2.2s infinite ease-in-out;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ticker-dice-btn:hover .ticker-dot {
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--accent-mint);
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px var(--accent-mint); }
  50% { opacity: 0.45; transform: scale(0.85); box-shadow: 0 0 2px var(--accent-mint); }
}

.ticker-marquee-wrap {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 25px, black calc(100% - 25px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 25px, black calc(100% - 25px), transparent);
}

.ticker-text-marquee {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  animation: tickerSlide 42s linear infinite;
  padding-left: 100%;
}

.studio-ticker-bar:hover .ticker-text-marquee {
  animation-play-state: paused;
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.ticker-badge {
  color: var(--accent-amber);
  font-weight: 600;
}

.ticker-divider {
  color: var(--border-subtle);
}

.ticker-msg {
  color: var(--text-secondary);
}

.ticker-weather {
  color: #fde68a;
}

.ticker-weather.live-synced {
  color: #6ee7b7;
}

.ticker-telemetry {
  color: #e2e8f0;
}

/* Quote & Philosophy Box Transition */
.quote-transition {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

#wisdomLed {
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

#wisdomLed.pulse-led {
  transform: scale(1.6);
  box-shadow: 0 0 16px var(--accent-gold);
}

/* ==========================================================================
   Hero Section with Multi-Mode Interactive Soundfield
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(2rem, 3.5vw, 2.75rem) 0 clamp(1.5rem, 2.5vw, 2rem);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 245, 230, 0.06);
  background:
    radial-gradient(ellipse 70% 50% at 75% 40%, rgba(245, 190, 117, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 25% 60%, rgba(217, 92, 38, 0.05) 0%, transparent 60%),
    var(--bg-primary);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 700px;
  pointer-events: none;
}

.hero-content a,
.hero-content button,
.hero-content input,
.hero-content label {
  pointer-events: auto;
}

/* Editorial Eyebrow (Replaces Clunky Tag Box) */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-amber);
  margin-bottom: 0.75rem;
}

.eyebrow-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-amber);
  box-shadow: 0 0 10px var(--accent-amber);
  display: inline-block;
  animation: pulse-led 3s infinite alternate ease-in-out;
  flex-shrink: 0;
}

.eyebrow-text {
  font-weight: 500;
  opacity: 0.95;
}

/* Legacy .hero-tag fallback */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 0.75rem;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.hero-title {
  font-size: var(--fluid-h1);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 0.65rem;
  letter-spacing: -0.035em;
  background: linear-gradient(140deg, #ffffff 30%, #ede8e1 70%, #a89f91 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 1.15rem;
  font-weight: 400;
}

/* Fluid Hero CTA Group */
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.15rem;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, rgba(54, 42, 30, 0.95) 0%, rgba(32, 25, 18, 0.95) 100%);
  border: 1px solid rgba(245, 190, 117, 0.45);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 190, 117, 0.12), inset 0 1px 0 rgba(255, 245, 230, 0.15);
  text-decoration: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(68, 52, 36, 0.98) 0%, rgba(42, 32, 22, 0.98) 100%);
  border-color: var(--accent-amber);
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 26px rgba(245, 190, 117, 0.25);
}

.btn-hero-primary .btn-arrow {
  transition: transform 0.25s ease;
  color: var(--accent-amber);
  font-size: 1.1rem;
  line-height: 1;
}

.btn-hero-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.hero-bio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.22s ease;
  font-family: var(--font-sans);
}

.hero-bio-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.hero-bio-link .bio-arrow {
  color: var(--accent-amber);
  transition: transform 0.22s ease;
}

.hero-bio-link:hover .bio-arrow {
  transform: translate(2px, -2px);
}

/* Legacy .hero-actions fallback */
.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Quiet Floating Ambient Soundfield Dock */
.hero-ambient-dock {
  position: absolute;
  bottom: 0.85rem;
  right: clamp(1rem, 2.5vw, 2rem);
  z-index: 15;
}

.ambient-pill-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(18, 14, 11, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.22rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 245, 230, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.ambient-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding-left: 0.35rem;
  padding-right: 0.15rem;
}

/* Canvas Mode Switcher Bar in Hero (kept for backwards compatibility) */
.canvas-mode-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(18, 14, 11, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.22rem 0.45rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 245, 230, 0.08);
  margin-top: 1.5rem;
}

.canvas-mode-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-right: 0.25rem;
  padding-left: 0.25rem;
}

.mode-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.mode-pill.active {
  color: var(--accent-amber);
  background: rgba(245, 190, 117, 0.14);
  border-color: rgba(245, 190, 117, 0.35);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(245, 190, 117, 0.18);
}

/* Canvas Rack in Hero - Atmospheric Soundfield with Vignette Mask */
.synth-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.82;
  z-index: 1;
  mask-image: radial-gradient(circle at 65% 45%, black 35%, rgba(0,0,0,0.5) 65%, transparent 95%);
  -webkit-mask-image: radial-gradient(circle at 65% 45%, black 35%, rgba(0,0,0,0.5) 65%, transparent 95%);
}

#synthCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 768px) {
  .hero-ambient-dock {
    position: static;
    margin-top: 2rem;
  }
}

/* ==========================================================================
   Interactive Buttons & Controls
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.45rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn-primary {
  background: rgba(38, 30, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fef3c7;
  border: 1px solid rgba(245, 158, 11, 0.38);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 235, 200, 0.08);
  font-weight: 500;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: rgba(54, 42, 30, 0.95);
  border-color: rgba(245, 158, 11, 0.75);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.18), inset 0 1px 0 rgba(255, 235, 200, 0.15);
}

.btn-secondary {
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border-medium);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-amber);
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 4px 15px rgba(245, 190, 117, 0.25);
}

.btn-amber {
  background: rgba(45, 35, 25, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 190, 117, 0.35);
  color: #fef3c7;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-amber:hover {
  background: rgba(62, 48, 34, 0.95);
  border-color: rgba(245, 190, 117, 0.7);
  box-shadow: 0 4px 16px rgba(245, 190, 117, 0.18);
  transform: translateY(-2px);
  color: #ffffff;
}

/* ==========================================================================
   Dynamic Cursor Spotlight Cards (Hardware Modules)
   ========================================================================== */
.project-card,
.activity-card,
.spotlight-article-card,
.bio-feature-card,
.music-album-card,
.bc-card {
  position: relative;
  background: rgba(22, 18, 14, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(245, 190, 117, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 245, 230, 0.05);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              background 0.3s ease;
  overflow: hidden;
  cursor: pointer;
}

.spotlight-article-card {
  background: rgba(26, 21, 16, 0.68) !important;
  border: 1px solid rgba(245, 190, 117, 0.18) !important;
  border-radius: var(--radius-xl) !important;
  padding: 1.75rem 2rem !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 245, 230, 0.06) !important;
  cursor: pointer;
}

/* Dynamic radial hover glow using CSS variables updated by JS */
.project-card::after,
.activity-card::after,
.spotlight-article-card::after,
.bc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(245, 190, 117, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.project-card:hover::after,
.activity-card:hover::after,
.spotlight-article-card:hover::after,
.bc-card:hover::after {
  opacity: 1;
}

.project-card:hover,
.activity-card:hover,
.spotlight-article-card:hover,
.music-album-card:hover,
.bc-card:hover {
  transform: translateY(-4px);
  background: rgba(30, 24, 18, 0.82);
  border-color: rgba(245, 190, 117, 0.38) !important;
  box-shadow: 0 22px 50px -10px rgba(0, 0, 0, 0.8), 0 0 24px rgba(245, 190, 117, 0.14);
}

/* Accent lines on hardware cards */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.3s ease;
  z-index: 2;
}

.project-card[data-category="Audio Software & Tools"]:hover::before {
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}
.project-card[data-category="Creative Code & Visual Art"]:hover::before {
  background: linear-gradient(90deg, transparent, var(--accent-amber), transparent);
}
.project-card[data-category="Albums & Soundtracks"]:hover::before {
  background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  padding: 2.25rem 2.25rem 2rem 2.25rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
  position: relative;
  z-index: 2;
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-cyan);
  font-weight: 600;
}

.project-card[data-category="Creative Code & Visual Art"] .project-category {
  color: var(--accent-amber);
}
.project-card[data-category="Albums & Soundtracks"] .project-category {
  color: var(--accent-purple);
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #fff;
  line-height: 1.3;
  position: relative;
  z-index: 2;
}

.project-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1.4rem;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255, 245, 230, 0.035);
  border: 1px solid rgba(255, 245, 230, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}

.tag-pill:hover {
  color: #fff;
  background: rgba(255, 245, 230, 0.08);
  border-color: rgba(245, 190, 117, 0.28);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.project-footer {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.35rem;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.btn-card-launch {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Patch Bay Fast Filter Controls
   ========================================================================== */
.patch-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.patch-jack-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.jack-socket-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent-amber);
  background: #0a0d14;
  box-shadow: inset 0 1px 2px #000, 0 0 6px var(--accent-amber-glow);
  display: inline-block;
  position: relative;
}

.jack-socket-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: #000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: var(--border-bright);
}

.filter-btn.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--accent-amber);
  color: #fef3c7;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.18), inset 0 1px 0 rgba(255, 235, 190, 0.15);
}

/* ==========================================================================
   Activity Stream (Videos, Code, Jams)
   ========================================================================== */
.activity-stream {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.activity-card {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.activity-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-bright);
}

.activity-thumb {
  width: 100%;
  height: 195px;
  object-fit: cover;
  background: #000;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.activity-card:hover .activity-thumb {
  transform: scale(1.05);
}

.activity-body {
  padding: 2rem 2.25rem 2.25rem 2.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

.activity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
}

.badge-youtube { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-bandcamp { background: rgba(224, 122, 56, 0.15); color: #ea580c; border: 1px solid rgba(224, 122, 56, 0.35); }
.badge-github { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

.activity-title {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.activity-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* ==========================================================================
   Articles & Archive View (262+ Posts) - Fluid Editorial Stream
   ========================================================================== */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-row {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-top: none;
  border-left: none;
  border-right: none;
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.25rem;
  display: flex;
  gap: 2.25rem;
  align-items: flex-start;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-decoration: none;
}

.article-row:hover {
  background: rgba(255, 255, 255, 0.025);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  transform: translateX(6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.article-thumb-wrap {
  width: 155px;
  height: 102px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: #0d131d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.article-row:hover .article-thumb-img,
.spotlight-article-card:hover img {
  transform: scale(1.06);
}

.article-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #16202e 0%, #0d141e 100%);
  color: var(--accent-cyan);
  padding: 0.5rem;
  text-align: center;
}

.article-thumb-fallback svg {
  width: 32px;
  height: 32px;
  opacity: 0.85;
  filter: drop-shadow(0 0 6px var(--accent-cyan-glow));
}

.article-thumb-code {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.article-date-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-amber);
  min-width: 105px;
  flex-shrink: 0;
  padding-top: 0.35rem;
  letter-spacing: 0.04em;
}

.article-main {
  flex-grow: 1;
  min-width: 0;
  padding-right: 1rem;
}

.article-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.article-row:hover .article-title {
  color: var(--accent-amber);
}

.article-excerpt {
  font-size: 0.98rem;
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 0.95rem;
  max-width: 860px;
  word-break: normal;
}

.article-tags-inline {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.article-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 1.15rem;
  flex-shrink: 0;
  align-self: center;
  transition: all 0.25s ease;
}

.article-row:hover .article-arrow {
  background: rgba(245, 190, 117, 0.15);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  transform: translateX(4px);
  box-shadow: 0 0 12px var(--accent-amber-glow);
}

/* ==========================================================================
   Tactile Accents (Screws Disabled for Fluid Clean Design)
   ========================================================================== */
.card-screw {
  display: none !important;
}

.patch-jack {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #854d0e, #1c1917);
  border: 2px solid var(--accent-cedar);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8), 0 0 6px rgba(245, 158, 11, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.patch-jack::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #080b0f;
  border: 1px solid #555;
}

/* ==========================================================================
   Single Article Reader Mode (Magazine Typography)
   ========================================================================== */
.article-reader {
  max-width: 780px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.article-reader header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2rem;
}

.article-reader h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-content {
  font-size: 1.15rem;
  line-height: 1.85;
  color: #e2e8f0;
}

.article-content p {
  margin-bottom: 1.75rem;
}

.article-content h2, .article-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-panel);
}

.article-content blockquote {
  border-left: 3px solid var(--accent-amber);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* ==========================================================================
   Interactive Lab Preview Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
}

.modal-overlay.active {
  display: flex;
}

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  width: 95vw;
  max-width: 1280px;
  height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), 0 0 30px rgba(56, 189, 248, 0.15);
}

.modal-header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-controls {
  display: flex;
  gap: 0.65rem;
}

.modal-iframe-wrap {
  flex-grow: 1;
  position: relative;
  background: #000;
}

.modal-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   The Audiophile Floating Console & Audio Rack Dock
   ========================================================================== */
.audio-rack-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1180px;
  z-index: 1000;
  background: rgba(14, 20, 30, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 0.65rem 1.25rem;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.audio-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  padding: 0;
}

.player-track-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 220px;
}

.player-art-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-amber);
  box-shadow: 0 0 10px var(--accent-amber-glow);
  flex-shrink: 0;
  background: #090d14;
  animation: spinVinyl 12s linear infinite;
  animation-play-state: paused;
}

.player-art-thumb.playing {
  animation-play-state: running;
}

@keyframes spinVinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.player-jack-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.player-jack-light.playing {
  background: var(--accent-terracotta);
  box-shadow: 0 0 12px var(--accent-terracotta), 0 0 4px #ffedd5;
  animation: rackJackPulse 1.4s infinite alternate ease-in-out;
}

@keyframes rackJackPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 1; }
}

.player-track-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.player-track-album {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.player-controls-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.player-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.player-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.player-btn-play {
  background: linear-gradient(135deg, var(--accent-amber), #d97706);
  color: #000;
  font-size: 1rem;
  box-shadow: 0 2px 12px var(--accent-amber-glow);
}

.player-btn-play:hover {
  background: #fcd34d;
  color: #000;
  box-shadow: 0 0 18px var(--accent-amber-glow);
  transform: scale(1.06);
}

.player-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-grow: 1;
  max-width: 440px;
}

.player-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 38px;
}

.player-scrubber {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.player-scrubber:hover {
  height: 8px;
}

.player-scrubber-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-terracotta));
  border-radius: var(--radius-full);
}

/* Oscilloscope Canvas in Bottom Player */
.player-scope-canvas {
  width: 96px;
  height: 32px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Volume Control & Drawer Button */
.player-extra-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-vol-slider {
  width: 70px;
  height: 5px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

.player-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-amber);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-amber);
}

/* Slide-Up Playlist Drawer */
.player-drawer {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  width: calc(100% - 32px);
  max-width: 900px;
  max-height: 480px;
  background: rgba(24, 20, 16, 0.97);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(245, 190, 117, 0.15);
  z-index: 990;
  display: none;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-drawer.open {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.player-drawer-header {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-drawer-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}

.player-drawer-list {
  padding: 1rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.player-drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-drawer-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-bright);
  transform: translateX(4px);
}

.player-drawer-item.active {
  background: rgba(245, 190, 117, 0.15);
  border-color: var(--accent-amber);
}

/* ==========================================================================
   Mobile Synthesizer Dock (< 768px) & Fluid Overhaul
   ========================================================================== */
.mobile-nav-dock {
  display: none;
}

@media (max-width: 900px) {
  .player-scope-canvas { display: none; }
  .player-vol-slider { display: none; }
  .synth-canvas-container { width: 75%; opacity: 0.65; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  body { padding-bottom: 130px; }

  .mobile-nav-dock {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(11, 15, 22, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-medium);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.25rem;
  }

  .mobile-dock-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    position: relative;
    transition: all 0.2s ease;
    padding-top: 4px;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-dock-btn:hover,
  .mobile-dock-btn.active {
    color: #fff;
  }

  .mobile-dock-icon {
    font-size: 1.15rem;
    line-height: 1;
  }

  .mobile-dock-btn.active .mobile-dock-icon {
    color: var(--accent-amber);
    filter: drop-shadow(0 0 6px var(--accent-amber));
  }

  .mobile-dock-led {
    position: absolute;
    top: 3px;
    width: 14px;
    height: 2px;
    border-radius: 1px;
    background: transparent;
    transition: all 0.2s ease;
  }

  .mobile-dock-btn.active .mobile-dock-led {
    background: var(--accent-amber);
    box-shadow: 0 0 6px var(--accent-amber);
  }

  /* Audio bar docks smoothly above mobile nav */
  .audio-rack-bar {
    bottom: 66px;
    width: calc(100% - 20px);
    padding: 0.45rem 0.85rem;
  }

  .player-progress-wrap { display: none; }
  .player-track-album { display: none; }
  .player-track-title { max-width: 120px; font-size: 0.8rem; }
  .player-extra-controls { display: none; }

  /* Touch scrolling filter pills */
  .patch-filter-bar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .patch-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .article-row {
    flex-direction: column;
    padding: 1.75rem 0.5rem;
    gap: 1.25rem;
  }

  .article-thumb-wrap {
    width: 100%;
    height: 180px;
  }

  .article-date-badge { display: none; }
  .article-date-mobile {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-amber);
    margin-bottom: 0.35rem;
  }

  .article-main {
    padding-right: 0;
  }

  .article-arrow {
    display: none;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (min-width: 769px) {
  .article-date-mobile { display: none; }
}

/* Generous bottom clearance ensuring the floating audiophile dock never collides with content */
footer.section {
  border-top: 1px solid rgba(255, 245, 230, 0.06);
  padding: 3.5rem 0 8rem 0 !important;
  margin-top: 5rem;
}
