/* The page doesn't bounce past its edges into grey on phones (PROJECT-HUB.md, B3). */
html {
    background-color: #000;
    /* Up and down only: sideways would also stop a trackpad's swipe back. */
    overscroll-behavior-y: none;
}

body{
    background-color: rgb(0, 0, 0);
    margin: 0;
    overflow-x: hidden;
}



h1{
    height: 2%;
    width: 50%;
    color: #fdfbd4;
    padding: 2%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 10vmin;
}
.hero-section{
    position: relative;
    height: auto; 
    padding: 10vh 10%;
    box-sizing: border-box;
}
/* Cuts the nebula off at the sides of the page. Its layers are scaled up
   past the screen edge, and on phones that extra width made the browser
   treat the page as wider than the screen, which pushed the pinned black
   hole scene up and left the bottom of the screen uncovered. */
.nebula-clip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    overflow-x: clip;
    /* behind the hero text, above the stars */
    z-index: -1;
}

#nebula-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    aspect-ratio: 1;
    pointer-events: none;
    z-index: 0;
}

/* PC (landscape) only: lift the nebula toward the top of the screen, and
   fade it out by the end of the hero text, so the gap between the text and
   the black hole stays clear. The clip sits inside .hero-section, so its
   bottom edge follows the text at any window size (10vh is the hero's own
   bottom padding). */
@media (min-aspect-ratio: 1/1) {
    #nebula-canvas {
        top: -12vw;
    }

    .nebula-clip {
        bottom: 10vh;
        -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 94%);
        mask-image: linear-gradient(to bottom, black 65%, transparent 94%);
    }
}


.nebula-plasma {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    translate: 10vw 2vh;
    pointer-events: none;
    mix-blend-mode: screen;
    scale: 1.9;
    z-index: -9999;
}
.draw-plasma{
  
  scale: 3;
  z-index: 1;
}
.space-fog {
    position: absolute;
    top: 1%;
    left: 12%;
    width: 60%;
    height: 60%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;

    background:
 
        radial-gradient(
            ellipse at 20% 25%,
            rgba(35, 187, 213, 0.24) 0%,
            rgba(35, 186, 213, 0.29) 30%,
            transparent 65%
        ),

        radial-gradient(
            ellipse at 65% 35%,
            rgba(216, 43, 187, 0.235) 0%,
            rgba(216, 43, 187, 0.221) 35%,
            transparent 70%
        ),

    
        radial-gradient(
            ellipse at 40% 60%,
            rgba(145, 105, 195, 0.25) 0%,
            rgba(146, 105, 195, 0.256) 35%,
            transparent 70%
        ),

        
        radial-gradient(
            ellipse at 80% 80%,
            rgba(60, 150, 190, 0.3) 0%,
            transparent 65%
        );
    -webkit-mask-image: radial-gradient(
        ellipse closest-side at center,
        black 35%,
        rgba(0, 0, 0, 0.65) 65%,
        transparent 100%
    );

    mask-image: radial-gradient(
        ellipse closest-side at center,
        black 35%,
        rgba(0, 0, 0, 0.65) 65%,
        transparent 100%
    );
}
.scroll-stack {
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
    width: 80px;
    height: 104px;
    transform: scale(0.7);
    transform-origin: bottom right;
    z-index: 9999;
}

/* 1. THE FLOAT LAYER (Fixed Position) */
.dial-float-wrapper {
    position: absolute;
    bottom: 31px;
    left: 25px;
    width: 30px;
    height: 30px;
    animation: scrollDial 2.4s ease-in-out infinite;
    z-index: 2;
}
.scroll-label {
    position: absolute;
    bottom: 81px;
    left: 0;
    width: 80px;
    text-align: center;
    color: #fdfbd4;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    margin: 0;
    z-index: 3;
}
/* 2. THE ROTATE LAYER (Fixed Size) */
.Dial-icon {
    /* dial.png is mostly transparent padding (ring = 133px of 455x549),
       so scale the image to make the ring itself 30px and centre it. */
    position: absolute;
    width: 103px;
    height: 124px;
    left: -36px;
    top: -46px;
    max-width: none;
    transform-origin: 50% 49.5%;
    object-fit: contain;
    /* display: block; */
    animation: rotateDial 4s linear infinite;
    filter: drop-shadow(0 0 4px rgba(255, 140, 0, 0.8)); 
}

