/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(100, 255, 218, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(100, 255, 218, 0); }
    100% { box-shadow: 0 0 0 0 rgba(100, 255, 218, 0); }
}

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

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent); }
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes matrixRain {
    0% { 
        background-position: 0 0;
        opacity: 0.05;
    }
    50% { 
        opacity: 0.1;
    }
    100% { 
        background-position: 0 100%;
        opacity: 0.05;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.fade-in.delay-1 {
    animation-delay: 0.2s;
}

.fade-in.delay-2 {
    animation-delay: 0.4s;
}

.fade-in.delay-3 {
    animation-delay: 0.6s;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
    opacity: 0;
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out forwards;
    opacity: 0;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Typewriter Animation */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation: 
        typewriter 3.5s steps(40, end),
        blink 0.75s step-end infinite;
}

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

/* Scrolling Matrix Background */
.matrix-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(0deg, 
            rgba(0, 255, 65, 0.03) 25%, 
            transparent 25%, 
            transparent 50%, 
            rgba(0, 255, 65, 0.03) 50%, 
            rgba(0, 255, 65, 0.03) 75%, 
            transparent 75%, 
            transparent);
    background-size: 4px 4px;
    z-index: -1;
    opacity: 0.1;
    animation: matrixRain 20s linear infinite;
}

/* Gradient Animation */
.gradient-text {
    background: linear-gradient(90deg, var(--accent), var(--neon-purple), var(--neon-blue), var(--accent));
    background-size: 300% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 4s ease infinite;
}

/* Hover Animations */
.hover-lift {
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Scroll Animations */
/* These are applied using JavaScript in animations.js */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}