/* =================== FUTURISTIC PORTFOLIO STYLES =================== */
/* Modern, Professional, Premium Design System */

:root {
    /* Premium Color Palette */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #22d3ee;
    --accent-2: #a78bfa;
    --accent-3: #f472b6;
    --success: #10b981;
    --warning: #f59e0b;
    
    /* Neutral Colors - Refined */
    --text-color: #0f172a;
    --light-text: #64748b;
    --text-muted: #94a3b8;
    --bg-color: #fafbff;
    --light-bg: #f1f5f9;
    --dark-bg: #0f172a;
    --border-color: rgba(148, 163, 184, 0.15);
    
    /* Light/Dark mode variables */
    --body-bg: var(--bg-color);
    --body-color: var(--text-color);
    --header-bg: rgba(250, 251, 255, 0.88);
    --card-bg: var(--bg-color);
    --secondary-bg: #f1f5f9;
    
    /* Premium Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: 24px;
    --glass-saturate: 180%;
    
    /* Premium Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-accent: linear-gradient(135deg, #22d3ee 0%, #6366f1 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
    --gradient-mesh: radial-gradient(at 40% 20%, rgba(99, 102, 241, 0.07) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, rgba(168, 85, 247, 0.05) 0px, transparent 50%),
                     radial-gradient(at 0% 50%, rgba(34, 211, 238, 0.04) 0px, transparent 50%),
                     radial-gradient(at 80% 50%, rgba(244, 114, 182, 0.04) 0px, transparent 50%);
    
    /* Refined Spacing */
    --section-padding: 120px 0;
    --container-padding: 0 24px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Premium Transitions */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Premium Border radius */
    --border-radius: 16px;
    --btn-radius: 9999px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Refined Layered Shadows */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
    --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.12);
    --shadow-glow-lg: 0 0 60px rgba(99, 102, 241, 0.18);
    --shadow-card: 0 4px 24px -4px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(99, 102, 241, 0.02);
    --shadow-card-hover: 0 16px 48px -8px rgba(99, 102, 241, 0.18), 0 0 0 1px rgba(99, 102, 241, 0.08);
}

/* Dark mode colors - Premium */
body.dark-theme {
    --body-bg: #0a0e1a;
    --body-color: #f1f5f9;
    --header-bg: rgba(10, 14, 26, 0.92);
    --card-bg: #141827;
    --border-color: rgba(99, 102, 241, 0.08);
    --light-text: #94a3b8;
    --light-bg: #1e293b;
    --secondary-bg: #0f172a;
    --glass-bg: rgba(20, 24, 39, 0.88);
    --glass-border: rgba(99, 102, 241, 0.12);
    --gradient-mesh: radial-gradient(at 40% 20%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, rgba(168, 85, 247, 0.08) 0px, transparent 50%),
                     radial-gradient(at 0% 50%, rgba(34, 211, 238, 0.06) 0px, transparent 50%);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.theme-toggle-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.35);
    transition: var(--transition-bounce);
}

.theme-toggle-floating:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.45);
}

.theme-toggle-floating:active {
    transform: scale(0.95);
}

.theme-toggle-floating i {
    font-size: 1.25rem;
    color: white;
    position: absolute;
    transition: var(--transition);
}

.theme-toggle-floating .fa-moon {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-toggle-floating .fa-sun {
    opacity: 0;
    transform: rotate(-90deg);
}

body.dark-theme .theme-toggle-floating .fa-moon {
    opacity: 0;
    transform: rotate(90deg);
}

body.dark-theme .theme-toggle-floating .fa-sun {
    opacity: 1;
    transform: rotate(0deg);
}

@media (max-width: 768px) {
    .theme-toggle-floating {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--body-bg);
    background-image: var(--gradient-mesh);
    background-attachment: fixed;
    color: var(--body-color);
    line-height: 1.7;
    transition: background-color 0.5s ease, color 0.3s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.loading {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--body-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.section {
    padding: var(--section-padding);
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    padding-bottom: 24px;
    display: inline-block;
    width: 100%;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 9999px;
    box-shadow: 0 2px 20px rgba(99, 102, 241, 0.4);
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: var(--accent);
    border-radius: 9999px;
    animation: titleLineMove 4s ease-in-out infinite;
    z-index: 1;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}

@keyframes titleLineMove {
    0%, 100% { transform: translateX(calc(-50% - 30px)); }
    50% { transform: translateX(calc(-50% + 30px)); }
}

.section-description {
    text-align: center;
    max-width: 600px;
    margin: 2rem auto 4rem;
    color: var(--light-text);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* =================== BUTTONS - Premium =================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--btn-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.25), transparent);
    opacity: 0;
    transition: var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* =================== HEADER & NAVIGATION - Premium =================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur));
    -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