.void-scroll-widget {
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 40px;
    height: 71px;
    box-sizing: border-box;
    border: 2px solid rgba(253, 251, 212, 0.85);
    background: rgba(253, 251, 212, 0.06);
    border-radius: 50px;
    z-index: 1;
    display: flex;
}

/* Animations */
@keyframes rotateDial {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(15px); }
}

@keyframes scrollDial {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(22px); }
}


#star{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.about {
    color: #fdfbd4;
    position: relative; 
    z-index: 1;
    font-family: 'Orbitron', sans-serif;
    font-size:4vh;
}

/* Info icon pinned to the bottom-left corner. */
.info-note {
    position: fixed;
    left: max(16px, env(safe-area-inset-left));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 9999;
    outline: none;
    transition: opacity 0.4s ease, visibility 0s linear 0s;
}

.info-note svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: #fdfbd4;
    stroke: #fdfbd4;
    stroke-width: 1.6;
    stroke-linecap: round;
    opacity: 0.45;
    transition: opacity 0.2s;
}

.info-note circle:first-child {
    fill: none;
}

.info-note-text {
    position: absolute;
    left: 0;
    bottom: 22px;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #fdfbd4;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.info-note:hover svg,
.info-note:focus svg {
    opacity: 1;
}

.info-note:hover .info-note-text,
.info-note:focus .info-note-text {
    opacity: 1;
}

@font-face {
    font-family: 'Orbitron';
    src: url('font/Orbitron/Orbitron-Medium.ttf');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.star{
    position: absolute;
    background: white;
    border-radius: 50%;
    pointer-events: none;
}

/* The sky canvas that replaces the star dots. Its height is the large viewport
   height, not the visible one: on phones the visible height changes as the
   address bar slides in and out, and a canvas that followed it would be redrawn
   on every scroll. */
.star-canvas{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100lvh;
    display: block;
    pointer-events: none;
    opacity: 0;
    transition: opacity 900ms ease;
}

.star-canvas.is-ready{
    opacity: 1;
}

/* The twinkling layers. Each first fades in like the steady layer (star-appear),
   then fades between full and dimmed for good (star-twinkle). Each layer has its
   own pace and its own starting moment (each canvas sets --twinkle-index), so the
   layers never line up. Only opacity moves, so the browser does it on the GPU and
   nothing is redrawn. Both animations start with is-ready. */
.star-twinkle.is-ready{
    animation:
        star-appear 900ms ease both,
        star-twinkle calc(2.6s + var(--twinkle-index) * 1.15s) ease-in-out calc(900ms + var(--twinkle-index) * 700ms) infinite alternate;
}

@keyframes star-appear{
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes star-twinkle{
    from { opacity: 1; }
    to { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce){
    .star-canvas{
        transition: none;
    }

    .star-twinkle.is-ready{
        animation: none;
    }
}
.projects {

    width: 80%; 
    color: #fdfbd4;
    text-align: center;
    font-family: 'Orbitron', sans-serif; 
    font-size: 4vh;
    margin: 20px auto;
    text-shadow: 0 0 20px rgba(248, 231, 0, 0.5); 
    top: 2vh;
}
/* MILKY WAY in the gap between the hero text and the black hole.
   scripts/frontend/home/milkyway.js draws it and runs the hyperdrive jump. */
.galaxy-gap {
    position: relative;
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The galaxy with the word under it. Lifted toward the hero text; the gap
   keeps its own height, so the black hole below does not move. */
.galaxy-stack {
    position: relative;
    top: -11vh;
    /* Same shape as the stage on the standalone page (1.26 wide per 1 tall),
       56vh tall. Never wider than the screen: anything wider breaks the
       pinned black hole scene on phones. */
    width: min(100%, calc(56vh * 1.26));
}

.milky-way {
    width: 100%;
    aspect-ratio: 1.26;
    display: block;
    cursor: pointer;
}

/* The word sits in the empty band under the galaxy, inside the canvas box,
   so it keeps its place at any size. Clicking it starts the same jump. */
.galaxy-discover {
    position: absolute;
    left: 50%;
    bottom: 7%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.4em 0.8em;
    border: 0;
    background: none;
    color: #fdfbd4;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.6vh;
    letter-spacing: 0.35em;
    /* letter-spacing also trails the last letter; pull the word back to centre */
    text-indent: 0.35em;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(248, 231, 0, 0.5);
    cursor: pointer;
    transition: text-shadow 0.25s ease;
}

.galaxy-discover:hover,
.galaxy-discover:focus-visible {
    text-shadow: 0 0 12px rgba(248, 231, 0, 0.9), 0 0 28px rgba(248, 231, 0, 0.6);
}

.galaxy-discover:focus-visible {
    outline: 1px solid rgba(253, 251, 212, 0.6);
    outline-offset: 2px;
}

/* Full-screen layer for the hyperdrive jump. Invisible and click-through
   until milkyway.js adds .active; removing .active fades it out. */
.milky-way-warp {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s ease-out;
}

.milky-way-warp.active {
    pointer-events: auto;
    opacity: 1;
    transition: none;
}

/* White cover for a return jump from Discover. index.html marks the page
   with html.returning before the first paint, so nothing of the top of the
   page shows; milkyway.js takes over with its own jump layer and removes the
   mark. Reduced motion gets no cover at all. */
html.returning::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgb(237, 247, 255);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    html.returning::before {
        display: none;
    }
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}



/* NESTED COORDINATE SYSTEM FOR ANY ASPECT RATIO with the black hole */
.black-hole-section {
  position: relative;
  height: 140vh;
  /* The pinned scene is 100lvh and the scroll through it 40svh, so the end
     is reachable when a phone's address bar hides (PROJECT-HUB.md, B1). */
  height: calc(100lvh + 40svh);
  width: 100%;
}

.black-hole-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  /* The largest screen height, so the scene always covers the screen (B1). */
  height: 100lvh;
  overflow: hidden;
  isolation: isolate;
}

.black-hole-viewport > .projects {
  position: relative;
  z-index: 1;
  opacity: var(--approach-label-opacity, 1);
}

.black-hole-stage {
  --vortex-spin-duration: 0.1s;
  /* Tilt of the accretion disk; the round shadow and its arcs do not tilt. */
  --disk-tilt: 20deg;
  --glow-pulse-duration: 4.6s;
  position: absolute;
  width: min(50vw, calc(50svh * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  top: 50%;
  left: 50%;
  /* Aim into the upper dark hemisphere, above the foreground band. */
  transform-origin: 50% 79%;
  transform: translate(-50%, -79%) scale(var(--approach-scale, 1));
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  overflow: visible;
  will-change: transform;
}

/* Keep the scene measurable and animating while its textures are prepared. */
.black-hole-stage.is-loading {
  opacity: 0;
}

/* WebGL version of the scene (createLensRenderer in fscripts.js). It draws the
   shadow, ring, disk and arch itself, so the layered fallback is switched off.
   The canvas fills the pinned viewport and is never scaled: the approach's
   zoom happens inside the shader, which keeps it sharp. */
.lensed-disk {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.black-hole-stage.lensed > * {
  display: none !important;
}

.black-hole-darkness {
  /* Fixed, so the fade covers the whole screen even when the pinned scene
     is shorter than it (phone address bar hidden). */
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #030303;
  opacity: var(--approach-darkness, 0);
  pointer-events: none;
}

/* Mounted directly on body on mobile, outside the sticky scene's clipping. */
.black-hole-darkness-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  will-change: opacity;
}

@media (max-aspect-ratio: 1/1) {
  .black-hole-stage {
    width: 100vw;
  }
}

/* Stable viewport units keep browser toolbar changes out of zoom progress. */


.disk-of-light {
  position: absolute; 
  border-radius: 50%;
  transform: rotate(var(--disk-tilt));
  will-change: transform;
}


#ring-3 {
  position: absolute;
  top: 31.8%;
  left: 24%;
  width: 52%;
  height: 92.4%;
  animation-duration: 0.5s;
  z-index: 20;
  /* Tight falloff: the glow hugs the photon ring instead of fogging the sky. */
  opacity: 0.3;
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 18%, black 30%, transparent 55%);
  mask-image: radial-gradient(ellipse at center, transparent 18%, black 30%, transparent 55%);

 
  background: conic-gradient(
    from var(--angle),
    rgba(255, 130, 30, 0.75) 0%,
    rgba(255, 150, 40, 0.9) 25%,
    rgba(255, 120, 30, 0.65) 50%,
    rgba(255, 150, 40, 0.85) 75%,
    rgba(255, 130, 30, 0.75) 100%
  ) !important; 
}
#ring-3::before { animation-duration: 0.1s; animation-direction: normal; }
#ring-3::after { animation-duration: 0.2s; }




#ring-4 {
  position: absolute;
  top: 51%;
  left: 28%;
  width: 44%;
  height: 78%;
  animation-duration: 0.5s;
  z-index: 20;
  /* Tight falloff: the glow hugs the photon ring instead of fogging the sky. */
  opacity: 0.3;
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 16%, black 27%, transparent 42%);
  mask-image: radial-gradient(ellipse at center, transparent 16%, black 27%, transparent 42%);

 
  background: conic-gradient(
    from var(--angle),
    rgba(255, 130, 30, 0.75) 0%,
    rgba(255, 150, 40, 0.9) 25%,
    rgba(255, 120, 30, 0.65) 50%,
    rgba(255, 150, 40, 0.85) 75%,
    rgba(255, 130, 30, 0.75) 100%
  ) !important; 
}
#ring-4::before { animation-duration: 0.1s; animation-direction: normal; }
#ring-4::after { animation-duration: 0.2s; }








#ring-6 {
  position: absolute;

  /* Match the square swirl texture projected by scaleX(2.33)/scaleY(0.3):
     60% stage width -> 139.8% width and 32% stage height (16:9 stage). */
  top: 67%;
  left: -19.9%;

  width: 139.8%;
  height: 32%;
  animation-duration: var(--vortex-spin-duration);
  /* Kept faint and short: the baked gas is the body, this only tints it. */
  opacity: 0.35;

  z-index: 298;


  -webkit-mask-image:
    radial-gradient(
      ellipse at center,
      transparent 4%,
      black 20%,
      transparent 48%
    );

  mask-image:
    radial-gradient(
      ellipse at center,
      transparent 4%,
      black 20%,
      transparent 48%
    );

  
  background:
    conic-gradient(
      from var(--angle),

      rgba(255, 140, 35, 0.8) 0%,
      rgba(255, 150, 40, 0.95) 22%,
      rgba(255, 130, 30, 0.7) 43%,
      rgba(255, 150, 40, 0.85) 65%,
      rgba(255, 160, 45, 1) 82%,
      rgba(255, 140, 35, 0.8) 100%
    ) !important;
}

