/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --secondary-color: #3b7bff;
    --accent-color: #00d870;
    
    /* Enhanced Typography Scale */
    --font-size-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
    --font-size-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
    --font-size-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
    --font-size-lg: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --font-size-xl: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    --font-size-2xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --font-size-3xl: clamp(1.5rem, 1.25rem + 1.25vw, 1.875rem);
    --font-size-4xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.25rem);
    --font-size-5xl: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);
    --font-size-6xl: clamp(2.5rem, 2rem + 2.5vw, 4rem);
    
    /* Typography Settings */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0em;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    
    /* Advanced Easing */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Enhanced Gradients */
    --gradient-primary: linear-gradient(135deg, #3b7bff 0%, #00d870 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Enhanced Hover States */
    --hover-lift: 0 12px 24px -12px rgba(0, 0, 0, 0.5);
    --hover-glow: 0 0 20px rgba(59, 123, 255, 0.15);
    --hover-scale: 1.02;
    --hover-transition: all 0.3s var(--ease-out-quart);
    
    /* Consistent Border Radius System */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Consistent Font Weight Scale */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
}

/* Dark Theme (Default) */
[data-theme="dark"] {
    --primary-color: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #f1f5f9;
    --text-light: #cbd5e1;
    --text-hero: #f8fafc;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #283544;
    --bg-elevated: #334155;
    --bg-dark: #111827;
    
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.6);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.7);
    
    --surface-gradient: linear-gradient(135deg, #1e293b 0%, #283544 100%);
}

/* Light Theme */
[data-theme="light"] {
    --primary-color: #1f2937;
    --text-primary: #1a1a1a;
    --text-secondary: #374151;
    --text-light: #6b7280;
    --text-hero: #111827;
    
    --bg-primary: #fefefe;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --bg-elevated: #e8eaed;
    --bg-dark: #1f2937;
    
    --border-color: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.08);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.12), 0 2px 4px -2px rgb(0 0 0 / 0.12);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.12), 0 4px 6px -4px rgb(0 0 0 / 0.12);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.12), 0 8px 10px -6px rgb(0 0 0 / 0.12);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.28);
    
    --surface-gradient: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
}

/* Light theme specific adjustments */
[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.96);
    backdrop-filter: blur(20px) saturate(120%);
    border-bottom: 1px solid rgba(209, 213, 219, 0.6);
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(248, 250, 252, 0.98);
    border-bottom: 1px solid rgba(209, 213, 219, 0.8);
    box-shadow: 
        0 2px 8px 0 rgba(0, 0, 0, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Account for fixed navbar + breathing room */
}

/* Parallax Scrolling Effects */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    right: -10%;
    bottom: -20%;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.015) 0%, transparent 70%),
                radial-gradient(circle at 70% 80%, rgba(34, 197, 94, 0.012) 0%, transparent 70%);
    will-change: transform;
    z-index: 0;
}

.projects::before {
    content: '';
    position: absolute;
    top: -15%;
    left: -5%;
    right: -5%;
    bottom: -15%;
    background: radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.009) 0%, transparent 75%),
                radial-gradient(ellipse at 20% 80%, rgba(236, 72, 153, 0.006) 0%, transparent 75%);
    will-change: transform;
    z-index: 0;
}

.about::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -5%;
    right: -5%;
    bottom: -10%;
    background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.0075) 0%, transparent 70%);
    will-change: transform;
    z-index: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-feature-settings: 'liga' 1, 'kern' 1, 'cv05' 1, 'cv11' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: var(--font-size-base);
    font-weight: 400;
    letter-spacing: var(--tracking-normal);
    cursor: default;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.container {
    max-width: min(1200px, 95vw);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 1.5rem);
    position: relative;
    z-index: 2;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px) saturate(120%);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 0 20px rgba(59, 123, 255, 0.02);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease;
    transform: translateY(0);
}

/* Enhanced navbar states */
.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px) saturate(130%);
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
    box-shadow: 
        0 2px 8px 0 rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 0 30px rgba(59, 123, 255, 0.03);
}

.navbar.hidden {
    transform: translateY(-100%);
    opacity: 0.95;
}

.navbar.show {
    transform: translateY(0);
    opacity: 1;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.02) 50%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar:hover::before {
    opacity: 1;
}

.nav-container {
    max-width: min(1200px, 95vw);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 1.5rem);
    display: flex;
    align-items: center;
    height: clamp(60px, 8vw, 70px);
    gap: 2rem;
}

