/* ===== Tokens ===== */
:root {
  --bg-core: #050208;
  --bg-mid: #0a0514;
  --bg-outer: #12091f;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.5);
  --faint: rgba(255, 255, 255, 0.12);
  --violet: #b478ff;
  --magenta: #ff3cb4;
  --cyan: #28dcf0;
  --accent-type: #e8d4ff;
  --card: rgba(20, 10, 40, 0.55);
  --maxw: 720px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-core);
  color: var(--fg);
  font-family: 'Cormorant Garamond', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top, var(--bg-outer) 0%, var(--bg-mid) 38%, var(--bg-core) 72%, #000 100%);
  background-attachment: fixed;
}

/* ===== Starfield (fixed, parallax-ish) ===== */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.8), transparent 40%),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.5), transparent 40%),
    radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.9), transparent 40%),
    radial-gradient(2px 2px at 90px 40px, rgba(255,255,255,0.7), transparent 40%),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.4), transparent 40%),
    radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.8), transparent 40%),
    radial-gradient(1px 1px at 180px 200px, rgba(255,255,255,0.6), transparent 40%),
    radial-gradient(1px 1px at 210px 60px, rgba(255,255,255,0.9), transparent 40%),
    radial-gradient(1px 1px at 240px 140px, rgba(255,255,255,0.5), transparent 40%),
    radial-gradient(1.5px 1.5px at 60px 220px, rgba(255,255,255,0.8), transparent 40%),
    radial-gradient(1px 1px at 100px 280px, rgba(255,255,255,0.6), transparent 40%),
    radial-gradient(1px 1px at 170px 320px, rgba(255,255,255,0.4), transparent 40%),
    radial-gradient(2px 2px at 200px 380px, rgba(255,255,255,0.9), transparent 40%),
    radial-gradient(1px 1px at 30px 400px, rgba(255,255,255,0.5), transparent 40%),
    radial-gradient(1px 1px at 220px 450px, rgba(255,255,255,0.7), transparent 40%);
  background-repeat: repeat;
  background-size: 260px 500px, 360px 600px, 500px 800px;
}

/* ===== Nebula glows (fixed) ===== */
.nebula { position: fixed; pointer-events: none; z-index: 1; filter: blur(30px); }

.nebula-core {
  top: 28%; left: 50%;
  width: 900px; height: 700px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 60% 40% at 50% 50%,
    rgba(180, 120, 255, 0.40) 0%, rgba(255, 80, 180, 0.18) 40%, transparent 70%);
  filter: blur(20px);
  animation: breathe 8s ease-in-out infinite;
}
.nebula-cyan {
  top: -10%; right: -15%;
  width: 700px; height: 600px;
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
    rgba(40, 220, 240, 0.20) 0%, rgba(80, 180, 255, 0.1) 45%, transparent 75%);
  animation: drift-a 22s ease-in-out infinite;
}
.nebula-magenta {
  bottom: -20%; left: -15%;
  width: 800px; height: 700px;
  background: radial-gradient(ellipse 55% 50% at 50% 50%,
    rgba(255, 60, 180, 0.22) 0%, rgba(200, 40, 140, 0.12) 45%, transparent 75%);
  animation: drift-b 28s ease-in-out infinite;
}
.nebula-gold {
  top: 8%; left: -8%;
  width: 480px; height: 420px;
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
    rgba(255, 190, 110, 0.16) 0%, rgba(255, 130, 90, 0.08) 45%, transparent 75%);
  animation: drift-c 34s ease-in-out infinite;
}

@keyframes breathe { 0%,100% { transform: translate(-50%,-50%) scale(0.95); opacity: 0.85; } 50% { transform: translate(-50%,-50%) scale(1.05); opacity: 1; } }
@keyframes drift-a { 0%,100% { transform: translate(0,0) scale(1); opacity: 0.9; } 50% { transform: translate(-40px,30px) scale(1.08); opacity: 1; } }
@keyframes drift-b { 0%,100% { transform: translate(0,0) scale(1); opacity: 0.85; } 50% { transform: translate(50px,-40px) scale(1.1); opacity: 1; } }
@keyframes drift-c { 0%,100% { transform: translate(0,0) scale(0.95); opacity: 0.7; } 50% { transform: translate(30px,40px) scale(1.05); opacity: 0.95; } }

