/* Endless night sky: dark gradient, tiny faint stars in three parallax layers, and an atmosphere (black / graphite / #FE8D31 glow)
   that changes gradually from section to section. Driven by the scroll position (CSS scroll-driven animations where supported,
   a light scroll listener elsewhere); on desktop the sky also leans with the mouse and the stars near the pointer come alive.
   No clouds, mist, moon, planets or galaxies. Replaces the old background orbs and grain. */
.bg-fx { background: #040404 !important; }
.bg-fx .orb, .bg-fx .bg-grain { display: none !important; }

.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sky > i, .sky > canvas, .sky-pl { position: absolute; left: 0; top: 0; width: 100%; display: block; }
.sky-pl { height: 100%; }
.sky-pl > canvas { position: absolute; left: 0; top: 0; width: 100%; display: block; }
.sky-live { z-index: 2; }
.sky-base { height: 100%; background: linear-gradient(180deg, #030303 0%, #0a0807 42%, #15100c 100%); }
.sky-glow { top: -10vh; height: 120vh; opacity: 0; transform: translate3d(0, 0, 0); }   /* taller than the screen: the glow moves with the scroll and never shows an edge */
.sky-glow.ga { background: radial-gradient(120% 75% at 50% 118%, rgba(254, 141, 49, 0.34) 0%, rgba(254, 141, 49, 0.10) 38%, rgba(254, 141, 49, 0) 66%); }
.sky-glow.gb {
  background:
    radial-gradient(95% 65% at 100% 0%, rgba(254, 141, 49, 0.26) 0%, rgba(254, 141, 49, 0.07) 40%, rgba(254, 141, 49, 0) 68%),
    radial-gradient(70% 50% at 0% 100%, rgba(62, 52, 46, 0.45) 0%, rgba(62, 52, 46, 0) 70%);
}
.sky-glow.gc {
  background:
    radial-gradient(100% 70% at 0% 105%, rgba(254, 141, 49, 0.30) 0%, rgba(254, 141, 49, 0.08) 42%, rgba(254, 141, 49, 0) 68%),
    radial-gradient(80% 50% at 100% 20%, rgba(56, 48, 42, 0.40) 0%, rgba(56, 48, 42, 0) 70%);
}
.sky-st { transform: translate3d(0, 0, 0); }
.sky-st.s1 { --d: 160px; animation: sky-tw 9s ease-in-out infinite alternate; }
.sky-st.s2 { --d: 420px; animation: sky-tw 7s ease-in-out -3s infinite alternate; }
.sky-st.s3 { --d: 900px; animation: sky-tw 5.5s ease-in-out -1.5s infinite alternate; }

@keyframes sky-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, calc(var(--d) * -1), 0); } }
@keyframes sky-tw { from { opacity: 0.62; } to { opacity: 1; } }
@keyframes sky-mv-a { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -7vh, 0); } }
@keyframes sky-mv-b { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 6vh, 0); } }
@keyframes sky-mv-c { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -5vh, 0); } }

/* scroll-driven (compositor) where the browser supports it; sky.js builds the sky-ga / sky-gb / sky-gc keyframes from the real section positions */
@supports (animation-timeline: scroll()) {
  html.sky-sd .sky-glow.ga { animation: sky-ga linear both, sky-mv-a linear both; animation-timeline: scroll(root block), scroll(root block); }
  html.sky-sd .sky-glow.gb { animation: sky-gb linear both, sky-mv-b linear both; animation-timeline: scroll(root block), scroll(root block); }
  html.sky-sd .sky-glow.gc { animation: sky-gc linear both, sky-mv-c linear both; animation-timeline: scroll(root block), scroll(root block); }
  html.sky-sd .sky-st.s1 { animation: sky-drift linear both, sky-tw 9s ease-in-out infinite alternate; animation-timeline: scroll(root block), auto; }
  html.sky-sd .sky-st.s2 { animation: sky-drift linear both, sky-tw 7s ease-in-out -3s infinite alternate; animation-timeline: scroll(root block), auto; }
  html.sky-sd .sky-st.s3 { animation: sky-drift linear both, sky-tw 5.5s ease-in-out -1.5s infinite alternate; animation-timeline: scroll(root block), auto; }
}

@media (prefers-reduced-motion: reduce) {
  .sky-st { animation: none !important; transform: none !important; opacity: 1; }
  .sky-glow { animation: none !important; }
  .sky-live { display: none; }
}

/* the home screen: no blurred portrait behind the text any more - the same endless night sky as the rest of the page */
.home-bgphoto, .home-ghost { display: none !important; }
