/* Shared page background for every page except the landing page (which has it in landing.css + its particles):
   the same night-blue gradient, frost dot grid, slow aurora glow and falling snow (canvas from background.js).
   Use: <link rel="stylesheet" href="assets/background.css" data-keep> + <script src="assets/background.js"></script>.
   data-keep: once loaded, it stays on for every page of the visit (nav.js), also the landing page, because it styles
   the background layers that stay while the content changes. Everything in here matches the landing page. */
body {
  background: radial-gradient(1200px 800px at 80% -10%, #0c1d33, transparent 65%),
              radial-gradient(900px 700px at -10% 40%, #081a2e, transparent 60%), #050c17;
}
/* frost dot grid, fades out towards the bottom */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(rgba(225, 245, 255, .07) 1.2px, transparent 1.6px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}
/* slow aurora glow */
.aurora { position: fixed; inset: -20% -10% auto; height: 80vh; z-index: -3; pointer-events: none; filter: blur(70px); opacity: .55; }
.aurora i { position: absolute; border-radius: 50%; }
.aurora i:nth-child(1) { width: 46vw; height: 30vh; left: 38%; top: 10%; background: rgba(70, 184, 255, .22); animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 34vw; height: 24vh; left: 62%; top: 28%; background: rgba(120, 255, 230, .10); animation: drift 34s ease-in-out infinite alternate-reverse; }
.aurora i:nth-child(3) { width: 30vw; height: 26vh; left: 8%; top: 40%; background: rgba(60, 110, 255, .12); animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-6vw, 4vh) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } }

/* falling snow: fades in once it runs smoothly, so it is never seen standing still */
#snowfall { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .9s ease; }
#snowfall.on { opacity: 1; }

/* the landing page's particles, when the visit came by it: they are then the snow on this page too (bytes.js) */
#bytes { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; transition: opacity .9s ease; }
#bytes.wait { opacity: 0; }
#snow { display: none; }   /* the landing page's old snow canvas (unused there too) */