#header.scrolled {
    box-shadow: var(--shadow-lg), 0 1px 0 var(--border-color);
}

#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 20px;
}

.logo a {
    font-family: 'Raleway', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--body-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo a span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    color: var(--light-text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 10px 18px;
    border-radius: var(--btn-radius);
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.08);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link::after {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.menu-toggle:hover {
    background: var(--light-bg);
}

.bar {
    width: 24px;
    height: 2.5px;
    background-color: var(--body-color);
    border-radius: var(--btn-radius);
    transition: var(--transition);
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* =================== HERO SECTION - Premium =================== */
#hero {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12), transparent);
    overflow: hidden;
    padding: 100px 20px 60px;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

#hero .container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 2;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    width: 100%;
    background: linear-gradient(135deg, var(--body-color) 0%, var(--light-text) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.hero-content h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    width: 100%;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.02em;
}

/* Typing cursor effect */
.hero-content h2.typing-active::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--primary-color);
    margin-left: 4px;
    animation: blink-cursor 0.8s infinite;
    vertical-align: middle;
}

@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--light-text);
    width: 100%;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 3rem;
    width: 100%;
    flex-wrap: wrap;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--light-text);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.35);
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: bounce-scroll 2s ease-in-out infinite;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--light-text);
    border-radius: 14px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: var(--btn-radius);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s ease-in-out infinite;
}

.arrow {
    margin-top: 4px;
}

.arrow span {
    display: block;
    width: 12px;
    height: 12px;
    border-bottom: 2px solid var(--light-text);
    border-right: 2px solid var(--light-text);
    transform: rotate(45deg);
}

@keyframes scroll-wheel {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(12px);
        opacity: 0;
    }
}

@keyframes bounce-scroll {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) translateY(10px);
        opacity: 0.7;
    }
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================== MODERN ANIMATIONS =================== */
/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animation */
.scroll-reveal.revealed .skill-logo-item,
.scroll-reveal.revealed .project-item,
.scroll-reveal.revealed .contact-card {
    animation: slideUpFade 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.scroll-reveal.revealed .skill-logo-item:nth-child(1) { animation-delay: 0.1s; }
.scroll-reveal.revealed .skill-logo-item:nth-child(2) { animation-delay: 0.15s; }
.scroll-reveal.revealed .skill-logo-item:nth-child(3) { animation-delay: 0.2s; }
.scroll-reveal.revealed .skill-logo-item:nth-child(4) { animation-delay: 0.25s; }
.scroll-reveal.revealed .skill-logo-item:nth-child(5) { animation-delay: 0.3s; }
.scroll-reveal.revealed .skill-logo-item:nth-child(6) { animation-delay: 0.35s; }
.scroll-reveal.revealed .skill-logo-item:nth-child(7) { animation-delay: 0.4s; }
.scroll-reveal.revealed .skill-logo-item:nth-child(8) { animation-delay: 0.45s; }

.scroll-reveal.revealed .contact-card:nth-child(1) { animation-delay: 0.1s; }
.scroll-reveal.revealed .contact-card:nth-child(2) { animation-delay: 0.2s; }
.scroll-reveal.revealed .contact-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(1deg); }
    50% { transform: translateY(-5px) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(-1deg); }
}

/* Gradient text animation */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.section-title {
    background: linear-gradient(135deg, var(--body-color) 0%, var(--primary-color) 40%, var(--accent) 70%, var(--body-color) 100%);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease infinite;
    text-shadow: none;
    letter-spacing: -0.02em;
}

/* Shimmer effect for buttons */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
    pointer-events: none;
}

