/* =============================================
   PORTFOLIO MANON ARAUJO - STYLES CSS
   Optimisé pour SEO et Performance
   ============================================= */

/* Variables CSS pour maintenance facile */
:root {
    --primary: #6366f1;
    --secondary: #a855f7;
    --accent: #ec4899;
    --dark: #0a0e27;
    --darker: #050714;
    --light: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
}

/* Reset et Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: auto;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--darker);
    color: var(--light);
    overflow-x: hidden;
    min-width: 320px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* Optimisation typographique */
p {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    line-height: 1.6;
}

h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    letter-spacing: -0.02em;
    line-height: 0.9;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

h4 {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
}

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

/* Sections */
section {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Navigation Responsive */
nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(10, 14, 39, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 20px 40px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    padding: 5px 0;
    white-space: nowrap;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover {
    color: var(--light);
}

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center, var(--dark) 0%, var(--darker) 100%);
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 2;
    opacity: 0.3;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    text-align: center;
    z-index: 10;
    position: relative;
    max-width: 1200px;
    padding: 0 20px;
}

.code-decoration {
    font-family: 'Courier New', monospace;
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.2s forwards;
}

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

.hero h1 span {
    display: inline-block;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2) drop-shadow(0 0 20px rgba(99, 102, 241, 0.5)); }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-weight: 300;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.4s forwards;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-stats {
    display: flex;
    gap: 60px;
    justify-content: center;
    margin: 40px 0;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cta-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
}

.cta-button {
    padding: 18px 45px;
    background: var(--gradient);
    border: none;
    border-radius: 100px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

.cta-button-outline {
    padding: 18px 45px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-block;
}

.cta-button-outline:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.2s forwards, bounce 2s ease-in-out 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.scroll-indicator svg {
    width: 30px;
    height: 30px;
    stroke: rgba(255, 255, 255, 0.4);
}

/* Section headers */
.section-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.section-title-animated {
    font-size: 3rem;
    display: inline-block;
    position: relative;
    word-spacing: -0.3em;
    letter-spacing: -0.02em;
}

.title-word {
    display: inline-block;
    margin: 0 5px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* About Section */
.about {
    padding: 150px 20px;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.about-background {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.05) 0%, 
        transparent 40%, 
        rgba(168, 85, 247, 0.05) 70%, 
        transparent 100%);
    z-index: -2;
    pointer-events: none;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 150px;
    align-items: center;
    min-height: 600px;
}

.profile-section {
    position: relative;
    perspective: 1000px;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-card {
    width: 100%;
    max-width: 500px;
    height: 600px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.profile-card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.card-front {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.profile-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.card-back {
    background: radial-gradient(ellipse at center, var(--dark) 0%, var(--darker) 100%);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    position: relative;
    overflow: hidden;
}

#card-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    z-index: 1;
}

.hero-grid-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 2;
    opacity: 0.3;
    animation: gridMove 20s linear infinite;
}

.card-back-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    padding: 30px;
    background: rgba(10, 14, 39, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.about-content h2 {
    font-size: 3rem;
    margin-bottom: 30px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.skill-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    align-items: center;
}

.skill-name {
    font-weight: 600;
    font-size: 1rem;
}

.skill-level {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 700;
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    width: 0%;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Timeline Section */
.timeline {
    padding: 120px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--darker) 0%, rgba(10, 14, 39, 0.95) 50%, var(--darker) 100%);
    z-index: -2;
}

.floating-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.orb {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.2;
    animation: float-orb 20s infinite ease-in-out;
}

.orb:nth-child(1) { 
    background: radial-gradient(circle, var(--primary) 0%, transparent 60%);
    animation-delay: 0s;
}
.orb:nth-child(2) { 
    background: radial-gradient(circle, var(--secondary) 0%, transparent 60%);
    animation-delay: 7s; 
}
.orb:nth-child(3) { 
    background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
    animation-delay: 14s;
}

@keyframes float-orb {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.2;
    }
    25% { 
        transform: translate(100px, -100px) scale(1.2);
        opacity: 0.3;
    }
    50% { 
        transform: translate(-150px, 50px) scale(0.8);
        opacity: 0.15;
    }
    75% { 
        transform: translate(50px, 100px) scale(1.1);
        opacity: 0.25;
    }
}

.timeline-container {
    position: relative;
}

.timeline-path {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(-50%);
    overflow: hidden;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    height: 100%;
}

.timeline-energy {
    position: absolute;
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        var(--primary) 20%,
        var(--secondary) 50%,
        var(--accent) 80%,
        transparent 100%
    );
    animation: energy-flow 4s infinite linear;
    box-shadow: 0 0 30px var(--primary);
}