#ring-6::before {
  animation-duration: 1s;
  animation-direction: normal;
}
.spiral-layer {
  position: absolute;

  top: 48%;
  left: 0;

  width: 100%;
  height: 60%;

  z-index: 310;

  pointer-events: none;

  display: flex;
  justify-content: center;
  align-items: center;

  /*
    Squash the circular spiral into the same
    perspective as your accretion disk.
  */
  transform:
    rotate(-12deg)
    scaleX(1.45)
    scaleY(0.38);

  transform-origin: center;
}

#accretion-spiral {
  width: 70%;
  height: 100%;

  overflow: visible;

  animation: spiral-spin 2s linear infinite;
}
.spiral-anchor {
  position: absolute;

  left: 50%;
  top: 83%;

  width: 60%;
  height: 200%;

  transform:
    translate(-50%, -50%)
    rotate(var(--disk-tilt));

  transform-origin: center;

  /* above the gas (200), below the void (305) so the hole stays dark */
  z-index: 250;
  pointer-events: none;
}

.spiral-plane {
  width: 100%;
  height: 100%;

  transform:
    scaleX(2.33)
    scaleY(0.3);

  transform-origin: center;
}

.spiral-spin {
  width: 100%;
  height: 100%;

  transform-origin: center;

  animation: spiral-spin var(--vortex-spin-duration) linear infinite;

  /* Promote to its own GPU layer: the streaks and their blur/glow are
     rasterised once and the layer is just rotated, not repainted. */
  will-change: transform;
}

