/* ==========================================================================
   CINEMATIC KEYFRAMES & TRANSITIONS - CHITTURI NAGA RAJA TEJA ROHITH
   ========================================================================== */

/* Cursor Blink for Terminal & Hero */
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Mouse Scroll Animation */
@keyframes scrollScroll {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.3; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Core Pulsing Glow */
@keyframes corePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.4);
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
        box-shadow: 0 0 0 8px rgba(34, 211, 238, 0);
    }
}

/* Radar Rings */
@keyframes radarRing {
    0% {
        transform: scale(0.95);
        opacity: 1;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Wave Bar Animation for Voice Introduction */
@keyframes wavePulse {
    0% { height: 4px; }
    100% { height: 18px; }
}

/* Typing Message Dot Animation */
@keyframes typingPulse {
    0% { transform: translateY(0); opacity: 0.3; }
    100% { transform: translateY(-4px); opacity: 1; }
}

/* SVG Line Drawing Path Pipeline Flow */
@keyframes pipelineFlow {
    from {
        stroke-dashoffset: 120;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Dynamic packet moving along paths */
@keyframes flowPacket {
    0% {
        offset-distance: 0%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        offset-distance: 100%;
        opacity: 0;
    }
}

/* Glowing Ambient Blobs Movement */
@keyframes ambientDrift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* ==========================================================================
   SCROLL TRIGGERS & REVEALS
   ========================================================================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    will-change: transform, opacity;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.reveal-active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered load rules for children of active items */
.reveal-active.stagger-container > * {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-active.stagger-container > *:nth-child(1) { animation-delay: 0.1s; }
.reveal-active.stagger-container > *:nth-child(2) { animation-delay: 0.2s; }
.reveal-active.stagger-container > *:nth-child(3) { animation-delay: 0.3s; }
.reveal-active.stagger-container > *:nth-child(4) { animation-delay: 0.4s; }
.reveal-active.stagger-container > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes staggerReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating effect for cards and nodes */
.floating-element {
    animation: floatAnim 6s ease-in-out infinite alternate;
}

@keyframes floatAnim {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

/* Ambient glow movement integration */
.glow-1 {
    animation: ambientDrift 20s infinite alternate ease-in-out;
}
.glow-2 {
    animation: ambientDrift 25s infinite alternate-reverse ease-in-out;
}
.glow-3 {
    animation: ambientDrift 30s infinite alternate ease-in-out;
}
