/* Advanced Animations for Version 6 - Dark & Dynamic */

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(57, 255, 20, 0.6), 0 0 60px rgba(57, 255, 20, 0.4);
    }
}

@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 rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes backgroundMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Particle Effect Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(90, 164, 84, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(123, 201, 111, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(57, 255, 20, 0.02) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: backgroundMove 20s ease infinite;
    pointer-events: none;
    z-index: 0;
}

/* Glowing Lines Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(57, 255, 20, 0.05),
        transparent
    );
    animation: shimmer 3s infinite;
    pointer-events: none;
    z-index: 0;
}

/* Service Card Hover Animations */
.service {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        transparent,
        rgba(57, 255, 20, 0.1),
        transparent
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.service:hover::before {
    transform: translateX(100%);
}

/* Service Image Zoom Effect */
.service-image {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.service:hover .service-image {
    transform: scale(1.08);
    filter: brightness(1.15) contrast(1.05);
}

/* Animated Border */
@keyframes borderAnimation {
    0%, 100% {
        border-image-source: linear-gradient(0deg, #39ff14, #39ff14);
    }
    50% {
        border-image-source: linear-gradient(180deg, #39ff14, #39ff14);
    }
}

.service {
    border-image-slice: 1;
    animation: borderAnimation 3s ease-in-out infinite;
}

/* Title Animation */
h1, h2, h3 {
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #39ff14, transparent);
    animation: pulse 2s ease-in-out infinite;
}

/* Logo Animation */
.logo {
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(57, 255, 20, 0.5));
}

/* Navigation Link Hover Effect */
nav a {
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #39ff14, transparent);
    transition: left 0.4s;
}

nav a:hover::before {
    left: 100%;
}

/* Button Ripple Effect */
button, .submit-btn {
    position: relative;
    overflow: hidden;
}

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

button:active::after, .submit-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Scroll-triggered Animations */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax Effect */
.parallax-container {
    transform-style: preserve-3d;
}

.parallax-layer {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Smooth scrolling optimization */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero, .contact-section {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* Experience Badge Float */
.experience {
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(90, 164, 84, 0.4);
}

/* Back to Top Button Glow */
.back-to-top {
    animation: glow 2s ease-in-out infinite;
}

/* Contact Cards Slide In */
.contact-info-card {
    animation: slideInLeft 0.8s ease-out;
}

.contact-form-card {
    animation: slideInRight 0.8s ease-out;
}

/* Input Focus Glow */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
    transform: scale(1.02);
}

/* Footer Link Hover */
.footer-links a {
    transition: all 0.3s ease;
}

.footer-links a:hover {
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.8);
}

/* Staggered Service Card Animation */
.service:nth-child(1) { animation-delay: 0.1s; }
.service:nth-child(2) { animation-delay: 0.2s; }
.service:nth-child(3) { animation-delay: 0.3s; }
.service:nth-child(4) { animation-delay: 0.4s; }
.service:nth-child(5) { animation-delay: 0.5s; }
.service:nth-child(6) { animation-delay: 0.6s; }
