


/* ============================================
   VALIDATED BY SECTION (Ils nous ont validé)
   ============================================ */

#validated-by {
    background: transparent;
    padding-top: 0px;
    padding-bottom: 90px;
    min-height: unset;
}


.validated-clients.compact {
    display: flex;
    flex-direction: row;
    gap: 18px;
    justify-content: center;
    align-items: stretch;
    margin-top: 32px;
    flex-wrap: wrap;
    perspective: 1000px;
}
.client-card.compact {
    min-width: 220px;
    max-width: 260px;
    padding: 16px 12px;
    gap: 12px;
    font-size: 0.98rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeInUp 0.7s cubic-bezier(.68,-0.55,.27,1.55);
}
.client-card.compact .client-photo {
    width: 54px;
    height: 54px;
}
.client-card.compact .client-info h3 {
    font-size: 1.05rem;
}
.client-card.compact .client-info p {
    font-size: 0.95rem;
    margin: 0;
}
@media (max-width: 900px) {
    .validated-clients.compact {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        justify-content: flex-start;
        gap: 16px;
        margin: 32px -20px 0 -20px; /* Bleed to edges */
        padding: 0 20px 20px 20px; /* Content padding */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide scrollbar Firefox */
    }
    .validated-clients.compact::-webkit-scrollbar {
        display: none; /* Hide scrollbar Chrome/Safari */
    }
    .client-card.compact {
        min-width: 260px;
        max-width: 260px;
        width: 260px;
        scroll-snap-align: center;
        flex-shrink: 0;
        margin: 0;
    }
}

.client-card {
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 22px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 36px;
    min-width: 340px;
    max-width: 420px;
    transition: box-shadow 0.3s, transform 0.3s;
    animation: fadeInUp 0.7s cubic-bezier(.68,-0.55,.27,1.55);
    flex: 0 0 340px;
    transform-style: preserve-3d;
}

.client-card:hover {
    box-shadow: 0 15px 40px rgba(164,0,27,0.25);
    transform: scale(1.04) translateY(-10px) rotateX(3deg) rotateY(-3deg);
    z-index: 2;
}

.client-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    border: 2px solid var(--accent-color);
    background: #fff;
}

.client-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-info h3 {
    margin: 0 0 4px 0;
    font-size: 1.18rem;
    color: var(--accent-color);
    font-weight: 700;
}

.client-info p {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0 0 6px 0;
}

