/* 02 — the human continuum */
.person-presence {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: 176px;
  aspect-ratio: 1;
  background:
    radial-gradient(circle, rgba(120, 217, 209, 0.08), transparent 34%),
    radial-gradient(circle, rgba(94, 142, 182, 0.1), rgba(11, 29, 43, 0.96) 70%);
  border: 1px solid rgba(243, 240, 232, 0.24);
  border-radius: 50%;
  color: var(--cyan);
  box-shadow: 0 0 70px rgba(94, 142, 182, 0.08), inset 0 0 44px rgba(243, 240, 232, 0.03);
  opacity: 0.86;
  transform: translate(-50%, -50%) scale(.92);
  transition: opacity 700ms ease, transform 900ms var(--ease), border-color 700ms ease, box-shadow 800ms ease;
}

.presence-orbit {
  position: absolute;
  inset: -18%;
  border: 1px dashed rgba(243, 240, 232, 0.12);
  border-radius: 48% 52% 46% 54%;
  animation: presence-orbit-drift 18s linear infinite;
}

.brain-mark {
  position: absolute;
  z-index: 3;
  inset: 10%;
  width: 80%;
  height: 80%;
  margin: auto;
  color: inherit;
  filter: drop-shadow(0 0 14px rgba(120, 217, 209, 0.18));
  overflow: visible;
}

.brain-outline,
.brain-fold {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.brain-outline { stroke-width: 1.7; opacity: .82; }
.brain-fold { stroke-width: 1.25; opacity: .46; }

.brain-current {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--current-length, 8) calc(100 - var(--current-length, 8));
  stroke-dashoffset: 100;
  opacity: 0;
  filter: drop-shadow(0 0 3px currentColor);
  vector-effect: non-scaling-stroke;
  animation:
    brain-current-flow var(--current-speed, 4.4s) linear infinite,
    brain-current-spark var(--spark-speed, 3.1s) ease-in-out infinite;
}

.current-a { --current-length: 11; --current-speed: 4.1s; --spark-speed: 2.9s; animation-delay: -.8s, -1.7s; }
.current-b { --current-length: 7; --current-speed: 5.3s; --spark-speed: 3.7s; animation-delay: -3.6s, -.4s; }
.current-c { --current-length: 13; --current-speed: 3.8s; --spark-speed: 4.6s; animation-delay: -2.1s, -3.2s; }
.current-d { --current-length: 6; --current-speed: 6.2s; --spark-speed: 3.3s; animation-delay: -4.9s, -2.4s; }
.current-e { --current-length: 9; --current-speed: 4.7s; --spark-speed: 5.2s; animation-delay: -1.4s, -4.1s; }

.brain-core {
  fill: var(--gold);
  stroke: rgba(243, 240, 232, 0.78);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 7px rgba(228, 184, 91, 0.58));
  transform-box: fill-box;
  transform-origin: center;
  animation: brain-core-thinking 5.6s ease-in-out infinite;
}

@keyframes brain-current-flow {
  0% { stroke-dashoffset: 108; }
  74%, 100% { stroke-dashoffset: -108; }
}

@keyframes brain-current-spark {
  0%, 12%, 78%, 100% { opacity: 0; }
  22% { opacity: .94; }
  38% { opacity: .42; }
  53% { opacity: .82; }
  66% { opacity: .18; }
}

@keyframes brain-core-thinking {
  0%, 17%, 37%, 61%, 100% { scale: 1; filter: drop-shadow(0 0 7px rgba(228, 184, 91, 0.5)); }
  23% { scale: 1.32; filter: drop-shadow(0 0 12px rgba(228, 184, 91, 0.86)); }
  43% { scale: 1.16; filter: drop-shadow(0 0 9px rgba(228, 184, 91, 0.7)); }
  68% { scale: 1.42; filter: drop-shadow(0 0 14px rgba(228, 184, 91, 0.92)); }
}

