/* ===== Graph stage — sticky pin like index "30%" ===== */
.core-graph-section {
  position: relative;
  min-height: 140vh; /* pin-distance 40vh gives user a moment to see the frozen brain before scrolling past; collapse animation removed */
  overflow: visible;
}
.core-graph-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}
.core-graph-section canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* No CSS opacity — JS scroll-driven cascade controls per-node visibility */
}
.core-graph-section .graph-info-card,
.core-graph-section .graph-legend {
  opacity: 0;
  transition: opacity 700ms cubic-bezier(.2,.7,.3,1), transform 800ms cubic-bezier(.2,.7,.3,1);
}
.core-graph-section .graph-info-card { transform: translate(28px, -14px) scale(0.94); }
.core-graph-section .graph-legend    { transform: translate(-28px, 14px) scale(0.94); }
.core-graph-section.is-ready .graph-info-card,
.core-graph-section.is-ready .graph-legend {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .core-graph-section canvas,
  .core-graph-section .graph-info-card,
  .core-graph-section .graph-legend { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ===== Liquid Glass shared treatment ===== */
.liquid-glass {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.06) 100%),
    rgba(13,14,21,0.45);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 18px 48px rgba(0,0,0,0.45),
    0 2px 8px rgba(0,0,0,0.25);
  overflow: hidden;
}
.liquid-glass::before {
  /* Specular highlight — soft inner top-light, like glass refracting */
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 60% at 30% 0%, rgba(255,255,255,0.12) 0%, transparent 55%),
    radial-gradient(80% 50% at 80% 100%, rgba(160,180,255,0.08) 0%, transparent 60%);
  pointer-events: none; mix-blend-mode: screen;
}
.liquid-glass::after {
  /* Edge sheen */
  content: ''; position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 35%, transparent 65%, rgba(160,107,255,0.10));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
}
.liquid-glass > * { position: relative; z-index: 1; }

/* Floating info card top-right */
.core-graph-section .graph-info-card {
  position: absolute; top: clamp(20px, 4vh, 36px); right: clamp(20px, 4vw, 40px); z-index: 3;
  width: 260px;
  padding: 18px 20px;
  font-size: 13px; line-height: 1.5;
  pointer-events: none;
}
.core-graph-section .graph-info-card h4 {
  font-size: 12px; margin: 0 0 6px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.55); font-weight: 700;
}
.core-graph-section .graph-info-card p {
  color: rgba(255,255,255,0.6); margin: 0;
}
.core-graph-section .graph-info-card .info-name {
  color: #fff; font-weight: 700; font-size: 16px;
}
.core-graph-section .info-status {
  display: none; margin-top: 10px; padding: 3px 9px; border-radius: 999px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
}
.core-graph-section .info-status.live {
  background: rgba(0,224,255,0.12); color: #00e0ff; border: 1px solid rgba(0,224,255,0.3);
}
.core-graph-section .info-status.planned {
  background: rgba(160,107,255,0.12); color: #a06bff; border: 1px solid rgba(160,107,255,0.3);
}

