/* Ambient visual system: non-interactive and fixed behind the content. */
.ambient-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
  background: #0e0a08;
  contain: layout paint;
}
.ambient-scene > * { position: absolute; inset: 0; pointer-events: none; }
.ambient-network {
  display: block;
  width: 100%;
  height: 100%;
  opacity: .96;
}
.ambient-grid {
  z-index: 1;
  background-image:
    linear-gradient(to right, rgba(240, 143, 65, .065) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(240, 143, 65, .065) 1px, transparent 1px);
  background-size: 73px 73px;
  mask-image: radial-gradient(ellipse 78% 78% at 53% 48%, #000 3%, transparent 100%);
  opacity: .48;
  animation: ambientGridDrift 45s linear infinite;
}
.ambient-aurora {
  z-index: 0;
  inset: -36%;
  background:
    radial-gradient(ellipse 24% 29% at 30% 32%, rgba(188, 83, 28, .18), transparent 72%),
    radial-gradient(ellipse 29% 27% at 77% 64%, rgba(238, 115, 38, .125), transparent 72%),
    radial-gradient(ellipse 19% 26% at 68% 18%, rgba(156, 81, 39, .115), transparent 75%);
  filter: blur(40px);
  animation: ambientAurora 24s ease-in-out infinite alternate;
}
.ambient-beam {
  z-index: 2;
  inset: -35% 0;
  background: linear-gradient(180deg,
    transparent 0%,
    transparent 42%,
    rgba(255, 172, 94, .015) 47%,
    rgba(255, 153, 74, .065) 49.9%,
    rgba(255, 201, 125, .018) 50.1%,
    transparent 58%);
  transform: translateY(-88%);
  animation: ambientBeam 17s linear infinite;
  opacity: .8;
}
.ambient-vignette {
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(9, 5, 3, .50), transparent 20%, transparent 80%, rgba(9, 5, 3, .55)),
    linear-gradient(180deg, rgba(9, 5, 3, .18), transparent 17%, transparent 79%, rgba(9, 5, 3, .2));
}
/* The moving background must remain visible through every full-width section. */
body > main, body > .footer { position: relative; z-index: 1; }
.header { z-index: 50; }
.boot { z-index: 130; }
.section-light-border {
  background: linear-gradient(180deg, rgba(17, 11, 8, .78), rgba(12, 8, 6, .81) 72%);
}
.statement-stripe { background: rgba(13, 9, 7, .84); }
.contact-section {
  background:
    radial-gradient(circle at 90% 100%, rgba(135, 63, 24, .13), transparent 44%),
    rgba(14, 9, 7, .78);
}
.footer { background: rgba(12, 8, 7, .92); }
/* In the first screen, keep the particle network visible around the portrait. */
.hero::before { opacity: .66; }
@keyframes ambientAurora {
  0% { transform: translate3d(-3%, -2%, 0) rotate(-7deg) scale(1); }
  50% { transform: translate3d(4%, 2%, 0) rotate(5deg) scale(1.09); }
  100% { transform: translate3d(-2%, 5%, 0) rotate(-4deg) scale(1.02); }
}
@keyframes ambientGridDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 73px 73px, 73px 73px; }
}
@keyframes ambientBeam {
  0% { transform: translate3d(0, -90%, 0); }
  100% { transform: translate3d(0, 90%, 0); }
}
@media(max-width: 700px) {
  .ambient-grid { opacity: .32; background-size: 56px 56px; }
  .ambient-aurora { filter: blur(45px); opacity: .9; }
  .ambient-network { opacity: .74; }
  .ambient-beam { opacity: .45; }
}
@media(prefers-reduced-motion: reduce) {
  .ambient-grid, .ambient-aurora, .ambient-beam { animation: none !important; }
  .ambient-beam { display: none; }
}
