/* ============================================
   PORTFOLIO ÉPURÉ - DESIGN MODERNE 2025
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* Palette Bleue */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --accent: #0ea5e9;
    --accent-glow: rgba(59, 130, 246, 0.4);
    
    /* Neutres */
    --black: #09090b;
    --dark: #18181b;
    --dark-light: #27272a;
    --gray-900: #3f3f46;
    --gray-600: #71717a;
    --gray-400: #a1a1aa;
    --gray-200: #e4e4e7;
    --white: #fafafa;
    
    /* Effets */
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glow: 0 0 60px rgba(99, 102, 241, 0.15);
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--gray-200);
    background: var(--black);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ============================================
   CURSOR PERSONNALISÉ
   ============================================ */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s var(--ease-out), opacity 0.15s;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s;
}

.cursor.hover {
    transform: scale(2);
    background: rgba(99, 102, 241, 0.1);
}

@media (max-width: 768px) {
    .cursor, .cursor-dot { display: none; }
}

/* ============================================
   NAVBAR - GLASSMORPHISM
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.5s var(--ease-out);
}

.navbar.scrolled {
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--glass-border);
    transition: all 0.3s var(--ease-out);
}

.logo:hover .logo-img {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--accent-glow);
}

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

.nav-link {
    text-decoration: none;
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    transition: all 0.3s var(--ease-out);
    position: relative;
}

.nav-link:hover {
    color: var(--white);
    background: var(--glass);
}

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

/* Language Selector */
.language-selector {
    position: relative;
    margin-left: 1rem;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--gray-200);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.lang-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--dark);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0.5rem;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--gray-400);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-option:hover, .lang-option.active {
    background: var(--glass);
    color: var(--white);
}

.lang-arrow {
    transition: transform 0.3s;
}

.lang-btn.active .lang-arrow {
    transform: rotate(180deg);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO SECTION - IMMERSIVE
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 6rem 2rem;
    max-width: 100vw;
}

#particlesCanvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.6;
    max-width: 100%;
}

.floating-shapes {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
    will-change: transform;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary), #1e40af);
    top: -10%;
    left: -5%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--accent), #0891b2);
    bottom: -5%;
    right: -5%;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

.shape-4 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    bottom: 30%;
    left: 5%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.02); }
}

.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6rem;
    max-width: 1400px;
    width: 100%;
    position: relative;
    z-index: 10;
}

.hero-image-container {
    position: relative;
    flex-shrink: 0;
}

.hero-profile-img {
    width: 320px;
    height: 320px;
    border-radius: 32px;
    object-fit: cover;
    border: 3px solid var(--glass-border);
    box-shadow: var(--glow), 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: heroImageFloat 6s ease-in-out infinite;
    transition: all 0.5s var(--ease-out);
}

.hero-image-container:hover .hero-profile-img {
    transform: scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 0 80px var(--accent-glow), 0 25px 50px rgba(0, 0, 0, 0.5);
}

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

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

.greeting {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeSlideUp 0.8s var(--ease-out) 0.2s forwards;
}

.name {
    display: block;
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 700;
    color: #ffffff !important;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s var(--ease-out) 0.4s forwards;
    -webkit-text-fill-color: #ffffff !important;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: fadeSlideUp 0.8s var(--ease-out) 0.6s forwards;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    opacity: 0;
    animation: fadeSlideUp 0.8s var(--ease-out) 0.8s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s var(--ease-out) 1s forwards;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass);
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1s var(--ease-out) 1.5s forwards;
}

.scroll-indicator span {
    display: block;
    width: 28px;
    height: 44px;
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 4px;
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(16px); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ============================================
   SECTIONS COMMUNES
   ============================================ */
section {
    padding: 8rem 2rem;
    position: relative;
    overflow-x: hidden;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    color: var(--white);
    position: relative;
}

.section-title::after {
    content: attr(data-text);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(5rem, 12vw, 10rem);
    font-weight: 800;
    color: var(--glass);
    z-index: -1;
    white-space: nowrap;
    pointer-events: none;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -200px;
    right: -200px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -150px;
    left: -150px;
}

.about-content {
    display: grid;
    gap: 4rem;
}

.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

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

.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out);
}