/* fscripts.js bakes #spiral-svg into this canvas (see bakeSwirl). */
.spiral-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Glow is baked into the texture, so zoom does not enlarge a live filter. */
}

#spiral-path {
  fill: none;

  stroke: #ff4d0d;
  stroke-width: 1.4;

  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Lensed upper disk: the same spinning texture, exposed as nested half rings.
   The stationary masks keep the arch above the void while streaks circulate. */
.spiral-anchor-crown {
  left: 50%;
  top: 83%;
  width: 70%;
  height: auto;
  aspect-ratio: 1;
  /* The shadow is round, so the lensed arch stays a circle around it. */
  transform: translate(-50%, -50%);
  z-index: 275;
  -webkit-mask-image: linear-gradient(to bottom, black 35%, transparent 52%);
  mask-image: linear-gradient(to bottom, black 35%, transparent 52%);
}

/* Reveal the lower half of the identical texture without reversing its spin. */
.spiral-anchor-crown-lower {
  /* Let the lower glow fade along the disk's diagonal crossing. */
  -webkit-mask-image: linear-gradient(calc(177deg + var(--disk-tilt)), transparent 48%, black 65%);
  mask-image: linear-gradient(calc(177deg + var(--disk-tilt)), transparent 48%, black 65%);
}

.spiral-anchor-crown .spiral-plane {
  transform: none;
  /* Thick arch: hot against the ring, fading to wispy orange at its outer edge. */
  -webkit-mask-image: radial-gradient(ellipse closest-side, transparent 32%, black 35%, black 52%, transparent 70%);
  mask-image: radial-gradient(ellipse closest-side, transparent 32%, black 35%, black 52%, transparent 70%);
  /* Faint, so the baked strands stay visible through it. */
  background: radial-gradient(
    circle closest-side,
    transparent 31%,
    rgba(255, 240, 200, 0.55) 35%,
    rgba(255, 190, 80, 0.4) 44%,
    rgba(255, 130, 30, 0.18) 56%,
    transparent 70%
  );
}

