:root {
  --bg: #0b0b12;
  --fg: #f4f2ff;
  --muted: #8d8aa8;
  --c1: #ff3d81;
  --c2: #ffb03b;
  --c3: #3dd9ff;
  --c4: #9b5cff;
  --mx: 50vw;
  --my: 40vh;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 18px/1.5 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

/* Soft spotlight that trails the cursor */
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--mx) var(--my), rgb(155 92 255 / 0.18), transparent 60%);
}

main, footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.hello {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  animation: rise 0.8s 0.1s both;
}

.name {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(3rem, 13vw, 8.5rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.word { display: inline-block; white-space: nowrap; margin-right: 0.22em; }

.char {
  display: inline-block;
  background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4), var(--c1));
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Gradient only paints inside the box; pad it so glyph edges (like the final "s") aren't clipped,
     and cancel with negative margin so spacing is unchanged */
  padding: 0.06em 0.1em;
  margin: -0.06em -0.1em;
  animation:
    drop 0.9s cubic-bezier(0.2, 1.6, 0.4, 1) both,
    shimmer 8s linear infinite;
  animation-delay: calc(var(--i) * 45ms + 200ms), calc(var(--i) * -0.25s);
  transition: transform 0.25s cubic-bezier(0.2, 1.8, 0.4, 1);
  cursor: default;
  user-select: none;
}

.char.landed { animation: shimmer 8s linear infinite; animation-delay: calc(var(--i) * -0.25s); }
.char.boing { animation: boing 0.6s cubic-bezier(0.2, 1.8, 0.4, 1), shimmer 8s linear infinite; }

.tagline {
  margin: 0;
  font-size: clamp(1.25rem, 4vw, 2rem);
  font-weight: 600;
  animation: rise 0.8s 0.9s both;
}

.verb {
  background: linear-gradient(90deg, var(--c3), var(--c4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.caret {
  display: inline-block;
  width: 0.08em;
  height: 1em;
  margin-left: 0.08em;
  vertical-align: -0.12em;
  background: var(--c3);
  animation: blink 1s steps(1) infinite;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
  animation: rise 0.8s 1.1s both;
}

.pill {
  position: relative;
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4)) border-box;
  border: 2px solid transparent;
  transition: transform 0.2s cubic-bezier(0.2, 1.8, 0.4, 1), box-shadow 0.2s;
}

.pill:hover, .pill:focus-visible {
  box-shadow: 0 0 24px rgb(255 61 129 / 0.45), 0 0 48px rgb(61 217 255 / 0.25);
  outline: none;
}

footer {
  padding-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  animation: rise 0.8s 1.3s both;
}

footer p { margin: 0; }

/* Party mode (Konami code) */
body.party .glow { animation: hue 1.2s linear infinite; }
body.party .name { animation: wobble 0.5s ease-in-out infinite alternate; }

@keyframes drop {
  from { transform: translateY(-1.2em) rotate(-20deg) scale(0.4); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes boing {
  0% { transform: none; }
  30% { transform: translateY(-0.25em) scale(1.25, 0.8) rotate(-8deg); }
  60% { transform: translateY(0.04em) scale(0.9, 1.12) rotate(4deg); }
  100% { transform: none; }
}

@keyframes shimmer { to { background-position: 400% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes hue { to { filter: hue-rotate(360deg); } }
@keyframes wobble { from { transform: rotate(-2deg) scale(1); } to { transform: rotate(2deg) scale(1.04); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .caret { display: none; }
}
