/* General Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Dark/Light Mode Variables */
:root {
    /* Dark mode (default) */
    --clr-background: #0a1929; /* Deep navy background */
    --clr-text: #ffffff; /* Crisp white text */
    --clr-text-muted: #94a3b8; /* Soft blue-gray */
    --clr-primary: #00d4ff; /* Electric blue */
    --clr-secondary: #7c3aed; /* Vibrant purple */
    --clr-card-bg: rgba(23, 42, 69, 0.7); /* Translucent navy */
    --clr-card-border: rgba(0, 212, 255, 0.2); /* Glowing blue border */
    --clr-card-hover-bg: rgba(28, 48, 76, 0.9); /* Deeper navy on hover */
    --clr-card-hover-border: rgba(124, 58, 237, 0.3); /* Purple border on hover */
    --clr-section-bg: rgba(15, 23, 42, 0.7); /* Darker navy sections */
    --clr-section-border: rgba(0, 212, 255, 0.1); /* Subtle blue border */
    --clr-footer-bg: #0f172a; /* Deep navy footer */
    --clr-accent: #22d3ee; /* Cyan accent */
    --btn-primary-bg: linear-gradient(to right, var(--clr-accent), var(--clr-secondary));
    --btn-secondary-bg: rgba(255, 99, 71, 0.1);
    --card-shadow: 0 8px 32px rgba(39, 62, 131, 0.15),
                  inset 0 2px 15px rgba(255, 99, 71, 0.05);
    --card-hover-shadow: 0 16px 48px rgba(250, 22, 22, 0.2),
                        inset 0 2px 20px rgba(8, 152, 200, 0.1);
    --section-padding: 5em 2em;
    --section-margin: 2em auto;
    --fs-h1: 3.5rem;
    --fs-h2: 2.75rem;
    --fs-h3: 1.5rem;
    --fs-body: 1.125rem;
    --bs: 0 8px 32px rgba(78, 84, 200, 0.1), 0 4px 8px rgba(157, 78, 221, 0.05);
    --spacing-small: 0.4rem;
    --spacing-medium: 0.8rem;
    --spacing-large: 2.5rem;
    --pattern-hexagons: 
        linear-gradient(60deg, var(--clr-primary) 1px, transparent 1px),
        linear-gradient(-60deg, var(--clr-primary) 1px, transparent 1px);
    --pattern-circuit:
        radial-gradient(circle at 50% 50%, var(--clr-primary) 1px, transparent 1px),
        linear-gradient(90deg, var(--clr-primary) 1px, transparent 1px);
    --pattern-stripes:
        repeating-linear-gradient(45deg, var(--clr-primary) 0px, var(--clr-primary) 1px, transparent 1px, transparent 30px);
    --pattern-dots:
        radial-gradient(var(--clr-primary) 1px, transparent 1px),
        radial-gradient(var(--clr-secondary) 1px, transparent 1px);
    --pattern-waves:
        linear-gradient(45deg, transparent 48%, var(--clr-primary) 49%, var(--clr-primary) 51%, transparent 52%);
}

/* Light Mode */
body.light-mode {
    --clr-background: #fff5f5; /* Light background with slight red tint */
    --clr-text: #333; /* Dark text */
    --clr-text-muted: #666; /* Muted text */
    --clr-primary: #ff4d4d; /* Bright red */
    --clr-secondary: #ff8080; /* Lighter red */
    --clr-card-bg: rgba(255, 242, 242, 0.8); /* Translucent white with red tint */
    --clr-card-border: rgba(255, 77, 77, 0.2); /* Subtle red border */
    --clr-card-hover-bg: rgba(255, 235, 235, 0.9); /* Slightly redder on hover */
    --clr-card-hover-border: rgba(255, 128, 128, 0.3); /* Enhanced red border */
    --clr-section-bg: rgba(255, 242, 242, 0.8); /* Translucent white with red tint */
    --clr-section-border: rgba(255, 128, 128, 0.2); /* Subtle red border */
    --clr-footer-bg: #2e1a1a; /* Deep red-tinted footer */
    --clr-accent: #ff3333; /* Vibrant red accent */
    --btn-primary-bg: linear-gradient(to right, #ff4d4d, #ff8080); /* Red gradient */
    --btn-secondary-bg: rgba(255, 77, 77, 0.1);
    --card-shadow: 0 8px 32px rgba(255, 77, 77, 0.15),
                  inset 0 2px 15px rgba(255, 128, 128, 0.05);
    --card-hover-shadow: 0 16px 48px rgba(255, 77, 77, 0.2),
                        inset 0 2px 20px rgba(255, 128, 128, 0.1);
}

/* Avoid width-related issues */
* {
    box-sizing: border-box;
    max-width: 100vw; /* Restrict elements within viewport width */
}

/* Theme Toggle Fix */
.theme-toggle {
    position: fixed;
    top: auto;
    right: 50%;
    transform: translateX(50%); /* Center horizontally */
    z-index: 1001;
    cursor: pointer;
    background: var(--clr-card-bg);
    border: 1px solid var(--clr-card-border);
    border-radius: 50%;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.theme-toggle:hover {
    transform: translateX(50%) scale(1.1);
    background: var(--clr-card-hover-bg);
    border-color: var(--clr-card-hover-border);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5); /* Glow effect */
}

.theme-label {
    font-size: 0.6rem;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle:hover .theme-label {
    opacity: 1;
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--clr-text);
}

/* Particles.js Container */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--clr-secondary);
    z-index: 1000;
    width: 0%;
    transition: width 0.3s ease;
}

/* Smooth Scroll */
html, body {
    scroll-behavior: smooth;
    /* overflow-x: hidden; */
}

/* Responsive Typography */
@media (min-width: 800px) {
    :root {
        --fs-h1: 4.5rem;
        --fs-h2: 3.75rem;
        --fs-h3: 1.5rem;
        --fs-body: 1.125rem;
    }
}

/* Body Styling */
body {
    overflow-x: hidden;
    background: var(--clr-background);
    color: var(--clr-text);
    margin: 0;
    font-family: var(--ff-primary);
    font-size: var(--fs-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Elements */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.light-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: floatOrb 20s infinite ease-in-out;
}

.orb-1 {
    background: var(--clr-primary);
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    background: var(--clr-secondary);
    width: 300px;
    height: 300px;
    top: 50%;
    right: -50px;
    animation-delay: -5s;
}

.orb-3 {
    background: var(--clr-accent);
    width: 250px;
    height: 250px;
    bottom: -50px;
    left: 50%;
    animation-delay: -10s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, 50px) scale(1.1);
    }
    50% {
        transform: translate(0, 100px) scale(1);
    }
    75% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: moveParticle 15s infinite linear;
}

@keyframes moveParticle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Enhanced Section Cards */
section {
    padding: var(--section-padding);
    background: var(--clr-section-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--clr-section-border);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: var(--section-margin);
    border-radius: 15px;
    max-width: 1200px;
    position: relative;
    z-index: 1;
    
}

section:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-medium);
    background: rgba(var(--clr-background), 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: top 0.3s ease-in-out;
}

.logo {
    display: inline-block;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: var(--fw-bold);
    color: var(--clr-text);
    /* margin-left: var(--spacing-medium); */
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    left: 1em;
}

