:root {
    --bg-color: #FBFFE9;
    --accent-yellow: #F9F6AD;
    --card-yellow: #FFE88E;
    --font-main: 'Anonymous Pro', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-main);
    color: black;
    line-height: 1.4;
}

/* Animation au scroll */
.scroll-reveal {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Délais pour animations successives */
.scroll-reveal:nth-child(1) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.5s; }

/* Navbar */
.navbar {
    background-color: var(--accent-yellow);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
    font-size: 2rem;
    position: relative;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: black;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: black;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Menu Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: black;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

/* Hero Section */
.hero h1 {
    font-size: 3rem;
    font-weight: normal;
    margin-bottom: 30px;
}

.bio-card {
    background-color: var(--card-yellow);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 50px;
}

.bio-card p {
    margin-bottom: 15px;
}

.btn-cv {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 30px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-family: var(--font-main);
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-cv:hover {
    background-color: #333;
    transform: translateY(-3px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

/* Projects Section */
h2 {
    font-size: 2.5rem;
    font-weight: normal;
    margin-bottom: 30px;
}

.projects-grid-container {
    position: relative;
    margin-bottom: 20px;
}

.vertical-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #000;
    transform: translateX(-50%);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 20px 0;
}

.project-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.3);
    height: 150px;
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px) brightness(0.8);
    transition: 0.3s;
}

.project-card:hover img {
    filter: blur(0px) brightness(1);
}

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 10px;
    pointer-events: none;
}

.overlay span {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.project-languages {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
}

.dark-text { color: black; }

.more-projects {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.project-card.wide {
    width: 300px;
}

/* Carrousel Mobile */
.carousel-container {
    display: none;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 20px 0;
}

.carousel-track {
    display: flex;
    gap: 20px;
    animation: scroll 20s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Contact Section */
.contact-section {
    margin-top: 60px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-links img {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    transition: transform 0.2s;
}

.social-links img:hover {
    transform: scale(1.1);
}

/* Footer */
.footer {
    background-color: var(--accent-yellow);
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    font-size: 1.2rem;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        position: absolute;
        right: 20px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background-color: var(--accent-yellow);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .navbar {
        justify-content: center;
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .bio-card {
        font-size: 1rem;
        padding: 20px;
    }

    /* Masquer la grille desktop */
    .projects-grid-container {
        display: none;
    }

    .more-projects {
        display: none;
    }

    /* Afficher le carrousel */
    .carousel-container {
        display: block;
    }

    .carousel-track .project-card {
        min-width: 280px;
        height: 180px;
    }

    h2 {
        font-size: 2rem;
    }

    .social-links img {
        width: 60px;
        height: 60px;
    }

    .vertical-line {
        display: none;
    }

    .overlay span {
        font-size: 1.5rem;
    }

    .project-languages {
        font-size: 0.8rem;
    }
}