/*
 * FIX: Route-wide ambient lighting must stay the SAME HUE from hero to footer.
 * Live-reference sampling at 1440x900:
 *   About: blue / ~210-225deg for scroll y=0..4350
 *   Work:  raspberry red / ~345-355deg for scroll y=0..4500
 * Earlier styles incorrectly introduced green in testimonials, collaboration,
 * and the shared footer. Draw lighting on the actual scrolling viewport,
 * rather than assigning unrelated backgrounds to adjacent sections.
 */
body[data-page="about"] #frame-content {
  --route-glow-core:rgba(50,99,190,.58);
  --route-glow-edge:rgba(38,77,154,.28);
  --route-accent:#9caff2;
  --route-accent-rgb:137,167,234;
  background-color:#080b11;
  background-image:
    radial-gradient(ellipse 54% 76% at -11% 62%,rgba(48,99,189,.64) 0%,rgba(33,70,148,.34) 36%,transparent 80%),
    radial-gradient(ellipse 54% 78% at 108% 32%,rgba(45,92,187,.62) 0%,rgba(32,73,151,.30) 39%,transparent 80%),
    linear-gradient(120deg,#0a0c14 0%,#0a0c14 45%,#090c13 100%)!important;
}
body[data-page="work"] #frame-content {
  --route-glow-core:rgba(196,59,72,.59);
  --route-glow-edge:rgba(150,46,55,.28);
  --route-accent:#eaa0b0;
  --route-accent-rgb:231,138,158;
  background-color:#10090c;
  background-image:
    radial-gradient(ellipse 54% 74% at -12% 63%,rgba(198,58,72,.66) 0%,rgba(151,45,57,.33) 38%,transparent 80%),
    radial-gradient(ellipse 54% 80% at 108% 32%,rgba(194,58,72,.66) 0%,rgba(146,43,56,.33) 42%,transparent 80%),
    linear-gradient(120deg,#120b0d 0%,#100b0c 45%,#130b0d 100%)!important;
}

/* Do not paint opaque, section-local green behind the viewport-level light. */
body[data-page="about"] #frame-content main > section,
body[data-page="work"] #frame-content main > section,
body[data-page="about"] #frame-content main > footer,
body[data-page="work"] #frame-content main > footer {
  background:transparent!important;
  background-color:transparent!important;
}

/* Legacy hero, notes and project backgrounds must no longer override it. */
body[data-page="about"] #frame-content .route-hero::before,
body[data-page="work"] #frame-content .route-hero::before,
body[data-page="about"] #frame-content .route-testimonials::after,
body[data-page="work"] #frame-content .route-testimonials::after,
body[data-page="about"] #frame-content .route-collaboration::after,
body[data-page="work"] #frame-content .route-collaboration::after {
  display:none!important;
}
body[data-page="about"] #frame-content .home-document-footer::before,
body[data-page="about"] #frame-content .home-document-footer::after,
body[data-page="work"] #frame-content .home-document-footer::before,
body[data-page="work"] #frame-content .home-document-footer::after {
  display:none!important;
}

/* Existing section glows are re-colored to the active route rather than
 * introducing green or yellow as the user scrolls into them. */
body[data-page="about"] #frame-content .section-glow,
body[data-page="work"] #frame-content .section-glow {
  background:radial-gradient(ellipse at center,
    var(--route-glow-core) 0%,
    var(--route-glow-edge) 45%,
    transparent 77%)!important;
  filter:blur(64px);
  opacity:.6;
  mix-blend-mode:screen;
  pointer-events:none;
}
body[data-page="about"] #frame-content #about-bio>.section-glow {
  opacity:.4;
}

/* Individual project/notes panels stay dark and legible against the shared
 * ambient light. This applies to both About and Work notes carousels. */
body[data-page="about"] #frame-content .route-testimonials .note-card,
body[data-page="work"] #frame-content .route-testimonials .note-card {
  background:rgba(10,12,18,.90)!important;
  border-color:rgba(var(--route-accent-rgb),.35)!important;
}
body[data-page="work"] #frame-content .route-testimonials .note-card {
  background:rgba(21,11,15,.88)!important;
}
body[data-page="about"] #frame-content .route-testimonials .notes-controls button,
body[data-page="work"] #frame-content .route-testimonials .notes-controls button {
  background:rgba(12,12,16,.68)!important;
  color:var(--route-accent)!important;
  border-color:rgba(var(--route-accent-rgb),.44)!important;
}
body[data-page="about"] #frame-content .route-testimonials .notes-controls button:hover,
body[data-page="work"] #frame-content .route-testimonials .notes-controls button:hover {
  background:rgba(var(--route-accent-rgb),.22)!important;
}
body[data-page="about"] #frame-content .route-collaboration .section-heading h2 em,
body[data-page="work"] #frame-content .route-collaboration .section-heading h2 em {
  color:var(--route-accent)!important;
}
body[data-page="about"] #frame-content .home-document-footer .document-footer-brand span,
body[data-page="work"] #frame-content .home-document-footer .document-footer-brand span,
body[data-page="about"] #frame-content .home-document-footer .document-footer-availability i,
body[data-page="work"] #frame-content .home-document-footer .document-footer-availability i {
  color:var(--route-accent)!important;
  background:var(--route-accent)!important;
}
body[data-page="about"] #frame-content .home-document-footer .document-footer-availability i,
body[data-page="work"] #frame-content .home-document-footer .document-footer-availability i {
  box-shadow:0 0 9px rgba(var(--route-accent-rgb),.5)!important;
}

/* Keep the background anchored to the viewport on small screens too.
 * No viewport-colored section should reintroduce green at a breakpoint. */
@media(max-width:600px) {
 body[data-page="about"] #frame-content {
  background-image:
   radial-gradient(ellipse 95% 65% at -48% 57%,rgba(50,99,190,.62),transparent 85%),
   radial-gradient(ellipse 94% 67% at 148% 25%,rgba(45,92,187,.60),transparent 85%),
   #0a0c14!important;
 }
 body[data-page="work"] #frame-content {
  background-image:
   radial-gradient(ellipse 95% 65% at -48% 57%,rgba(198,58,72,.66),transparent 85%),
   radial-gradient(ellipse 94% 67% at 148% 25%,rgba(194,58,72,.63),transparent 85%),
   #100b0d!important;
 }
}