.client-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #9147ff;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.client-link:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .validated-slider {
        width: 98vw;
        gap: 18px;
    }
    .client-card {
        min-width: 90vw;
        max-width: 98vw;
        padding: 22px 10px;
    }
    .slider-btn {
        font-size: 1.5rem;
        width: 36px;
        height: 36px;
    }
}
@font-face {
    font-family: 'Stack Sans Notch';
    src: url('fonts/Stack_Sans_Notch/static/StackSansNotch-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Stack Sans Notch';
    src: url('fonts/Stack_Sans_Notch/static/StackSansNotch-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Stack Sans Notch';
    src: url('fonts/Stack_Sans_Notch/static/StackSansNotch-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
.hero-immersive {
    animation: heroFadeIn 1.2s cubic-bezier(.23,1.12,.32,1);
}
@keyframes heroFadeIn {
    0% { opacity: 0; transform: translateY(40px) scale(0.98); }
    80% { opacity: 1; transform: translateY(-8px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.main-logo.logo-bounce {
    animation: logoBounce 0.7s cubic-bezier(.23,1.12,.32,1);
}
@keyframes logoBounce {
    0% { transform: scale(1) rotate(0deg); }
    30% { transform: scale(1.18) rotate(-8deg); }
    50% { transform: scale(0.92) rotate(6deg); }
    70% { transform: scale(1.08) rotate(-4deg); }
    100% { transform: scale(1) rotate(0deg); }
}
/* Carrousel d'images dans les projets */
.carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 16px;
}
.carousel-img {
    width: 100%;
    max-width: 340px;
    max-height: 220px;
    aspect-ratio: 16/10;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    object-fit: cover;
    background: rgba(255,255,255,0.01);
    padding: 0;
    transition: box-shadow 0.3s, transform 0.3s;
}
.carousel-btn {
    background: var(--glass-bg);
    border: none;
    color: var(--accent-color);
    font-size: 1.6rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 8px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    transform: scale(1.04);
    box-shadow: 0 8px 32px rgba(164,0,27,0.18);
}
.carousel-btn:hover {
    background: var(--accent-light);
    color: #fff;
}
/* ============================================
   PORTFOLIO 4WAWAX - DESIGN MODERNE & ANIMÉ
   Liquid Glass + Animations Fluides
   ============================================ */

/* Variables CSS pour les thèmes */
:root {
    /* Thème clair */
    --bg-color: #f8f9ff;
    --bg-secondary: #ffffff;
    --text-color: #1a1a2e;
    --text-light: #6c757d;
    --accent-color: #a4001b;
    --accent-light: #d40028;
    --accent-dark: #7a0014;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #a4001b 0%, #d40028 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    /* Background Lines Variables */
    --line-color: rgba(0, 0, 0, 0.05);
    --star-color: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] {
    /* Thème sombre */
    --bg-color: #0a0a0a;
    --bg-secondary: #0a0a0a;
    --text-color: #e8e8e8;
    --text-light: #a8a8a8;
    --accent-color: #a4001b;
    --accent-light: #d40028;
    --accent-dark: #7a0014;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    
    /* Background Lines Variables Dark */
    --line-color: rgba(255, 255, 255, 0.05);
    --star-color: rgba(255, 255, 255, 0.8);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html {
    scrollbar-width: thin;
    scrollbar-color: #d40028 #f8f9ff;
}

html[data-theme="dark"] {
    scrollbar-color: #d40028 #0a0a0a;
}

body {
    font-family: 'Stack Sans Notch', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.45rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
    overflow-x: hidden;
}

body.loading header,
body.loading section,
body.loading footer {
    opacity: 0;
}

body:not(.loading) header,
body:not(.loading) section,
body:not(.loading) footer {
    animation: siteAppear 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Écran de chargement */
#loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s cubic-bezier(0.4, 0, 0.2, 1);
}

#loader-screen.hidden {
    animation: screenSlideUp 1s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    animation: loaderFadeIn 1s ease-out;
}

.loader-logo {
    width: 200px;
    height: 200px;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: loaderPulse 3s infinite ease-in-out;
    filter: drop-shadow(0 8px 40px rgba(164,0,27,0.25));
}

.loader-logo:hover {
    transform: scale(1.1) rotate(3deg);
    filter: drop-shadow(0 12px 60px rgba(164,0,27,0.4));
}

.loader-logo.clicked {
    animation: rocketLaunch 1s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}

.loader-text {
    font-size: 1.4rem;
    color: var(--accent-color);
    font-weight: 600;
    animation: loaderTextPulse 2s infinite ease-in-out;
    letter-spacing: 1px;
    transition: opacity 0.2s ease;
}

.loader-text.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes loaderFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 8px 40px rgba(164,0,27,0.25)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 15px 60px rgba(164,0,27,0.4)); }
}

@keyframes loaderTextPulse {
    0%, 100% { opacity: 0.6; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-5px); }
}

@keyframes loaderExplode {
    0% { transform: scale(1) rotate(0deg); opacity: 1; filter: drop-shadow(0 8px 40px rgba(164,0,27,0.25)); }
    20% { transform: scale(1.15) rotate(90deg); opacity: 1; filter: drop-shadow(0 20px 80px rgba(164,0,27,0.5)); }
    50% { transform: scale(0.95) rotate(270deg); opacity: 0.9; filter: drop-shadow(0 30px 100px rgba(164,0,27,0.6)); }
    75% { transform: scale(1.5) rotate(450deg); opacity: 0.4; filter: drop-shadow(0 40px 120px rgba(164,0,27,0.4)); }
    100% { transform: scale(3) rotate(720deg); opacity: 0; filter: drop-shadow(0 0 0 rgba(164,0,27,0)); }
}

@keyframes rocketLaunch {
    0% { 
        transform: scale(1) translateY(0) rotate(0deg); 
        opacity: 1; 
        filter: drop-shadow(0 8px 40px rgba(164,0,27,0.25));
    }
    15% {
        transform: scale(1.1) translateY(-10px) rotate(5deg);
        opacity: 1;
        filter: drop-shadow(0 15px 60px rgba(164,0,27,0.4));
    }
    30% {
        transform: scale(1.05) translateY(-20px) rotate(-3deg);
        opacity: 1;
        filter: drop-shadow(0 20px 80px rgba(164,0,27,0.5));
    }
    50% {
        transform: scale(0.8) translateY(-100vh) rotate(10deg);
        opacity: 0.8;
        filter: drop-shadow(0 30px 100px rgba(164,0,27,0.6)) blur(2px);
    }
    100% { 
        transform: scale(0.3) translateY(-150vh) rotate(20deg); 
        opacity: 0; 
        filter: drop-shadow(0 0 0 rgba(164,0,27,0)) blur(5px);
    }
}

@keyframes screenSlideUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@keyframes siteAppear {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 12px;
    background: #f8f9ff;
    border-radius: 8px;
}

html[data-theme="dark"] ::-webkit-scrollbar {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #d40028 0%, #a4001b 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(164,0,27,0.10);
    border: 2px solid #f8f9ff;
    min-height: 40px;
    transition: background 0.3s;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    border-color: #0a0a0a;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #a4001b 0%, #d40028 100%);
}

::-webkit-scrollbar-track {
    background: #f8f9ff;
    border-radius: 8px;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-corner {
    background: #f8f9ff;
}

html[data-theme="dark"] ::-webkit-scrollbar-corner {
    background: #0a0a0a;
}


/* HERO IMMERSIVE */
.hero-immersive {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(164,0,27,0.08);
}
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 2;
}
.hero-logo-effect {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
}
.main-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 4px 32px rgba(164,0,27,0.13);
    animation: logoPop 2.2s cubic-bezier(.23,1.12,.32,1) 1;
    background: #fff;
    transition: transform 0.3s;
}
.main-logo:hover {
    transform: scale(1.08) rotate(-8deg);
    box-shadow: 0 8px 40px rgba(164,0,27,0.18);
}
.hero-text h1 {
    font-size: 3.7rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    margin-bottom: 0.5rem;
}
.highlight {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}
.subtitle {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.slogan {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.2rem;
}
.magic-text {
    color: var(--accent-light);
    font-weight: bold;
    letter-spacing: 0.5px;
    animation: magicText 2.5s infinite alternate;
}
.cta-button.pulse {
    animation: pulseBtn 1.7s infinite alternate;
}
@keyframes logoPop {
    0% { transform: scale(0.2) rotate(-30deg); opacity: 0; }
    60% { transform: scale(1.15) rotate(8deg); opacity: 1; }
    80% { transform: scale(0.95) rotate(-4deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes magicText {
    0% { color: var(--accent-light); }
    100% { color: var(--accent-dark); }
}
@keyframes pulseBtn {
    0% { box-shadow: 0 0 0 0 var(--accent-light, #d40028); }
    100% { box-shadow: 0 0 0 12px rgba(212,0,40,0.08); }
}
.scroll-down {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    z-index: 3;
}
.scroll-down span {
    display: block;
    width: 28px;
    height: 48px;
    border: 2px solid var(--accent-light);
    border-radius: 16px;
    position: relative;
}
.scroll-down span::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--accent-light);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    animation: scrollDot 1.2s infinite;
}
@keyframes scrollDot {
    0% { top: 10px; opacity: 1; }
    80% { top: 28px; opacity: 0.7; }
    100% { top: 10px; opacity: 1; }
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 0px;
    text-align: center;
    color: var(--text-color);
    position: relative;
    display: block;
    width: 100%;
    letter-spacing: 1px;
    line-height: 1.1;
}

/* Removed h2::after to move underline to subtitle */

.section-header {
    text-align: center;
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--accent-color); /* Red color */
    font-weight: 600;
    margin-top: -10px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 15px;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-2);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    color: var(--text-color);
}

p {
    color: var(--text-light);
    line-height: 1.8;
}

/* .carousel-btn styles removed for a clean look */

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ============================================
   HEADER & NAVIGATION (FLOATING ISLAND)
   ============================================ */

header {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: fit-content;
    max-width: 95%;
    z-index: 1000;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 100px;
    padding: 8px 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: skewX(-0.5deg);
}

header.scrolled {
    top: 15px;
    background: rgba(10, 10, 10, 0.85);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    gap: 20px;
    width: auto;
    transform: skewX(0.5deg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.3rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
    padding-left: 10px;
}

.logo span {
    font-family: 'Stack Sans Notch', 'Segoe UI', 'Helvetica Neue', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo img {
    height: 32px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: filter 0.4s ease;
}

.logo:hover img {
    animation: logoRotate 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 15px rgba(164, 0, 27, 0.6));
}

@keyframes logoRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.03);
    padding: 5px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: 'Stack Sans Notch', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 20px;
    border-radius: 100px;
    display: inline-block; /* Ensure transform works for magnetic effect */
}

nav a::after {
    display: none;
}

nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

nav a.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(164, 0, 27, 0.4);
}

#theme-toggle {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 5px;
}

#theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

#theme-toggle img {
    width: 24px !important;
    height: 24px !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Responsive Navbar */
@media (max-width: 768px) {
    /* Header: Invisible container for Nav */
    header {
        display: block;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        pointer-events: none;
        width: 0;
        height: 0;
        padding: 0;
        margin: 0;
        position: fixed;
        top: 0;
        left: 0;
        transform: none;
    }

    header .container {
        display: contents;
    }

    .logo {
        display: none !important;
    }

    /* Floating Hamburger Button (Bottom Left) */
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        bottom: 30px;
        left: 30px;
        width: 60px;
        height: 60px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
        z-index: 1002;
        padding: 16px;
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
    }

    .mobile-menu-toggle:active {
        transform: scale(0.9);
    }

    .mobile-menu-toggle span {
        position: absolute;
        width: 24px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--accent-color);
    }

    .mobile-menu-toggle span:nth-child(1) { top: 20px; }
    .mobile-menu-toggle span:nth-child(2) { top: 28px; }
    .mobile-menu-toggle span:nth-child(3) { top: 36px; }

    /* Hamburger Animation */
    .mobile-menu-toggle.active {
        background: var(--accent-color);
        border-color: var(--accent-color);
    }

    .mobile-menu-toggle.active span {
        background: #fff;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        top: 28px;
        transform: translateX(-50%) rotate(45deg);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        top: 28px;
        transform: translateX(-50%) rotate(-45deg);
    }

    /* Full Screen Menu */
    nav {
        pointer-events: auto !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(5, 5, 5, 0.6) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999 !important;
        backdrop-filter: blur(50px) !important;
        -webkit-backdrop-filter: blur(50px) !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    nav.active {
        opacity: 1 !important;
        visibility: visible !important;
    }

    nav ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 40px !important;
        background: transparent !important;
        border: none !important;
        width: 100% !important;
        height: auto !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    nav li {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
        margin: 0 !important;
        padding: 0 !important;
    }

    nav.active li {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    nav a {
        font-size: 2.5rem !important;
        padding: 10px 20px !important;
        width: auto !important;
        text-align: center !important;
        font-weight: 700 !important;
        color: #fff !important;
        text-transform: uppercase !important;
        letter-spacing: 2px !important;
        display: block !important;
        text-decoration: none !important;
    }
    
    nav a:hover, nav a.active {
        color: var(--accent-color);
        background: transparent;
        box-shadow: none;
        transform: scale(1.1);
    }
    
    #theme-toggle {
        display: none; /* Hide theme toggle in header, maybe move to menu later if needed */
    }

    /* Centering elements on mobile */
    .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .hero, .hero-immersive {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .hero-content {
        align-items: center;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .about-content, .contact-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .about-text {
        text-align: center;
        margin-bottom: 30px;
    }

    .contact-form-block, .contact-info-block {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #contact-form {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch; /* Stretch to fill width */
    }

    #contact-form label {
        align-self: center;
        text-align: center;
        width: 100%;
    }
    
    #contact-form input, #contact-form textarea {
        text-align: center;
        width: 100% !important; /* Force full width */
        box-sizing: border-box; /* Include padding in width */
    }

    /* Fix grid layout for name/email on mobile */
    #contact-form > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        width: 100%;
    }

    .info-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        width: 100%;
        gap: 10px;
    }

    .social-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .social-links a {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    /* Ensure grids are centered */
    .stats-grid, .skills-grid, .tools-grid {
        justify-items: center;
        width: 100%;
    }
    
    .portfolio-grid {
        justify-items: center;
        width: 100%;
    }
}