/* Keep the lower arc narrow while holding its inner edge against the rim. */
.spiral-anchor-crown-lower .spiral-plane {
  -webkit-mask-image: radial-gradient(ellipse closest-side, transparent 32%, black 34.5%, black 39%, transparent 47%);
  mask-image: radial-gradient(ellipse closest-side, transparent 32%, black 34.5%, black 39%, transparent 47%);
}

/* The outer anchor supplies the elliptical projection after rotation. */
.spiral-anchor-crown .spiral-canvas {
  object-fit: fill;
}

.spiral-anchor-crown .spiral-spin {
  position: relative;
}

.spiral-anchor-crown .crown-detail {
  position: absolute;
  inset: 0;
  transform: rotate(28deg);
  opacity: 0.45;
}

/* Front copy: lower (near) half of the disk only, around the sphere. */
.spiral-anchor-front {
  /* Above the void (305) and the photon ring (400): the near half of the
     disk passes in front of the shadow. */
  z-index: 410;
}

.spiral-anchor-front .spiral-plane {
  -webkit-mask-image: linear-gradient(to bottom, transparent 49.5%, black 53%);
  mask-image: linear-gradient(to bottom, transparent 49.5%, black 53%);
  /* Soft warm glow under the gas so the band reads against the shadow. */
  background: radial-gradient(
    circle closest-side,
    transparent 15%,
    rgba(255, 206, 110, 0.55) 18%,
    rgba(255, 168, 60, 0.42) 30%,
    rgba(255, 130, 30, 0.22) 50%,
    rgba(255, 110, 20, 0.07) 66%,
    transparent 76%
  );
}