.logo span {
    background: var(--clr-primary);
    color: var(--clr-secondary);
    padding: var(--spacing-small) var(--spacing-medium);
    border-radius: 8px;
    box-shadow: var(--bs);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo:hover span {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    /* background: var(--clr-secondary); /* Subtle inverse effect on hover */
    /* color: var(--clr-primary);  */
}

/* Navigation */
.nav {
    position: fixed;
    background: var(--clr-background);
    color: var(--clr-text);
    top: 0;
    right: 0;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 444ms cubic-bezier(0.5, 0, 0.5, 1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: var(--spacing-small);
    width: relative;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.nav__link {
    color: var(--clr-text);
    font-weight: var(--fw-bold);
    font-size: var(--fs-h3);
    text-decoration: none;
    padding: var(--spacing-small) var(--spacing-medium);
    width: calc(100% - 2em);
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: var(--spacing-small) 0;
    position: relative;
}

.nav__link:hover {
    color: var(--clr-accent);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
    padding: 0.56em;
    background: transparent;
    border: 0;
    cursor: pointer;
    position: absolute;
    right: 1em;
    top: auto;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-open .nav {
    transform: translateX(0);
}

.nav-open .nav-toggle {
    position: fixed;
}

.nav-open .hamburger {
    transform: rotate(45deg);
}

.nav-open .hamburger::before {
    transform: translateY(8px) rotate(90deg);
    top: -8px;
}

.nav-open .hamburger::after {
    transform: translateY(-8px) rotate(90deg);
    bottom: -8px;
}

.hamburger {
    display: block;
    position: relative;
    width: 32px;  /* Increased width */
}

.hamburger, .hamburger::before, .hamburger::after {
    background: var(--clr-text);
    width: 32px;  /* Match parent width */
    height: 2px;
    border-radius: 1em;
    transition: all 250ms ease-in-out;
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Intro Section - Reduce gap from header */
.intro {
    min-height: 85vh;
    margin-top: 0.5rem;  /* Small gap between header and intro */
    position: relative;
    overflow: hidden;
    background: var(--clr-background);
    padding: 2rem 1rem;
}

/* Enhanced Background Effects */
.intro::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, 
        rgba(52, 152, 219, 0.1) 0%,
        rgba(52, 152, 219, 0.05) 25%,
        transparent 50%);
    animation: pulseGradient 10s ease-in-out infinite;
}

@keyframes pulseGradient {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.intro-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.gradient-sphere {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(
        circle,
        rgba(var(--clr-primary), 0.15) 0%,
        rgba(var(--clr-primary), 0.1) 40%,
        transparent 70%
    );
    border-radius: 50%;
    top: -200px;
    right: -200px;
    filter: blur(40px);
    animation: rotateSphere 20s linear infinite;
}

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

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(var(--clr-primary), 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--clr-primary), 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
    animation: moveGrid 15s linear infinite;
}

@keyframes moveGrid {
    0% { transform: translateY(0); }
    100% { transform: translateY(30px); }
}

/* Container */
.intro-container {
    max-width: 1400px;  /* Increased from 1200px */
    margin: 0 auto;
    padding: 0 1rem;    /* Reduced padding for more space */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-large);
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Enhanced Content Styling */
.intro-title-wrapper {
    margin-bottom: var(--spacing-large);
    position: relative;
}

.intro-subtitle {
    display: block;
    font-size: 1.125rem;
    color: var(--clr-secondary);
    margin-bottom: var(--spacing-small);
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-top: 1.5%;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.5s 0.3s forwards;
}

.intro-title {
    position: relative;
    margin: 0;
}

.name {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(120deg, var(--clr-text), var(--clr-accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    display: block;
    animation: shimmer 3s infinite;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.5s 0.5s forwards, shimmer 3s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

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

.title-decorator {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
    border-radius: 2px;
    transform: scaleX(0);
    animation: expandWidth 0.9s 0.3s forwards;
}

@keyframes expandWidth {
    to { transform: scaleX(-1); }
}

.intro-role {
    margin: var(--spacing-large) 0;
    font-weight: 400;
    opacity: 0;
    animation: fadeIn 0.5s 0.9s forwards;
}

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

.role-prefix {
    color: var(--clr-text-muted);
    font-size: 1.25rem;
}

.role-main {
    color: var(--clr-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-left: var(--spacing-small);
    position: relative;
}

.role-main::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 1em;
    background-color: var(--clr-primary);
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.intro-description {
    color: var(--clr-text-muted);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-large);
    max-width: 540px;
    opacity: 0;
    animation: fadeIn 0.5s 1.1s forwards;
}

/* Enhanced Expertise Tags */
.expertise-wrapper {
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeIn 0.5s 1.3s forwards;
}

.expertise-label {
    color: var(--clr-text);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.expertise-tags {
    display: flex;
    gap: var(--spacing-medium);
    flex-wrap: wrap;
}

.tag {
    display: flex;
    align-items: center;
    gap: var(--spacing-small);
    padding: var(--spacing-small) var(--spacing-medium);
    background: rgba(var(--clr-primary), 0.1);
    border: 1px solid rgba(var(--clr-primary), 0.2);
    border-radius: 9999px;
    color: var(--clr-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.tag:hover {
    background: rgba(var(--clr-primary), 0.15);
    transform: translateY(-2px) scale(1.05);
    border-color: rgba(var(--clr-primary), 0.3);
    box-shadow: 0 4px 15px rgba(var(--clr-primary), 0.2);
}

.tag i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.tag:hover i {
    transform: rotate(360deg);
}

+.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

+.tag:hover::before {
    left: 100%;
}

/* Enhanced CTA Buttons */
.cta-wrapper {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation: fadeIn 0.5s 1.5s forwards;
}

.cta-primary, .cta-secondary {
    padding: 0.65em 1.25em;
    min-width: fit-content;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.cta-primary {
    background: var(--btn-primary-bg);
    color: var(--clr-text);
    box-shadow: 0 4px 14px rgba(var(--clr-primary), 0.3);
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.cta-primary:hover::before {
    left: 100%;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--clr-primary), 0.4);
    cursor: pointer;
}

.cta-secondary {
    border: 1px solid var(--clr-primary);
    color: var(--clr-primary);
    background: var(--btn-secondary-bg);
}

.cta-secondary:hover {
    background: var(--btn-secondary-hover-bg);
    transform: translateY(-2px);
}

/* Visual Section */
.intro-visual {
    position: relative;
    opacity: 0;
    animation: fadeIn 0.5s 0.1s forwards; /* Appears slightly before the name */
}

.profile-frame {
    position: relative;
    width: 400px;
    height: 500px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.5s 0.1s forwards; /* Appears slightly before the name */
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    position: relative;
    z-index: 2;
    border: 2px solid var(--clr-accent);
    box-shadow: var(--bs);
    opacity: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Main frame decorator */
.frame-decorator {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--clr-secondary);
    border-radius: 20px;
    z-index: 1;
    opacity: 0;
    animation: fadeIn 0.5s 0.1s forwards;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Corner decorations */
.frame-decorator::before {
    content: '';
    position: absolute;
    inset: -15px;
    border: 1px solid var(--clr-section-border);
    border-radius: 25px;
    z-index: 0;
    opacity: 0;
    animation: fadeIn 0.5s 0.1s forwards;
}

.frame-decorator::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 1px dashed var(--clr-accent);
    border-radius: 22px;
    opacity: 0;
    animation: fadeIn 0.5s 0.1s forwards;
}

/* Corner accents */
.profile-frame::before,
.profile-frame::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--clr-secondary);
    z-index: 3;
    opacity: 0;
    animation: fadeIn 0.5s 0.1s forwards;
}

.profile-frame::before {
    top: -10px;
    right: -10px;
    border-left: 0;
    border-bottom: 0;
    border-radius: 0 10px 0 0;
}

.profile-frame::after {
    bottom: -10px;
    left: -10px;
    border-right: 0;
    border-top: 0;
    border-radius: 0 0 0 10px;
}

/* Enhanced hover effects */
.profile-frame:hover .profile-image {
    transform: translate(-8px, -8px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--clr-accent);
}

.profile-frame:hover .frame-decorator {
    transform: translate(8px, 8px);
    border-color: var(--clr-secondary);
}

.profile-frame:hover .frame-decorator::before {
    border-color: var(--clr-card-hover-border);
}

.profile-frame:hover .frame-decorator::after {
    opacity: 0.7;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.float-element {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    background: rgba(var(--clr-primary), 0.1);
    border: 1px solid rgba(var(--clr-primary), 0.2);
    color: var(--clr-accent);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    animation: float 6s infinite ease-in-out;
}

@media (max-width: 768px) {
    .float-element {
        width: 30px;
        height: 30px;
    }
}

.python {
    top: 20%;
    left: -20px;
    animation-delay: 0s;
}

.data {
    top: 50%;
    right: -20px;
    animation-delay: 2s;
}

.analytics {
    bottom: 20%;
    left: -20px;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px); /* Reduced floating distance */
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .intro-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-large);
    }

    .intro-content {
        order: 2;
    }

    .intro-visual {
        order: 1;
    }

    .title-decorator {
        left: 50%;
        transform: translateX(-50%);
    }

    .intro-description {
        margin-left: auto;
        margin-right: auto;
    }

    .expertise-tags {
        justify-content: center;
    }

    .cta-wrapper {
        justify-content: center;
    }

    .profile-frame {
        width: 300px;
        height: 375px;
    }
}

@media (max-width: 640px) {
    .name {
        font-size: 2.5rem;
    }

    .cta-wrapper {
        flex-direction: column;
        gap: var(--spacing-medium);
    }

    .profile-frame {
        width: 250px;
        height: 312px;
    }

    .intro-content {
        margin-top: 2rem;
    }
}

/* My Services Section */
.my-services {
    position: relative;
    overflow: hidden;
    background: var(--clr-background);
    padding: 2rem 1rem;
    z-index: 1;
}

/* Enhanced Background Effects (Same as Intro Section) */
.my-services::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(var(--clr-primary-rgb), 0.1), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(var(--clr-secondary-rgb), 0.1), transparent 40%);
    z-index: 0;
    filter: blur(20px);
}

.my-services::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(45deg, transparent 45%, var(--clr-primary) 49%, var(--clr-primary) 51%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, var(--clr-secondary) 49%, var(--clr-secondary) 51%, transparent 55%);
    background-size: 30px 30px;
    opacity: 0.1;
    z-index: 0;
    animation: patternShift 20s linear infinite;
}

/* Section Title */
.section__title--services {
    text-align: left;
    color: var(--clr-text);
    font-size: var(--fs-h2);
    margin-bottom: 3rem;
    position: relative; /* Required for absolute positioning of ::after */
}

.my-services {
    overflow: visible !important; /* Ensure nothing is clipping the ::after */
}

.section__title--services::after {
    content: '';
    position: absolute;
    bottom: -15px;
    margin-left: 1.3em;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--clr-secondary), var(--clr-primary));
    border-radius: 2px;
}

