/* ==========================================================================
   AI Computer Science Plus — Animations & Transitions
   Comprehensive animation system for a futuristic AI education platform.
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties — Timing, Easing & Glow Colors
   -------------------------------------------------------------------------- */
:root {
  --anim-duration-fastest: 100ms;
  --anim-duration-fast:    200ms;
  --anim-duration-normal:  400ms;
  --anim-duration-slow:    800ms;
  --anim-duration-slower:  1200ms;
  --anim-duration-slowest: 2000ms;

  --ease-default:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in:       cubic-bezier(0.4, 0, 1, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-elastic:  cubic-bezier(0.68, -0.55, 0.27, 1.55);
  --ease-spring:   cubic-bezier(0.175, 0.885, 0.32, 1.275);

  --glow-blue:   #00b4ff;
  --glow-purple: #8b5cf6;
  --glow-cyan:   #00e5ff;
  --glow-green:  #00ff88;
}

/* ==========================================================================
   1. FADE ANIMATIONS
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   2. SLIDE ANIMATIONS
   ========================================================================== */

@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideInUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes slideInDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

@keyframes slideOutLeft {
  from { transform: translateX(0);     opacity: 1; }
  to   { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

@keyframes slideOutUp {
  from { transform: translateY(0);     opacity: 1; }
  to   { transform: translateY(-100%); opacity: 0; }
}

@keyframes slideOutDown {
  from { transform: translateY(0);    opacity: 1; }
  to   { transform: translateY(100%); opacity: 0; }
}

/* ==========================================================================
   3. SCALE & BOUNCE ANIMATIONS
   ========================================================================== */

@keyframes scaleIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

@keyframes scaleOut {
  from { transform: scale(1);    opacity: 1; }
  to   { transform: scale(0.85); opacity: 0; }
}

@keyframes bounceIn {
  0%   { transform: scale(0.3);  opacity: 0; }
  50%  { transform: scale(1.08); opacity: 1; }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes bounceOut {
  0%   { transform: scale(1);    opacity: 1; }
  25%  { transform: scale(1.08); }
  100% { transform: scale(0.3);  opacity: 0; }
}

/* ==========================================================================
   4. PULSE ANIMATIONS — AI Activity Indicators
   ========================================================================== */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

@keyframes pulseSlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.03); }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 6px var(--glow-blue), 0 0 14px rgba(0, 180, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 14px var(--glow-purple), 0 0 40px rgba(139, 92, 246, 0.5);
  }
}

/* ==========================================================================
   5. SHIMMER — Loading Skeleton
   ========================================================================== */

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ==========================================================================
   6. TYPING — AI Cursor Blink
   ========================================================================== */

@keyframes typing {
  0%, 100% { border-right-color: transparent; }
  50%      { border-right-color: currentColor; }
}

/* ==========================================================================
   7. FLOAT — Gentle Floating for Idle Avatars / Elements
   ========================================================================== */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ==========================================================================
   8. GLITCH — Cybersecurity Lab Effect
   ========================================================================== */

@keyframes glitch {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); filter: none; }
  10%      { clip-path: inset(40% 0 20% 0); transform: translate(-3px, 2px);  filter: hue-rotate(90deg); }
  20%      { clip-path: inset(10% 0 60% 0); transform: translate(3px, -1px);  filter: hue-rotate(0deg); }
  30%      { clip-path: inset(50% 0 10% 0); transform: translate(-2px, 1px);  filter: hue-rotate(180deg); }
  40%      { clip-path: inset(0 0 0 0); transform: translate(0); filter: none; }
  50%      { clip-path: inset(30% 0 30% 0); transform: translate(2px, -2px);  filter: hue-rotate(270deg); }
  60%      { clip-path: inset(0 0 0 0); transform: translate(0); filter: none; }
}

/* ==========================================================================
   9. SCANLINE — CRT / Retro Terminal Feel
   ========================================================================== */