.nav-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-logo .logo-text:hover {
    color: var(--secondary-color);
    transform: translateY(-1px);
    text-shadow: 0 2px 8px rgba(59, 123, 255, 0.2);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--hover-transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.4s var(--ease-out-quart);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.donate-link {
    color: #ef4444 !important;
}

.donate-link:hover {
    color: #dc2626 !important;
}

.github-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.github-nav-link svg {
    transition: transform 0.3s ease;
}

.github-nav-link:hover svg {
    transform: scale(1.1) rotate(5deg);
}

.github-link svg {
    transition: transform 0.3s ease;
}

.github-link:hover svg {
    transform: scale(1.1) rotate(-5deg);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hover-transition);
    position: relative;
    min-height: 44px;
    min-width: 44px;
}

.theme-toggle:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Light theme enhancements */
[data-theme="light"] .hero {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

[data-theme="light"] .projects {
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
}

[data-theme="light"] .project-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(209, 213, 219, 0.7);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .project-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px) scale(1.02);
}

/* Light theme button improvements */
[data-theme="light"] .cta-primary {
    background: #2563eb;
    color: white;
    box-shadow: 
        0 4px 14px 0 rgba(37, 99, 235, 0.25),
        0 0 0 1px rgba(37, 99, 235, 0.1);
}
[data-theme="light"] .cta-primary:hover {
    background: #1d4ed8;
    box-shadow: 
        0 8px 25px rgba(37, 99, 235, 0.3),
        0 0 0 1px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px) scale(1.02);
}
[data-theme="light"] .cta-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(31, 41, 55, 0.3);
}
[data-theme="light"] .cta-secondary:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

/* Light theme scroll button */
[data-theme="light"] .scroll-top-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(209, 213, 219, 0.7);
    color: var(--text-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}
[data-theme="light"] .scroll-top-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(37, 99, 235, 0.3);
    color: #2563eb;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

/* Light theme text readability */
[data-theme="light"] .hero-title {
    color: #111827;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .hero-subtitle {
    color: #374151;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .hero-description {
    color: #4b5563;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .section-title {
    color: #111827;
}
[data-theme="light"] .section-subtitle {
    color: #374151;
}
[data-theme="light"] .project-title {
    color: #111827;
}
[data-theme="light"] .project-description {
    color: #4b5563;
}
[data-theme="light"] .about {
    padding: clamp(60px, 12vw, 100px) 0;
}
[data-theme="light"] .about-text {
    color: #374151;
    line-height: var(--leading-loose);
}
[data-theme="light"] .footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border-top: 1px solid rgba(209, 213, 219, 0.6);
}
[data-theme="light"] .footer-title {
    color: #111827;
}
[data-theme="light"] .footer-description {
    color: #6b7280;
}
[data-theme="light"] .footer-links a {
    color: #4b5563;
}
[data-theme="light"] .footer-links a:hover {
    color: #2563eb;
}

.theme-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s var(--ease-out-quart);
}

/* Theme icon visibility */
[data-theme="dark"] .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0.8);
    position: absolute;
}

[data-theme="light"] .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0.8);
    position: absolute;
}

[data-theme="light"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--hover-transition);
}

/* Hero Section */
.hero {
    padding: clamp(80px, 15vw, 120px) 0 clamp(60px, 10vw, 80px);
    background: var(--bg-primary);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero .container {
    text-align: center;
    transform: translate3d(0, 0, 0);
}

.hero-content {
    animation: heroFadeIn 1s ease-out;
}

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

.hero-title {
    font-size: var(--font-size-6xl);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 1.5rem;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tighter);
    color: var(--text-hero);
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(59, 130, 246, 0.08);
    font-variation-settings: 'wght' 800, 'slnt' -1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { 
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    33% { 
        background-position: 50% 0%;
        filter: hue-rotate(5deg);
    }
    66% { 
        background-position: 100% 50%;
        filter: hue-rotate(-5deg);
    }
}

.hero-subtitle {
    font-size: var(--font-size-2xl);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--tracking-normal);
    line-height: var(--leading-snug);
    opacity: 0.95;
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: var(--leading-relaxed);
    font-weight: 400;
    letter-spacing: var(--tracking-normal);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-primary, .cta-secondary {
    padding: clamp(0.875rem, 3vw, 1rem) clamp(1.5rem, 4vw, 2rem);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: var(--hover-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    min-width: 48px;
}

.cta-primary {
    background: var(--secondary-color);
    color: white;
    box-shadow: 
        0 4px 14px 0 rgba(59, 130, 246, 0.15),
        0 0 0 1px rgba(59, 130, 246, 0.08);
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-primary:hover::before {
    width: 300px;
    height: 300px;
}

.cta-primary:hover {
    background: #2563eb;
    transform: translateY(-4px) scale(var(--hover-scale));
    box-shadow: 
        var(--hover-lift),
        var(--hover-glow),
        0 0 0 1px rgba(59, 130, 246, 0.12);
}

.cta-primary:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: var(--shadow-md);
    transition: all 0.1s ease;
}

.cta-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.cta-secondary:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-4px) scale(var(--hover-scale));
    box-shadow: 
        var(--hover-lift),
        0 0 12px rgba(59, 130, 246, 0.15),
        0 0 0 1px rgba(59, 130, 246, 0.08);
}

