/* Scroll rendering budget: preserve the visual language without full-page repaints. */
.portfolio-page .paper {
  background-attachment: scroll, scroll, scroll;
}

.unified-interface :is(.character-archive, .project-archive, .quest-journal),
.portfolio-page .paper :is(.talent-card, .work-card, .skill-detail, .education-ribbon) {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* These pointer-following fixed gradients were nearly invisible but forced a
   viewport-sized blend pass on every frame. Local hover light remains intact. */
.portfolio-page::after,
.portfolio-page .paper::after {
  display: none;
}

.unified-interface .world-atmosphere {
  contain: strict;
  mix-blend-mode: normal;
  will-change: opacity;
}
.unified-interface .world-atmosphere > i,
.unified-interface .world-fog-banks,
.unified-interface .world-mote-field {
  will-change: transform;
}
.unified-interface .world-fog-banks i {
  filter: none;
  opacity: .42;
  will-change: transform;
}

/* While the viewport is moving, spend the frame budget on scrolling. The
   ambience resumes 150 ms after the final scroll event. */
body.is-scrolling .world-atmosphere *,
body.is-scrolling .living-landscape *,
body.is-scrolling .panel-shimmer,
body.is-scrolling .hero-idle-motes i,
body.is-scrolling .orbit,
body.is-scrolling .vision {
  animation-play-state: paused !important;
}

/* A chapter crossed during a deliberate jump stays readable, but its large
   blur/clip reveal waits until the visitor actually stops there. */
.unified-motion-ready .unified-arrival.is-passing {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
  filter: none !important;
  transition: none !important;
}
.unified-interface .unified-arrival.is-passing::after {
  animation: none !important;
  transform: scaleX(1);
}

body.is-scrolling .celestial-constellation :is(.celestial-nebula, .celestial-dust i, .node-star),
body.is-scrolling .loadout-resonance .loadout-energy-pulse,
body.is-scrolling .loadout-resonance .tech-sigil-frame::after {
  animation-play-state: paused !important;
}

/* Pointer parallax settles instantly while the viewport moves. The exact
   ambience position is retained, then animation resumes after scrollend. */
body.is-scrolling :is(.world-fog-banks, .world-mote-field) {
  transition: none !important;
}

.motion-suspended :is(.world-atmosphere, .living-landscape) {
  visibility: hidden;
}

@media (max-width: 800px), (prefers-reduced-motion: reduce) {
  .unified-interface .world-fog-banks,
  .unified-interface .world-mote-field,
  .unified-interface .panel-shimmer {
    display: none;
  }
}
