/* 
* Animations Stylesheet
* Author: Krishchal Regmi
* Version: 1.0
*/

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

/* =========== Animation Classes =========== */
.animate {
    opacity: 0;
}

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

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

.animate.fade-in-down {
    animation: fadeInDown 1s ease forwards;
}

.animate.fade-in-left {
    animation: fadeInLeft 1s ease forwards;
}

.animate.fade-in-right {
    animation: fadeInRight 1s ease forwards;
}

.animate.pulse {
    animation: pulse 2s infinite;
}

.animate.bounce {
    animation: bounce 2s infinite;
}

/* Delay Classes */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-800 {
    animation-delay: 0.8s;
}

.delay-900 {
    animation-delay: 0.9s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* Animated Elements */
.hero-content {
    animation: fadeIn 1.5s ease-in-out;
}

.profile-image {
    animation: fadeInDown 1.2s ease-in-out;
}

.hero-text h1 {
    animation: fadeInUp 1.2s ease-in-out 0.3s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-text h2 {
    animation: fadeInUp 1.2s ease-in-out 0.5s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-text p {
    animation: fadeInUp 1.2s ease-in-out 0.7s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-cta {
    animation: fadeInUp 1.2s ease-in-out 0.9s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.social-links {
    animation: fadeInUp 1.2s ease-in-out 1.1s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.section-header {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.skills-content, .about-content, .experience-content, 
.education-content, .projects-content, .contact-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.skills-content.visible, .about-content.visible, .experience-content.visible,
.education-content.visible, .projects-content.visible, .contact-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-item, .project-card, .education-item, .timeline-item, .contact-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.skill-item.visible, .project-card.visible, .education-item.visible, 
.timeline-item.visible, .contact-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items */
.skill-item:nth-child(1), .project-card:nth-child(1), 
.education-item:nth-child(1), .contact-item:nth-child(1) {
    transition-delay: 0.1s;
}

.skill-item:nth-child(2), .project-card:nth-child(2), 
.education-item:nth-child(2), .contact-item:nth-child(2) {
    transition-delay: 0.2s;
}

.skill-item:nth-child(3), .project-card:nth-child(3), 
.education-item:nth-child(3), .contact-item:nth-child(3) {
    transition-delay: 0.3s;
}

.skill-item:nth-child(4), .project-card:nth-child(4), 
.education-item:nth-child(4), .contact-item:nth-child(4) {
    transition-delay: 0.4s;
}

.skill-item:nth-child(5), .project-card:nth-child(5) {
    transition-delay: 0.5s;
}

.skill-item:nth-child(6), .project-card:nth-child(6) {
    transition-delay: 0.6s;
}

.skill-item:nth-child(7) {
    transition-delay: 0.7s;
}

.skill-item:nth-child(8) {
    transition-delay: 0.8s;
}

/* Resume download button animation */
.resume-download {
    animation: slideInFromBottom 1s ease-in-out 1.5s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.download-btn {
    animation: pulse 2s infinite;
    animation-delay: 3s;
}