/* Services Container */
.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Service Cards */
.service {
    background: rgba(var(--clr-card-bg-rgb), 0.8);
    border: 1px solid var(--clr-card-border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.service:hover {
    transform: translateY(-5px);
    border-color: var(--clr-card-hover-border);
    box-shadow: var(--card-hover-shadow);
}

/* Service Header Styling */
.service-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;
    gap: 1rem;
    margin: 0 0 1.25rem 0;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

.service-header i {
    display: inline-block;
    font-size: 1.5rem;
    color: #4A90E2;  /* Changed from #FF6B6B to #4A90E2 for dark mode default */
    margin-top: 0.25rem;
    -webkit-transition: all 0.4s ease;
    transition: all 0.4s ease;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    animation: floatIcon 3s ease-in-out infinite;
}

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

.service-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--clr-text);
    line-height: 1.4;  /* Better line height for wrapped titles */
    flex: 1;  /* Allow text to wrap properly */
}

/* Service icon hover animation */
.service:hover .service-header i {
    transform: rotateY(180deg);
    color: #FF6B6B;  /* Changed from #4A90E2 to #FF6B6B for dark mode hover */
}

/* Light mode adjustments for service icons */
.light-mode .service-header i {
    color: #FF6B6B;  /* Changed from #4A90E2 to #FF6B6B for light mode default */
}

.light-mode .service:hover .service-header i {
    color: #4A90E2;  /* Changed from #FF6B6B to #4A90E2 for light mode hover */
}

/* Service Content */
.service p {
    color: var(--clr-text-muted);
    font-size: 1rem;
    line-height: 1.8;
    padding-right: 0;  /* Remove padding to make text fuller */
    position: relative;
    z-index: 1;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}


.python {
    top: 20%;
    left: -20px;
    animation-delay: 0s;
}

.data {
    top: 50%;
    right: -20px;
    animation-delay: 2s;
}

.analytics {
    bottom: 20%;
    left: -20px;
    animation-delay: 4s;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .services {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }
    
    .service {
        padding: 1.25rem 1rem;
    }

    .service-header {
        margin: 0 0 0.75rem 0;
    }
    
    .service p {
        padding-right: 0;  /* Remove extra padding on mobile */
    }
}

@media (min-width: 1200px) {
    .services {
        max-width: 1000px;  /* Reduced max-width for larger screens */
        gap: 1.5rem;  /* Smaller gap between cards */
    }
}

@media (max-width: 768px) {
    .services {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }
    
    .service {
        padding: 1.25rem 1rem;
    }
}

/* About Me Section */
.about-me {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--clr-background);
    padding: 2rem 1rem;  /* Match projects section padding */
}

/* Background Effects */
.about-me::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 0% 0%, rgba(255, 99, 71, 0.03), transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(0, 191, 255, 0.03), transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* Header */
.about__header {
    text-align: left;
    margin-bottom: 3rem;
}

.section__title {
    font-size: var(--fs-h2);
    color: var(--clr-text);
    margin-bottom: 0.75rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--btn-primary-bg);
    border-radius: 2px;
    z-index: 1;
}

+.section__title::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--clr-primary);
    transition: width 0.3s ease;
}

+.section__title:hover::before {
    width: 100%;
}

.section__subtitle {
    font-size: var(--fs-body);
    color: var(--clr-text-muted);
    margin-top: 1rem;
    background: var(--clr-card-bg);
    border: 1px solid var(--clr-card-border);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

/* About Grid */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 1400px;  /* Increased from 1200px */
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 1rem;
}

/* About Cards */
.about-card {
    display: flex;
    align-items: center;
    background: var(--clr-card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--clr-card-border);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    gap: 1rem;
}

.about-card:hover {
    transform: translateY(-5px);
    background: var(--clr-card-hover-bg);
    border-color: var(--clr-card-hover-border);
    box-shadow: var(--card-hover-shadow);
}

/* Card Icons */
.card-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--btn-secondary-bg);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem; /* Default for larger screens */
}

.card-icon i {
    font-size: 1.5rem;
    color: var(--clr-primary);
    transition: all 0.3s ease;
}

.about-card:hover .card-icon {
    transform: rotateY(180deg); /* Rotate the icon 180 degrees */
    transition: transform 0.5s ease; /* Smooth transition for the rotation */
}


.about-card:hover .card-icon i {
    color: var(--clr-secondary);
    transform: scale(1.1);
}

/* Card Content */
.about-card__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;  /* Tight spacing between elements */
}

.about-card__title {
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--clr-text);
    margin: 0 0 0.1rem 0;  /* Small margin only at bottom */
}

.about-card__description {
    color: var(--clr-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;  /* Remove margin */
}

/* Timeline */
.timeline {
    margin-top: 3rem;
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--clr-card-border);
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--clr-primary);
    border: 2px solid var(--clr-background);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--clr-secondary);
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: var(--clr-card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--clr-card-border);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-card {
        flex-wrap: wrap;
        padding: 1.5rem 1rem;
    }

    .card-icon {
        margin-bottom: 0; /* Remove spacing below icon */
        margin-right: 1rem; /* Add spacing to the right of the icon */
    }

    .about-card__content {
        flex-direction: row; /* Icon and title on the same line */
        align-items: center;
        gap: 1rem; /* Add spacing between icon and title */
        flex-wrap: wrap;
    }

    .about-card__description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-top: 1rem;
        flex-basis: 100%; /* Text spans the full width below title and icon */
    }

    .timeline {
        padding-left: 1rem;
    }
}

