/* ==========================================================================
   CSS Animations & Keyframes
   ========================================================================== */

/* Subtle glow animation for text */
@keyframes subtle-glow {
    0%, 100% {
        text-shadow: 0 0 8px rgba(var(--cyber-blue-rgb), 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(var(--cyber-blue-rgb), 0.8),
                     0 0 30px rgba(var(--cyber-blue-rgb), 0.4);
    }
}

/* Pulsing dot animation */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 8px currentColor;
    }
    50% {
        opacity: 0.5;
        box-shadow: 0 0 4px currentColor;
    }
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Gradient shift animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale in animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   Animation Utility Classes
   ========================================================================== */

.pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

.floating-element {
    animation: float 6s ease-in-out infinite;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.5s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 0.5s ease forwards;
}

/* Animation delays */
.animation-delay-100 { animation-delay: 100ms; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-300 { animation-delay: 300ms; }
.animation-delay-400 { animation-delay: 400ms; }
.animation-delay-500 { animation-delay: 500ms; }

/* ==========================================================================
   Typing Animation
   ========================================================================== */

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    0%, 50% { border-color: var(--cyber-blue); }
    51%, 100% { border-color: transparent; }
}

@keyframes typing-glow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(var(--cyber-blue-rgb), 0.5);
    }
    50% {
        text-shadow: 0 0 15px rgba(var(--cyber-blue-rgb), 0.8),
                     0 0 25px rgba(var(--cyber-blue-rgb), 0.4);
    }
}

.typing-container {
    display: inline-block;
    position: relative;
}

.typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--cyber-blue);
    animation:
        typing 3.5s steps(40, end) forwards,
        blink-caret 0.75s step-end infinite,
        typing-glow 2s ease-in-out infinite;
    width: 0;
    font-family: var(--font-mono);
}

.typing-text.typing-complete {
    animation:
        blink-caret 0.75s step-end infinite,
        typing-glow 2s ease-in-out infinite;
    width: auto;
}

/* Multiple typing lines with delays */
.typing-line-1 { animation-delay: 0s; }
.typing-line-2 { animation-delay: 3.5s; }
.typing-line-3 { animation-delay: 7s; }
