/* Enhanced Visual Effects for Portfolio */

/* Animated Gradient Background */
body {
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(47, 115, 242, 0.15) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.dark body::before {
    background: radial-gradient(circle, rgba(47, 115, 242, 0.1) 0%, transparent 70%);
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Glassmorphism card effects */
.card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .card {
    background-color: rgba(8, 23, 56, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Enhanced Button Gradients */
.btn-primary {
    background: linear-gradient(135deg, #2f73f2 0%, #1e5fd9 100%);
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Floating Animation for Hero Image */
.hero-image img {
    animation: heroFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(47, 115, 242, 0.3));
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Glowing effect on primary elements */
.section-badge-dot {
    box-shadow: 0 0 20px var(--success);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 20px var(--success);
    }

    50% {
        box-shadow: 0 0 30px var(--success), 0 0 40px rgba(60, 210, 120, 0.5);
    }
}

/* Enhanced Service Card Animations */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 5px 15px rgba(47, 115, 242, 0.4));
}

/* Skill Bar Glow Effect */
.skill-progress {
    box-shadow: 0 0 10px rgba(47, 115, 242, 0.5);
}

/* Portfolio Card Enhanced Hover */
.portfolio-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Smooth Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transform-origin: left;
    z-index: 100;
}

/* Text Selection */
::selection {
    background-color: var(--primary);
    color: white;
}

::-moz-selection {
    background-color: var(--primary);
    color: white;
}

/* Enhanced Form Inputs */
.form-input,
.form-textarea {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-input:focus,
.form-textarea:focus {
    box-shadow: 0 0 0 3px rgba(47, 115, 242, 0.15), 0 0 20px rgba(47, 115, 242, 0.1);
}

/* Animated Underline for Links */
.service-link,
.footer-link {
    position: relative;
}

.service-link::after,
.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.service-link:hover::after,
.footer-link:hover::after {
    width: 100%;
}

/* Counter Animation on Scroll */
.counter-value {
    background: linear-gradient(135deg, var(--primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Testimonial Card Enhancement */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.1;
    font-family: Georgia, serif;
}

/* Dark Mode Toggle Button Styles */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: var(--border-color);
    border-radius: 15px;
    transition: background-color 0.3s ease;
}

.dark .theme-toggle {
    background-color: var(--primary);
}

.theme-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark .theme-toggle::after {
    transform: translateX(30px);
}

/* Smooth Page Load Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero,
section {
    animation: fadeInUp 0.8s ease-out;
}

/* Stagger animation for cards */
.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.3s;
}

.service-card:nth-child(4) {
    animation-delay: 0.4s;
}

.service-card:nth-child(5) {
    animation-delay: 0.5s;
}

.service-card:nth-child(6) {
    animation-delay: 0.6s;
}

.portfolio-card:nth-child(1) {
    animation-delay: 0.1s;
}

.portfolio-card:nth-child(2) {
    animation-delay: 0.2s;
}

.portfolio-card:nth-child(3) {
    animation-delay: 0.3s;
}

.portfolio-card:nth-child(4) {
    animation-delay: 0.4s;
}

.portfolio-card:nth-child(5) {
    animation-delay: 0.5s;
}

.portfolio-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Scroll reveal animations */
@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);
    }
}

/* Gradient Text Effect */
.hero-title span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Enhanced Shadow Effects */
.dark .card:hover {
    box-shadow:
        0 0 30px rgba(47, 115, 242, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Particle effect container */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(47, 115, 242, 0.3), transparent),
        radial-gradient(2px 2px at 60px 70px, rgba(60, 210, 120, 0.3), transparent),
        radial-gradient(1px 1px at 50px 50px, rgba(47, 115, 242, 0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(60, 210, 120, 0.2), transparent);
    background-size: 200px 200px;
    background-position: 0 0;
    animation: particles 20s linear infinite;
    opacity: 0.4;
    pointer-events: none;
}

@keyframes particles {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 200px 200px;
    }
}