@media (max-width: 480px) {
    .about-me {
        padding: 4rem 1rem;
    }

    .card-icon {
        width: 40px;
        height: 40px;
    }

    .about-card__title {
        font-size: 1rem;
    }

    .about-card__description {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .timeline {
        padding-left: 0.75rem;
    }
}



/* Work Section */
.my-work {
    position: relative;
    /* The section will be at least as tall as the viewport */
    min-height: 88vh;
    background: var(--clr-background);
    padding: 5rem 1rem;
    overflow: hidden;
}

/* Subtle gradient background */
.my-work::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 0% 0%, 
            rgba(255, 99, 71, 0.03),
            transparent 50%),
        radial-gradient(circle at 100% 100%, 
            rgba(0, 191, 255, 0.03),
            transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* Header */
.work__header {
    max-width: 1400px;
    margin: 0 auto 3rem;
    text-align: left;
    padding: 0 2rem;
}

.work__header .section__title {
    font-size: 2.5rem;
    color: var(--clr-text);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.work__header .section__subtitle {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Ultra-wide work grid */
.work-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* Reduced gap */
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 2rem;
}

/* Wide work card with grid layout */
.work-card {
    width: 100%;
    background: var(--clr-card-bg);
    border-radius: 16px;
    padding: 1.25rem 1.5rem; /* Reduced padding */
    border: 1px solid var(--clr-card-border);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem; /* Reduced gap */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.work-card:hover {
    margin-top: 0;
    transform: translateY(-5px) rotateX(2deg);
    background: var(--clr-card-hover-bg);
    border-color: var(--clr-card-hover-border);
    box-shadow: var(--card-hover-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Main content container */
.work-card__content {
    flex: 1;
    position: relative;
}

/* Subtle separator line */
.work-card__content::after {
    content: '';
    position: absolute;
    right: -1.25rem;
    top: 0;
    height: 100%;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--clr-card-border),
        transparent
    );
}

/* Card elements */
.work-card__year {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--clr-accent);
    margin-bottom: 0.75rem;
}

.work-card__title {
    font-size: var(--fs-h3); /* Slightly smaller */
    font-weight: 700;
    margin-bottom: 0.5rem; /* Reduced margin */
    color: var(--clr-text);
}

.work-card__company {
    font-size: 0.95rem; /* Slightly smaller */
    margin-bottom: 1.4rem; /* Reduced margin */
    color: var(--clr-text-muted);
}

/* Task list */
.work-card__tasks {
    list-style: none;
    margin-bottom: 1rem; /* Reduced margin */
}

.work-card__tasks li {
    padding-left: 2.5rem; /* Reduced padding */
    margin-bottom: 0.5rem; /* Reduced margin */
    position: relative;
    line-height: 1.5;
    color: var(--clr-text-muted);
    font-size: 0.95rem;
}

.work-card__tasks li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--clr-accent);
}

/* Enhanced floating skills section */
.work-card__skills {
    display: flex;
    justify-content: space-around;
    flex-direction: column;
    gap: 1.5rem; /* Reduced gap */
    padding: 0.5rem 0;
    max-height: 100%;
    overflow-y: auto;
    cursor: text;
}

/* Skill tag container */
.work-card__skills span {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s ease forwards;
    opacity: 0;
    transform: translateX(20px);
}

/* Animated background on hover */
.work-card__skills span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.work-card__skills span:hover::before {
    transform: translateX(0);
}

/* Staggered animation for skills */
.work-card__skills span:nth-child(1) { animation-delay: 0s; }
.work-card__skills span:nth-child(2) { animation-delay: 0.1s; }
.work-card__skills span:nth-child(3) { animation-delay: 0.2s; }
.work-card__skills span:nth-child(4) { animation-delay: 0.3s; }
.work-card__skills span:nth-child(5) { animation-delay: 0.4s; }
.work-card__skills span:nth-child(6) { animation-delay: 0.5s; }
.work-card__skills span:nth-child(7) { animation-delay: 0.6s; }
.work-card__skills span:nth-child(8) { animation-delay: 0.7s; }

/* Colorful skill variants with enhanced styling */
.work-card__skills span:nth-child(5n+1) {
    background: rgba(255, 99, 71, 0.15);
    color: #ff6347;
    box-shadow: 0 2px 8px rgba(255, 99, 71, 0.1);
}

.work-card__skills span:nth-child(5n+2) {
    background: rgba(0, 191, 255, 0.15);
    color: #00bfff;
    box-shadow: 0 2px 8px rgba(0, 191, 255, 0.1);
}

.work-card__skills span:nth-child(5n+3) {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.1);
}

.work-card__skills span:nth-child(5n+4) {
    background: rgba(50, 205, 50, 0.15);
    color: #32cd32;
    box-shadow: 0 2px 8px rgba(50, 205, 50, 0.1);
}

.work-card__skills span:nth-child(5n+5) {
    background: rgba(238, 130, 238, 0.15);
    color: #ee82ee;
    box-shadow: 0 2px 8px rgba(238, 130, 238, 0.1);
}

/* Hover effects for skill tags */
.work-card__skills span:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Animation keyframes */
@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Work Card Reference */
.work-card__reference {
    font-size: 0.8rem; /* Smaller font size */
    color: var(--clr-text-muted);
    padding-top: 0.5rem; /* Reduced padding */
    border-top: 1px solid rgba(var(--clr-secondary), 0.1);
    grid-column: 1 / -1;
    margin-top: 0.5rem; /* Reduced margin */
}

.work-card__reference a {
    color: var(--clr-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.work-card__reference a:hover {
    color: var(--clr-primary);
}

/* Scrollbar styling for skills container */
.work-card__skills::-webkit-scrollbar {
    width: 4px;
}

.work-card__skills::-webkit-scrollbar-track {
    background: rgba(var(--clr-secondary), 0.05);
    border-radius: 4px;
}

.work-card__skills::-webkit-scrollbar-thumb {
    background: rgba(var(--clr-secondary), 0.2);
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .my-work {
        padding: 4rem 1.5rem;
    }

    .work-card {
        padding: 1.5rem;
        grid-template-columns: 1fr; /* Single column on smaller screens */
    }

    .work-card__content::after {
        display: none; /* Hide separator on small screens */
    }

    .work-card__skills {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .my-work {
        padding: 3rem 1rem;
    }

    .work-card {
        padding: 1rem;
    }

    .work-card__title {
        font-size: 1.25rem;
    }

    .work-card__skills span {
        font-size: 0.75rem;
    }
}



/* Projects Section */
.projects {
    min-height: 88vh;
    position: relative;
    padding: 2rem 1rem;  /* Reduced overall section padding */
    background: var(--clr-background);
    z-index: 2;
}

.projects__header {
    text-align: left;
    margin-bottom: 1.5rem;  /* Reduced space between header and grid */
}

/* Projects Grid Layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Maximum 3 columns by default */
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Project Card */
.project-card {
    background: rgba(var(--clr-card-bg-rgb), 0.8);
    border-radius: 20px;
    padding: 1rem;
    border: 1px solid var(--clr-card-border);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--clr-primary);
    background: var(--clr-card-hover-bg);
    box-shadow: var(--card-hover-shadow);
}

/* Project Image Enhancement */
.project-image-wrapper {
    position: relative;
    height: 140px;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image-wrapper {
    transform: translateY(-5px);
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image-wrapper img {
    transform: scale(1.05);
}

/* Project Content */
.project-content {
    padding: 0.75rem 0.5rem;
    position: relative;
}

.project-content h3 {
    font-size: 1.2rem;
    color: var(--clr-text);
    margin-bottom: 0.5rem;
}

.project-content p {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Floating Tech Stack */
.project-tech-stack {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.project-tech-stack i {
    position: absolute;
    font-size: 1.2rem;
    color: var(--clr-primary);
    opacity: 0.7;
    filter: blur(0.5px);
    animation: floatPetal 6s ease-in-out infinite;
}

/* Distribute icons around the card */
.project-tech-stack i:nth-child(1) {
    top: -20px;
    left: 10%;
    animation-delay: 0s;
}

.project-tech-stack i:nth-child(2) {
    top: 30%;
    right: -20px;
    animation-delay: -2s;
}

.project-tech-stack i:nth-child(3) {
    bottom: -15px;
    right: 20%;
    animation-delay: -4s;
}

/* Petal-like floating animation */
@keyframes floatPetal {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(10px, 15px) rotate(45deg);
    }
    50% {
        transform: translate(-5px, -10px) rotate(-30deg);
    }
    75% {
        transform: translate(-15px, 5px) rotate(15deg);
    }
}

/* Add subtle glow effect to floating icons */
.project-tech-stack i::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--clr-primary) 0%, transparent 70%);
    opacity: 0.2;
    filter: blur(3px);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

/* Project Link */
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--clr-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: transparent;
}

.project-link:hover {
    color: var(--clr-secondary);
    background: rgba(var(--clr-primary), 0.1);
}

.project-link i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link:hover i {
    transform: translateX(8px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);  /* 2 columns on tablet/smaller screens */
        max-width: 800px;
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;  /* Single column on mobile */
        max-width: 500px;
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;  /* Single column on mobile */
        max-width: 600px;
        gap: 1.5rem;
    }

    .project-image-wrapper {
        height: 200px;
    }

    .project-tech-stack i {
        font-size: 1rem;
    }

    .project-tech-stack i:nth-child(1) {
        top: -15px;
        left: 15%;
    }

    .project-tech-stack i:nth-child(2) {
        right: -15px;
    }

    .project-tech-stack i:nth-child(3) {
        bottom: -10px;
        right: 25%;
    }
}

@media (max-width: 576px) {
    .section__title {
        font-size: 2rem;
    }

    .project-image-wrapper {
        height: 180px;
    }

    .project-content {
        padding: 1rem;
    }

    .project-content h3 {
        font-size: 1.1rem;
    }

    .project-tech-stack i {
        font-size: 0.9rem;
    }
}


/* Blog Section Base */
.blog {
    min-height: 50vh;
    position: relative;
    padding: 4rem 0;
    background: var(--clr-background);
    overflow: hidden;
}

.blog__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Gradient Background */
.blog::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, 
    rgba(255, 99, 71, 0.1),
    transparent 60%),
    radial-gradient(circle at bottom right, 
    rgba(255, 99, 71, 0.1),
    transparent 60%),
    radial-gradient(circle, 
    rgba(0, 191, 255, 0.1),
    transparent 60%);
    pointer-events: none;
}

