/* ═══════════════════════════════════════════════════════════════
   PAGE BACKGROUNDS — Shared Utility Layer
   Each page gets its own thematic background animation.
   This file contains shared variables, utilities & keyframes.
   ═══════════════════════════════════════════════════════════════ */

/* ── Global Body BG canvas anchor ── */
#page-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* ── Shared floating shape base ── */
.page-bg-shape {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  will-change: transform, opacity;
}

/* ═══════════════════════════════════════
   HOME PAGE — Digital Cosmos / Code Stars
   ═══════════════════════════════════════ */
.home-bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
  will-change: transform, opacity;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.home-orb-1 {
  width: 55vw;
  max-width: 700px;
  height: 55vw;
  max-height: 700px;
  background: radial-gradient(ellipse at 40% 40%,
      rgba(212, 175, 55, 0.30) 0%,
      rgba(212, 175, 55, 0.10) 55%,
      transparent 78%);
  top: -12%;
  left: -18%;
  animation: homeOrb1 30s ease-in-out infinite alternate;
}

.home-orb-2 {
  width: 50vw;
  max-width: 640px;
  height: 50vw;
  max-height: 640px;
  background: radial-gradient(ellipse at 60% 60%,
      rgba(30, 41, 59, 0.20) 0%,
      rgba(30, 41, 59, 0.08) 55%,
      transparent 78%);
  bottom: -10%;
  right: -12%;
  animation: homeOrb2 26s ease-in-out infinite alternate;
}

.home-orb-3 {
  width: 35vw;
  max-width: 450px;
  height: 35vw;
  max-height: 450px;
  background: radial-gradient(ellipse at 50% 50%,
      rgba(212, 175, 55, 0.20) 0%,
      transparent 70%);
  top: 35%;
  left: 30%;
  animation: homeOrb3 22s ease-in-out infinite alternate;
}

@keyframes homeOrb1 {
  0% {
    opacity: 0.60;
    transform: translate(0, 0) scale(1.00);
  }

  50% {
    opacity: 0.80;
    transform: translate(50px, 30px) scale(1.08);
  }

  100% {
    opacity: 0.65;
    transform: translate(20px, 60px) scale(0.96);
  }
}

@keyframes homeOrb2 {
  0% {
    opacity: 0.55;
    transform: translate(0, 0) scale(1.00);
  }

  50% {
    opacity: 0.72;
    transform: translate(-45px, -28px) scale(1.07);
  }

  100% {
    opacity: 0.60;
    transform: translate(-15px, -55px) scale(0.94);
  }
}

@keyframes homeOrb3 {
  0% {
    opacity: 0.40;
    transform: translate(0, 0) scale(1.00);
  }

  50% {
    opacity: 0.58;
    transform: translate(25px, -20px) scale(1.05);
  }

  100% {
    opacity: 0.45;
    transform: translate(-20px, 30px) scale(0.97);
  }
}

/* ═══════════════════════════════════════
   ABOUT PAGE — already has aurora blobs
   Extra: subtle diagonal grid lines
   ═══════════════════════════════════════ */
.about-page-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridFade 8s ease-in-out infinite alternate;
}

@keyframes gridFade {
  0% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

/* ═══════════════════════════════════════
   SKILLS PAGE — body-wide circuit glow
   Supplements the neural-canvas in hero
   ═══════════════════════════════════════ */
.skills-bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: -1;
  will-change: transform, opacity;
}

.skills-orb-1 {
  width: 60vw;
  max-width: 760px;
  height: 60vw;
  max-height: 760px;
  background: radial-gradient(ellipse at 35% 35%,
      rgba(212, 175, 55, 0.25) 0%,
      rgba(212, 175, 55, 0.08) 60%,
      transparent 80%);
  top: -15%;
  left: -20%;
  animation: skillsOrb1 28s ease-in-out infinite alternate;
}