/* Projects Section */
.projects {
    padding: clamp(60px, 12vw, 100px) 0;
    background: linear-gradient(135deg, #0a101a 0%, var(--bg-primary) 100%);
    border-top: 1px solid rgba(51, 65, 85, 0.1);
    border-bottom: 1px solid rgba(51, 65, 85, 0.1);
    position: relative;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(3rem, 8vw, 4rem);
    max-width: min(800px, 90vw);
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-variation-settings: 'wght' 800;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--tracking-wide);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: clamp(1.5rem, 4vw, 2rem);
    margin-top: clamp(2rem, 6vw, 3rem);
    position: relative;
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.projects-grid::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.2) 20%, rgba(59, 130, 246, 0.4) 50%, rgba(59, 130, 246, 0.2) 80%, transparent 100%);
    z-index: 0;
}

@media (max-width: 768px) {
    .projects-grid::before {
        display: none;
    }
}

.project-card {
    background: var(--surface-gradient);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 4vw, 2rem);
    box-shadow: var(--shadow-md);
    transition: all 0.5s var(--ease-out-quart);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-12px) scale(var(--hover-scale));
    box-shadow: 
        var(--hover-lift),
        var(--hover-glow),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card.coming-soon {
    opacity: 0.7;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

.project-card.coming-soon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { 
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% { 
        left: 100%;
        opacity: 0;
    }
}

.project-image {
    text-align: center;
    margin-bottom: 1.5rem;
}

.project-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    transition: all 0.4s var(--ease-out-quart);
    opacity: 0;
    animation: fadeInImage 0.5s ease forwards;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInImage {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.project-card:hover .project-image img {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: var(--leading-relaxed);
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link, .project-download {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: var(--hover-transition);
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-link {
    background: var(--secondary-color);
    color: white;
}

.project-link:hover {
    background: #2563eb;
    transform: translateY(-2px) scale(var(--hover-scale));
    box-shadow: var(--hover-lift), 0 0 12px rgba(59, 130, 246, 0.15);
}

.project-download {
    background: var(--accent-color);
    color: white;
}

.project-download:hover {
    background: #16a34a;
    transform: translateY(-2px) scale(var(--hover-scale));
    box-shadow: 
        0 8px 20px rgba(34, 197, 94, 0.25),
        0 0 12px rgba(34, 197, 94, 0.15);
}

.coming-soon-badge {
    background: linear-gradient(135deg, var(--text-light), var(--text-secondary));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.coming-soon-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: badgeShimmer 3s infinite;
}

@keyframes badgeShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced focus states for accessibility */
*:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 4px;
    box-shadow: 0 0 0 4px rgba(59, 123, 255, 0.1);
}


.cta-primary:focus-visible,
.cta-secondary:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(59, 123, 255, 0.1);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero::before,
    .projects::before,
    .about::before {
        transform: none !important;
    }
}

/* About Section */
.about {
    padding: clamp(60px, 12vw, 100px) 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.about-content {
    max-width: min(900px, 90vw);
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    line-height: var(--leading-loose);
    text-align: left;
    font-weight: 400;
    letter-spacing: var(--tracking-normal);
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--bg-primary);
}

.contact-content {
    text-align: center;
}

.contact-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-email {
    font-size: 1.5rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s var(--ease-out-quart);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
}

.contact-email:hover {
    color: #2563eb;
    transform: translateY(-1px);
    text-shadow: 0 2px 8px rgba(59, 123, 255, 0.2);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0f1419 100%);
    color: var(--text-primary);
    padding: 3rem 0 1.5rem;
    position: relative;
    border-top: 1px solid rgba(51, 65, 85, 0.3);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}


.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
    transition: all 0.3s ease;
}