/* Blog Header */
.blog__header {
    text-align: left;
    margin-bottom: 4rem;
}

.section__title {
    font-size: 2.5rem;
    color: var(--clr-text);
    margin-bottom: 0.5rem;
}

.section__subtitle {
    color: var(--clr-text-muted);
    font-size: 1.1rem;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

/* Blog Card */
.blog-card {
    background: var(--clr-card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--clr-card-border);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-card:hover {
    margin-top: 0;
    transform: translateY(-5px);
    background: var(--clr-card-hover-bg);
    border-color: var(--clr-card-hover-border);
    box-shadow: var(--card-hover-shadow);
}

/* Card Meta Information */
.blog-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
}

.blog-card__date,
.blog-card__updated {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card__meta i {
    color: var(--clr-primary);
    font-size: 0.9rem;
}

/* Card Main Content */
.blog-card__main {
    flex: 1;
}

.blog-card__title {
    font-size: 1.4rem;
    color: var(--clr-text);
    margin-bottom: 1rem;
}

.blog-card__description {
    color: var(--clr-text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Card Footer */
.blog-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 1rem;
}
.blog-card__category {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.blog-card__category span {
    background: var(--clr-card-bg);
    color: var(--clr-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(var(--clr-primary-rgb), 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card__category span i {
    font-size: 0.9rem;
}

.blog-card__category span:hover {
    border-color: var(--clr-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(var(--clr-primary-rgb), 0.1);
}

.blog-card__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--clr-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.blog-card__link:hover {
    color: var(--clr-secondary);
}

.blog-card__link:hover i {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog {
        padding: 3rem 0;
    }
    
    .blog__container {
        padding: 0 1.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .blog-card {
        padding: 1.5rem;
    }
    
    .section__title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .blog-card {
        padding: 1.25rem;
    }
    
    .blog-card__title {
        font-size: 1.2rem;
    }
    
    .blog-card__meta {
        font-size: 0.8rem;
    }
}

/* Timeline */
.timeline {
    position: relative;
    padding: var(--spacing-large) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--clr-primary);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: var(--spacing-medium);
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--clr-secondary);
    margin-bottom: var(--spacing-small);
}

.timeline-content {
    background: var(--clr-card-bg);
    border-radius: 16px;
    padding: var(--spacing-medium);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    background: var(--clr-card-hover-bg);
    border-color: var(--clr-card-hover-border);
}

/* Contact Section */
.contact {
    min-height: 50vh;
    position: relative;
    overflow: hidden;
    background: var(--clr-background);
    padding: 2rem 1rem;  /* Match projects section padding */
    margin: var(--section-margin);
    border-radius: 15px;
}

/* Gradient overlay for the contact section */
.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, 
    rgba(255, 99, 71, 0.1),
    transparent 60%),
    radial-gradient(circle at bottom left, 
    rgba(255, 99, 71, 0.1),
    transparent 60%),
    radial-gradient(circle, 
    rgba(0, 191, 255, 0.1),
    transparent 60%);
    pointer-events: none;
    );
    animation: pulseGradient 10s ease-in-out infinite; /* Consistent animation */
    z-index: 0; /* Place it behind the content */
    border-radius: 15px; /* Match the border radius */
}

/* Contact Form Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-medium);
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-large); /* Add padding for better spacing */
    background: var(--clr-section-bg); /* Use the same section background */
    backdrop-filter: blur(10px); /* Add blur for consistency */
    border: 1px solid var(--clr-section-border); /* Use the same border */
    border-radius: 15px; /* Match the border radius of other sections */
    box-shadow: var(--card-shadow); /* Add shadow for depth */
    position: relative; /* Ensure the form is positioned correctly */
    z-index: 1; /* Ensure it's above the background */
    transition: all 0.3s ease; /* Add transition for smooth hover effect */
}

/* Hover Effect for the Contact Form Card */
.contact-form:hover {
    transform: translateY(-5px); /* Slight upward movement */
    box-shadow: var(--card-hover-shadow); /* Enhanced shadow on hover */
    border-color: var(--clr-card-hover-border); /* Change border color on hover */
    background: var(--clr-card-hover-bg); /* Slightly lighter background on hover */
}

/* Input and Textarea Styling */
.contact-form input,
.contact-form textarea {
    padding: var(--spacing-medium);
    border: 1px solid var(--clr-card-border);
    border-radius: 8px;
    background: var(--clr-card-bg
    ); /* Use card background for inputs */
    color: var(--clr-text);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px); /* Add blur for consistency */
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--clr-secondary); /* Highlight focus state */
    background: var(--clr-card-hover-bg); /* Slightly lighter background on focus */
    box-shadow: 0 0 10px rgba(var(--clr-secondary), 0.2); /* Add glow effect */
    transform: translateY(-2px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(var(--clr-primary), 0.2);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

/* Submit Button Styling */
.contact-form .cta-primary {
    padding: var(--spacing-medium) var(--spacing-large);
    background: var(--btn-primary-bg); /* Use primary button gradient */
    color: var(--clr-text);
    border: none;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-form .cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--clr-primary), 0.4); /* Add hover effect */
}

+.contact-form .cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

+.contact-form .cta-primary:hover::before {
    left: 100%;
}


/* Footer */
.footer {
    background: var(--clr-footer-bg, #111);
    color: var(--clr-accent);
    text-align: center;
    padding: 2rem 0;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__link {
    font-weight: var(--fw-bold);
    color: var(--clr-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer__link:hover {
    color: var(--clr-secondary);
}

.social-list {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.social-list__link {
    font-size: 1.2rem;
    color: var(--clr-text);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-list__link:hover {
    color: var(--clr-primary);
    transform: translateY(-3px);
    border-color: var(--clr-primary);
    box-shadow: 0 5px 15px rgba(var(--clr-primary), 0.2);
}

.footer__copyright {
    margin-top: 1.5rem;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Fix for glow effect */
.section-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.service,
.about-card,
.work-card,
.project-card,
.intro-content,
.intro-visual,
.contact-form {
    position: relative;
    z-index: 2;
    background: rgba(var(--clr-card-bg-rgb), 0.8);
}

/* Enhanced Scroll to Top Button */
.scrollup {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    background: var(--clr-card-bg);
    border: 1px solid var(--clr-card-border);
    border-radius: 50%;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    box-shadow: var(--card-shadow);
    z-index: 9999; /* Ensure it's above all other elements */
}

.scrollup i {
    color: #fff;
    transition: transform 0.3s ease;
}

.light-mode .scrollup i {
    color: #333;
}

.scrollup.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Enhanced hover effects */
.scrollup:hover {
    background: #fff;
    border-color: #fff;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 15px rgba(var(--clr-primary), 0.3);
}

.light-mode .scrollup:hover {
    background: #333;
    border-color: #333;
}

.scrollup:hover i {
    color: #333;
    animation: bounceUp 0.8s ease infinite;
}

.light-mode .scrollup:hover i {
    color: #fff;
}

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

/* Add pulse effect when scrolling fast */
.scrollup.pulse {
    animation: pulse 0.5s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .footer {
        font-size: var(--fs-h4);
    }

    .social-list {
        margin: var(--spacing-medium) 0 0;
    }

    .social-list__link {
        padding: var(--spacing-small);
    }
}

@media (max-width: 480px) {
    .scrollup {
        right: 10px;
        bottom: 10px;
        width: 30px;
        height: 30px;
    }

    .scrollup i {
        font-size: 1.25rem;
    }
}

/* Global Utility Classes */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--clr-primary);
}

.text-secondary {
    color: var(--clr-secondary);
}

.text-accent {
    color: var(--clr-accent);
}

.text-muted {
    color: var(--clr-text-muted);
}

.bg-primary {
    background: var(--clr-primary);
}

.bg-secondary {
    background: var(--clr-secondary);
}

.bg-accent {
    background: var(--clr-accent);
}

.bg-text {
    background: var(--clr-text);
    color: var(--clr-background);
}

.bg-muted {
    background: var(--clr-text-muted);
}

.bg-gradient {
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
}

.border-primary {
    border: 2px solid var(--clr-primary);
}

.border-secondary {
    border: 2px solid var(--clr-secondary);
}

.border-accent {
    border: 2px solid var(--clr-accent);
}

.border-text {
    border: 2px solid var(--clr-text);
}

.border-muted {
    border: 2px solid var(--clr-text-muted);
}

.border-gradient {
    border: 2px solid var(--clr-primary);
}

/* Services Section Spacing */
.services__header {
    margin-bottom: 3rem;
}

/* Services Grid Layout */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Service Card Styling */
.service-card {
    background: var(--clr-card-bg);
    border: 1px solid var(--clr-card-border);
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

/* Only wrap on mobile screens */
@media (max-width: 768px) {
    .cta-wrapper {
        flex-wrap: wrap;
    }
    .cta-primary, .cta-secondary {
        padding: 0.75em 1.5em;
        font-size: 1rem;
    }
}

/* About Card Header Styling */
.card-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 0.75rem;
    margin: 0;  /* Remove margin completely */
}

.card-header i {
    display: inline-block;
    font-size: 1.25rem;
    color: #4A90E2;  /* Changed from #FF6B6B to #4A90E2 for dark mode default */
    -webkit-transition: all 0.4s ease;
    transition: all 0.4s ease;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.card-header h3 {
    margin: 0;
    color: var(--clr-text);
}

/* About card icon hover animation */
.about-card:hover .card-header i {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
    color: #FF6B6B;  /* Changed from #4A90E2 to #FF6B6B for dark mode hover */
}

/* Light mode color adjustments */
.light-mode .card-header i {
    color: #FF6B6B;  /* Changed from #4A90E2 to #FF6B6B for light mode default */
}

.light-mode .about-card:hover .card-header i {
    color: #4A90E2;  /* Changed from #FF6B6B to #4A90E2 for light mode hover */
}

/* Service Header Styling */
.service-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: flex-start;
    -ms-flex-align: start;
    align-items: flex-start;
    gap: 1rem;
    margin: 0 0 1.25rem 0;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

/* Add interactive background effect to sections */
.my-services,
.about-me,
.my-work,
.projects,
+.intro,
+.contact {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Interactive background animation */
.section-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.section-background .dot {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at center,
        rgba(255, 82, 82, 0.25) 0%,
        rgba(255, 82, 82, 0.15) 50%,
        transparent 70%
    );
    opacity: 0.8;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease-out;
    filter: blur(25px);
    width: 120px;
    height: 120px;
}

/* Ensure ALL content stays above the glow effect */
.service,
.about-card,
.work-card,
.project-card,
+.intro-content,
+.intro-visual,
+.contact-form {
    position: relative;
    z-index: 2;
    background: var(--clr-card-bg);
}

/* Light mode adjustments - More noticeable glow */
.light-mode .section-background .dot {
    background: radial-gradient(circle at center,
        rgba(74, 144, 226, 0.35) 0%,
        rgba(74, 144, 226, 0.25) 50%,
        transparent 70%
    );
    opacity: 0.8;
    filter: blur(20px);  /* Slightly less blur for sharper effect */
}

/* Fix for project cards to ensure glow shows through */
.project-card {
    background: rgba(var(--clr-card-bg-rgb), 0.8);
    backdrop-filter: blur(5px);
}

/* Adjust project grid for better spacing */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Make work cards use space better */
.work-card {
    padding: 2rem;
    width: 100%;
}

/* Adjust service cards layout */
.services {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

/* Responsive adjustments */
@media (max-width: 1600px) {
    .intro-container,
    .services,
    .about-grid,
    .work-grid,
    .projects-grid {
        max-width: 1600px;
        padding: 0 1.5rem;
    }
}

@media (max-width: 1200px) {
    .intro-container,
    .services,
    .about-grid,
    .work-grid,
    .projects-grid {
        max-width: 1200px;
        padding: 0 1rem;
    }
}

/* Media Queries for Responsive Grids */
@media screen and (max-width: 1200px) {
    .services {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
    }
}

@media screen and (max-width: 768px) {
    .services,
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        gap: 1.5rem;
    }

    .service,
    .project-card {
        width: 100%;
        margin: 0 auto;
    }
}

@media screen and (max-width: 480px) {
    .services,
    .projects-grid {
        padding: 0.5rem;
        gap: 1rem;
    }
}

/* Extra large screens */
@media screen and (max-width: 1800px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr); /* Maximum 3 columns */
        max-width: 1400px;
    }
}

/* Large screens */
@media screen and (max-width: 1400px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        gap: 1.75rem;
    }
}

/* Medium screens */
@media screen and (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        gap: 1.5rem;
    }
}

@media screen and (max-width: 650px) {
    .projects-grid {
        grid-template-columns: 1fr; /* Single column */
        max-width: 500px;
        gap: 1.25rem;
    }
    
    .project-image-wrapper {
        height: 200px; /* Larger images for single column */
    }
}

/* Section Decorative Elements */
.my-services, .about-me, .my-work, .projects, .contact {
    position: relative;
    overflow: hidden;
}

/* Floating Shapes */
.my-services::before,
.about-me::before,
.my-work::before,
.projects::before,
.contact::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: 
        radial-gradient(circle at 10% 10%, rgba(var(--clr-primary), 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(var(--clr-secondary), 0.05) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* Animated Corner Accents */
.my-services::after,
.about-me::after,
.my-work::after,
.projects::after,
.contact::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid var(--clr-accent);
    opacity: 0.2;
    z-index: 0;
}

.my-services::after {
    top: -75px;
    right: -75px;
    border-radius: 0 0 0 100%;
    animation: rotateTopRight 20s linear infinite;
}

.about-me::after {
    bottom: -75px;
    left: -75px;
    border-radius: 0 100% 0 0;
    animation: rotateBottomLeft 20s linear infinite;
}

.my-work::after {
    top: -75px;
    left: -75px;
    border-radius: 0 0 100% 0;
    animation: rotateTopLeft 20s linear infinite;
}

.projects::after {
    bottom: -75px;
    right: -75px;
    border-radius: 100% 0 0 0;
    animation: rotateBottomRight 20s linear infinite;
}

.contact::after {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: pulseAndRotate 10s ease-in-out infinite;
}

/* Floating Bubbles */
.section-bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.bubble {
    position: absolute;
    background: radial-gradient(circle at center, 
        rgba(var(--clr-primary), 0.1),
        rgba(var(--clr-secondary), 0.05));
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
}

.my-services .bubble:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.my-services .bubble:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 20%;
    animation-delay: -5s;
}

.about-me .bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    bottom: 30%;
    right: 15%;
    animation-delay: -2s;
}

.about-me .bubble:nth-child(2) {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 25%;
    animation-delay: -7s;
}

/* Decorative Lines */
.decorative-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.1;
}

.decorative-lines::before,
.decorative-lines::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, 
        transparent,
        var(--clr-primary),
        transparent);
    height: 1px;
}