@keyframes scanline {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* ==========================================================================
   10. PARTICLE FLOAT — Neural Network Background Particles
   ========================================================================== */

@keyframes particleFloat {
  0%   { transform: translate(0, 0) scale(1);        opacity: 0.3; }
  25%  { transform: translate(15px, -30px) scale(1.1);  opacity: 0.6; }
  50%  { transform: translate(-10px, -50px) scale(0.9); opacity: 0.4; }
  75%  { transform: translate(20px, -20px) scale(1.05); opacity: 0.7; }
  100% { transform: translate(0, 0) scale(1);        opacity: 0.3; }
}

/* ==========================================================================
   11. BORDER GLOW — Animated Neon Border (Blue / Purple / Cyan Cycle)
   ========================================================================== */

@keyframes borderGlow {
  0%, 100% {
    border-color: var(--glow-blue);
    box-shadow: 0 0 8px var(--glow-blue), inset 0 0 8px rgba(0, 180, 255, 0.12);
  }
  33% {
    border-color: var(--glow-purple);
    box-shadow: 0 0 8px var(--glow-purple), inset 0 0 8px rgba(139, 92, 246, 0.12);
  }
  66% {
    border-color: var(--glow-cyan);
    box-shadow: 0 0 8px var(--glow-cyan), inset 0 0 8px rgba(0, 229, 255, 0.12);
  }
}

/* ==========================================================================
   12. WAVEFORM — Audio / TTS Visualization
   ========================================================================== */

@keyframes waveform {
  0%, 100% { transform: scaleY(0.3); }
  25%      { transform: scaleY(1); }
  50%      { transform: scaleY(0.6); }
  75%      { transform: scaleY(0.9); }
}

/* ==========================================================================
   13. SPIN — Loading Spinners
   ========================================================================== */

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ==========================================================================
   14. SHAKE — Error Feedback
   ========================================================================== */

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-4px); }
  30%, 70% { transform: translateX(4px); }
}

/* ==========================================================================
   15. CONFETTI — Celebration Particle Burst
   ========================================================================== */

@keyframes confetti {
  0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  50%  { opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg) scale(0.5); opacity: 0; }
}

/* ==========================================================================
   16. PROGRESS FILL — Smooth Progress Bar
   ========================================================================== */

@keyframes progressFill {
  from { width: 0%; }
  to   { width: var(--progress-target, 100%); }
}

/* ==========================================================================
   17. CODE HIGHLIGHT — Line Highlight Flash for Code Review
   ========================================================================== */

@keyframes codeHighlight {
  0%   { background-color: rgba(0, 180, 255, 0.35); }
  100% { background-color: transparent; }
}

/* ==========================================================================
   18. NODE CONNECT — Neural Network Node Connection
   ========================================================================== */

@keyframes nodeConnect {
  0%   { stroke-dashoffset: 200; opacity: 0; }
  30%  { opacity: 1; }
  100% { stroke-dashoffset: 0;   opacity: 1; }
}

/* ==========================================================================
   19. DATA FLOW — Pipeline Visualization
   ========================================================================== */

@keyframes dataFlow {
  0%   { transform: translateX(-100%); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(100%);  opacity: 0; }
}

/* ==========================================================================
   20. MATRIX RAIN — Subtle Character Rain for Backgrounds
   ========================================================================== */