.footer-section .logo-text:hover {
    color: var(--secondary-color);
    transform: translateY(-1px);
    text-shadow: 0 2px 8px rgba(59, 123, 255, 0.2);
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-links a:hover {
    color: var(--text-primary);
    padding-left: 8px;
    transform: translateX(3px);
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover::before {
    opacity: 1;
    left: -8px;
    color: var(--secondary-color);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.github-link svg {
    transition: transform 0.3s ease;
}

.github-link:hover svg {
    transform: scale(1.1);
}

.footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero .container {
        padding: 0 clamp(1.5rem, 4vw, 2rem);
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
        gap: clamp(2rem, 3vw, 2.5rem);
    }
    
    .container {
        padding: 0 clamp(1.5rem, 4vw, 2rem);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: clamp(60px, 8vw, 70px);
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
        gap: 1.5rem;
        flex: none;
        justify-content: center;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .nav-actions iframe {
        display: none; /* Hide sponsor button on mobile */
    }

    .nav-menu .nav-link {
        min-height: 48px;
        padding: 1rem 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        margin: 0 1rem;
        transition: all 0.3s ease;
    }

    .nav-menu .nav-link:hover {
        background: rgba(59, 130, 246, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: clamp(1rem, 4vw, 1.5rem);
        position: relative;
        z-index: 1;
    }

    .cta-primary, .cta-secondary {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        min-height: 52px;
        padding: clamp(1rem, 4vw, 1.25rem) clamp(1.5rem, 6vw, 2rem);
        font-size: 1.1rem;
        font-weight: 600;
    }

    /* Thumb-friendly bottom zone for primary actions */
    .mobile-thumb-zone {
        position: sticky;
        bottom: 1rem;
        left: 0;
        right: 0;
        z-index: 100;
        padding: 0 1rem;
        pointer-events: none;
    }

    .mobile-thumb-zone .cta-primary {
        pointer-events: all;
        box-shadow: 
            0 8px 32px rgba(59, 130, 246, 0.3),
            0 0 0 1px rgba(59, 130, 246, 0.1);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: clamp(1.5rem, 5vw, 2rem);
    }

    .project-card {
        padding: clamp(1.5rem, 5vw, 2rem);
    }

    .project-links {
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .project-link, .project-download {
        flex: 1;
        min-height: 48px;
        padding: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .project-card {
        padding: clamp(1.25rem, 6vw, 1.75rem);
    }
    
    .hero-cta {
        gap: clamp(1rem, 3vw, 1.25rem);
    }

    .cta-primary, .cta-secondary {
        min-height: 56px;
        font-size: 1.125rem;
        padding: 1.25rem 1.75rem;
    }

    /* Ensure all interactive elements are thumb-friendly */
    .hamburger {
        min-height: 48px;
        min-width: 48px;
        padding: 0.75rem;
    }

    .scroll-top-btn {
        width: 48px;
        height: 48px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .footer-links a {
        padding: 0.75rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Large screens optimization */
@media (min-width: 1440px) {
    .container,
    .nav-container {
        max-width: min(1400px, 90vw);
    }
    
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(2.5rem, 3vw, 3rem);
    }
    
    .hero-title {
        font-size: clamp(3rem, 5vw, 4.5rem);
    }
    
    .section-title {
        font-size: clamp(2.5rem, 4vw, 3rem);
    }
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: rgba(59, 123, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 123, 255, 0.2);
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hover-transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: float 3s ease-in-out infinite;
}

.scroll-top-btn:hover {
    background: rgba(59, 123, 255, 0.2);
    border-color: rgba(59, 123, 255, 0.4);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 123, 255, 0.15);
}

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

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}


.scroll-top-btn svg {
    width: 20px;
    height: 20px;
}

/* Loading and Transition States */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for project cards */
.project-card:nth-child(1) {
    transition-delay: 0.1s;
}

.project-card:nth-child(2) {
    transition-delay: 0.2s;
}

.project-card:nth-child(3) {
    transition-delay: 0.3s;
}

.project-card:nth-child(4) {
    transition-delay: 0.4s;
}