.decorative-lines::before {
    width: 50%;
    top: 20%;
    left: 0;
    animation: slideRight 8s ease-in-out infinite;
}

.decorative-lines::after {
    width: 70%;
    bottom: 30%;
    right: 0;
    animation: slideLeft 8s ease-in-out infinite;
}

/* Animations */
@keyframes rotateTopRight {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateBottomLeft {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes rotateTopLeft {
    from { transform: rotate(-45deg); }
    to { transform: rotate(315deg); }
}

@keyframes rotateBottomRight {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes pulseAndRotate {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0.2;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
        opacity: 0.3;
    }
}

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

@keyframes slideRight {
    0%, 100% {
        transform: translateX(0);
        opacity: 0;
    }
    50% {
        transform: translateX(100%);
        opacity: 0.5;
    }
}

@keyframes slideLeft {
    0%, 100% {
        transform: translateX(0);
        opacity: 0;
    }
    50% {
        transform: translateX(-100%);
        opacity: 0.5;
    }
}

/* Enhanced Section Decorations */
.section-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Glowing Dots */
.glowing-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.glowing-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--clr-accent);
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0.5;
    animation: glowPulse 3s ease-in-out infinite;
}

.my-services .glowing-dot:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.my-services .glowing-dot:nth-child(2) { top: 70%; right: 15%; animation-delay: -1s; }
.my-services .glowing-dot:nth-child(3) { top: 40%; left: 80%; animation-delay: -2s; }