.reveal-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: all 0.4s var(--ease-out);
}

.stat-item:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--glow);
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-400);
    font-size: 0.95rem;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills {
    background: var(--black);
}

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

.skill-category {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: all 0.5s var(--ease-out);
    opacity: 0;
    transform: translateY(40px);
}

.skill-category.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.skill-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.5s;
}

.skill-category:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--glow);
}

.skill-category:hover .skill-glow {
    opacity: 1;
}

.skill-category h3 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-category h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--gray-200);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
}

.skill-category.animate-in .skill-tag {
    animation: popIn 0.4s var(--ease-spring) forwards;
}

.skill-tag:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.skill-icon {
    font-size: 1.3rem;
    transition: transform 0.3s var(--ease-spring);
}

.skill-tag:hover .skill-icon {
    transform: scale(1.2) rotate(10deg);
}

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   PROJECTS SECTION - SCROLL REVEAL EFFECT
   ============================================ */
.projects {
    background: var(--dark);
    padding-bottom: 4rem;
}

.project-category {
    margin-bottom: 8rem;
}

.project-category:last-child {
    margin-bottom: 0;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 4rem;
    font-weight: 600;
}

.category-icon {
    font-size: 1.8rem;
}

/* Timeline Container */
.projects-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Ligne verticale centrale */
.projects-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, 
        transparent 0%,
        var(--primary) 10%,
        var(--primary) 90%,
        transparent 100%
    );
    opacity: 0.3;
}

/* Project Items with Scroll Animation */
.timeline-item {
    position: relative;
    width: 100%;
    padding: 0;
    margin-bottom: 4rem;
    left: 0 !important;
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.timeline-left,
.timeline-right {
    padding: 0 !important;
}

/* Point sur la timeline */
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 4px solid var(--dark);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-item.visible .timeline-dot {
    opacity: 1;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

/* Project Card Styling */
.project-card {
    background: var(--dark-light);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all 0.4s var(--ease-out);
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 380px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.timeline-item:nth-child(odd) .project-card {
    background: linear-gradient(135deg, var(--dark-light) 0%, #1f1f23 100%);
}

.timeline-item:nth-child(even) .project-card {
    background: linear-gradient(135deg, #1a1a2e 0%, var(--dark-light) 100%);
}

.project-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.15);
    transform: translateY(-5px);
}

/* Project Cards */
.project-image {
    height: 100%;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.project-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s var(--ease-out);
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(14, 165, 233, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}

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

.project-link {
    color: var(--white);
    text-decoration: none;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid var(--white);
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s var(--ease-out);
    transform: translateY(20px);
    opacity: 0;
}

.project-card:hover .project-link {
    transform: translateY(0);
    opacity: 1;
}

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

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 100px;
    z-index: 5;
}

.project-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-info h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1rem;
    font-weight: 700;
}

.project-info p {
    color: var(--gray-400);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

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

.project-tags span {
    padding: 0.5rem 1rem;
    background: var(--glass);
    color: var(--primary-light);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--glass-border);
}

/* App Platforms */
.app-platforms {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.platform-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--glass);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--gray-200);
}

.platform-badge.android {
    color: #3ddc84;
}

.platform-badge.ios.coming-soon {
    color: var(--gray-600);
    opacity: 0.7;
}

.platform-icon {
    width: 18px;
    height: 18px;
}

/* ============================================
   GALLERY SECTION
   ============================================ */
.gallery {
    background: var(--black);
}

.gallery-subtitle {
    text-align: center;
    color: var(--gray-400);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    margin-top: -0.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease-out);
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--dark);
    border: 1px solid var(--glass-border);
    transition: all 0.5s var(--ease-out);
}

