/* NetPack - Cool Section Effects */

/* ============================================
   HEADER SECTION - Particle Background Effect
   ============================================ */
header {
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(74, 107, 181, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(74, 107, 181, 0.08) 0%, transparent 50%);
    animation: headerPulse 15s ease-in-out infinite;
    pointer-events: none;
}

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

/* Floating animation for header elements */
.centerHeader h1,
.centerHeader .creative {
    animation: floatHeader 6s ease-in-out infinite;
}

.centerHeader .creative {
    animation-delay: 0.5s;
}

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

/* ============================================
   FEATURED TOOLS SECTION - Gradient Wave Effect
   ============================================ */
.featured-tools-section {
    position: relative;
    overflow: hidden;
}

.featured-tools-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(74, 107, 181, 0.05) 50%, transparent 70%);
    animation: waveMove 20s linear infinite;
    pointer-events: none;
}

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

/* Card hover effects with 3D transform */
.featured-tool-card {
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.featured-tool-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(74, 107, 181, 0.3);
}

/* ============================================
   ABOUT SECTION - Ripple Effect
   ============================================ */
#about {
    position: relative;
    overflow: hidden;
}

#about::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(74, 107, 181, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 8s ease-out infinite;
    pointer-events: none;
}

@keyframes ripple {
    0% {
        width: 300px;
        height: 300px;
        opacity: 0.8;
    }
    100% {
        width: 1500px;
        height: 1500px;
        opacity: 0;
    }
}

/* Service cards with stagger animation */
.circ li {
    animation: fadeInUp 0.8s ease-out forwards;
}

.circ li:nth-child(1) { animation-delay: 0.1s; }
.circ li:nth-child(2) { animation-delay: 0.2s; }
.circ li:nth-child(3) { animation-delay: 0.3s; }
.circ li:nth-child(4) { animation-delay: 0.4s; }
.circ li:nth-child(5) { animation-delay: 0.5s; }
.circ li:nth-child(6) { animation-delay: 0.6s; }

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

/* Hover effect with glow - ensure opacity stays at 1 */
.circ li:hover {
    opacity: 1 !important;
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(74, 107, 181, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(74, 107, 181, 0.6);
    }
}

/* ============================================
   IN-HOUSE SECTION - Parallax Layers Effect
   ============================================ */
#In-House {
    position: relative;
    overflow: hidden;
}

#In-House::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, transparent 0%, rgba(74, 107, 181, 0.03) 50%, transparent 100%);
    animation: parallaxSlide 25s ease-in-out infinite;
    pointer-events: none;
}

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

/* Card flip effect on hover */
.card {
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
}

/* Shimmer effect on card images */
.card_image {
    position: relative;
    overflow: hidden;
}

.card_image::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.card:hover .card_image::after {
    transform: translateX(100%);
}

/* ============================================
   WORK SECTION - Zoom & Tilt Effect
   ============================================ */
#Work {
    position: relative;
    overflow: hidden;
}

#Work::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at top left, rgba(74, 107, 181, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(102, 126, 234, 0.05) 0%, transparent 50%);
    animation: breathe 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes breathe {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Portfolio items with perspective */
.workMainImg {
    perspective: 1000px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.workMainImg:hover {
    transform: translateY(-10px) rotateY(5deg);
}

/* Image reveal effect */
.workMainImg img {
    transition: transform 0.6s ease;
}

.workMainImg:hover img {
    transform: scale(1.1);
}

/* ============================================
   CONTACT SECTION - Magnetic Field Effect
   ============================================ */
#Contact {
    position: relative;
    overflow: hidden;
}

#Contact::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at center, rgba(74, 107, 181, 0.08) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: magneticPulse 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes magneticPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

/* Form inputs with focus effect */
.mail input,
.mail textarea {
    transition: all 0.3s ease;
    position: relative;
}

.mail input:focus,
.mail textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 107, 181, 0.2);
}

/* Button ripple effect */
.mail button,
.mail input[type="submit"] {
    position: relative;
    overflow: hidden;
}

.mail button::after,
.mail input[type="submit"]::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;
}

.mail button:active::after,
.mail input[type="submit"]:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   SCROLL ANIMATIONS - Intersection Observer
   ============================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Different reveal directions */
.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */
body.dark header::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(74, 107, 181, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(102, 126, 234, 0.15) 0%, transparent 50%);
}

body.dark .featured-tools-section::before {
    background: 
        linear-gradient(45deg, transparent 30%, rgba(74, 107, 181, 0.08) 50%, transparent 70%);
}

body.dark #about::after {
    background: radial-gradient(circle, rgba(74, 107, 181, 0.15) 0%, transparent 70%);
}

body.dark .circ li:hover {
    box-shadow: 0 0 30px rgba(74, 107, 181, 0.5);
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Disable effects on mobile for performance */
@media (max-width: 768px) {
    header::before,
    .featured-tools-section::before,
    #about::after,
    #In-House::before,
    #Work::before,
    #Contact::before {
        animation: none;
    }
    
    .featured-tool-card:hover {
        transform: translateY(-5px);
    }
    
    .card:hover {
        transform: translateY(-10px);
    }
}

/* ============================================
   CURSOR EFFECTS (Desktop Only)
   ============================================ */
@media (min-width: 769px) {
    .featured-tool-card,
    .card,
    .workMainImg,
    .circ li {
        cursor: pointer;
    }
    
    /* Magnetic cursor effect */
    .featured-tool-card:hover,
    .card:hover,
    .workMainImg:hover {
        transition: transform 0.2s ease-out;
    }
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(74, 107, 181, 0.1) 50%,
        transparent 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ============================================
   RIPPLE EFFECT STYLES
   ============================================ */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: rippleAnimation 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}