/* Glow pulse animation */
@keyframes glowPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3),
                    0 0 40px rgba(99, 102, 241, 0.1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.5),
                    0 0 60px rgba(99, 102, 241, 0.2);
    }
}

/* Card hover lift effect */
.skill-logo-item,
.project-item,
.glass-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-logo-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

/* Button hover effect - simplified for stability */
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Text reveal animation */
@keyframes textReveal {
    from {
        clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
    }
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* Underline animation for links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* Icon bounce on hover */
.social-icons a:hover i,
.footer-social a:hover i {
    animation: iconBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Ripple effect - disabled to prevent button bugs */
/* 
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}
*/

/* Tilt effect for cards */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Background orbs floating animation - enhanced */
.orb {
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 { animation-delay: 0s; }
.orb-2 { animation-delay: -5s; }
.orb-3 { animation-delay: -10s; }

@keyframes orbFloat {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    25% { 
        transform: translate(50px, -50px) scale(1.1);
        opacity: 0.7;
    }
    50% { 
        transform: translate(0, -100px) scale(0.9);
        opacity: 0.6;
    }
    75% { 
        transform: translate(-50px, -50px) scale(1.05);
        opacity: 0.5;
    }
}

/* Smooth section transitions */
.section {
    position: relative;
}

.section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--body-bg));
    pointer-events: none;
    opacity: 0.5;
}

#hero::after,
#contact::after {
    display: none;
}

/* Parallax scrolling for backgrounds */
.parallax-bg {
    transform: translateZ(-1px) scale(2);
}

/* Counter number animation */
.stat-number {
    display: inline-block;
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
}

/* Typing cursor enhanced */
@keyframes cursorBlink {
    0%, 50% { border-color: var(--primary-color); }
    51%, 100% { border-color: transparent; }
}

/* Loading skeleton animation */
@keyframes skeleton {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--secondary-bg) 25%, var(--border-color) 50%, var(--secondary-bg) 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

/* =================== ABOUT SECTION - Premium =================== */
#about {
    background: var(--secondary-bg);
    position: relative;
    overflow: hidden;
}

#about::before {
    display: none;
}

.about-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.about-card {
    background: var(--glass-bg);
    backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur));
    -webkit-backdrop-filter: saturate(var(--glass-saturate)) blur(var(--glass-blur));
    border-radius: var(--radius-lg);
    padding: 48px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: start;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: visible;
    transition: var(--transition);
}

.about-card:hover {
    box-shadow: var(--shadow-card-hover);
}

body.dark-theme .about-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.about-card::before {
    display: none;
}

.about-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.about-image-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.dark-theme .about-image-container {
    border-color: rgba(255, 255, 255, 0.15);
}

.about-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image-container:hover .about-profile-img {
    transform: scale(1.1);
}

.about-image-glow {
    display: none;
}

.about-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--btn-radius);
    font-size: 0.8rem;
    font-weight: 600;
    color: #22c55e;
}