/* Floating legend bottom-left */
.core-graph-section .graph-legend {
  position: absolute; bottom: clamp(20px, 4vh, 36px); left: clamp(20px, 4vw, 40px); z-index: 3;
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 20px;
  font-size: 13px;
}
.core-graph-section .graph-legend-row {
  display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.7);
}
.core-graph-section .legend-dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0; box-sizing: border-box;
}
.core-graph-section .legend-dot.core {
  background: #0a0a0f; border: 1.5px solid rgba(255,255,255,0.55);
  box-shadow: 0 0 14px rgba(160,180,255,0.55);
}
/* Cap = filled glass-orb (matches graph) */
.core-graph-section .legend-dot.cap {
  background: radial-gradient(circle at 32% 32%,
    rgba(238,222,255,0.95) 0%,
    rgba(202,170,255,0.95) 22%,
    #a06bff 60%,
    rgba(54,22,116,0.95) 100%);
  box-shadow: 0 0 12px rgba(160,107,255,0.5);
}
/* Cap planned = dashed hollow circle */
.core-graph-section .legend-dot.cap.planned {
  background: transparent;
  border: 1.5px dashed rgba(196,164,255,0.9);
  box-shadow: none;
  animation: core-graph-pulse 2.4s ease-in-out infinite;
}
/* Tool = hollow ring with inner dot (matches graph) */
.core-graph-section .legend-dot.tool {
  background: radial-gradient(circle, #00e0ff 0%, #00e0ff 22%, transparent 28%, transparent 100%);
  border: 1.5px solid #00e0ff;
  box-shadow: 0 0 10px rgba(0,224,255,0.55);
}
/* Tool planned = dashed empty ring */
.core-graph-section .legend-dot.tool.planned {
  background: transparent;
  border: 1.5px dashed rgba(0,224,255,0.85);
  box-shadow: none;
  animation: core-graph-pulse 2.4s ease-in-out infinite;
}

@keyframes core-graph-pulse {
  0%, 100% { opacity: 0.50; }
  50% { opacity: 0.78; }
}

@media (max-width: 900px) {
  .core-graph-section .graph-info-card { width: 180px; font-size: 12px; padding: 12px 14px; }
  .core-graph-section .graph-legend { font-size: 11px; padding: 12px 14px; gap: 8px; }
}
/* Mobile: matches desktop — 40vh pin-distance after autoplay, no collapse. */
@media (max-width: 768px) {
  .core-graph-section {
    min-height: 140vh;
  }
}

/* ===== Mobile LIVE-Badge + Scroll-Hint =====
   Sitzen im sticky-stage (also immer im Viewport während der Pin läuft).
   Badge: oben links, pulse-Dot, "LIVE · AURALEX BRAIN" Label.
   Hint: oben mittig unter dem Badge bei progress < 0.15, fadet raus wenn
   der User die ersten Skills sieht. */
.core-graph-live-badge {
  display: none;
}
@media (max-width: 768px) {
  .core-graph-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    position: absolute;
    top: 78px;
    left: 18px;
    padding: 6px 12px 6px 9px;
    background: rgba(8, 10, 18, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0,224,255,0.30);
    border-radius: 100px;
    color: rgba(255,255,255,0.92);
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 6px 18px rgba(0,224,255,0.18);
    opacity: 0;
    transition: opacity 200ms ease;
  }
  .core-graph-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00e0ff;
    box-shadow: 0 0 8px rgba(0,224,255,0.95), 0 0 16px rgba(0,224,255,0.55);
    animation: core-graph-live-pulse 1.8s ease-in-out infinite;
  }
  @keyframes core-graph-live-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.6; }
  }
  /* Live badge appears once autoplay finishes */
  .core-graph-section.is-autoplay-done .core-graph-live-badge {
    opacity: 1;
  }
}
/* Phone: info-card + legend werden komplett verborgen. Grund: das #page-content
   wrapping div hat eine identity-transform (matrix(1,0,0,1,0,0)) als CSS-side-
   effect, das macht position:fixed-Kinder relativ zum wrapper statt zum view-
   port — und position:absolute + top:auto + bottom:N resolved auf negative
   Werte bei position:sticky-Containing-Blocks. Beide Pfade waren gebrochen.
   Auf Mobile ist die "Hover: __" Card ohnehin sinnlos (kein Hover) und der
   Tap auf einen Skill highlightet ihn + seine Edges direkt im Canvas via
   setHovered() — das ist das Feedback. */
@media (max-width: 768px) {
  .core-graph-section .graph-info-card,
  .core-graph-section .graph-legend {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .core-graph-section .legend-dot.planned { animation: none; opacity: 0.5; }
}

/* ===== Graph Completion Bar (HOLD phase signal) ===== */
.graph-completion-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(8,12,24,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,224,255,0.22);
  border-radius: 100px;
  padding: 8px 18px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.82);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
  z-index: 10;
}
.graph-completion-bar.is-visible {
  opacity: 1;
}
@media (min-width: 769px) {
  .graph-completion-bar.is-visible {
    opacity: 0.7;
  }
}
.graph-completion-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e0ff;
  flex-shrink: 0;
  animation: completionPulse 1.8s ease-in-out infinite;
}
@keyframes completionPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,224,255,0.6); }
  50% { box-shadow: 0 0 0 5px rgba(0,224,255,0); }
}
.graph-completion-scroll {
  opacity: 0.45;
  margin-left: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .graph-completion-dot { animation: none; }
  .graph-completion-bar { transition: none; }
}