.skills-orb-2 {
  width: 50vw;
  max-width: 640px;
  height: 50vw;
  max-height: 640px;
  background: radial-gradient(ellipse at 65% 65%,
      rgba(30, 41, 59, 0.20) 0%,
      rgba(30, 41, 59, 0.08) 60%,
      transparent 80%);
  bottom: -10%;
  right: -15%;
  animation: skillsOrb2 24s ease-in-out infinite alternate;
}

.skills-dot-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(30, 41, 59, 0.15) 1px, transparent 1px);
  background-size: 42px 42px;
  animation: dotFade 10s ease-in-out infinite alternate;
}

@keyframes skillsOrb1 {
  0% {
    opacity: 0.55;
    transform: translate(0, 0) scale(1);
  }

  100% {
    opacity: 0.80;
    transform: translate(40px, 35px) scale(1.07);
  }
}

@keyframes skillsOrb2 {
  0% {
    opacity: 0.50;
    transform: translate(0, 0) scale(1);
  }

  100% {
    opacity: 0.70;
    transform: translate(-40px, -30px) scale(1.06);
  }
}

@keyframes dotFade {
  0% {
    opacity: 0.35;
  }

  100% {
    opacity: 0.70;
  }
}

/* ═══════════════════════════════════════
   PROJECTS PAGE — Hexagon Tech Grid
   ═══════════════════════════════════════ */
.projects-bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
  will-change: transform, opacity;
}

.proj-orb-1 {
  width: 55vw;
  max-width: 700px;
  height: 55vw;
  max-height: 700px;
  background: radial-gradient(ellipse at 40% 40%,
      rgba(212, 175, 55, 0.25) 0%,
      rgba(212, 175, 55, 0.08) 55%,
      transparent 78%);
  top: -10%;
  right: -10%;
  animation: projOrb1 32s ease-in-out infinite alternate;
}

.proj-orb-2 {
  width: 45vw;
  max-width: 580px;
  height: 45vw;
  max-height: 580px;
  background: radial-gradient(ellipse at 55% 55%,
      rgba(30, 41, 59, 0.22) 0%,
      rgba(30, 41, 59, 0.08) 60%,
      transparent 80%);
  bottom: -8%;
  left: -12%;
  animation: projOrb2 27s ease-in-out infinite alternate;
}

.proj-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 3px,
      rgba(30, 41, 59, 0.03) 3px,
      rgba(30, 41, 59, 0.03) 4px);
  animation: scanFade 6s ease-in-out infinite alternate;
}

@keyframes projOrb1 {
  0% {
    opacity: 0.55;
    transform: translate(0, 0) scale(1);
  }

  100% {
    opacity: 0.78;
    transform: translate(-35px, 40px) scale(1.06);
  }
}

@keyframes projOrb2 {
  0% {
    opacity: 0.50;
    transform: translate(0, 0) scale(1);
  }

  100% {
    opacity: 0.68;
    transform: translate(45px, -35px) scale(1.08);
  }
}

@keyframes scanFade {
  0% {
    opacity: 0.4;
  }

  100% {
    opacity: 1.0;
  }
}

/* ═══════════════════════════════════════
   EXPERIENCE PAGE — Growth/Progression Glow
   ═══════════════════════════════════════ */
.exp-bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
  will-change: transform, opacity;
}

.exp-orb-1 {
  width: 58vw;
  max-width: 720px;
  height: 58vw;
  max-height: 720px;
  background: radial-gradient(ellipse at 38% 38%,
      rgba(212, 175, 55, 0.25) 0%,
      rgba(212, 175, 55, 0.08) 55%,
      transparent 80%);
  top: -15%;
  left: -20%;
  animation: expOrb1 34s ease-in-out infinite alternate;
}

.exp-orb-2 {
  width: 48vw;
  max-width: 600px;
  height: 48vw;
  max-height: 600px;
  background: radial-gradient(ellipse at 62% 62%,
      rgba(30, 41, 59, 0.20) 0%,
      rgba(30, 41, 59, 0.07) 60%,
      transparent 80%);
  bottom: -12%;
  right: -14%;
  animation: expOrb2 28s ease-in-out infinite alternate;
}