@keyframes energy-flow {
    0% { transform: translateY(-200px); }
    100% { transform: translateY(calc(100vh + 200px)); }
}

.timeline-item {
    display: flex;
    margin-bottom: 100px;
    position: relative;
    opacity: 0;
    transform: translateX(-50px) scale(0.9);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
    transform: translateX(50px) scale(0.9);
}

.timeline-item:nth-child(even).visible {
    transform: translateX(0) scale(1);
}

.timeline-content {
    width: 45%;
    background: linear-gradient(135deg, 
        rgba(10, 14, 39, 0.9) 0%,
        rgba(10, 14, 39, 0.7) 100%
    );
    backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 25px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.visible .timeline-content::before {
    transform: scaleX(1);
}

.timeline-content:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--primary);
    box-shadow: 
        0 30px 60px rgba(99, 102, 241, 0.4),
        0 0 80px rgba(99, 102, 241, 0.1);
    background: linear-gradient(135deg, 
        rgba(10, 14, 39, 1) 0%,
        rgba(10, 14, 39, 0.9) 100%
    );
}

.timeline-icon {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 2.5rem;
    opacity: 0.15;
    animation: icon-pulse 3s infinite ease-in-out;
    filter: drop-shadow(0 0 20px var(--primary));
}

@keyframes icon-pulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 0.15;
    }
    50% { 
        transform: scale(1.1) rotate(5deg);
        opacity: 0.25;
    }
}

.timeline-glow {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.timeline-content:hover .timeline-glow {
    opacity: 0.05;
    animation: glow-pulse 2s infinite;
}

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

.timeline-node {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    z-index: 10;
}

.node-core {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--gradient);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 30px var(--primary),
        0 0 60px var(--primary),
        inset 0 0 10px rgba(255, 255, 255, 0.5);
    animation: core-pulse 2s infinite;
}

@keyframes core-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 
            0 0 30px var(--primary),
            0 0 60px var(--primary);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        box-shadow: 
            0 0 40px var(--primary),
            0 0 80px var(--primary);
    }
}

.node-ring {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    animation: ring-expand 2s infinite;
    box-shadow: 0 0 20px var(--primary);
}

@keyframes ring-expand {
    0% {
        transform: scale(0.8);
        opacity: 1;
        border-width: 3px;
    }
    100% {
        transform: scale(2);
        opacity: 0;
        border-width: 1px;
    }
}

/* Projects Section */
.projects {
    padding: 120px 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--darker) 0%, rgba(10, 14, 39, 0.95) 100%);
}

.projects::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 70%);
    animation: floatingBackground 30s ease-in-out infinite;
    z-index: -1;
}

@keyframes floatingBackground {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-50px, -50px) rotate(120deg);
    }
    66% {
        transform: translate(50px, -50px) rotate(240deg);
    }
}

.matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    pointer-events: none;
}

#matrix-canvas {
    opacity: 0.2;
}

.projects-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: clamp(30px, 4vw, 50px);
    max-width: 1400px;
    margin: 0 auto;
}

.project-hero-card {
    position: relative;
    background: rgba(10, 14, 39, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 30px;
    padding: 30px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(100px) scale(0.8) rotateX(-10deg);
}

.project-hero-card.visible {
    animation: projectReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes projectReveal {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.8) rotateX(-10deg);
    }
    60% {
        transform: translateY(-10px) scale(1.02) rotateX(5deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0);
    }
}