/* Same spiral and palette inside the void, flattened into a shallow band.
   Widening its orbits reduces the visible curvature across the hole. */
.spiral-anchor-void {
  /* Unused while the front copy of the disk crosses the shadow itself. */
  display: none;
  left: 50%;
  top: 42.157%;
  width: 250%;
  height: 392.157%;

}

.spiral-anchor-void .spiral-plane {
  transform:
    scaleX(3.5)
    scaleY(0.68);

  -webkit-mask-image: linear-gradient(to bottom, transparent 48%, black 53%);
  mask-image: linear-gradient(to bottom, transparent 48%, black 53%);

  background: radial-gradient(
    circle closest-side,
    transparent 14%,
    rgba(255, 226, 90, 1) 19%,
    rgba(255, 196, 30, 0.95) 25%,
    rgba(255, 150, 0, 0.55) 33%,
    rgba(255, 110, 0, 0.18) 42%,
    transparent 52%
  );
}

.spiral-anchor-void .spiral-canvas {
  opacity: 0.6;
  -webkit-mask-image: radial-gradient(circle closest-side, black 30%, transparent 45%);
  mask-image: radial-gradient(circle closest-side, black 30%, transparent 45%);
}

@keyframes spiral-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.disk-of-light, 
.disk-of-light::before, 
.disk-of-light::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from var(--angle),
    #e47d0830 0%,
    #e47d08cb 12%,
    #ff590040 30%,
    #fad000cf 48%,
    #ff590030 64%,
    #f48a09 82%,
    #ff3e1280 91%,
    #e47d0830 100%
  );
  animation: rotate-disk 3s linear infinite;
}
.disk-of-light {
  position: absolute;
  transform: rotate(var(--disk-tilt));
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 40%, black 41%, transparent 43%);
  filter: blur(0.04cqw) brightness(1.7);
}


/* Keep the disk's gold from clipping to pale yellow/white. The photon
   rim keeps its own brightness through the shared .disk-of-light rule. */
#ring-3,
#ring-6 {
  filter: blur(0.04cqw) brightness(1.25);
}

.disk-of-light::before {
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 39%, black 40%, transparent 43%);
  animation-duration: 5.5s;
  animation-direction: reverse;
  filter: blur(0.12cqw);
  opacity: 0.8;
}


.disk-of-light::after {
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 38%, black 40%, transparent 45%);
  animation-duration: 8s;
  opacity: 0.5;
  filter: blur(0.39cqw);
}

@keyframes rotate-disk {
  from { --angle: 0deg; }
  to { --angle: 360deg; }

}

/* Rasterize halo paint effects once; only transform/opacity animate afterward.
   Override the original ID rules after a successful bake, retaining fallback. */
:is(.disk-of-light, #trailoflight, #ring-3, #ring-4, #ring-6).halo-baked {
  background: none !important;
  filter: none !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  animation: none !important;
}
.disk-of-light.halo-baked::before,
.disk-of-light.halo-baked::after {
  content: none !important;
  animation: none !important;
}
.halo-texture-plane {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1;
  transform-origin: top left;
  pointer-events: none;
}
.halo-texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform, opacity;
}