.exp-rising-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.08) 1px, transparent 1px);
  background-size: 1px 80px;
  background-position: left top;
  animation: riseShift 15s linear infinite;
}

@keyframes expOrb1 {
  0% {
    opacity: 0.55;
    transform: translate(0, 0) scale(1.00);
  }

  100% {
    opacity: 0.78;
    transform: translate(50px, 25px) scale(1.07);
  }
}

@keyframes expOrb2 {
  0% {
    opacity: 0.50;
    transform: translate(0, 0) scale(1.00);
  }

  100% {
    opacity: 0.72;
    transform: translate(-40px, -30px) scale(1.05);
  }
}

@keyframes riseShift {
  0% {
    background-position: left 0px;
  }

  100% {
    background-position: left -80px;
  }
}

/* ═══════════════════════════════════════
   CONTACT PAGE — Signal Waves
   ═══════════════════════════════════════ */
.contact-bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
  will-change: transform, opacity;
}

.cont-orb-1 {
  width: 60vw;
  max-width: 750px;
  height: 60vw;
  max-height: 750px;
  background: radial-gradient(ellipse at 40% 40%,
      rgba(212, 175, 55, 0.28) 0%,
      rgba(212, 175, 55, 0.08) 55%,
      transparent 78%);
  top: -14%;
  right: -16%;
  animation: contOrb1 30s ease-in-out infinite alternate;
}

.cont-orb-2 {
  width: 50vw;
  max-width: 640px;
  height: 50vw;
  max-height: 640px;
  background: radial-gradient(ellipse at 60% 60%,
      rgba(16, 185, 129, 0.15) 0%,
      rgba(16, 185, 129, 0.05) 55%,
      transparent 78%);
  bottom: -10%;
  left: -12%;
  animation: contOrb2 25s ease-in-out infinite alternate;
}

.cont-orb-3 {
  width: 40vw;
  max-width: 500px;
  height: 40vw;
  max-height: 500px;
  background: radial-gradient(ellipse at 50% 50%,
      rgba(30, 41, 59, 0.15) 0%,
      transparent 70%);
  top: 40%;
  left: 25%;
  animation: contOrb3 20s ease-in-out infinite alternate;
}

/* Ripple rings for contact */
.contact-ripple-wrap {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
}

.contact-ripple {
  position: absolute;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: rippleGrow 6s ease-out infinite;
}

.contact-ripple:nth-child(1) {
  width: 200px;
  height: 200px;
  animation-delay: 0s;
}

.contact-ripple:nth-child(2) {
  width: 400px;
  height: 400px;
  animation-delay: 2s;
}

.contact-ripple:nth-child(3) {
  width: 600px;
  height: 600px;
  animation-delay: 4s;
}

.contact-ripple:nth-child(4) {
  width: 800px;
  height: 800px;
  animation-delay: 6s;
}

@keyframes rippleGrow {
  0% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.3);
  }

  60% {
    opacity: 0.25;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.0);
  }
}

@keyframes contOrb1 {
  0% {
    opacity: 0.55;
    transform: translate(0, 0) scale(1);
  }

  100% {
    opacity: 0.78;
    transform: translate(-40px, 35px) scale(1.07);
  }
}

@keyframes contOrb2 {
  0% {
    opacity: 0.45;
    transform: translate(0, 0) scale(1);
  }

  100% {
    opacity: 0.65;
    transform: translate(35px, -28px) scale(1.06);
  }
}

@keyframes contOrb3 {
  0% {
    opacity: 0.35;
    transform: translate(0, 0) scale(1);
  }

  100% {
    opacity: 0.52;
    transform: translate(-22px, 18px) scale(1.04);
  }
}

/* ── Reduced-motion override ── */
@media (prefers-reduced-motion: reduce) {

  .home-bg-orb,
  .about-page-grid-overlay,
  .skills-bg-orb,
  .skills-dot-grid,
  .projects-bg-orb,
  .proj-scanlines,
  .exp-bg-orb,
  .exp-rising-lines,
  .contact-bg-orb,
  .contact-ripple {
    animation: none !important;
    opacity: 0.35 !important;
  }
}