.project-hero-card.visible:nth-child(1) { animation-delay: 0s; }
.project-hero-card.visible:nth-child(2) { animation-delay: 0.15s; }
.project-hero-card.visible:nth-child(3) { animation-delay: 0.3s; }
.project-hero-card.visible:nth-child(4) { animation-delay: 0.45s; }
.project-hero-card.visible:nth-child(5) { animation-delay: 0.6s; }
.project-hero-card.visible:nth-child(6) { animation-delay: 0.75s; }
.project-hero-card.visible:nth-child(7) { animation-delay: 0.9s; }
.project-hero-card.visible:nth-child(8) { animation-delay: 1.05s; }

.project-hero-card:hover {
    transform: translateY(-20px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 
        0 40px 80px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(99, 102, 241, 0.5),
        inset 0 0 50px rgba(99, 102, 241, 0.1);
}

.project-screen {
    background: linear-gradient(135deg, #1a1a2e 0%, #0a0e27 100%);
    border-radius: 20px;
    padding: 10px;
    margin-bottom: 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.screen-header {
    display: flex;
    gap: 8px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px 10px 0 0;
}

.screen-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff5f57, #ff3a30);
}

.screen-dot:nth-child(2) { background: linear-gradient(135deg, #ffbd2e, #ff9f0a); }
.screen-dot:nth-child(3) { background: linear-gradient(135deg, #28ca42, #10d94e); }

.project-preview {
    height: 200px;
    background: var(--gradient);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    position: relative;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-preview::after {
    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.6s;
}

.project-hero-card:hover .project-preview::after {
    left: 100%;
}

.project-tag {
    display: inline-block;
    padding: 5px 12px;
    background: var(--gradient);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
}

.project-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--light);
}

.project-desc {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 25px;
}

.project-stack {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stack-icon {
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s;
}

.stack-icon:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    transform: translateY(-5px) scale(1.1);
}

.project-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 50px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.project-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transition: left 0.4s;
    z-index: -1;
}

.project-btn:hover::before {
    left: 0;
}

.project-btn:hover {
    color: white;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* Contact Section */
.contact {
    padding: 120px 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--darker) 0%, rgba(10, 14, 39, 0.95) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.contact.visible .section-title-animated .title-word {
    animation: fadeInUp 1s ease-out forwards;
}

.contact.visible .section-title-animated .title-word:nth-child(1) {
    animation-delay: 0.5s;
}

.contact.visible .section-title-animated .title-word:nth-child(2) {
    animation-delay: 0.8s;
}

.contact-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.contact-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: floatParticle 20s infinite linear;
    opacity: 0.4;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100vh) translateX(200px) scale(1.5);
        opacity: 0;
    }
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.sphere-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -300px;
    left: -300px;
}

.sphere-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -250px;
    right: -250px;
    animation-duration: 25s;
    animation-direction: reverse;
}

.sphere-3 {
    width: 450px;
    height: 450px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 30s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33% { transform: translate(30px, -50px) scale(1.1) rotate(120deg); }
    66% { transform: translate(-40px, 30px) scale(0.9) rotate(240deg); }
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    width: 100%;
}

.contact-info-card {
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 30px;
    padding: 60px;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 60px rgba(99, 102, 241, 0.05);
    position: relative;
    overflow: hidden;
}

.contact-info-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient);
    border-radius: 30px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.contact-info-card:hover::before {
    opacity: 1;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.contact-method::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.6s;
}

.contact-method:hover::before {
    left: 100%;
}

.contact-method:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

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

.method-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.method-info {
    display: flex;
    flex-direction: column;
}

.method-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3px;
}

.method-value {
    font-size: 1rem;
    color: var(--light);
    font-weight: 500;
}

