:root {
  --bg: #03050b;
  --fg: #e9edf5;
  --muted: rgba(150, 180, 235, 0.6);
  --c1: #0e2a66; /* deep ultramarine */
  --c2: #073a55; /* petrol */
  --c3: #2a1c38; /* dusk, a trace of warmth */
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Background layers ---------- */

.aurora {
  position: fixed;
  inset: -20%;
  filter: blur(100px);
  opacity: 0.6;
  z-index: 0;
}

.blob {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}

.b1 {
  background: radial-gradient(circle, var(--c1) 0%, transparent 65%);
  top: 5%; left: 10%;
  animation: drift1 38s ease-in-out infinite alternate;
}
.b2 {
  background: radial-gradient(circle, var(--c2) 0%, transparent 65%);
  top: 30%; left: 45%;
  animation: drift2 46s ease-in-out infinite alternate;
}
.b3 {
  background: radial-gradient(circle, var(--c3) 0%, transparent 65%);
  top: 50%; left: 5%;
  animation: drift3 54s ease-in-out infinite alternate;
}

@keyframes drift1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(12vw, 8vh) scale(1.15); }
  100% { transform: translate(-6vw, 14vh) scale(0.95); }
}
@keyframes drift2 {
  0%   { transform: translate(0, 0) scale(1.05); }
  50%  { transform: translate(-14vw, -6vh) scale(0.9); }
  100% { transform: translate(-4vw, 10vh) scale(1.1); }
}
@keyframes drift3 {
  0%   { transform: translate(0, 0) scale(0.95); }
  50%  { transform: translate(16vw, -12vh) scale(1.1); }
  100% { transform: translate(8vw, 4vh) scale(1); }
}

#motes {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.8) 100%);
}

/* ---------- Content ---------- */

.hero {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.title {
  font-size: calc(clamp(2.6rem, 9vw, 7.5rem) * var(--title-scale, 1));
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  animation: breathe 9s ease-in-out infinite;
}

.title > span { display: inline-block; }

/* Each part of the name in its own voice: pixel // hairline // classical */
.title .p1 {
  font-family: "Silkscreen", monospace;
  font-size: 0.95em;
  letter-spacing: -0.06em;
}

.title .sep {
  font-family: "Red Hat Display", sans-serif;
  font-weight: 300;
  margin: 0 var(--sep-gap, 0.06em);
  letter-spacing: -0.04em;
  color: var(--muted);
  transform: translateY(-0.01em);
}

.title .p2 {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: -0.01em;
}

/* ---------- Sound toggle ---------- */

.sound {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(150, 180, 235, 0.35);
  border-radius: 50%;
  background: rgba(10, 18, 40, 0.45);
  backdrop-filter: blur(6px);
  color: var(--fg);
  opacity: 0.75;
  cursor: pointer;
  transition: opacity 0.3s, border-color 0.3s, background 0.3s;
}
.sound svg { width: 20px; height: 20px; }
.sound:hover, .sound:focus-visible {
  opacity: 1;
  border-color: rgba(150, 180, 235, 0.7);
  background: rgba(20, 35, 75, 0.6);
  outline: none;
}
.sound .wave { display: none; }
.sound.on .wave { display: inline; }
.sound.on .cross { display: none; }

@keyframes breathe {
  0%, 100% { text-shadow: 0 0 24px rgba(110, 150, 255, 0.14); }
  50%      { text-shadow: 0 0 48px rgba(110, 150, 255, 0.32); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .blob, .grain { animation: none !important; }
  .title { animation: none !important; }
}
