/* ===== RESET & BASE STYLES ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Colors - Light Theme */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #93c5fd;
    --secondary: #8b5cf6;
    --accent: #10b981;
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    /* Borders */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Spacing */
    --container-padding: 1rem;
    --section-padding: 4rem 0;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s ease;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-light: #334155;
    --border-medium: #475569;
}

/* ===== FONT OPTIMIZATION ===== */
/* Font Awesome optimization for better loading performance */
.fas, .far, .fab {
    font-display: swap;
}

/* Ensure icons display properly during font loading */
.fas::before, 
.far::before, 
.fab::before {
    font-feature-settings: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

/* ===== FIX H1 USER AGENT FONT SIZE ===== */
h1 {
    font-size: revert-layer;
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: var(--text-lg);
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: var(--text-inverse);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 6px;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border: none;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transition: all var(--transition-medium);
    border: 2px solid var(--border-light);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: var(--primary);
    color: var(--text-inverse);
}

.theme-toggle:focus {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.theme-toggle .fa-moon {
    display: block;
}

.theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 999;
    transition: all var(--transition-medium);
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.nav-logo {
    font-size: var(--text-xl);
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
}

.logo-text {
    display: inline-block;
    padding: 0.5rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-medium);
}

.nav-logo:hover .logo-text {
    background: var(--primary);
    color: var(--text-inverse);
    transform: rotate(5deg);
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-medium);
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-medium);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: var(--text-inverse);
    transform: translateY(-2px);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 6rem 0 4rem;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.greeting {
    display: block;
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.name {
    display: block;
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title {
    display: block;
    font-size: var(--text-2xl);
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-md);
}

.social-link:hover {
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===== CODE WINDOW ===== */
.code-window {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.code-header {
    background: var(--bg-tertiary);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.code-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.code-title {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: auto;
}

.code-content {
    background: #1e293b;
    padding: 2rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .code-content {
    background: #f8fafc;
    border-top: 1px solid var(--border-light);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    transition: all var(--transition-medium);
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}

[data-theme="light"] .stat-number {
    color: #2563eb;
}

.stat-label {
    font-size: var(--text-sm);
    color: #e2e8f0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

[data-theme="light"] .stat-label {
    color: var(--text-secondary);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    animation: bounce 2s infinite;
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s infinite;
}

.scroll-text {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.about-layout {
    display: block;
}

.about-main {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    width: 100%;
}

.about-text p {
    font-size: var(--text-lg);
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-intro {
    color: var(--text-primary);
    font-weight: 500;
}

.about-highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    border-left: 4px solid var(--primary);
}

.about-highlight i {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.about-highlight span {
    color: var(--text-primary);
    font-size: var(--text-base);
}

.tech-stack {
    margin-top: 2.5rem;
}

.tech-stack h3 {
    font-size: var(--text-xl);
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.tech-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-medium);
    border: 1px solid var(--border-light);
}

.tech-item:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.tech-item i {
    font-size: 1.25rem;
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.tech-item span {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: var(--section-padding);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    position: relative;
    border: 1px solid var(--border-light);
}

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

.service-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.service-badge {
    position: absolute;
    top: -10px;
    right: 1rem;
    background: var(--primary);
    color: var(--text-inverse);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: var(--primary-light);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

.service-title {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: var(--text-xl);
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    list-style: none;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.service-features i {
    color: var(--accent);
    font-size: var(--text-sm);
}

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
}

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

.project-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-placeholder {
    font-size: 3rem;
    color: var(--text-inverse);
    opacity: 0.8;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.project-image:hover .project-overlay {
    opacity: 1;
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: var(--text-inverse);
    border-radius: 50%;
    color: var(--primary);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-medium);
}

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

.project-content {
    padding: 1.5rem;
}

.project-title {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: var(--text-lg);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 500;
}

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

.stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.stat i {
    color: var(--primary);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-medium);
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.method-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.method-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.method-content {
    flex: 1;
}

.method-content h3 {
    font-size: var(--text-xl);
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.method-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.method-arrow {
    color: var(--primary);
    font-size: 1.25rem;
    transition: transform var(--transition-fast);
}

.contact-method:hover .method-arrow {
    transform: translateX(5px);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-tertiary);
    padding: 2rem 0;
    border-top: 1px solid var(--border-light);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

/* ===== ANIMATIONS ===== */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40%, 43% {
        transform: translateX(-50%) translateY(-10px);
    }
    70% {
        transform: translateX(-50%) translateY(-5px);
    }
    90% {
        transform: translateX(-50%) translateY(-2px);
    }
}

@keyframes scroll-wheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateX(-50%) translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Extra Large Screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-container {
        gap: 6rem;
    }
    
    .code-window {
        max-width: 600px;
    }
    
    .stats-container {
        max-width: 650px;
    }
    
    .stat-number {
        font-size: 3rem;
    }
}

/* Large Desktops (1200px+) - Default styles already applied above */

/* Desktop and Laptops */
@media (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-container {
        gap: 4rem;
    }
}

/* Laptops and smaller desktops */
@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
    }
    
    .hero-container {
        gap: 3rem;
    }
    
    .code-window {
        max-width: 450px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .container {
        max-width: 900px;
    }
    
    .hero-container {
        gap: 2.5rem;
    }
    
    .code-window {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .stats-container {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.25rem 0.75rem;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
    
    .about-main {
        padding: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    :root {
        --container-padding: 1.5rem;
        --section-padding: 4rem 0;
    }
    
    .container {
        max-width: 100%;
        padding: 0 var(--container-padding);
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 4rem;
        left: -100%;
        width: 100%;
        height: calc(100vh - 4rem);
        background: var(--bg-card);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left var(--transition-medium);
        box-shadow: var(--shadow-lg);
        z-index: 1000;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .hamburger:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .hamburger:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    
    .nav-toggle.active .hamburger:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
    
    /* Hero Section */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-visual {
        order: 1;
    }
    
    .hero-title .name {
        font-size: var(--text-4xl);
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Code Window & Stats */
    .code-window {
        max-width: 100%;
        margin: 0;
    }
    
    .code-content {
        padding: 1.5rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 280px;
    }
    
    .stat-item {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
    
    .stat-label {
        font-size: var(--text-sm);
    }
    
    /* About Section */
    .about-layout {
        display: block;
    }
    
    .about-main {
        padding: 2rem;
        width: 100%;
    }
    
    .tech-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card.featured {
        transform: none;
        margin-top: 0;
    }
    
    /* Projects Section */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Contact Section */
    .contact-methods {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-method {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .method-icon {
        width: 60px;
        height: 60px;
    }
    
    .method-icon i {
        font-size: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Hide scroll indicator on mobile */
    .scroll-indicator {
        display: none;
    }
}

/* Small Mobile devices */
@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
        --section-padding: 3rem 0;
    }
    
    /* Theme Toggle */
    .theme-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
        box-shadow: var(--shadow-lg);
    }
    
    /* Typography */
    .hero-title .name {
        font-size: var(--text-3xl);
        line-height: 1.1;
    }
    
    .section-title {
        font-size: var(--text-3xl);
    }
    
    .hero-description {
        font-size: var(--text-base);
        line-height: 1.6;
    }
    
    /* Hero Section */
    .hero-container {
        gap: 2rem;
    }
    
    .hero-social {
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-buttons {
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        max-width: 260px;
        padding: 0.875rem 1.5rem;
        font-size: var(--text-sm);
    }
    
    /* Code Window & Stats */
    .code-window {
        margin: 0;
        border-radius: var(--radius-md);
    }
    
    .code-content {
        min-height: 140px;
        padding: 1.25rem 0.75rem;
    }
    
    .stats-container {
        gap: 0.75rem;
        max-width: 240px;
    }
    
    .stat-item {
        padding: 1.25rem 0.75rem;
        border-radius: var(--radius-md);
    }
    
    .stat-number {
        font-size: 2rem;
        margin-bottom: 0.375rem;
    }
    
    .stat-label {
        font-size: var(--text-xs);
        line-height: 1.3;
    }
    
    /* About Section */
    .about-main {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }
    
    .about-text p {
        font-size: var(--text-base);
        line-height: 1.7;
    }
    
    .about-highlight {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    
    .tech-items {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .tech-item {
        padding: 0.875rem;
    }
    
    .tech-stack h3 {
        font-size: var(--text-lg);
        margin-bottom: 1.25rem;
    }
    
    /* Services Section */
    .services-grid {
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }
    
    .service-title {
        font-size: var(--text-lg);
    }
    
    /* Projects Section */
    .projects-grid {
        gap: 1rem;
    }
    
    .project-card {
        border-radius: var(--radius-lg);
    }
    
    /* Contact Section */
    .contact-method {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
        border-radius: var(--radius-lg);
    }
    
    .method-content h3 {
        font-size: var(--text-lg);
    }
    
    .method-content p {
        font-size: var(--text-sm);
    }
    
    .method-arrow {
        display: none;
    }
    
    /* Footer */
    .footer-content {
        gap: 0.75rem;
        padding: 1.5rem 0;
    }
    
    .footer-text p {
        font-size: var(--text-sm);
    }
}

/* ===== UTILITY CLASSES & OPTIMIZATIONS ===== */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Smooth scrolling for all devices */
html {
    scroll-behavior: smooth;
}

/* Optimize images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Prevent layout shift and improve performance */
.code-window,
.stat-item,
.service-card,
.project-card,
.contact-method {
    contain: layout;
}

/* Print styles */
@media print {
    .theme-toggle,
    .nav-toggle,
    .scroll-indicator {
        display: none !important;
    }
    
    .hero-buttons,
    .contact-methods {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}