#ring-3::before,
#ring-6::before,
#trailoflight::before {
  animation: rotate-disk 2s linear infinite reverse;
}

#ring-3::after,
#ring-6::after,
#trailoflight::after {
  animation: rotate-disk 3s linear infinite,
    glow-breathe 4.6s ease-in-out infinite;
}

#ring-3::after { animation-delay: -2s, -1.5s; }
#ring-6::after { animation-delay: -5s, -3s; }


#ring-3::before,
#ring-3::after {
  background: inherit;
}

#ring-6::before,
#ring-6::after {
  --angle: inherit;
  background: inherit;
  animation: none;
}

#ring-6::after {
  animation: glow-breathe 4.6s ease-in-out infinite;
  animation-delay: 0s;
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.38; }
  50% { opacity: 0.68; }
}
 
#trailoflight::before { 
  animation-duration: 3.1s; 
  animation-direction: normal; 
}

#trailoflight {
  position: absolute;
  /* Round on screen: 38.25% of the width equals 68% of the 16:9 height. */
  top: 49%;
  left: 30.875%;
  width: 38.25%;
  height: 68%;
  z-index: 400;
  mix-blend-mode: screen;

  /* Thin, hard-edged photon ring: sharp against the shadow, quick fade outside. */
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    transparent 40.5%,
    #000 41.5%,
    #000 46%,
    transparent 53%
  );
  mask-image: radial-gradient(
    ellipse at center,
    transparent 40.5%,
    #000 41.5%,
    #000 46%,
    transparent 53%
  );

  background:
    radial-gradient(
      ellipse at center,
      transparent 40%,
      #fffdf2 41%,
      #ffe9b0e0 44%,
      #ffb84090 48%,
      #c8640040 51%,
      transparent 53%
    ),
    conic-gradient(
      from var(--angle),
      #fa890049 0%,
      #fa890049 20%,
      #6335008e 35%,
      #663800c7 50%,
      #ff121231 65%,
      #fa890049 80%,
      #fa890049 100%
    ) !important;

  background-blend-mode: screen;
  transform: rotate(90deg);
  animation-duration: 2s;
}


.void {
  position: absolute;

  top: 83%;
  left: 50%;

  width: 22%;
  aspect-ratio: 1;

  transform: translate(-50%, -50%);

  border-radius: 50%;

  /* Pure black: the grey conic wedges read as fog inside the shadow. */
  background: #000;

  /* above #ring-6 (300) and the front swirl (290), so their straight band
     doesn't cross the hole; the shallow .spiral-anchor-void inside replaces it */
  z-index: 305;
  overflow: hidden;

  pointer-events: none;
}

.stage {
  transition: none !important;
  animation: none !important;
  will-change: transform;
}

/* ---- Projects: the quiet link in the top right corner (home/projects-link.js) ----
   Styled like the Discover control. It stays put while the page scrolls and
   fades away while the visitor is inside the black hole. */
.corner-projects {
    position: fixed;
    top: max(12px, 2.4vh);
    right: max(14px, 2.6vw);
    z-index: 700;
    padding: 0.5em 0.7em;
    color: #fdfbd4;
    opacity: 0.75;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(11px, 1.8vh, 15px);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.4s ease, text-shadow 0.25s ease, visibility 0s linear 0s;
}
.corner-projects:hover,
.corner-projects:focus-visible {
    opacity: 1;
    text-shadow: 0 0 12px rgba(248, 231, 0, 0.9), 0 0 28px rgba(248, 231, 0, 0.6);
}
.corner-projects:focus-visible {
    outline: 1px solid rgba(253, 251, 212, 0.6);
    outline-offset: 2px;
}
body:has(.black-hole-section.is-inside) .corner-projects {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
/* The ⓘ note hides inside too, so it never sits on a project card (PROJECT-HUB.md, H2). */
body:has(.black-hole-section.is-inside) .info-note {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
