/* ========================================
   TERMINAL THEME - Animations
   ======================================== */

/* === TYPING EFFECT === */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes typing-text {
    from {
        max-width: 0;
    }

    to {
        max-width: 100%;
    }
}

/* === CURSOR BLINK === */
@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/* === CRT SCAN LINE EFFECT === */
@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100vh);
    }
}

/* === GREEN GLOW PULSE === */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(0, 255, 0, 0.5), 0 0 20px rgba(0, 255, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.8), 0 0 30px rgba(0, 255, 0, 0.5), 0 0 40px rgba(0, 255, 0, 0.3);
    }
}

/* === TEXT GLOW === */
@keyframes textGlow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    }

    50% {
        text-shadow: 0 0 20px rgba(0, 255, 0, 0.8), 0 0 30px rgba(0, 255, 0, 0.5);
    }
}

/* === FADE IN UP === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* === FADE IN === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* === SLIDE IN RIGHT === */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === BOOT SEQUENCE === */
@keyframes bootSequence {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* === FLICKER EFFECT === */
@keyframes flicker {

    0%,
    100% {
        opacity: 1;
    }

    41%,
    43% {
        opacity: 0.8;
    }

    45% {
        opacity: 1;
    }

    47%,
    49% {
        opacity: 0.9;
    }
}

/* === UTILITY CLASSES === */
.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 2s steps(40, end) forwards;
}

.cursor::after {
    content: '▋';
    animation: blink 1s step-end infinite;
    color: var(--terminal-green);
}

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

.text-glow {
    animation: textGlow 2s ease-in-out infinite;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* === STAGGERED ANIMATIONS === */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

/* === HOVER EFFECTS === */
.hover-glow {
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--glow-green-strong);
    transform: translateY(-4px);
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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