/* ===== Page shell ===== */
.page {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px 64px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 78vh;
  min-height: 78svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Equalizer the wordmark sits on (bars injected by script.js) */
.waveform {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, 94vw);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}
.wf-bar {
  flex: 1 1 0;
  min-width: 2px;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(to top, var(--cyan), var(--violet) 50%, var(--magenta));
  transform: scaleY(calc(var(--peak, 1) * 0.12));
  transform-origin: center;
  animation: wf-pulse var(--dur, 1s) ease-in-out var(--delay, 0s) infinite alternate;
  box-shadow: 0 0 6px rgba(180, 120, 255, 0.35);
}
@keyframes wf-pulse {
  from { transform: scaleY(calc(var(--peak, 1) * 0.10)); opacity: 0.55; }
  to   { transform: scaleY(calc(var(--peak, 1) * 1.00)); opacity: 1; }
}

.wordmark {
  position: relative;
  z-index: 2;
  margin: 0;
  font-weight: 300;
  font-size: clamp(46px, 8vw, 76px);
  letter-spacing: 0.04em;
  line-height: 1;
}
.wordmark em { font-style: italic; font-weight: 400; color: var(--accent-type); }

.tagline {
  position: relative;
  z-index: 2;
  margin: 14px 0 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-cue {
  position: relative;
  z-index: 2;
  margin-top: 38px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--muted);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: color 0.2s ease;
  animation: bob 2.4s ease-in-out infinite;
}
.scroll-cue:hover { color: var(--fg); }
.scroll-cue svg { width: 20px; height: 20px; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ===== Sections ===== */
section { margin: 0 0 56px; }
.section-title {
  margin: 0;
  font-weight: 300;
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: 0.02em;
}
.section-sub {
  margin: 4px 0 22px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
}

/* ===== Player ===== */
.player-frame {
  max-width: 560px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--faint);
  box-shadow: 0 0 40px rgba(180, 120, 255, 0.18);
  background: rgba(10, 5, 20, 0.6);
}
.player { display: block; width: 100%; border: 0; }

/* ===== Discography ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.cover {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid var(--faint);
  background: var(--card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cover img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.cover:hover, .cover:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(180, 120, 255, 0.30);
  outline: none;
}
.cover:focus-visible { border-color: var(--fg); }
.cover-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 12px 10px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  letter-spacing: 0.3px;
  line-height: 1.25;
  background: linear-gradient(to top, rgba(5, 2, 8, 0.92), rgba(5, 2, 8, 0));
}
.badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #050208;
  background: var(--accent-type);
}
.is-latest { border-color: rgba(180, 120, 255, 0.5); }

/* ===== Platform row ===== */
.platform-row { display: flex; flex-wrap: wrap; gap: 10px; }
.platform {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--faint);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.platform .ico { width: 20px; height: 20px; flex: 0 0 20px; }
.platform:hover, .platform:focus-visible { transform: translateY(-2px); border-color: rgba(255,255,255,0.35); outline: none; }
.p-spotify:hover    { box-shadow: 0 0 18px rgba(29, 185, 84, 0.45); }
.p-apple:hover      { box-shadow: 0 0 18px rgba(255, 80, 120, 0.45); }
.p-soundcloud:hover { box-shadow: 0 0 18px rgba(255, 112, 0, 0.45); }
.p-youtube:hover    { box-shadow: 0 0 18px rgba(255, 0, 0, 0.40); }
.p-deezer:hover     { box-shadow: 0 0 18px rgba(162, 56, 255, 0.45); }
.p-spotify    .ico { color: #1db954; }
.p-apple      .ico { color: #fb5068; }
.p-soundcloud .ico { color: #ff7000; }
.p-youtube    .ico { color: #ff3b3b; }
.p-deezer     .ico { color: #a238ff; }

/* ===== Shooting star ===== */
.shooting-star {
  position: fixed;
  top: var(--start-y, -10%);
  left: var(--start-x, -10%);
  width: 2px; height: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px #fff, 0 0 20px rgba(255,255,255,0.6);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
}
.shooting-star.flash { animation: shoot 1.6s ease-out forwards; }
@keyframes shoot {
  0% { opacity: 0; transform: translate(0,0); }
  10% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 600px), var(--dy, 400px)); }
}

/* ===== Footer ===== */
.site-footer { text-align: center; padding-top: 8px; }
.email {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.email:hover { color: var(--fg); }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .page { padding: 0 18px 56px; }
  .hero { min-height: 72vh; min-height: 72svh; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
  .platform-row { flex-direction: column; }
  .platform { width: 100%; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nebula, .wf-bar, .shooting-star, .scroll-cue { animation: none !important; }
  .wf-bar { transform: scaleY(calc(var(--peak, 1) * 0.5)); }
}