.presence-time {
  position: absolute;
  left: 50%;
  bottom: -30px;
  width: 220px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 240, 232, 0.28), var(--cyan), rgba(243, 240, 232, 0.28), transparent);
  transform: translateX(-50%);
}

.presence-time::before,
.presence-time::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  aspect-ratio: 1;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(120, 217, 209, 0.6);
  transform: translateY(-50%);
}

.presence-time::before { left: 22%; }
.presence-time::after { right: 22%; }

@keyframes presence-orbit-drift {
  to { rotate: 360deg; }
}

.human-continuum-visual .fragment {
  opacity: 0;
  filter: blur(4px);
  transform: scale(.82) translateY(12px);
  transition: opacity 460ms ease, transform 700ms var(--ease), border-color 500ms ease, filter 520ms ease;
}

.human-continuum-visual .human-axis,
.human-continuum-visual .human-domain {
  opacity: 0;
}

.human-continuum-visual .human-axis {
  z-index: 2;
  transition: opacity 700ms ease, background 600ms ease;
}

.scene-gap[data-frame-current="1"] .fragment { opacity: 0; filter: blur(4px); transform: scale(.82) translateY(12px); }
.scene-gap[data-frame-current="1"] :is(.fragment-a, .fragment-b, .fragment-e),
.scene-gap:is([data-frame-current="2"], [data-frame-current="3"]) .fragment {
  opacity: 1;
  filter: blur(0);
  transform: scale(1) translateY(0);
}

.scene-gap:is([data-frame-current="3"], [data-frame-current="4"]) .person-presence {
  color: var(--coral);
  border-color: rgba(232, 132, 105, 0.42);
  box-shadow: 0 0 84px rgba(232, 132, 105, 0.1), inset 0 0 44px rgba(232, 132, 105, 0.04);
}

.scene-gap[data-frame-current="4"] .fragment {
  opacity: .34;
  filter: blur(.7px);
  transform: scale(.92) translate(var(--shift-x, 0), var(--shift-y, 0));
}

.scene-gap:is(
  [data-frame-current="5"],
  [data-frame-current="6"],
  [data-frame-current="7"],
  [data-frame-current="8"],
  [data-frame-current="9"]
) .fragment {
  opacity: .055;
  filter: blur(1.4px);
  transform: scale(.82);
}

.scene-gap:is(
  [data-frame-current="5"],
  [data-frame-current="6"],
  [data-frame-current="7"],
  [data-frame-current="8"],
  [data-frame-current="9"]
) .person-presence {
  opacity: 1;
  color: var(--cyan);
  border-color: rgba(120, 217, 209, 0.5);
  box-shadow: 0 0 96px rgba(120, 217, 209, 0.14), inset 0 0 48px rgba(120, 217, 209, 0.06);
  transform: translate(-50%, -50%) scale(1.04);
}

.scene-gap:is(
  [data-frame-current="5"],
  [data-frame-current="6"],
  [data-frame-current="7"],
  [data-frame-current="8"],
  [data-frame-current="9"]
) :is(.human-axis) {
  opacity: 1;
}

.scene-gap:is(
  [data-frame-current="5"],
  [data-frame-current="6"],
  [data-frame-current="7"],
  [data-frame-current="8"],
  [data-frame-current="9"]
) .memory-thread {
  border-color: rgba(120, 217, 209, 0.24);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(0);
}

.scene-gap:is([data-frame-current="6"], [data-frame-current="7"], [data-frame-current="8"], [data-frame-current="9"]) .domain-work,
.scene-gap:is([data-frame-current="7"], [data-frame-current="8"], [data-frame-current="9"]) .domain-learn,
.scene-gap:is([data-frame-current="8"], [data-frame-current="9"]) .domain-life,
.scene-gap[data-frame-current="9"] .domain-self {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(120, 217, 209, 0.3);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.scene-gap[data-frame-current="9"] .domain-self { border-color: rgba(228, 184, 91, 0.52); }
.scene-gap[data-frame-current="9"] .continuity-caption { opacity: 1; transform: translate(-50%, 0); }
