/* Scenery is atmosphere, not a competing layer behind the writing. */
.has-atmosphere { background: #f7f9fb !important; }
:root[data-theme='dark'] .has-atmosphere { background: #101a35 !important; }
.atmosphere { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; }
.atmosphere__day, .atmosphere__night { position: absolute; inset: 0; background: center / cover no-repeat; transition: opacity 220ms ease; }
.atmosphere__day { background-image: url('assets/atmosphere/day-sky.png'); opacity: .13; }
.atmosphere__night { background-image: url('assets/atmosphere/night-nebula.png'); background-position: center; opacity: 0; }
:root[data-theme='dark'] .atmosphere__day { opacity: 0; }
:root[data-theme='dark'] .atmosphere__night { opacity: .07; }
.atmosphere__sparkles { position: absolute; inset: 0; opacity: 0; }
:root[data-theme='dark'] .atmosphere__sparkles { opacity: .2; }
.atmosphere__star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #d9edff; box-shadow: 0 0 7px #a8bdff; animation: star-glimmer 7s ease-in-out infinite; }
@keyframes star-glimmer { 0%,100% { opacity: .2; } 50% { opacity: .8; } }
.atmosphere-inactive .atmosphere *, :root:not([data-theme='dark']) .atmosphere * { animation-play-state: paused; }
.has-atmosphere .site-rail { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.has-atmosphere :is(.work-entry, .case-hero, .case-section)::before { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@media (max-width: 979px) {
  .atmosphere__day, .atmosphere__night { background-position: 65% center; }
  .atmosphere__day { opacity: .06; }
  :root[data-theme='dark'] .atmosphere__night { opacity: 0; }
  .atmosphere__sparkles { display: none; }
}
@media (prefers-reduced-motion: reduce) { .atmosphere * { animation: none !important; transition: none !important; } }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body.has-rail { --atmosphere-glass: var(--paper); --atmosphere-edge: var(--rule); }
  .has-atmosphere .site-rail, .has-atmosphere :is(.work-entry, .case-hero, .case-section)::before { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media print { .atmosphere { display: none; } }