@keyframes matrixRain {
  0%   { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.8; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* ==========================================================================
   BONUS — Platform-Specific Keyframes (Legacy Compat)
   ========================================================================== */

/* --- XP Gain Burst --- */
@keyframes xp-burst {
  0%   { opacity: 1; transform: scale(1) translateY(0); }
  50%  { transform: scale(1.3) translateY(-20px); }
  100% { opacity: 0; transform: scale(0.8) translateY(-60px); }
}

/* --- Badge Unlock --- */
@keyframes badge-unlock {
  0%   { opacity: 0; transform: scale(0) rotate(-180deg); }
  50%  { transform: scale(1.3) rotate(10deg); }
  70%  { transform: scale(0.9) rotate(-5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* --- Streak Fire Flicker --- */
@keyframes fire-flicker {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  25%      { transform: scaleY(1.1) scaleX(0.95); }
  50%      { transform: scaleY(0.95) scaleX(1.05); }
  75%      { transform: scaleY(1.05) scaleX(0.98); }
}

/* --- Code Execution Glow --- */
@keyframes code-run-glow {
  0%   { border-color: var(--accent-green, var(--glow-green)); box-shadow: 0 0 10px rgba(0, 255, 136, 0.3); }
  50%  { border-color: var(--accent-cyan, var(--glow-cyan));   box-shadow: 0 0 20px rgba(0, 229, 255, 0.3); }
  100% { border-color: var(--accent-green, var(--glow-green)); box-shadow: 0 0 10px rgba(0, 255, 136, 0.3); }
}

/* --- Mode Indicator Glow --- */
@keyframes mode-glow {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* --- Progress Ring (SVG Circular) --- */
@keyframes progress-ring {
  from { stroke-dashoffset: 283; }
}

/* --- Cursor Blink --- */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ==========================================================================
   UTILITY ANIMATION CLASSES
   ========================================================================== */

/* --- Fade Utilities ----------------------------------------------------- */
.animate-fadeIn       { animation: fadeIn       var(--anim-duration-normal) var(--ease-out) both; }
.animate-fadeOut      { animation: fadeOut      var(--anim-duration-normal) var(--ease-in) both; }
.animate-fadeInUp     { animation: fadeInUp     0.6s var(--ease-out) both; }
.animate-fadeInDown   { animation: fadeInDown   var(--anim-duration-normal) var(--ease-out) both; }
.animate-fadeInLeft   { animation: fadeInLeft   0.5s var(--ease-out) both; }
.animate-fadeInRight  { animation: fadeInRight  0.5s var(--ease-out) both; }

/* --- Slide Utilities ---------------------------------------------------- */
.animate-slideUp      { animation: slideInUp    var(--anim-duration-normal) var(--ease-out) both; }
.animate-slideDown    { animation: slideInDown  var(--anim-duration-normal) var(--ease-out) both; }
.animate-slideLeft    { animation: slideInLeft  var(--anim-duration-normal) var(--ease-out) both; }
.animate-slideRight   { animation: slideInRight var(--anim-duration-normal) var(--ease-out) both; }

/* --- Scale & Bounce Utilities ------------------------------------------- */
.animate-scaleIn      { animation: scaleIn     var(--anim-duration-normal) var(--ease-spring) both; }
.animate-scaleOut     { animation: scaleOut    var(--anim-duration-normal) var(--ease-in) both; }
.animate-bounceIn     { animation: bounceIn    var(--anim-duration-slow)   var(--ease-bounce) both; }
.animate-bounceOut    { animation: bounceOut   var(--anim-duration-slow)   var(--ease-in) both; }

/* --- AI Activity Indicators --------------------------------------------- */
.animate-pulse        { animation: pulse       1.5s  var(--ease-in-out) infinite; }
.animate-pulseSlow    { animation: pulseSlow   3s    var(--ease-in-out) infinite; }
.animate-pulseGlow    { animation: pulseGlow   2.5s  var(--ease-in-out) infinite; }

/* --- Loading & Skeleton ------------------------------------------------- */
.animate-shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s var(--ease-in-out) infinite;
}

/* --- AI & Interface Effects --------------------------------------------- */
.animate-typing       { animation: typing          0.8s  steps(1) infinite; }
.animate-float        { animation: float           3.5s  var(--ease-in-out) infinite; }
.animate-glitch       { animation: glitch          3s    steps(1) infinite; }
.animate-scanline     { animation: scanline        4s    linear infinite; }
.animate-particleFloat { animation: particleFloat   8s    var(--ease-in-out) infinite; }
.animate-borderGlow   { animation: borderGlow      4s    var(--ease-in-out) infinite; }
.animate-waveform     { animation: waveform        0.6s  var(--ease-in-out) infinite; }

/* --- Spinners ----------------------------------------------------------- */
.animate-spin         { animation: spin            0.8s  linear infinite; }
.animate-spinSlow     { animation: spinSlow        3s    linear infinite; }

/* --- Feedback ----------------------------------------------------------- */
.animate-shake        { animation: shake           0.5s  var(--ease-default) both; }
.animate-confetti     { animation: confetti        3s    ease-in forwards; }

/* --- Progress & Code ---------------------------------------------------- */
.animate-progressFill  { animation: progressFill   1.2s  var(--ease-out) both; }
.animate-codeHighlight { animation: codeHighlight  1.5s  var(--ease-out) both; }

/* --- Neural Network & Data --------------------------------------------- */
.animate-nodeConnect  { animation: nodeConnect     0.8s  var(--ease-out) both; }
.animate-dataFlow     { animation: dataFlow        2s    linear infinite; }
.animate-matrixRain   { animation: matrixRain      4s    linear infinite; }

/* --- Legacy Compat Aliases ---------------------------------------------- */
.anim-fade-up    { animation: fadeInUp    0.6s ease forwards; }
.anim-fade-down  { animation: fadeInDown  0.5s ease forwards; }
.anim-fade-left  { animation: fadeInLeft  0.5s ease forwards; }
.anim-fade-right { animation: fadeInRight 0.5s ease forwards; }
.anim-fade       { animation: fadeIn      0.4s ease forwards; }
.anim-scale      { animation: scaleIn     0.4s ease forwards; }
.slide-right     { animation: slideInRight 0.4s ease forwards; }
.slide-left      { animation: slideInLeft  0.4s ease forwards; }
.slide-up        { animation: slideInUp    0.4s ease forwards; }
.float           { animation: float 3s ease-in-out infinite; }
.badge-unlock    { animation: badge-unlock 0.8s var(--ease-bounce) forwards; }
.fire-icon       { animation: fire-flicker 0.5s ease-in-out infinite; display: inline-block; }
.code-running    { animation: code-run-glow 1s ease-in-out infinite; }
.glow-pulse      { animation: pulseGlow 2s ease-in-out infinite; }
.glow-pulse-green {
  animation: pulseGlow 2s ease-in-out infinite;
  --glow-blue: var(--accent-green, #00ff88);
  --glow-purple: var(--accent-green, #00ff88);
}

/* ==========================================================================
   ANIMATION DELAYS (100ms increments)
   ========================================================================== */

.animate-delay-100  { animation-delay: 100ms; }
.animate-delay-200  { animation-delay: 200ms; }
.animate-delay-300  { animation-delay: 300ms; }
.animate-delay-400  { animation-delay: 400ms; }
.animate-delay-500  { animation-delay: 500ms; }
.animate-delay-600  { animation-delay: 600ms; }
.animate-delay-700  { animation-delay: 700ms; }
.animate-delay-800  { animation-delay: 800ms; }
.animate-delay-900  { animation-delay: 900ms; }
.animate-delay-1000 { animation-delay: 1000ms; }

/* Legacy delay aliases */
.anim-delay-1 { animation-delay: 0.1s; opacity: 0; }
.anim-delay-2 { animation-delay: 0.2s; opacity: 0; }
.anim-delay-3 { animation-delay: 0.3s; opacity: 0; }
.anim-delay-4 { animation-delay: 0.4s; opacity: 0; }
.anim-delay-5 { animation-delay: 0.5s; opacity: 0; }

/* ==========================================================================
   ANIMATION DURATIONS
   ========================================================================== */

.animate-duration-fast   { animation-duration: var(--anim-duration-fast); }
.animate-duration-normal { animation-duration: var(--anim-duration-normal); }
.animate-duration-slow   { animation-duration: var(--anim-duration-slow); }

/* ==========================================================================
   HOVER INTERACTION EFFECTS
   ========================================================================== */

.hover-scale {
  transition: transform var(--anim-duration-fast) var(--ease-out);
}
.hover-scale:hover {
  transform: scale(1.05);
}

.hover-glow {
  transition: box-shadow var(--anim-duration-normal) var(--ease-out);
}
.hover-glow:hover {
  box-shadow: 0 0 10px var(--glow-blue), 0 0 30px rgba(0, 180, 255, 0.3);
}

.hover-lift {
  transition: transform var(--anim-duration-fast) var(--ease-out),
              box-shadow var(--anim-duration-fast) var(--ease-out);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   TRANSITION UTILITIES
   ========================================================================== */

.transition-all {
  transition-property: all;
  transition-duration: var(--anim-duration-normal);
  transition-timing-function: var(--ease-default);
}

.transition-colors {
  transition-property: color, background-color, border-color, outline-color, fill, stroke;
  transition-duration: var(--anim-duration-fast);
  transition-timing-function: var(--ease-default);
}

.transition-transform {
  transition-property: transform;
  transition-duration: var(--anim-duration-fast);
  transition-timing-function: var(--ease-default);
}

.transition-opacity {
  transition-property: opacity;
  transition-duration: var(--anim-duration-normal);
  transition-timing-function: var(--ease-default);
}

/* ==========================================================================
   PLATFORM-SPECIFIC COMPONENT CLASSES
   ========================================================================== */

/* --- Neural Particle Background ----------------------------------------- */
.neural-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.neural-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-blue, var(--glow-blue));
  opacity: 0.3;
  animation: particleFloat 8s ease-in-out infinite;
}

.neural-particle:nth-child(2n) { background: var(--accent-purple, var(--glow-purple)); animation-duration: 10s; }
.neural-particle:nth-child(3n) { background: var(--accent-green, var(--glow-green));  animation-duration: 12s; animation-delay: 2s; }
.neural-particle:nth-child(4n) { background: var(--accent-cyan, var(--glow-cyan));    animation-duration: 9s;  animation-delay: 1s; }

/* --- SVG Neural Connection Lines ---------------------------------------- */
.neural-line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: nodeConnect 1s ease forwards;
}

/* --- Typing Cursor ------------------------------------------------------ */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-blue, var(--glow-blue));
  margin-left: 2px;
  animation: blink-cursor 0.8s step-end infinite;
  vertical-align: text-bottom;
}

/* --- XP Burst Effect ---------------------------------------------------- */
.xp-burst {
  position: absolute;
  font-family: var(--font-display, inherit);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-green, var(--glow-green));
  pointer-events: none;
  animation: xp-burst 1.2s ease forwards;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* --- Glitch Text -------------------------------------------------------- */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
}

.glitch-text::before {
  color: var(--accent-red, #ff4444);
  animation: glitch 3s infinite;
  clip-path: inset(0 0 0 0);
}

.glitch-text::after {
  color: var(--accent-cyan, var(--glow-cyan));
  animation: glitch 3s infinite reverse;
  clip-path: inset(0 0 0 0);
}

/* --- Waveform Bars ------------------------------------------------------ */
.waveform-bar {
  width: 3px;
  background: var(--accent-blue, var(--glow-blue));
  border-radius: 2px;
  transform-origin: bottom;
  animation: waveform 0.6s ease-in-out infinite;
}

.waveform-bar:nth-child(2) { animation-delay: 0.1s; }
.waveform-bar:nth-child(3) { animation-delay: 0.2s; }
.waveform-bar:nth-child(4) { animation-delay: 0.3s; }
.waveform-bar:nth-child(5) { animation-delay: 0.15s; }

/* --- Algorithm Step Highlight ------------------------------------------- */
.algo-step-active {
  animation: codeHighlight 0.5s ease forwards;
  border-left: 3px solid var(--accent-blue, var(--glow-blue));
}

/* --- Progress Ring (SVG Circular) --------------------------------------- */
.progress-ring-circle {
  transition: stroke-dashoffset var(--anim-duration-slow);
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* --- Confetti Pieces ---------------------------------------------------- */
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  z-index: 9999;
  pointer-events: none;
  animation: confetti 3s ease-in forwards;
}

/* --- Mode Indicators ---------------------------------------------------- */
.mode-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: mode-glow 1.5s ease-in-out infinite;
}

.mode-explain   { background: var(--accent-blue, var(--glow-blue)); }
.mode-socratic  { background: var(--accent-amber, #f59e0b); }
.mode-debug     { background: var(--accent-red, #ff4444); }
.mode-challenge { background: var(--accent-green, var(--glow-green)); }
.mode-project   { background: var(--accent-purple, var(--glow-purple)); }
.mode-revision  { background: var(--accent-cyan, var(--glow-cyan)); }
.mode-ethics    { background: #FF6B9D; }
.mode-career    { background: #FFD700; }
.mode-research  { background: #FF8C42; }
.mode-mentor    { background: #E040FB; }

/* --- Intersection Observer Reveal --------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hover Card Tilt ---------------------------------------------------- */
.tilt-card {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tilt-card:hover {
  transform: rotateX(2deg) rotateY(-2deg) scale(1.02);
}

/* ==========================================================================
   REDUCED MOTION — Accessibility
   Disables all animations and transitions for users who prefer reduced motion.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
