/* ==========================================================================
   DEV KUMAR RAY - CYBERSECURITY & AI DEVELOPER PORTFOLIO
   Animations & Motion Design (animations.css)
   ========================================================================== */

/* ==========================================================================
   1. SCROLL REVEAL (Intersection Observer)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

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

/* Staggered Delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* ==========================================================================
   2. TYPING EFFECT CURSOR
   ========================================================================== */
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-cursor::after {
    content: "▋";
    display: inline-block;
    color: var(--primary);
    margin-left: 6px;
    font-size: 0.9em;
    animation: cursorBlink 0.9s step-end infinite;
    vertical-align: baseline;
}

/* ==========================================================================
   3. STATUS DOT PULSE
   ========================================================================== */
@keyframes statusPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    70% {
        transform: scale(2.2);
        opacity: 0;
    }
    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

/* ==========================================================================
   4. CONTINUOUS MICRO-ANIMATIONS
   ========================================================================== */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.animate-float {
    animation: float 5.5s ease-in-out infinite;
}

@keyframes subtleGlow {
    0%, 100% {
        box-shadow: 0 0 25px rgba(var(--primary-rgb), 0.08);
    }
    50% {
        box-shadow: 0 0 45px rgba(var(--primary-rgb), 0.22);
    }
}

.animate-glow {
    animation: subtleGlow 4s ease-in-out infinite;
}

/* ==========================================================================
   5. HOVER LIFT & GLOW UTILITIES
   ========================================================================== */
.hover-lift {
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-glow:hover {
    box-shadow: 0 10px 30px var(--primary-glow);
}

/* ==========================================================================
   6. MODAL & LIGHTBOX ANIMATIONS
   ========================================================================== */
@keyframes modalBackdropFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalContentZoomIn {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-overlay.active {
    animation: modalBackdropFadeIn 0.25s ease-out forwards;
}

.lightbox-overlay.active img {
    animation: modalContentZoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   7. REDUCED MOTION PREFERENCE
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .animate-float {
        animation: none !important;
    }

    .typing-cursor::after {
        animation: none;
        opacity: 1;
    }
}