/* Variables */
:root {
    --primary-color: #00ff41;
    --primary-dark: #00cc33;
    --bg-color: #0a0a0a;
    --bg-darker: #050505;
    --bg-lighter: #111111;
    --text-color: #e0e0e0;
    --text-muted: #888888;
    --font-mono: 'Inconsolata', monospace;
    --container-padding: 2rem;
    --section-spacing: 4rem;
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg-darker);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 255, 65, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 255, 65, 0.03) 0%, transparent 20%);
    background-attachment: fixed;
    letter-spacing: 0.3px;
}

/* En-tête */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem var(--container-padding);
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(5px);
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--primary-color);
    background: rgba(0, 255, 65, 0.05);
}

.nav-links a:hover::after {
    width: 80%;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

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

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

/* Sections principales */
main {
    margin-top: 80px;
    padding: 0 var(--container-padding);
}

.section {
    min-height: 100vh;
    padding: 6rem var(--container-padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: 80px;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color) 20%, var(--primary-color) 80%, transparent);
    opacity: 0.2;
}

h1, h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

/* Grille des projets */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Liens sociaux */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Pied de page */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Menu hamburger (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

/* Styles responsifs */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --section-spacing: 3rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 70%;
        height: calc(100vh - 70px);
        background: rgba(10, 10, 10, 0.95);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 0;
        transition: right 0.3s ease-in-out;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .projects-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .project-item {
        display: flex;
        flex-direction: column;
        background: rgba(0, 20, 0, 0.05);
        border: 1px solid rgba(0, 255, 65, 0.1);
        border-radius: 4px;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .project-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 255, 65, 0.1);
    }

    .project-item > .matrix-link {
        padding: 1.5rem;
        font-size: 1.2rem;
        text-decoration: none;
        color: var(--primary-color);
        display: flex;
        align-items: center;
        transition: background 0.3s ease;
    }

    .project-item > .matrix-link:hover {
        background: rgba(0, 255, 65, 0.05);
    }

    .project-item > .matrix-link::before {
        content: '>_';
        margin-right: 0.5rem;
        color: var(--primary-color);
    }

    .section {
        padding: 4rem 0;
    }
}

/* Effets Matrix */
.project-description {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 20, 0, 0.1);
    border-left: 2px solid var(--primary-color);
}

.project-description p {
    margin: 0.5rem 0;
    color: var(--text-color);
}

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

.matrix-code {
    font-family: var(--font-mono);
    background: rgba(0, 30, 0, 0.15);
    padding: 1.5rem;
    border: 1px solid rgba(0, 255, 65, 0.1);
    border-left: 3px solid var(--primary-color);
    margin: 1.5rem 0;
    line-height: 1.8;
    max-width: 800px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.matrix-code::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: scanline 2s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(calc(100% + 100vh)); }
}

.matrix-link {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
    padding: 0.2rem 0.4rem;
    position: relative;
    z-index: 1;
}

.matrix-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
    z-index: -1;
}

.matrix-link:hover {
    color: #fff;
    background: rgba(0, 255, 65, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
}

.matrix-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Effet de surbrillance au survol des sections */
.section:hover h2 {
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    transition: text-shadow 0.3s ease;
}

/* Animation de soulignement pour les titres */
h1, h2 {
    position: relative;
    display: inline-block;
}

h1::after, h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

h1:hover::after, h2:hover::after {
    width: 100%;
}

/* Effet de flou au survol des cartes de projet */
.projects-grid {
    perspective: 1000px;
}

.project-card {
    background: var(--bg-lighter);
    border: 1px solid rgba(0, 255, 65, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    transform-style: preserve-3d;
}

.project-card:hover {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow: 0 10px 30px rgba(0, 255, 65, 0.1);
    border-color: var(--primary-color);
}

/* Effet de curseur personnalisé */
body {
    cursor: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z" fill="%2300ff41"/></svg>'), auto;
}

a, button, .hamburger {
    cursor: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z" fill="%2300ff41"/><path d="M12 6C8.69 6 6 8.69 6 12C6 15.31 8.69 18 12 18C15.31 18 18 15.31 18 12C18 8.69 15.31 6 12 6Z" fill="%2300ff41"/></svg>'), pointer;
}