/* animations.css - Custom Animations */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100px);
        opacity: 0;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-out;
}

.slide-left {
    animation: slideInLeft 1s ease-out;
}

.slide-right {
    animation: slideInRight 1s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

.spin {
    animation: spin 1s linear infinite;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.2);
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Button Animations */
.btn-pulse:hover {
    animation: pulse 0.5s;
}

/* CV Download Button Special Animation */
.cv-download-btn {
    position: relative;
    overflow: hidden;
}

.cv-download-btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.cv-download-btn:focus:after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Circuit Animation for Hero */
.circuit-bg:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, transparent 50%, rgba(0, 102, 204, 0.1) 50%),
        linear-gradient(transparent 50%, rgba(0, 102, 204, 0.1) 50%);
    background-size: 50px 50px;
    animation: circuitMove 20s linear infinite;
}

@keyframes circuitMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* Notification Animation */
.notification {
    animation: slideInRight 0.3s ease;
}

.notification.fade-out {
    animation: slideOutRight 0.3s ease forwards;
}

/* Skill Bar Animation */
.skill-bar {
    height: 8px;
    background: var(--gray);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.skill-progress {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.skill-category:hover .skill-progress {
    width: var(--skill-width);
}