body.dark-theme .about-status {
    background: rgba(30, 41, 59, 0.8);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    }
    50% { 
        opacity: 0.6;
        box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
    }
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-header {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-theme .about-header {
    border-color: rgba(255, 255, 255, 0.1);
}

.about-name {
    font-size: 1.85rem;
    margin-bottom: 8px;
    color: var(--body-color);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.about-role {
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.about-role::before {
    content: '// ';
    color: #94a3b8;
}

.about-role::after {
    content: '';
}

.about-bio {
    color: var(--light-text);
    line-height: 1.8;
    margin: 0;
    font-size: 0.95rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-theme .about-stats {
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

body.dark-theme .stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--body-color);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--light-text);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-actions {
    display: flex;
    gap: 12px;
    padding-top: 4px;
}

.about-actions .btn {
    flex: 1;
}

/* About Section Responsive */
@media (max-width: 900px) {
    .about-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 36px 24px;
        gap: 32px;
    }
    
    .about-image-wrapper {
        justify-content: center;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .about-actions {
        flex-direction: column;
    }
    
    .about-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .about-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .about-image-container {
        width: 160px;
        height: 160px;
    }
    
    .stat-item {
        padding: 16px 12px;
    }
}

/* =================== SKILLS SECTION =================== */
.skills-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.skill-category h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-item {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 50%;
}

.skill-icon span {
    font-weight: 700;
    font-size: 1.8rem;
}

.skill-item h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.skill-bar {
    height: 8px;
    background: var(--light-bg);
    border-radius: 4px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

/* =================== PROJECTS SECTION =================== */
#projects {
    background: var(--secondary-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
}

.project-item {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-color);
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: var(--primary-light);
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.image-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-item:hover .project-image img {
    transform: scale(1.08);
}

.project-info {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    margin-bottom: 12px;
    font-size: 1.35rem;
    transition: color var(--transition-fast);
}

.project-item:hover .project-info h3 {
    color: var(--primary-color);
}

.project-info p {
    color: var(--light-text);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.7;
    flex-grow: 1;
}

.project-tags {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: var(--btn-radius);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition-fast);
}

.project-tags span:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.project-links {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

/* Projects Loading & Footer */
.projects-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--light-text);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.projects-footer {
    text-align: center;
    margin-top: 48px;
}

/* GitHub Project Card Extras */
.project-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--light-text);
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-language {
    display: flex;
    align-items: center;
    gap: 6px;
}

.language-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
}

/* Language colors */
.language-dot.python { background: #3572A5; }
.language-dot.javascript { background: #f1e05a; }
.language-dot.html { background: #e34c26; }
.language-dot.css { background: #563d7c; }
.language-dot.r { background: #198CE7; }
.language-dot.cpp { background: #f34b7d; }
.language-dot.c { background: #555555; }
.language-dot.java { background: #b07219; }
.language-dot.typescript { background: #2b7489; }

/* =================== CONTACT SECTION - MODERN GLASS DESIGN =================== */
#contact {
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(34, 211, 238, 0.06) 0%, transparent 40%);
    pointer-events: none;
    animation: contactBgFloat 20s ease-in-out infinite;
}

@keyframes contactBgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-2%, 2%) rotate(1deg); }
}

.section-subtitle {
    text-align: center;
    color: var(--light-text);
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 3rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

/* Glass Card Base */
.glass-card {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme .glass-card {
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.glass-card:hover .card-glow {
    opacity: 1;
}

/* Contact Cards - Left Side */
.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card {
    padding: 28px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(99, 102, 241, 0.15),
        0 0 60px rgba(99, 102, 241, 0.05);
}

body.dark-theme .contact-card:hover {
    box-shadow: 
        0 20px 40px rgba(99, 102, 241, 0.2),
        0 0 60px rgba(99, 102, 241, 0.1);
}

.contact-card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 16px;
    color: white;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    position: relative;
}

.contact-card-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 18px;
    opacity: 0.3;
    filter: blur(8px);
    z-index: -1;
}

.contact-card-icon.location {
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    box-shadow: 0 8px 20px rgba(34, 211, 238, 0.3);
}

.contact-card-icon.location::after {
    background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
}

.contact-card-icon.social {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
}

.contact-card-icon.social::after {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
}

.contact-card-content {
    flex: 1;
}

.contact-label {
    display: block;
    font-size: 0.85rem;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.contact-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--body-color);
    margin-bottom: 12px;
}

.contact-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.contact-action:hover {
    gap: 12px;
    color: var(--primary-dark);
}

.contact-action i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.contact-action:hover i {
    transform: translateX(4px);
}

/* Social Media Card */
.social-card {
    flex-direction: column;
    gap: 24px;
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

body.dark-theme .social-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-item::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-item.instagram::before {
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.1), rgba(253, 29, 29, 0.1), rgba(252, 176, 69, 0.1));
}

.social-item.github::before {
    background: linear-gradient(135deg, rgba(36, 41, 46, 0.1), rgba(88, 96, 105, 0.1));
}

.social-item.linkedin::before {
    background: linear-gradient(135deg, rgba(10, 102, 194, 0.1), rgba(0, 119, 181, 0.1));
}

.social-item:hover::before {
    opacity: 1;
}

.social-item:hover {
    transform: translateX(8px);
    border-color: transparent;
}

.social-icon-wrapper {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-item.instagram .social-icon-wrapper {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    color: white;
}

.social-item.github .social-icon-wrapper {
    background: linear-gradient(135deg, #24292e, #586069);
    color: white;
}

.social-item.linkedin .social-icon-wrapper {
    background: linear-gradient(135deg, #0a66c2, #0077b5);
    color: white;
}

.social-info {
    flex: 1;
}

.social-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--body-color);
}

.social-handle {
    display: block;
    font-size: 0.8rem;
    color: var(--light-text);
}

.social-arrow {
    color: var(--light-text);
    font-size: 0.8rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.social-item:hover .social-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Right Side - Map & Form */
.contact-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Map Container */
.map-container {
    padding: 0;
    overflow: hidden;
}

.map-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--body-color);
}

body.dark-theme .map-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.map-pin-pulse {
    width: 12px;
    height: 12px;
    background: #22d3ee;
    border-radius: 50%;
    position: relative;
    animation: pinPulse 2s ease-in-out infinite;
}

.map-pin-pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid #22d3ee;
    border-radius: 50%;
    animation: pinRing 2s ease-in-out infinite;
}

@keyframes pinPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes pinRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

.map-wrapper {
    height: 200px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Full width map at bottom */
.map-full-width {
    margin-top: 40px;
    width: 100%;
}

.map-full-width .map-wrapper {
    height: 280px;
}

.map-wrapper iframe {
    filter: grayscale(20%) contrast(1.1);
}

body.dark-theme .map-wrapper iframe {
    filter: invert(90%) hue-rotate(180deg) grayscale(20%);
}

/* Contact Form */
.contact-form {
    padding: 32px;
}

.contact-form:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(99, 102, 241, 0.12),
        0 0 60px rgba(99, 102, 241, 0.05);
}

.form-header {
    margin-bottom: 28px;
}

.form-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--body-color);
    margin-bottom: 4px;
}

.form-header p {
    color: var(--light-text);
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--body-color);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--body-color);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