.about-me .glowing-dot:nth-child(1) { top: 30%; right: 20%; animation-delay: -0.5s; }
.about-me .glowing-dot:nth-child(2) { bottom: 20%; left: 30%; animation-delay: -1.5s; }
.about-me .glowing-dot:nth-child(3) { top: 60%; right: 40%; animation-delay: -2.5s; }

/* Curved Lines */
.curved-line {
    position: absolute;
    border: none;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--clr-primary);
    opacity: 0.2;
    animation: rotateCurve 20s linear infinite;
}

.my-services .curved-line:nth-child(1) {
    top: -75px;
    left: -75px;
    animation-direction: reverse;
}

.about-me .curved-line:nth-child(1) {
    bottom: -75px;
    right: -75px;
}

/* Floating Shapes */
.floating-shape {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--clr-secondary);
    opacity: 0.2;
    animation: floatShape 8s ease-in-out infinite;
}

.floating-shape.diamond {
    transform: rotate(45deg);
}

.floating-shape.triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: var(--clr-primary);
}

.my-services .floating-shape:nth-child(1) {
    top: 30%;
    right: 10%;
    animation-delay: -2s;
}

.about-me .floating-shape:nth-child(1) {
    bottom: 20%;
    left: 15%;
    animation-delay: -1s;
}

/* Gradient Mesh */
.gradient-mesh {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 107, 107, 0.1), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(78, 205, 196, 0.1), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(69, 183, 209, 0.1), transparent 50%);
    opacity: 0.3;
    mix-blend-mode: screen;
    transition: all 0.5s ease;
}

.section:hover .gradient-mesh {
    opacity: 0.5;
    background-size: 120% 120%;
}

/* New Animations */
@keyframes glowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }
}

@keyframes rotateCurve {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

@keyframes meshFloat {
    0% { background-position: 0 0; }
    100% { background-position: 30px 30px; }
}

/* Section-specific enhancements */
.my-services .section-decoration::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, 
        rgba(var(--clr-primary), 0.1) 0%,
        transparent 70%);
    top: -100px;
    right: -100px;
    animation: rotatePulse 15s linear infinite;
}

.about-me .section-decoration::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, 
        rgba(var(--clr-secondary), 0.1) 0%,
        transparent 70%);
    bottom: -75px;
    left: -75px;
    animation: rotatePulse 15s linear infinite reverse;
}

@keyframes rotatePulse {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 0.2;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 0.1;
    }
}

/* Ensure content stays above decorations */
.section__title,
.section__subtitle,
.services,
.about-grid,
.work-grid,
.projects-grid,
.contact-form {
    position: relative;
    z-index: 2;
}

/* Sparkles Effect */
.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--clr-accent);
    animation: sparkle 4s ease-in-out infinite;
    opacity: 0;
}

.my-services .sparkle:nth-child(1) { top: 25%; left: 15%; animation-delay: 0s; }
.my-services .sparkle:nth-child(2) { top: 45%; right: 25%; animation-delay: -1s; }
.my-services .sparkle:nth-child(3) { bottom: 30%; left: 35%; animation-delay: -2s; }

.about-me .sparkle:nth-child(1) { top: 35%; right: 15%; animation-delay: -0.5s; }
.about-me .sparkle:nth-child(2) { bottom: 25%; left: 25%; animation-delay: -1.5s; }
.about-me .sparkle:nth-child(3) { top: 55%; left: 45%; animation-delay: -2.5s; }

.projects .sparkle:nth-child(1) { top: 20%; right: 30%; animation-delay: -0.7s; }
.projects .sparkle:nth-child(2) { bottom: 35%; left: 20%; animation-delay: -1.7s; }
.projects .sparkle:nth-child(3) { top: 45%; right: 15%; animation-delay: -2.7s; }

/* Corner Decorations */
.corner-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.corner-decoration::before,
.corner-decoration::after {
    content: '';
    position: absolute;
    background: var(--clr-primary);
    opacity: 0.2;
}

.corner-decoration::before {
    width: 2px;
    height: 100%;
}

.corner-decoration::after {
    width: 100%;
    height: 2px;
}

.corner-decoration--top-left {
    top: 0;
    left: 0;
}

.corner-decoration--top-right {
    top: 0;
    right: 0;
    transform: rotate(90deg);
}

.corner-decoration--bottom-left {
    bottom: 0;
    left: 0;
    transform: rotate(-90deg);
}

.corner-decoration--bottom-right {
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}

/* Wavy Border Effect */
.wavy-border {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.wavy-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        var(--clr-primary) 10px,
        var(--clr-primary) 11px
    );
    opacity: 0.1;
    animation: waveBorder 20s linear infinite;
}

/* Enhanced Background Patterns */
.bg-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 50% 50%, 
            var(--clr-primary) 1px, 
            transparent 1px),
        radial-gradient(circle at 0% 0%, 
            var(--clr-secondary) 1px, 
            transparent 1px);
    background-size: 20px 20px;
    opacity: 0.05;
    animation: patternFloat 30s linear infinite;
}

/* New Animations */
@keyframes sparkle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes waveBorder {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes patternFloat {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 20px;
    }
}

/* Section Hover Effects */
.my-services:hover .sparkle,
.about-me:hover .sparkle,
.projects:hover .sparkle {
    animation-duration: 2s;
}

.my-services:hover .corner-decoration::before,
.my-services:hover .corner-decoration::after,
.about-me:hover .corner-decoration::before,
.about-me:hover .corner-decoration::after,
.projects:hover .corner-decoration::before,
.projects:hover .corner-decoration::after {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.my-services:hover .wavy-border::before,
.about-me:hover .wavy-border::before,
.projects:hover .wavy-border::before {
    animation-duration: 15s;
}

/* Ensure smooth transitions */
.my-services,
.about-me,
.projects,
.contact {
    transition: transform 0.3s ease;
}

.my-services:hover,
.about-me:hover,
.projects:hover,
.contact:hover {
    transform: translateY(-5px);
}

/* New Decorative Elements */
.section-decorations {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* Rainbow Orbs */
.rainbow-orb {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96c93d);
    filter: blur(20px);
    opacity: 0.4;
    animation: floatOrb 15s ease-in-out infinite;
    transition: all 0.5s ease;
}

.section:hover .rainbow-orb {
    transform: scale(1.2);
    opacity: 0.6;
}

/* Geometric Patterns */
.geo-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(30deg, var(--clr-primary) 12%, transparent 12.5%, transparent 87%, var(--clr-primary) 87.5%, var(--clr-primary)),
        linear-gradient(150deg, var(--clr-primary) 12%, transparent 12.5%, transparent 87%, var(--clr-primary) 87.5%, var(--clr-primary)),
        linear-gradient(30deg, var(--clr-primary) 12%, transparent 12.5%, transparent 87%, var(--clr-primary) 87.5%, var(--clr-primary)),
        linear-gradient(150deg, var(--clr-primary) 12%, transparent 12.5%, transparent 87%, var(--clr-primary) 87.5%, var(--clr-primary)),
        linear-gradient(60deg, var(--clr-secondary) 25%, transparent 25.5%, transparent 75%, var(--clr-secondary) 75%, var(--clr-secondary));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0;
    opacity: 0.1;
    transition: all 0.5s ease;
}

.section:hover .geo-pattern {
    opacity: 0.15;
    background-size: 100px 175px;
}

/* Neon Lines */
.neon-lines {
    position: absolute;
    width: 100%;
    height: 100%;
}

.neon-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, var(--clr-primary), transparent);
    height: 2px;
    width: 100%;
    opacity: 0;
    transform-origin: left;
    animation: neonPulse 3s ease-in-out infinite;
}

.section:hover .neon-line {
    opacity: 0.5;
}

