/* ===== ADVANCED ANIMATIONS & 5D EFFECTS ===== */

/* Parallax Effects */
.parallax-element {
    transform-style: preserve-3d;
    will-change: transform;
}

/* 3D Card Effects */
.service-card,
.about-card,
.contact-card,
.portfolio-item {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.service-card:hover,
.about-card:hover,
.contact-card:hover,
.portfolio-item:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
}

/* Floating Animation Variations */
@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

@keyframes floatFast {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-25px) rotate(-2deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
    }
}

@keyframes slideInLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Particle Effects */
.particle {
    position: absolute;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 6s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Text Animation Effects */
.animated-text {
    overflow: hidden;
}

.animated-text span {
    display: inline-block;
    animation: textReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    transform: translateY(100%);
}

@keyframes textReveal {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Button Hover Effects */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

/* Navigation Hover Effects */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    left: 0;
}

/* Service Card Hover Effects */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
}

.service-card:hover::after {
    transform: scale(1);
}

/* Portfolio Filter Animation */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

/* Form Input Focus Effects */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    transform: scale(1.02);
}

/* Loading Screen Animations */
.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Scroll-triggered Animations */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Counter Animation */
.stat-number {
    transition: all 0.3s ease;
}

.stat-number.animate {
    animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Floating Elements Enhanced */
.floating-card {
    transition: all 0.3s ease;
}

.floating-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

/* Hero Grid Animation */
.hero-grid {
    animation: gridMove 20s linear infinite, gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

/* Logo Animation */
.logo-text {
    transition: all 0.3s ease;
}

.navbar:hover .logo-text {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Social Links Hover */
.social-link {
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.4);
}

/* Newsletter Form Animation */
.newsletter-form input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.newsletter-form button:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Portfolio Overlay Animation */
.portfolio-overlay {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.portfolio-item:hover .portfolio-overlay {
    background: rgba(0, 0, 0, 0.9);
}

.portfolio-info {
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}

/* Contact Form Animation */
.contact-form {
    transition: all 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.1);
}

/* Footer Animation */
.footer-section {
    transition: all 0.3s ease;
}

.footer-section:hover {
    transform: translateY(-5px);
}

/* Responsive Animations */
@media (max-width: 768px) {
    .floating-card {
        animation: floatSlow 8s ease-in-out infinite;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #00ffff;
        --secondary-color: #ff00ff;
        --dark-bg: #000000;
        --light-text: #ffffff;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {

    .service-card,
    .about-card,
    .contact-card {
        background: rgba(255, 255, 255, 0.03);
    }
}