body.dark-theme .form-group input:focus,
body.dark-theme .form-group textarea:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--light-text);
}

.form-group textarea {
    height: 130px;
    resize: none;
}

.btn-submit {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit::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-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-submit i {
    transition: transform 0.3s ease;
}

.btn-submit:hover i {
    transform: translateX(4px) rotate(-15deg);
}

/* Non-invasive loading state for submit button */
.btn-submit.loading {
    opacity: 0.85;
    pointer-events: none;
    cursor: wait;
}

.btn-submit.loading span {
    opacity: 0.7;
}

.btn-submit.loading i.fa-paper-plane {
    display: none;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    right: 20px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-cards {
        order: 2;
    }
    
    .contact-right {
        order: 1;
    }
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .contact-card-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        width: 100%;
    }
    
    .contact-card-icon {
        margin: 0 auto 12px auto;
    }
    
    .contact-card-content {
        width: 100%;
        text-align: center;
    }
    
    .contact-action {
        justify-content: center;
    }
    
    .social-card {
        align-items: center;
    }
    
    .social-grid {
        width: 100%;
    }
    
    .social-item {
        padding: 12px;
        justify-content: flex-start;
    }
}

.contact-form .btn {
    width: 100%;
}

.form-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #16a34a;
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-top: 16px;
    font-weight: 500;
    text-align: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =================== FOOTER =================== */
#footer {
    padding: 30px 0 20px;
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.footer-logo {
    margin-bottom: 0;
}

.footer-logo a {
    font-family: 'Raleway', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--body-color);
}

.footer-logo a span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.copyright {
    margin: 4px 0;
    color: var(--light-text);
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    color: var(--light-text);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 1rem;
}

.footer-social a:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* =================== RESPONSIVE DESIGN =================== */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .about-image {
        order: -1;
    }
    
    .img-container {
        max-width: 320px;
    }
}