.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-cta {
    padding: 20px 40px;
    background: var(--gradient);
    border: none;
    border-radius: 60px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
    display: inline-block;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s;
}

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

.primary-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 30px 50px rgba(99, 102, 241, 0.4);
}

.secondary-cta {
    padding: 20px 40px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 60px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s;
    display: inline-block;
}

.secondary-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* Touch targets mobiles */
@media (pointer: coarse) {
    button, a, .contact-method, .suggestion-chip, .project-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Conteneurs fluides */
.hero-content,
.about-container,
.timeline-container,
.contact-container {
    width: 100%;
    max-width: min(100%, 1400px);
    padding-inline: clamp(20px, 4vw, 40px);
    margin: 0 auto;
}

/* Overflow fix global */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        position: relative;
    }
    
    .about-background,
    .projects::before,
    .contact-bg {
        width: 100vw;
        left: 0;
        right: 0;
    }
}

/* Animations mobiles légères */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Navigation Responsive breakpoints */
@media (max-width: 900px) {
    nav {
        width: calc(100% - 60px);
        max-width: 600px;
        padding: 18px 35px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    nav {
        width: calc(100% - 40px);
        max-width: 500px;
        padding: 15px 25px;
        gap: 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    nav {
        width: calc(100% - 30px);
        max-width: none;
        padding: 12px 20px;
        gap: 15px;
        border-radius: 50px;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.85rem;
    }
    
    nav a {
        padding: 3px 5px;
    }
}

@media (max-width: 480px) {
    nav {
        top: 15px;
        width: calc(100% - 20px);
        padding: 10px 15px;
        gap: 10px;
        font-size: 0.8rem;
        border-radius: 25px;
    }
    
    nav a {
        padding: 2px 4px;
        font-weight: 400;
    }
}

@media (max-width: 380px) {
    nav {
        width: calc(100% - 16px);
        padding: 8px 10px;
        gap: 8px;
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    nav a {
        padding: 2px 3px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    nav {
        top: 10px;
        padding: 10px 20px;
        gap: 15px;
        font-size: 0.85rem;
    }
}

/* Responsive complet autres sections */
@media (max-width: 1200px) {
    .projects-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .about-container {
        gap: 100px;
    }
}

@media (max-width: 968px) {
    .hero h1 {
        font-size: clamp(2.5rem, 8vw, 5rem);
    }
    
    .hero-stats {
        gap: 40px;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .profile-section {
        min-height: 550px;
    }
    
    .profile-card {
        max-width: 400px;
        height: 500px;
        margin: 0 auto;
    }
    
    .timeline-container {
        padding: 0;
    }
    
    .timeline-path {
        left: 30px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: row;
        transform: none !important;
        padding-left: 0;
        margin-bottom: 60px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
        padding: 30px;
    }
    
    .timeline-node {
        left: 30px;
    }
    
    .projects-showcase {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .contact-info-card {
        padding: 50px 40px;
    }
    
    .gradient-sphere {
        width: 300px !important;
        height: 300px !important;
    }
}

/* Media queries complets jusqu'aux très petits écrans */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        padding: 100px 20px 80px;
    }
    
    .hero h1 {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        max-width: 100%;
    }
    
    .hero-stats {
        flex-direction: row;
        justify-content: space-around;
        gap: 20px;
        margin: 30px 0;
    }
    
    .stat-item {
        min-width: 80px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .cta-container {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    
    .cta-button,
    .cta-button-outline {
        width: 100%;
        max-width: 300px;
        padding: 16px 30px;
        font-size: 1rem;
    }
    
    .section-title-animated {
        font-size: 2rem;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .about {
        padding: 80px 20px;
    }
    
    .about-content h2 {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .timeline {
        padding: 80px 20px;
    }
    
    .timeline::before {
        display: none;
    }
    
    .floating-orbs {
        display: none;
    }
    
    .timeline-item {
        margin-bottom: 40px;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .timeline-item.visible {
        animation: none;
    }
    
    .timeline-content {
        padding: 25px;
        width: calc(100% - 70px);
        margin-left: 70px;
    }
    
    .timeline-content h4 {
        font-size: 1.1rem;
    }
    
    .timeline-icon {
        font-size: 1.8rem;
        top: 20px;
        right: 20px;
    }
    
    .projects {
        padding: 80px 20px;
    }
    
    .project-hero-card {
        padding: 25px;
    }
    
    .project-name {
        font-size: 1.5rem;
    }
    
    .project-stack {
        gap: 10px;
    }
    
    .stack-icon {
        width: 45px;
        height: 45px;
        font-size: 0.7rem;
    }
    
    .contact {
        padding: 80px 20px;
        min-height: auto;
    }
    
    .contact-info-card {
        padding: 40px 25px;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cta-group {
        flex-direction: column;
    }
    
    .primary-cta,
    .secondary-cta {
        width: 100%;
        padding: 18px 30px;
        font-size: 1rem;
    }
    
    .contact-particles {
        display: none;
    }
    
    #matrix-canvas {
        display: none;
    }
    
    #canvas-container {
        opacity: 0.5;
    }
    
    .hero-grid {
        background-size: 30px 30px;
        opacity: 0.2;
    }
    
    .hero {
        min-height: 100dvh;
        display: flex;
        align-items: center;
    }
    
    .hero-content {
        padding-bottom: 100px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .code-decoration {
        font-size: 0.85rem;
    }
    
    .profile-card {
        max-width: 100%;
        height: 450px;
    }
    
    .profile-avatar {
        width: 150px;
        height: 150px;
        font-size: 4rem;
        margin-bottom: 30px;
    }
    
    .card-back-content {
        padding: 20px;
    }
    
    .timeline-path {
        left: 20px;
    }
    
    .timeline-node {
        left: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 50px);
        margin-left: 50px;
        padding: 20px;
    }
    
    .timeline-content h3 {
        font-size: 0.95rem;
    }
    
    .timeline-content h4 {
        font-size: 1rem;
    }
    
    .timeline-content p {
        font-size: 0.9rem;
    }
    
    .project-hero-card {
        padding: 20px;
    }
    
    .project-screen {
        margin-bottom: 20px;
    }
    
    .project-preview {
        height: 150px;
    }
    
    .project-name {
        font-size: 1.3rem;
    }
    
    .project-desc {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .project-stack {
        gap: 8px;
    }
    
    .stack-icon {
        width: 40px;
        height: 40px;
        font-size: 0.65rem;
    }
    
    .project-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .contact-info-card {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .contact-info-card h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .contact-info-card p {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    
    .contact-method {
        padding: 15px;
        gap: 12px;
    }
    
    .method-icon {
        width: 40px;
        height: 40px;
    }
    
    .method-value {
        font-size: 0.9rem;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
    
    .scroll-indicator svg {
        width: 24px;
        height: 24px;
    }
    
    .orb {
        width: 150px !important;
        height: 150px !important;
    }
    
    .gradient-sphere {
        width: 200px !important;
        height: 200px !important;
    }
}

@media (max-width: 360px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .section-title-animated {
        font-size: 1.5rem;
    }
    
    .timeline-content {
        width: calc(100% - 40px);
        margin-left: 40px;
        padding: 15px;
    }
    
    .project-hero-card {
        padding: 15px;
    }
    
    .contact-info-card {
        padding: 25px 15px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 60px 20px;
    }
    
    .hero-stats {
        display: none;
    }
    
    .cta-container {
        flex-direction: row;
        margin-top: 20px;
    }
}

/* Fix pour les très grandes résolutions */
@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }
    
    .hero h1 {
        font-size: 8rem;
    }
    
    .section-title-animated {
        font-size: 4rem;
    }
}

/* Tablettes en mode portrait */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .projects-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-container {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 5rem;
    }
}

/* Tablettes en mode paysage */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 80px 40px;
    }
    
    .hero-stats {
        flex-direction: row;
    }
}