/* ΝΕΟΣΝΟΥΣ — the turning cosmos */

:root {
  --nyx: #0e0b17;
  --nyx-glow: #1b1531;
  --bone: #e6ded0;
  --gilt: #c7a35c;
  --haze: #7c6ba8;
}

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

html, body { height: 100%; }

body {
  overflow: hidden;
  background-color: var(--nyx);
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(230,222,208,0.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%,  rgba(230,222,208,0.40) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 89% 34%, rgba(199,163,92,0.45) 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 64%, rgba(230,222,208,0.30) 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 77%, rgba(124,107,168,0.55) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 82%,  rgba(230,222,208,0.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 8%,  rgba(230,222,208,0.45) 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 68%, rgba(230,222,208,0.30) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 41%, rgba(124,107,168,0.40) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 57% 29%, rgba(230,222,208,0.28) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 51%, rgba(230,222,208,0.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 15% 94%, rgba(199,163,92,0.35) 50%, transparent 51%),
    radial-gradient(ellipse 120% 80% at 50% 30%, var(--nyx-glow), var(--nyx) 70%);
}

::selection { background: var(--gilt); color: var(--nyx); }

/* ---- the cosmos, turning ---- */

.cosmos {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 0;
}

.cosmos img {
  width: 124vmin;
  max-width: none;
  opacity: 0.55;
  /* gild the white engraving lines */
  filter: brightness(0.72) sepia(0.9) saturate(1.8) hue-rotate(-8deg);
  /* engraving's true center within the PNG, so the turn doesn't wobble */
  transform-origin: 50.17% 51.39%;
  animation: turn 360s linear infinite;
}

/* ---- the name ---- */

main {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0 1rem;
  /* quiet the engraving behind the name */
  background: radial-gradient(ellipse 42% 16% at 50% 50%,
              rgba(14,11,23,0.82), rgba(14,11,23,0.45) 60%, transparent 100%);
}

h1 {
  font-family: "JetBrains Mono", monospace;
  font-weight: 300;
  font-size: clamp(1.8rem, 6.5vw, 4rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em; /* recentre letterspaced caps */
  color: var(--bone);
  text-shadow: 0 0 24px rgba(14,11,23,0.9);
  animation: arrive 3s ease-out both;
}

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

@keyframes turn { to { transform: rotate(360deg); } }

@keyframes arrive {
  from { opacity: 0; letter-spacing: 0.5em; }
  to   { opacity: 1; letter-spacing: 0.34em; }
}

@media (prefers-reduced-motion: reduce) {
  .cosmos img { animation: none; }
  h1 { animation: none; }
}