/* Prismatic Corners */
.prismatic-corner {
    position: absolute;
    width: 100px;
    height: 100px;
    opacity: 0.3;
    transition: all 0.4s ease;
}

.prismatic-corner::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, #ff6b6b, #4ecdc4, #45b7d1, #96c93d, #ff6b6b);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    filter: blur(5px);
}

.section:hover .prismatic-corner {
    opacity: 0.6;
    transform: scale(1.2) rotate(15deg);
}

/* Floating Particles */
.particle-group {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--clr-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 8s ease-in-out infinite;
}

.section:hover .floating-particle {
    animation-duration: 4s;
    opacity: 0.5;
}

/* Animations */
@keyframes neonPulse {
    0%, 100% { transform: scaleX(0.3); opacity: 0.2; }
    50% { transform: scaleX(1); opacity: 0.5; }
}

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, -30px) rotate(90deg); }
    50% { transform: translate(100px, 0) rotate(180deg); }
    75% { transform: translate(50px, 30px) rotate(270deg); }
}

/* Color Transitions */
.color-transition {
    position: absolute;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    filter: blur(50px);
    opacity: 0.2;
    mix-blend-mode: screen;
    animation: colorShift 10s ease-in-out infinite;
}

@keyframes colorShift {
    0%, 100% { background: linear-gradient(45deg, #ff6b6b, #4ecdc4); }
    33% { background: linear-gradient(45deg, #4ecdc4, #45b7d1); }
    66% { background: linear-gradient(45deg, #45b7d1, #96c93d); }
}

/* Apply to sections */
.my-services,
.about-me,
.my-work,
.projects,
.contact {
    position: relative;
}

.my-services .section-decorations .rainbow-orb:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.my-services .section-decorations .rainbow-orb:nth-child(2) { bottom: 30%; right: 15%; animation-delay: -5s; }

.about-me .section-decorations .neon-line:nth-child(1) { top: 30%; animation-delay: -1s; }
.about-me .section-decorations .neon-line:nth-child(2) { bottom: 40%; animation-delay: -3s; }

.my-work .section-decorations .prismatic-corner:nth-child(1) { top: 0; left: 0; }
.my-work .section-decorations .prismatic-corner:nth-child(2) { bottom: 0; right: 0; transform: rotate(180deg); }

.projects .section-decorations .floating-particle:nth-child(1) { top: 20%; left: 20%; animation-delay: -2s; }
.projects .section-decorations .floating-particle:nth-child(2) { top: 60%; right: 30%; animation-delay: -4s; }
.projects .section-decorations .floating-particle:nth-child(3) { bottom: 30%; left: 40%; animation-delay: -6s; }

.contact .section-decorations .color-transition:nth-child(1) { top: 20%; left: 10%; animation-delay: -3s; }
.contact .section-decorations .color-transition:nth-child(2) { bottom: 20%; right: 10%; animation-delay: -6s; }

/* Additional Decorative Elements */
/* Crystal Shards */
.crystal-shard {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    backdrop-filter: blur(5px);
    opacity: 0.3;
    transition: all 0.5s ease;
    animation: rotateShard 10s linear infinite;
}

.section:hover .crystal-shard {
    opacity: 0.5;
    transform: scale(1.2) rotate(45deg);
    filter: hue-rotate(90deg);
}

/* Glowing Rings */
.glowing-ring {
    position: absolute;
    width: 100px;
    height: 100px;
}

/* Liquid Bubbles */
.liquid-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.4),
        rgba(255, 255, 255, 0.1) 30%,
        rgba(255, 255, 255, 0.05) 60%,
        transparent 100%
    );
    backdrop-filter: blur(5px);
    opacity: 0.3;
    animation: bubbleFloat 8s ease-in-out infinite;
}

.section:hover .liquid-bubble {
    animation-duration: 4s;
    opacity: 0.5;
    filter: hue-rotate(90deg);
}

/* Glitter Effect */
.glitter {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: glitterSparkle 4s ease-in-out infinite;
}

.section:hover .glitter {
    animation-duration: 2s;
}

/* Energy Field */
.energy-field {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--clr-primary),
        var(--clr-secondary),
        transparent
    );
    opacity: 0.1;
    filter: blur(20px);
    animation: energyPulse 6s ease-in-out infinite;
}

.section:hover .energy-field {
    animation-duration: 3s;
    opacity: 0.2;
}

/* New Animations */
@keyframes bubbleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(20px, -20px) scale(1.1);
        opacity: 0.4;
    }
}

@keyframes glitterSparkle {
    0%, 100% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1) rotate(180deg);
        opacity: 0.8;
    }
}

@keyframes energyPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.2;
    }
}

/* Apply to sections */
.my-services .section-decorations .liquid-bubble:nth-child(1) { 
    top: 25%; 
    left: 15%; 
    width: 80px; 
    height: 80px; 
}
.my-services .section-decorations .liquid-bubble:nth-child(2) { 
    bottom: 35%; 
    right: 20%; 
    width: 60px; 
    height: 60px; 
    animation-delay: -4s; 
}

.about-me .section-decorations .glitter:nth-child(1) { top: 30%; left: 20%; animation-delay: -1s; }
.about-me .section-decorations .glitter:nth-child(2) { top: 50%; right: 30%; animation-delay: -2s; }
.about-me .section-decorations .glitter:nth-child(3) { bottom: 25%; left: 40%; animation-delay: -3s; }

.my-work .section-decorations .energy-field:nth-child(1) { top: 20%; right: 10%; }
.my-work .section-decorations .energy-field:nth-child(2) { bottom: 30%; left: 15%; animation-delay: -3s; }

/* Interactive Hover States */
.section:hover .section-decorations {
    z-index: 1;
}

.section:hover .liquid-bubble,
.section:hover .glitter,
.section:hover .energy-field {
    transition: all 0.3s ease;
}

/* Enhanced Light Mode Styles */
.light-mode .liquid-bubble {
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 107, 107, 0.4),
        rgba(255, 107, 107, 0.1) 30%,
        rgba(255, 107, 107, 0.05) 60%,
        transparent 100%
    );
}

.light-mode .glitter {
    background: var(--clr-primary);
}

.light-mode .energy-field {
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(255, 107, 107, 0.5),
        rgba(78, 205, 196, 0.5),
        transparent
    );
}

/* Enhanced Section Patterns */
.section-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

/* Hexagonal Grid Pattern */
.pattern-hexagons {
    background-image: 
        linear-gradient(60deg, var(--clr-primary) 1px, transparent 1px),
        linear-gradient(-60deg, var(--clr-primary) 1px, transparent 1px),
        linear-gradient(60deg, transparent 3px, var(--clr-background) 3px),
        linear-gradient(-60deg, transparent 3px, var(--clr-background) 3px);
    background-size: 40px 70px;
    animation: patternShift 20s linear infinite;
}

/* Circuit Board Pattern */
.pattern-circuit {
    background-image: 
        radial-gradient(circle at 50% 50%, var(--clr-primary) 1px, transparent 1px),
        linear-gradient(90deg, var(--clr-primary) 1px, transparent 1px),
        linear-gradient(var(--clr-primary) 1px, transparent 1px);
    background-size: 20px 20px, 60px 60px, 60px 60px;
    animation: circuitGlow 8s ease-in-out infinite;
}

/* Diagonal Stripes Pattern */
.pattern-stripes {
    background: repeating-linear-gradient(
        45deg,
        var(--clr-primary) 0px,
        var(--clr-primary) 1px,
        transparent 1px,
        transparent 30px
    );
    animation: stripeFlow 15s linear infinite;
}

/* Dot Matrix Pattern */
.pattern-dots {
    background-image: 
        radial-gradient(var(--clr-primary) 1px, transparent 1px),
        radial-gradient(var(--clr-secondary) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    animation: dotPulse 10s ease-in-out infinite;
}

/* Wave Pattern */
.pattern-waves {
    background: 
        linear-gradient(45deg, transparent 48%, var(--clr-primary) 49%, var(--clr-primary) 51%, transparent 52%) 50px 50px,
        linear-gradient(-45deg, transparent 48%, var(--clr-secondary) 49%, var(--clr-secondary) 51%, transparent 52%) 50px 50px;
    background-size: 100px 100px;
    animation: waveFlow 10s linear infinite;
}

/* Apply patterns to sections */