/* Text reveal animations */
.text-reveal,
.text-reveal-delay,
.text-reveal-delay-2 {
    position: relative;
    overflow: hidden;
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    animation: textReveal 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.text-reveal-delay {
    font-weight: 100;
    animation-delay: 0.3s;
}

.text-reveal-delay-2 {
    animation-delay: 0.6s;
}

@keyframes textReveal {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Fade in animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.9s;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for scroll indicator */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.7;
    }
}

/* Tech item hover animation */
.tech-item {
    animation: techFadeIn 0.5s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

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

/* Timeline item animations */
.timeline-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s ease;
}

.timeline-item.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered animation delays for tech cloud */
.tech-cloud .tech-item:nth-child(1) { animation-delay: 0.1s; }
.tech-cloud .tech-item:nth-child(2) { animation-delay: 0.2s; }
.tech-cloud .tech-item:nth-child(3) { animation-delay: 0.3s; }
.tech-cloud .tech-item:nth-child(4) { animation-delay: 0.4s; }
.tech-cloud .tech-item:nth-child(5) { animation-delay: 0.5s; }
.tech-cloud .tech-item:nth-child(6) { animation-delay: 0.6s; }
.tech-cloud .tech-item:nth-child(7) { animation-delay: 0.7s; }
.tech-cloud .tech-item:nth-child(8) { animation-delay: 0.8s; }
.tech-cloud .tech-item:nth-child(9) { animation-delay: 0.9s; }
.tech-cloud .tech-item:nth-child(10) { animation-delay: 1s; }
.tech-cloud .tech-item:nth-child(11) { animation-delay: 1.1s; }
.tech-cloud .tech-item:nth-child(12) { animation-delay: 1.2s; }

/* Project card reveal animation */
.project-card {
    opacity: 0;
    transform: translateY(30px);
}

.project-card.animate {
    animation: cardReveal 0.7s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.project-card:nth-child(2).animate { animation-delay: 0.2s; }
.project-card:nth-child(3).animate { animation-delay: 0.4s; }
.project-card:nth-child(4).animate { animation-delay: 0.6s; }

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

/* Neural network nodes animation for background */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.node {
    position: absolute;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 5s infinite ease-in-out;
}

/* Section transition animations */
.section {
    transition: opacity 0.5s ease;
}

.section:not(.active) {
    opacity: 0.3;
}

/* Contact form input focus animation */
.form-group input:focus,
.form-group textarea:focus {
    animation: focusPulse 1s ease-in-out;
}

@keyframes focusPulse {
    0% { box-shadow: 0 0 0 0 rgba(110, 87, 224, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(110, 87, 224, 0); }
    100% { box-shadow: 0 0 0 0 rgba(110, 87, 224, 0); }
}

/* Button hover effect */
@keyframes buttonGlow {
    0% { box-shadow: 0 0 5px rgba(110, 87, 224, 0.5); }
    50% { box-shadow: 0 0 15px rgba(110, 87, 224, 0.8); }
    100% { box-shadow: 0 0 5px rgba(110, 87, 224, 0.5); }
}

.cta-button:hover {
    animation: buttonGlow 2s infinite;
}