.gallery-image-wrapper:hover {
    transform: scale(1.02);
    border-color: var(--primary);
    box-shadow: var(--glow);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.gallery-image-wrapper:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(6, 182, 212, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}

.gallery-image-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.gallery-zoom-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid var(--white);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out);
    transform: scale(0.8);
    opacity: 0;
}

.gallery-image-wrapper:hover .gallery-zoom-btn {
    transform: scale(1);
    opacity: 1;
}

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

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    animation: fadeIn 0.3s var(--ease-out);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
    animation: scaleIn 0.4s var(--ease-spring);
}

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

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.lightbox-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out);
}

.lightbox-prev { left: -70px; }
.lightbox-next { right: -70px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.lightbox-image-container {
    border-radius: 16px;
    overflow: hidden;
}

.lightbox-img {
    max-width: 85vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 16px;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: linear-gradient(180deg, var(--dark) 0%, var(--black) 100%);
}

.contact .section-title {
    color: var(--white);
}

.contact-subtitle {
    text-align: center;
    color: var(--gray-400);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    margin-top: -0.5rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Contact Card */
.contact-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.contact-avatar {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--glass-border);
}

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

.contact-header-info h3 {
    font-size: 1.2rem;
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-header-info p {
    font-size: 0.9rem;
    color: var(--gray-400);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
}

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

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

.method-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.method-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.method-value {
    font-size: 0.95rem;
    color: var(--gray-200);
    font-weight: 500;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--dark);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-200);
}

.contact-form input,
.contact-form textarea {
    padding: 1rem 1.25rem;
    background: var(--dark);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--white);
    transition: all 0.3s var(--ease-out);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--gray-600);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.1rem 2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.form-status {
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 500;
    display: none;
}

.form-status.loading {
    display: block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.form-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.form-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--black);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    text-align: center;
}

.footer p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* ============================================
   SKILL MODAL
   ============================================ */
.skill-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.skill-modal.active {
    display: flex;
}

.skill-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s var(--ease-out);
}

.skill-modal-content {
    position: relative;
    background: var(--dark);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 550px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1;
    animation: scaleIn 0.4s var(--ease-spring);
}

.skill-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out);
    z-index: 2;
}

.skill-modal-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.skill-modal-header {
    padding: 2.5rem 2rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border-radius: 24px 24px 0 0;
}

.skill-modal-icon {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.skill-modal-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
}

.skill-modal-body {
    padding: 2rem;
}

.skill-modal-body p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

.skill-modal-details {
    background: var(--glass);
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 3px solid var(--primary);
}

.skill-modal-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
}

.skill-modal-details ul {
    list-style: none;
}

