/* Animation Styles */

/* Keyframes */
@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);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

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

.zoom-in {
    animation: zoomIn 0.6s ease-out;
}

.bounce {
    animation: bounce 2s infinite;
}

.pulse {
    animation: pulse 2s infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Delay Classes */
.delay-1 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.delay-2 {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.delay-3 {
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

.delay-4 {
    animation-delay: 0.8s;
    animation-fill-mode: both;
}

.delay-5 {
    animation-delay: 1s;
    animation-fill-mode: both;
}

/* Scroll Animation Classes */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease-out;
}

.scroll-animate-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease-out;
}

.scroll-animate-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease-out;
}

.scroll-animate-scale.animate {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Animation */
.stagger-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.stagger-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 45, 145, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(24, 160, 251, 0.3);
}

/* Loading Animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Text Animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    animation: textReveal 0.8s ease-out forwards;
}

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

/* Counter Animation */
.counter {
    transition: all 0.3s ease;
}

.counter.counting {
    color: var(--secondary-color);
    transform: scale(1.1);
}

/* Page Transition */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.page-transition.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Parallax Elements */
.parallax {
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

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

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

.timeline-item:nth-child(even) {
    transform: translateX(50px);
}

.timeline-item:nth-child(even).animate {
    transform: translateX(0);
}

/* Portfolio Card Animation */
.portfolio-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.portfolio-card.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Achievement Card Animation */
.achievement-card {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease-out;
}

.achievement-card.animate {
    opacity: 1;
    transform: scale(1);
}

/* Navigation Animation */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(24, 160, 251, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

/* Button Animation */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Form Animation */
.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    transform: translateY(-2px);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Mobile Specific Animations */
@media (max-width: 768px) {
    .fade-in-up,
    .fade-in-left,
    .fade-in-right {
        animation-duration: 0.6s;
    }
    
    .scroll-animate {
        transform: translateY(20px);
    }
    
    .timeline-item {
        transform: translateY(20px);
    }
    
    .timeline-item:nth-child(even) {
        transform: translateY(20px);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}