@media (max-width: 900px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        padding: 100px 30px 40px;
        gap: 8px;
        transition: right 0.3s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 998;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        padding: 14px 20px;
        width: 100%;
        border-radius: var(--border-radius);
    }
    
    .menu-toggle {
        display: flex;
        z-index: 999;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 28px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .img-container {
        max-width: 260px;
    }
    
    .img-container::after {
        top: 12px;
        left: 12px;
    }
    
    .social-icons a {
        width: 44px;
        height: 44px;
    }
    
    .btn {
        padding: 12px 24px;
    }
    
    .project-info {
        padding: 20px;
    }
    
    .skills-logo-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 16px;
    }
    
    .skill-logo-item {
        padding: 20px 16px;
    }
    
    .skill-logo-item i {
        font-size: 36px;
    }
    
    /* Mobile responsive fixes */
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    .about-card {
        padding: 20px;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .stat-item {
        padding: 16px 20px;
    }
    
    .about-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .about-actions .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .map-full-width .map-wrapper {
        height: 200px;
    }
    
    .contact-value {
        font-size: 0.95rem;
        word-break: break-word;
    }
    
    .social-grid {
        gap: 10px;
    }
    
    .form-header h3 {
        font-size: 1.2rem;
    }
    
    .nav-links {
        width: 100%;
        right: -100%;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content h2 {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .skills-logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .skill-logo-item {
        padding: 16px 12px;
    }
    
    .skill-logo-item i {
        font-size: 32px;
    }
    
    .skill-logo-item span {
        font-size: 0.75rem;
    }
    
    .contact-card {
        padding: 16px;
    }
    
    .contact-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .social-icon-wrapper {
        width: 36px;
        height: 36px;
    }
}

/* =================== ACCESSIBILITY =================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

/* =================== SCROLL TO TOP BUTTON =================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 99;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* =================== PRELOADER =================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--body-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(74, 108, 247, 0.2);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* =================== ANIMATIONS =================== */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate.active {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 {
    transition-delay: 0.2s;
}

.animate-delay-2 {
    transition-delay: 0.4s;
}

.animate-delay-3 {
    transition-delay: 0.6s;
}

/* =================== MODAL =================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--body-color);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.project-details-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.project-details-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 30px;
}

.project-details-image {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.project-details-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.project-details-meta {
    margin-bottom: 20px;
}

.meta-item {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.meta-title {
    font-weight: 600;
    min-width: 120px;
    color: var(--primary-color);
}

.meta-value {
    color: var(--light-text);
}

.project-details-description h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.project-details-description p {
    margin-bottom: 15px;
    color: var(--light-text);
}

/* Project gallery */
.project-gallery {
    margin-top: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
}

/* =================== CUSTOM CURSOR =================== */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(74, 108, 247, 0.5);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, width 0.3s, height 0.3s, opacity 0.3s;
}

.cursor.active {
    width: 50px;
    height: 50px;
    background-color: rgba(74, 108, 247, 0.2);
}

/* =================== BLOG SECTION =================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}

.blog-item {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.blog-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-item:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    gap: 15px;
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.blog-excerpt {
    color: var(--light-text);
    margin-bottom: 20px;
}

/* =================== TESTIMONIAL SECTION =================== */
.testimonial-slider {
    padding: 30px 0;
    position: relative;
}

.testimonial-item {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin: 0 15px;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid var(--primary-color);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-quote {
    font-style: italic;
    color: var(--light-text);
    margin-bottom: 20px;
    position: relative;
}

.testimonial-quote::before,
.testimonial-quote::after {
    content: '"';
    font-size: 2rem;
    color: var(--primary-color);
    position: absolute;
    opacity: 0.5;
}

.testimonial-quote::before {
    top: -15px;
    left: -5px;
}

.testimonial-quote::after {
    bottom: -25px;
    right: -5px;
}

.testimonial-client {
    font-weight: 700;
    font-size: 1.1rem;
}

.testimonial-position {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.slider-nav:hover {
    background-color: var(--primary-dark);
}

.slider-prev {
    left: -20px;
}

.slider-next {
    right: -20px;
}

/* Responsive adjustments for testimonials */
@media (max-width: 768px) {
    .slider-nav {
        display: none;
    }
    
    .testimonial-item {
        margin: 0;
    }
}

/* Media query fixes for project details modal */
@media (max-width: 768px) {
    .project-details-info {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Added accessibility focus styles */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 3px solid rgba(74, 108, 247, 0.5);
    outline-offset: 3px;
}

/* Print styles for better print experience */
@media print {
    #header, #footer, .scroll-top, .social-icons {
        display: none !important;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .section {
        padding: 20px 0 !important;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* =================== CUSTOM SCROLLBAR =================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--light-bg);
}

/* =================== SELECTION HIGHLIGHT =================== */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
