/* ========================================
   Variables CSS et Configuration
======================================== */
:root {
    /* Couleurs principales */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;

    --secondary-color: #64748b;
    --accent-color: #0ea5e9;

    /* Couleurs de fond */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    /* Couleurs de texte */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Couleurs de bordure */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;

    /* Typographie */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Courier New', monospace;

    /* Layout */
    --max-width: 1200px;
    --navbar-height: 70px;
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --border-color: #334155;
    --border-light: #1e293b;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ========================================
   Reset et styles de base
======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   Container
======================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
   Navigation
======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: box-shadow var(--transition-normal), background-color var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: var(--spacing-md);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    padding: 0.25rem 0;
}

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

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

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

/* Theme toggle button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

.moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="dark"] .moon-icon {
    display: block;
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-fast);
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    text-align: center;
}

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

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

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

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

/* ========================================
   Section générale
======================================== */
section {
    padding: var(--spacing-2xl) 0;
    min-height: 60vh;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* ========================================
   Hero Section
======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--navbar-height);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-greeting {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.75rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

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

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.hero-social {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.social-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-link span {
    font-size: 0.95rem;
}

/* Hero Code Window */
.hero-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-window {
    width: 100%;
    max-width: 500px;
    min-height: 300px;
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.window-header {
    background-color: #2d3748;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    align-items: center;
}

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

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.window-body {
    background: #1e293b;
    padding: 20px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
}

.window-body code {
    color: #e2e8f0;
}

.keyword { color: #c792ea; }
.class { color: #e5c07b; }
.class-name { color: #82aaff; }
.string { color: #c3e88d; }

/* ========================================
   À propos Section
======================================== */
.about {
    background-color: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

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

.about-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.highlight-item {
    text-align: center;
    padding: var(--spacing-md);
    background-color: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.highlight-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.highlight-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.about-image {
    display: flex;
    justify-content: center;
}

.profile-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--border-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Compétences Section
======================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.skill-category {
    background-color: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.category-title svg {
    flex-shrink: 0;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background-color: var(--bg-primary);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.skill-tag.expert {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.skill-tag.advanced {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.skill-tag.intermediate {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.skill-tag.beginner {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* ========================================
   Projets Section
======================================== */
.projects {
    background-color: var(--bg-secondary);
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.projects-category-title {
    font-size: 1.5rem;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    font-weight: 600;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.project-card {
    background-color: var(--bg-primary);
    border-radius: 16px;
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.project-card.featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: var(--spacing-xl);
}

.project-card.featured * {
    color: white;
}

.project-tag-featured {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.project-header {
    margin-bottom: var(--spacing-md);
}

.project-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.project-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.project-description {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.project-features {
    margin-bottom: var(--spacing-md);
}

.project-features h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.project-features ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.project-features li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
}

.tech-tag {
    padding: 0.4rem 0.8rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.project-card:not(.featured) .tech-tag {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.stat span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.project-links {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.project-status {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

/* Placeholder project card */
.project-card.placeholder {
    border: 2px dashed var(--border-color);
    background-color: var(--bg-secondary);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
}

.placeholder-content svg {
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.placeholder-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Project status badges */
.project-status-badge {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

.project-status-badge.active {
    background-color: #10b981;
    color: white;
}

.project-status-badge.private {
    background-color: #f59e0b;
    color: white;
}

/* Project metadata */
.project-meta {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
}

.project-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Private and Professional project cards */
.project-card.private {
    border: 2px dashed var(--border-color);
    opacity: 0.9;
}

.project-card.professional {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--primary-color);
}

/* ========================================
   Formation Section
======================================== */
.subsection-title {
    font-size: 1.5rem;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    font-weight: 600;
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
    margin-bottom: var(--spacing-2xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
}

.timeline-item {
    position: relative;
    padding-bottom: var(--spacing-lg);
}

.timeline-marker {
    position: absolute;
    left: calc(-2rem - 5px);
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 4px var(--primary-color);
}

.timeline-content {
    background-color: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.timeline-date {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-institution {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

.timeline-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: var(--spacing-md);
}

.timeline-details {
    list-style: disc;
    padding-left: 1.5rem;
}

.timeline-details li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ========================================
   Contact Section
======================================== */
.contact {
    background-color: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

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

.contact-method.location {
    cursor: default;
}

.contact-method.location:hover {
    transform: none;
}

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

.contact-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Contact CTA Card */
.contact-cta-card {
    background-color: var(--bg-primary);
    padding: var(--spacing-xl);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-cta-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: var(--spacing-lg);
}

.contact-cta-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.contact-cta-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 380px;
    margin-bottom: var(--spacing-lg);
}

.contact-cta-btn {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.contact-cta-email {
    margin-top: var(--spacing-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   Footer
======================================== */
.footer {
    background-color: var(--bg-tertiary);
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.footer-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* ========================================
   Scroll to top button
======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 999;
}

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

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ========================================
   Responsive Design
======================================== */

/* Tablettes */
@media (max-width: 968px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--navbar-height) + 2rem);
        padding-bottom: 2rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
    }

    .hero-content {
        max-width: 100%;
    }

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

    .hero-social {
        justify-content: center;
    }

    .hero-illustration {
        order: -1;
        max-width: 100%;
        overflow: hidden;
    }

    .code-window {
        max-width: 100%;
        text-align: left;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: var(--spacing-lg);
        transition: left var(--transition-normal);
        border-right: 1px solid var(--border-color);
    }

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

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-illustration {
        display: none;
    }

    .hero-cta {
        flex-direction: column;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .project-stats {
        grid-template-columns: 1fr;
    }

    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 42px;
        height: 42px;
    }

    .hero-social {
        gap: 0.5rem;
    }

    .social-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .code-window {
        max-width: 100%;
    }

    .window-body {
        font-size: 0.75rem;
        padding: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card.featured {
        padding: var(--spacing-lg);
    }

    .contact-content {
        gap: var(--spacing-lg);
    }

    .contact-cta-card {
        padding: var(--spacing-lg);
    }

    .footer-links {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
}