.skill-modal-details li {
    padding: 0.6rem 0;
    color: var(--gray-400);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.skill-modal-details li::before {
    content: '✓';
    color: var(--primary);
    font-weight: bold;
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVE - MOBILE FIRST
   ============================================ */
@media (max-width: 1024px) {
    .hero-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-profile-img {
        width: 250px;
        height: 250px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        position: static;
    }
    
    /* Projects responsive */
    .project-card {
        grid-template-columns: 1fr;
    }
    
    .project-image {
        min-height: 220px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100vh;
        background: rgba(9, 9, 11, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        transform: translateX(-100%);
        transition: transform 0.5s var(--ease-out);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu li {
        opacity: 0;
        transform: translateX(-30px);
        transition: all 0.4s var(--ease-out);
    }
    
    .nav-menu.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-menu.active li:nth-child(6) { transition-delay: 0.35s; }
    
    .nav-link {
        font-size: 1.5rem;
        padding: 1rem 2rem;
    }
    
    .language-selector {
        margin-left: 0;
        margin-right: 1rem;
    }
    
    section {
        padding: 5rem 1.5rem;
    }
    
    .hero {
        padding: 5rem 1.5rem;
        min-height: 100svh;
    }
    
    .hero-profile-img {
        width: 200px;
        height: 200px;
        border-radius: 24px;
    }
    
    .greeting {
        font-size: 0.8rem;
    }
    
    .name {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem 0.75rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    /* Projects mobile */
    .projects-timeline::before {
        left: 20px;
        transform: none;
    }
    
    .timeline-dot {
        left: 20px;
        transform: translateY(-50%);
    }
    
    .timeline-item {
        margin-bottom: 2rem;
        padding-left: 3rem;
    }
    
    .project-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .project-image {
        min-height: 200px;
    }
    
    .project-info {
        padding: 1.5rem;
    }
    
    .project-info h3 {
        font-size: 1.25rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    section {
        padding: 4rem 1rem;
    }
    
    .section-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }
    
    .section-title::after {
        font-size: clamp(3rem, 15vw, 5rem);
    }
    
    .hero-profile-img {
        width: 160px;
        height: 160px;
    }
    
    .about-stats {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    .skill-items {
        gap: 0.5rem;
    }
    
    .skill-tag {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-card,
    .contact-form-wrapper {
        padding: 1.5rem;
    }
}

/* ============================================
   ANIMATIONS UTILITAIRES
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out);
}

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

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s var(--ease-spring);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Smooth scroll behavior */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Selection */
::selection {
    background: var(--primary);
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-900);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Image Protection */
.protected-img {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

/* ============================================
   EFFETS AVANCÉS & MICRO-INTERACTIONS
   ============================================ */

/* Magnetic Button Effect */
.btn-primary {
    position: relative;
    overflow: hidden;
}

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

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

/* Glow effect on hover */
.glow-on-hover {
    transition: box-shadow 0.3s var(--ease-out);
}

.glow-on-hover:hover {
    box-shadow: 0 0 40px var(--accent-glow);
}

/* Text gradient animation */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Name is styled in hero section - no gradient effect here */

/* Floating animation for hero image */
.hero-image-container::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 40px;
    opacity: 0.2;
    filter: blur(30px);
    z-index: -1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.05); opacity: 0.3; }
}

/* Card shine effect */
.project-card::before,
.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: left 0.5s;
    pointer-events: none;
}

.project-card:hover::before,
.skill-category:hover::before {
    left: 100%;
}

/* Stagger animation for nav links */
.nav-menu li {
    opacity: 0;
    animation: fadeSlideDown 0.5s var(--ease-out) forwards;
}

.nav-menu li:nth-child(1) { animation-delay: 0.1s; }
.nav-menu li:nth-child(2) { animation-delay: 0.15s; }
.nav-menu li:nth-child(3) { animation-delay: 0.2s; }
.nav-menu li:nth-child(4) { animation-delay: 0.25s; }
.nav-menu li:nth-child(5) { animation-delay: 0.3s; }
.nav-menu li:nth-child(6) { animation-delay: 0.35s; }

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth border animation */
.stat-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, var(--primary), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-item:hover::before {
    opacity: 1;
}

/* Loading animation */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 99999;
    transition: opacity 0.5s, visibility 0.5s;
}

body.loaded::before {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE FINAL TOUCHES
   ============================================ */

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-wrapper {
        gap: 4rem;
    }
    
    .hero-profile-img {
        width: 280px;
        height: 280px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
    
    .hero-profile-img {
        width: 380px;
        height: 380px;
    }
}

/* Touch devices - remove hover effects that don't work well */
@media (hover: none) {
    .cursor, .cursor-dot {
        display: none !important;
    }
    
    .project-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    }
    
    .project-link {
        opacity: 1;
        transform: translateY(0);
        position: absolute;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
    }
    
    .gallery-zoom-btn {
        opacity: 1;
        transform: scale(1);
        position: absolute;
        bottom: 1rem;
        right: 1rem;
    }
}

/* Print styles */
@media print {
    .navbar, .cursor, .cursor-dot, .floating-shapes, #particlesCanvas {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --glass-border: rgba(255, 255, 255, 0.3);
    }
    
    .nav-link, .btn {
        border: 2px solid currentColor;
    }
}

/* Dark mode is default, but support light mode preference */
@media (prefers-color-scheme: light) {
    /* Keep dark theme as it's the design choice */
}