/* ============================================
   SECTIONS GÉNÉRALES
   ============================================ */

section {
    padding: 32px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

section:nth-child(even) {
    background: linear-gradient(180deg, transparent 0%, rgba(255, 0, 110, 0.03) 100%);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    text-align: center;
    padding-top: 180px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(245, 87, 108, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease-out;
}

.hero > .container > p:first-of-type {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 15px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero > .container > p:nth-of-type(2) {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: var(--gradient-2);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(164, 0, 27, 0.3);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(164, 0, 27, 0.4);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:active {
    transform: translateY(-1px);
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */

#portfolio {
    padding: 120px 0;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.filter-btn {
    padding: 12px 28px;
    background: var(--glass-bg);
    color: var(--text-color);
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

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

.filter-btn:hover,
.filter-btn.active {
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-4px) translateZ(10px);
    box-shadow: 0 8px 20px rgba(164, 0, 27, 0.3);
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    grid-auto-rows: 10px;
    padding: 36px 0 36px 0;
    animation: fadeInUp 0.8s cubic-bezier(.68,-0.55,.27,1.55) 0.4s both;
    /* Protection contre la sélection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    perspective: 1000px;
}

@media (max-width: 1100px) {
    .portfolio-grid {
        /* Grid handles columns automatically with auto-fill */
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 22px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    opacity: 1;
    transform: translateZ(0); /* Hardware acceleration */
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    margin-bottom: 0;
    width: 100%;
    height: fit-content;
}

.project-card.visible {
    animation: fadeInUp 0.6s ease-out forwards;
}

.project-card.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-10px) rotateX(4deg) rotateY(-4deg);
    z-index: 3;
    box-shadow: 
        15px 15px 30px rgba(0,0,0,0.25),
        0 15px 35px rgba(0,0,0,0.25);
}

.project-card img {
    width: 100%;
    height: auto;
    display: block;
    /* border-radius removed to let container clip */
    box-shadow: 0 6px 32px 0 rgba(0,0,0,0.10);
    filter: brightness(1) saturate(1.05);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease;
    background: #fff;
    /* Protection des images */
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    position: relative;
}

/* Conteneur pour le filigrane - ne casse pas le shadow */
.carousel,
.project-card > img {
    position: relative;
}

.carousel::after,
.project-card > img::after {
    content: '4Wawax';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.15);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 2;
    font-family: 'Stack Sans Notch', 'Segoe UI', sans-serif;
    letter-spacing: 4px;
    white-space: nowrap;
}

.project-card:hover img {
    transform: scale(1.06) translateZ(20px);
    filter: brightness(1.1) saturate(1.1);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 22px;
    z-index: 1;
}

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

.project-info {
    padding: 20px;
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    text-align: center;
    background: transparent;
    pointer-events: none;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-info {
    opacity: 1;
    transform: translateY(0) translateZ(30px);
}

.project-card h3 {
    font-size: 1.1rem;
    margin: 0;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.project-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.category-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--gradient-2);
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(164, 0, 27, 0.10);
    z-index: 4;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.10);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card:hover .category-tag {
    transform: translateZ(40px);
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal.closing {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    margin: 5% auto;
    padding: 0;
    border-radius: 30px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s ease-out;
    overflow: hidden;
}

.modal-content-image {
    padding: 0;
    background: var(--glass-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 32px;
    box-shadow: 0 16px 64px rgba(0,0,0,0.18), 0 2px 12px rgba(0,0,0,0.10);
}
.modal-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 56px 0 32px 0;
    background: linear-gradient(135deg, var(--bg-secondary) 60%, var(--glass-bg) 100%);
    border-radius: 32px 32px 0 0;
}
.modal-image {
    width: 100%;
    max-width: 900px;
    max-height: 80vh;
    border-radius: 22px;
    box-shadow: 0 16px 64px rgba(0,0,0,0.18);
    background: #fff;
    object-fit: contain;
    margin: 0 24px;
    transition: box-shadow 0.3s, transform 0.3s;
}
.modal-arrow {
    background: var(--glass-bg);
    border: none;
    color: var(--accent-color);
    font-size: 2.3rem;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 12px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(164,0,27,0.13);
    z-index: 10;
}
.modal-arrow:hover {
    background: var(--accent-light);
    color: #fff;
    transform: scale(1.13) rotate(-8deg);
    box-shadow: 0 8px 32px rgba(164,0,27,0.18);
}
.modal-title-bar {
    width: 100%;
    text-align: center;
    padding: 0 0 24px 0;
    background: transparent;
    border-radius: 0 0 32px 32px;
}
.modal-title-bar h2 {
    margin: 0;
    font-size: 1.08rem;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.10);
    padding-top: 2px;
}
/* Apparition animée des cartes galerie */
.project-card {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    animation: galleryFadeIn 0.7s cubic-bezier(.68,-0.55,.27,1.55) forwards;
    animation-delay: calc(var(--card-index, 0) * 0.08s);
}
.project-card.visible {
    opacity: 1;
    pointer-events: auto;
}
@keyframes galleryFadeIn {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}




.modal.closing {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    margin: 5% auto;
    padding: 0;
    border-radius: 30px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s ease-out;
    overflow: hidden;
}

.modal-content-image {
    padding: 0;
    background: var(--glass-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 32px;
    box-shadow: 0 16px 64px rgba(0,0,0,0.18), 0 2px 12px rgba(0,0,0,0.10);
}
.modal-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 56px 0 32px 0;
    background: linear-gradient(135deg, var(--bg-secondary) 60%, var(--glass-bg) 100%);
    border-radius: 32px 32px 0 0;
}
.modal-image {
    width: 100%;
    max-width: 900px;
    max-height: 80vh;
    border-radius: 22px;
    box-shadow: 0 16px 64px rgba(0,0,0,0.18);
    background: #fff;
    object-fit: contain;
    margin: 0 24px;
    transition: box-shadow 0.3s, transform 0.3s;
}
.modal-arrow {
    background: var(--glass-bg);
    border: none;
    color: var(--accent-color);
    font-size: 2.3rem;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 12px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(164,0,27,0.13);
    z-index: 10;
}
.modal-arrow:hover {
    background: var(--accent-light);
    color: #fff;
    transform: scale(1.13) rotate(-8deg);
    box-shadow: 0 8px 32px rgba(164,0,27,0.18);
}
.modal-title-bar {
    width: 100%;
    text-align: center;
    padding: 0 0 24px 0;
    background: transparent;
    border-radius: 0 0 32px 32px;
}
.modal-title-bar h2 {
    margin: 0;
    font-size: 1.08rem;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.10);
    padding-top: 2px;
}
/* Apparition animée des cartes galerie */
.project-card {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    animation: galleryFadeIn 0.7s cubic-bezier(.68,-0.55,.27,1.55) forwards;
    animation-delay: calc(var(--card-index, 0) * 0.08s);
}
.project-card.visible {
    opacity: 1;
    pointer-events: auto;
}
@keyframes galleryFadeIn {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal.closing .modal-content {
    animation: scaleOut 0.3s ease-out forwards;
}

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

.modal-header {
    padding: 30px;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
}

.modal-header h2 {
    margin: 0;
    text-align: left;
}

.modal-body {
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.modal-image {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-details h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.modal-details p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--text-color);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.close:hover {
    color: var(--accent-color);
    transform: rotate(90deg) scale(1.1);
    background: var(--accent-light);
    color: white;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

#about {
    background: transparent;
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text {
    animation: slideInLeft 0.8s ease-out;
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 25px;
    line-height: 1.9;
}

.about-image {
    animation: slideInRight 0.8s ease-out;
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: var(--gradient-2);
    border-radius: 30px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(20px);
}

.about-image img {
    width: 100%;
    border-radius: 25px;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s ease;
}

.about-image:hover img {
    transform: scale(1.05) rotate(-2deg);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

#contact {
    background: transparent;
}

.contact-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: stretch;
}

.contact-form-block,
.contact-info-block {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 22px;
    padding: 30px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#contact-form {
    display: flex;
    flex-direction: column;
    animation: slideInLeft 0.8s ease-out;
}

#contact-form label {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

#contact-form input,
#contact-form textarea {
    margin-bottom: 25px;
    padding: 15px 20px;
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    background: var(--glass-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: var(--text-light);
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 110, 0.1);
    transform: translateY(-2px);
}

.contact-info {
    animation: slideInRight 0.8s ease-out;
}

.contact-info h3 {
    margin-bottom: 30px;
    color: var(--text-color);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--glass-bg);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateX(5px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    width: 30px;
    text-align: center;
}

.info-item span {
    color: var(--text-color);
    font-weight: 500;
}

.social-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.social-links h3 {
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 100px;
}

.social-links a:hover {
    background: var(--glass-bg);
    transform: translateX(5px);
    color: var(--accent-light);
}

.social-links i {
    font-size: 1.2rem;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: var(--glass-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    padding: 15px 0;
    text-align: center;
    color: var(--text-light);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
}

footer p {
    font-family: 'Stack Sans Notch', 'Segoe UI', 'Helvetica Neue', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

footer nav ul {
    justify-content: center;
    gap: 30px;
}

footer nav a {
    color: var(--text-light);
    transition: color 0.3s ease;
    font-family: 'Stack Sans Notch', 'Segoe UI', 'Helvetica Neue', sans-serif;
    text-transform: uppercase;
}

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

.footer-logo {
    height: 24px;
    width: auto;
    transition: filter 0.3s, opacity 0.3s;
}

/* Light theme: Black logo needs to be dark gray */
html:not([data-theme="dark"]) .footer-logo {
    opacity: 0.6;
}

/* Dark theme: Black logo needs to be light gray */
[data-theme="dark"] .footer-logo {
    filter: invert(1) opacity(0.6);
}

/* ============================================
   MESSAGES
   ============================================ */

.success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    animation: slideInDown 0.4s ease-out;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: -20px;
    margin-bottom: 15px;
    display: none;
    animation: slideInDown 0.3s ease-out;
}

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

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    header .container {
        padding: 0 20px;
    }

    nav ul {
        gap: 20px;
        font-size: 0.9rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        padding-top: 60px;
        padding-bottom: 120px;
        min-height: 85vh;
        display: flex;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.8rem;
        line-height: 1.1;
    }

    .hero > .container > p:first-of-type {
        font-size: 1.1rem;
        padding: 0 10px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .modal-content {
        width: 100%;
        margin: 0;
        position: absolute;
        bottom: 0;
        left: 0;
        border-radius: 24px 24px 0 0;
        max-height: 85vh;
        overflow-y: auto;
        animation: slideUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes slideUpModal {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    
    .modal.closing .modal-content {
        animation: slideDownModal 0.3s forwards;
    }
    
    @keyframes slideDownModal {
        from { transform: translateY(0); }
        to { transform: translateY(100%); }
    }

    section {
        padding: 80px 0;
        min-height: auto;
    }

    .filter-buttons {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    header .container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h2::after {
        width: 40px;
    }

    .hero {
        padding-top: 120px;
        padding-bottom: 40px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero > .container > p:first-of-type {
        font-size: 1rem;
    }

    .cta-button {
        padding: 14px 30px;
        font-size: 0.95rem;
    }

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

    .project-card img {
        height: 200px;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 30% auto;
        border-radius: 20px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .contact-content {
        gap: 30px;
    }

    #contact-form input,
    #contact-form textarea {
        margin-bottom: 15px;
        padding: 12px 15px;
    }

    footer {
        padding-bottom: 100px;
    }

    footer .container {
        flex-direction: column;
    }

    footer nav ul {
        flex-direction: column;
        gap: 15px;
    }
}

/* ============================================
   PARTICULES ANIMÉES
   ============================================ */

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 15s infinite ease-in-out;
}

@keyframes float-particle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(100px, -100px) scale(1.5);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50px, -200px) scale(0.8);
        opacity: 0.2;
    }
    75% {
        transform: translate(-150px, -100px) scale(1.2);
        opacity: 0.4;
    }
}

/* ============================================
   EFFETS HOVER AMÉLIORÉS
   ============================================ */

.cta-button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.cta-button:hover::after {
    width: 300px;
    height: 300px;
}

.cta-button:active {
    transform: scale(0.95);
}

.info-item {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.info-item:hover {
    transform: translateX(10px) scale(1.02);
    background: linear-gradient(135deg, var(--glass-bg) 0%, rgba(164, 0, 27, 0.1) 100%);
}

/* ============================================
   ANIMATIONS DE RÉVÉLATION
   ============================================ */

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

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

/* ============================================
   EFFET DE PULSATION SUR LES ÉLÉMENTS IMPORTANTS
   ============================================ */

.pulse-effect {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(164, 0, 27, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(164, 0, 27, 0.6), 0 0 60px rgba(164, 0, 27, 0.3);
    }
}


/* ============================================
   RESPONSIVE - DÉSACTIVER LES PARTICULES SUR MOBILE
   ============================================ */

@media (max-width: 768px) {
    .particles-container {
        display: none;
    }
}

/* ============================================
   SECTION STATISTIQUES
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-card {
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(164, 0, 27, 0.2);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 15px 0;
    font-family: 'Stack Sans Notch', sans-serif;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ============================================
   SECTION COMPÉTENCES
   ============================================ */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.skill-item {
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 15px;
    padding: 20px 25px;
    transition: all 0.3s ease;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.skill-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(164, 0, 27, 0.15);
}

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

.skill-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.skill-percentage {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-color);
}

.skill-bar {
    width: 100%;
    height: 10px;
    background: rgba(164, 0, 27, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-light) 100%);
    width: 0%;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(164, 0, 27, 0.5);
}

/* ============================================
   SECTION OUTILS
   ============================================ */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.tool-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.tool-card:hover {
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 0 15px 40px rgba(164, 0, 27, 0.2);
}

.tool-card i {
    display: block;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.tool-card img {
    display: block;
    margin: 0 auto 15px;
    transition: transform 0.3s ease;
}

.tool-card:hover i,
.tool-card:hover img {
    transform: scale(1.2) rotate(-5deg);
}

.tool-card h3 {
    font-size: 1.3rem;
    margin: 10px 0;
    color: var(--text-color);
}

.tool-card p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* ============================================
   COMPTEUR DE PROJETS
   ============================================ */

.portfolio-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-count {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.count-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.count-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: 'Stack Sans Notch', sans-serif;
}

/* ============================================
   INDICATEUR DE DISPONIBILITÉ
   ============================================ */

.availability-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    border-radius: 50px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    animation: pulse-glow 2s infinite;
}

.status-badge.available {
    border-color: #10b981;
}

.status-badge.busy {
    border-color: #f59e0b;
}

.status-badge.unavailable {
    border-color: #ef4444;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

.status-badge.available .status-dot {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.status-badge.busy .status-dot {
    background: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
}

.status-badge.unavailable .status-dot {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

.status-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Badge compact pour le formulaire */
.availability-badge-small {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.availability-badge-small.available {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.availability-badge-small.busy {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.availability-badge-small.unavailable {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.status-dot-small {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

.availability-badge-small.available .status-dot-small {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.availability-badge-small.busy .status-dot-small {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

.availability-badge-small.unavailable .status-dot-small {
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
}

.status-text-small {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* ============================================
   ANIMATION DE TRANSITION ENTRE PAGES
   ============================================ */

.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: none;
}

.page-transition-overlay.active {
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE - NOUVELLES SECTIONS
   ============================================ */

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .tool-card {
        padding: 25px 15px;
    }
    
    .tool-card i {
        font-size: 2.5rem !important;
    }
    
    .portfolio-stats {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .category-count {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   ADVANCED EFFECTS (200% UPGRADE)
   ============================================ */

/* 1. Three.js Background - REMOVED */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none; 
}

/* 2. Custom Cursor - REMOVED */
/*
body {
    cursor: none; 
}

.custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s, transform 0.1s;
}

.custom-cursor.active {
    width: 0px;
    height: 0px;
}

.cursor-follower.active {
    width: 50px;
    height: 50px;
    background: rgba(164, 0, 27, 0.1);
    border-color: transparent;
}
*/

/* 3. Command Palette */
.command-palette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.command-palette-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.command-palette-modal {
    width: 600px;
    max-width: 90%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.command-palette-overlay.visible .command-palette-modal {
    transform: scale(1);
}

.cp-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.cp-header i {
    color: var(--text-secondary);
    margin-right: 15px;
}

.cp-header input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
}

.cp-esc {
    font-size: 0.8rem;
    background: var(--bg-color);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cp-results {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.cp-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
    color: var(--text-primary);
}

.cp-item:hover, .cp-item.selected {
    background: var(--accent-color);
    color: #fff;
}

.cp-item i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.cp-footer {
    padding: 10px 20px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cp-footer i {
    margin-right: 5px;
}

/* 4. Scroll Progress Bar */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-color);
    width: 0%;
    z-index: 99999;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--accent-color);
}

/* 5. Page Transition Overlay */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.page-transition-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 6. Magnetic Buttons */
.magnetic-btn {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* 7. Before/After Slider - REMOVED */
/*
.before-after-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 450px;
    margin: 40px auto;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    user-select: none;
}

.before-after-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.before-img {
    z-index: 1;
    clip-path: inset(0 50% 0 0); 
}

.after-img {
    z-index: 0;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: #fff;
    z-index: 10;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.slider-circle {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.slider-label {
    position: absolute;
    top: 20px;
    padding: 5px 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 5;
    pointer-events: none;
}

.label-before { left: 20px; }
.label-after { right: 20px; }
*/

/* 8. Video Cards */
.project-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    z-index: 5;
    backdrop-filter: blur(4px);
}

/* 9. Discord Status Widget */
.discord-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.discord-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #747f8d; /* Offline gray */
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.discord-status-dot.online { background: #3ba55c; box-shadow: 0 0 8px #3ba55c; }
.discord-status-dot.idle { background: #faa61a; box-shadow: 0 0 8px #faa61a; }
.discord-status-dot.dnd { background: #ed4245; box-shadow: 0 0 8px #ed4245; }
.discord-status-dot.offline { background: #747f8d; box-shadow: 0 0 5px #747f8d; }

.discord-widget:hover {
    background: rgba(88, 101, 242, 0.2);
    transform: translateY(-2px);
}

/* Video Container Styles */
.video-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
}

.project-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

/* ============================================
   PORTFOLIO SIDEBAR LAYOUT
   ============================================ */

.portfolio-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.portfolio-sidebar {
    flex: 0 0 260px;
    position: sticky;
    top: 120px; /* Adjust based on header height */
    
    /* Header styles applied */
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    
    animation: slideInLeft 0.8s ease-out;
    transform: skewX(0.9deg);
}

.portfolio-sidebar > * {
    transform: skewX(-0.9deg);
}

.portfolio-content {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
}

/* Adjust existing classes for sidebar context */
.portfolio-sidebar .filter-buttons {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
    align-items: stretch;
    display: flex;
}

.portfolio-sidebar .filter-btn {
    width: 100%;
    text-align: left;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    margin: 0;
    justify-content: flex-start;
}

.portfolio-sidebar .filter-btn i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

.portfolio-sidebar .portfolio-stats {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portfolio-sidebar .category-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.portfolio-sidebar .count-number {
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 900px) {
    .portfolio-layout {
        flex-direction: column;
    }
    
    .portfolio-sidebar {
        width: 100%;
        position: static;
        flex: none;
        margin-bottom: 30px;
        transform: none;
    }

    .portfolio-sidebar > * {
        transform: none;
    }
    
    .portfolio-sidebar .filter-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .portfolio-sidebar .filter-btn {
        width: auto;
        border-radius: 50px;
    }
    
    .portfolio-sidebar .portfolio-stats {
        flex-direction: row;
        justify-content: center;
        gap: 30px;
    }
}

/* ============================================
   FLUID CONTAINER & GRID ADJUSTMENTS
   ============================================ */

.container-fluid {
    width: 100%;
    padding: 0 40px; /* Padding on sides */
    margin: 0 auto;
    max-width: 1800px; /* Limit max width on very large screens */
}

/* Override portfolio grid for denser layout */
.portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Adjust sidebar position */
.portfolio-sidebar {
    top: 100px;
    margin-left: 0; /* Ensure it's on the left */
}

/* Responsive adjustments for fluid layout */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 20px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}





/* ============================================
   MODAL PORTFOLIO PREMIUM (GLASSMORPHISM)
   ============================================ */

.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0); /* Fully transparent */
    backdrop-filter: blur(25px); /* Heavy blur for focus */
    -webkit-backdrop-filter: blur(25px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 95vw;
    height: 90vh;
    max-width: 1400px;
    background: transparent; /* Fully transparent */
    border: none; /* No border */
    box-shadow: none; /* No shadow */
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-close:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* Container for the image/video - Takes available space */
.modal-carousel-container {
    flex: 1;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Removed fixed height, using flex: 1 to fill space */
    padding: 40px 0; /* Add breathing room */
}

/* Watermark overlay */
.modal-carousel-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    width: 30%; /* Adjust size as needed */
    height: 30%;
    background-image: url('assets/logo.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.3; /* Increased visibility */
    pointer-events: none;
    z-index: 2;
    filter: grayscale(100%) brightness(200%); /* Make it white-ish if needed */
}

.modal-carousel-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-carousel-track img,
.modal-carousel-track video {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    display: none;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: zoomFadeIn 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes zoomFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-carousel-track img.active,
.modal-carousel-track video.active {
    display: block;
}

/* Navigation Buttons */
.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
    backdrop-filter: blur(4px);
    font-size: 1.2rem;
}

.modal-prev:hover,
.modal-next:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 20px rgba(164, 0, 27, 0.4);
}

.modal-prev { left: 30px; }
.modal-next { right: 30px; }

/* Indicators */
.modal-indicators {
    position: absolute;
    bottom: 100px; /* Moved up to avoid overlap with floating info pill */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-indicator.active {
    background: var(--accent-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--accent-color);
}

/* Info Bar at Bottom - Floating Pill Style */
.modal-info {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    padding: 12px 30px;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 20;
}

.modal-title {
    font-size: 1.4rem;
    margin: 0;
    color: #fff;
    font-family: 'League Gothic', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: none;
}

.modal-category {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
    }
    
    .modal-prev, .modal-next {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }
    
    .modal-info {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .modal-carousel-track img,
    .modal-carousel-track video {
        max-width: 100%;
    }
}

/* ============================================
   NEW SECTION HEADER STYLES (Inspired by FAQ/Feedbacks)
   ============================================ */

.section-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #c41e1e; /* Pink/Purple color matching the theme */
    margin-bottom: 5px;
    text-transform: capitalize;
    letter-spacing: 0.1px;
}

.section-subtitle i {
    font-size: 1.3rem;
}

.section-title-wrapper {
    position: relative;
    display: inline-block;
}

.section-title {
    font-family: 'League Gothic', sans-serif;
    font-size: 6rem;
    font-weight: 400; /* League Gothic is naturally bold/condensed */
    color: #fff;
    text-transform: uppercase;
    line-height: 0.9;
    margin: 0;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}

/* Override default h2 styles if used on h2 */
h2.section-title {
    width: auto;
    margin-bottom: 0;
    background: none;
    -webkit-text-fill-color: initial;
}

h2.section-title::after {
    display: none;
}

/* Decorative Stars */
.title-star {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.title-star svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.title-star.star-1 {
    top: -15px;
    right: -35px;
    width: 35px;
    height: 35px;
    color: #f472b6; /* Pink */
    transform: rotate(15deg);
    animation: starFloat 3s ease-in-out infinite;
}

.title-star.star-2 {
    bottom: 5px;
    right: -45px;
    width: 20px;
    height: 20px;
    color: #a855f7; /* Purple */
    animation: starFloat 4s ease-in-out infinite 0.5s;
}

.title-star.star-3 {
    top: 40%;
    left: -30px;
    width: 25px;
    height: 25px;
    color: #c01f1f; /* Magenta */
    transform: rotate(-10deg);
    animation: starFloat 3.5s ease-in-out infinite 1s;
}

@keyframes starFloat {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    50% { transform: translateY(-5px) rotate(10deg) scale(1.1); }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 4rem;
    }
    .title-star.star-1 { right: -20px; width: 25px; height: 25px; }
    .title-star.star-2 { right: -25px; width: 15px; height: 15px; }
    .title-star.star-3 { left: -15px; width: 18px; height: 18px; }
}


/* ============================================
   BACKGROUND LINES ANIMATION
   ============================================ */

/* Ensure content is above lines */
main, footer, section {
    position: relative;
    z-index: 1;
}

.lines-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    /* background: transparent; */
}

.bg-line {
    position: absolute;
    background: var(--line-color);
    width: 1px;
    transform-origin: top left;
    overflow: hidden; /* To clip the shooting star */
}

.shooting-star {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px; /* Slightly thicker for better visibility */
    margin-left: -0.5px; /* Center it */
    height: 300px; /* Longer tail */
    background: linear-gradient(to bottom, transparent, var(--star-color));
    opacity: 1;
    will-change: top; /* Optimize for top animation */
}

@keyframes shootDown {
    0% {
        top: -300px;
    }
    100% {
        top: 100%;
    }
}

