/* Fade In Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll Animations */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

section.show {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Title Animation */
.hero-title {
    animation: fadeInUp 1s ease 0.5s both;
}

/* Stagger Animation for Project Cards */
.project-card:nth-child(1) {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.project-card:nth-child(2) {
    animation: fadeInUp 0.8s ease 0.4s both;
}

.project-card:nth-child(3) {
    animation: fadeInUp 0.8s ease 0.6s both;
}

.project-card:nth-child(4) {
    animation: fadeInUp 0.8s ease 0.8s both;
}

/* Pulse Animation for CTA Button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(65, 183, 131, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(65, 183, 131, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(65, 183, 131, 0);
    }
}

.btn-primary:hover {
    animation: pulse 2s infinite;
}

/* Loading Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Smooth Transitions for Theme Changes */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    @keyframes hexagonMove {
        0% {
            transform: translate(0, 0);
        }

        100% {
            transform: translate(-40px, -69px);
        }
    }
}