/* ==================
   1. Reset & Variables
   ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #05050c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --violet: #8b5cf6;
    --cyan: #22d3ee;
    --border: rgba(255, 255, 255, 0.1);
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
}

/* ==================
   2. Typographie & Composants de base
   ================== */
h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    background: linear-gradient(to right, var(--violet), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    line-height: 1.1;
}

h2 {
    font-size: 2rem;
    margin-bottom: 32px;
    color: #fff;
}

h3 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 12px;
}

p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fff;
}

/* Boutons d'appel à l'action */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 16px;
    margin-right: 16px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--cyan);
    color: var(--bg);
}

.btn-primary:hover {
    background-color: #fff;
    color: var(--bg);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

/* ==================
   3. Layout & Header
   ================== */
section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 24px;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 12, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

nav {
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
}

nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
}

nav ul a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

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

/* ==================
   4. Sections spécifiques
   ================== */
/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 120px;
}

#hero p {
    font-size: 1.15rem;
    max-width: 600px;
}

/* Projets (Système de Grille & Cartes) */
#projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

#projects h2 {
    grid-column: 1 / -1;
}

#projects article {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

#projects article:hover {
    transform: translateY(-5px);
    border-color: var(--violet);
    background-color: var(--bg-card-hover);
}

#projects article p {
    flex-grow: 1;
}

#projects ul {
    margin: 20px 0;
    list-style: none;
}

#projects ul li {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    border-radius: 999px;
    padding: 4px 12px;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Compétences */
.skill-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    list-style: none;
}

.skill-categories li {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Expérience (Frise chronologique) */
.timeline {
    border-left: 2px solid var(--border);
    padding-left: 32px;
    margin-left: 16px;
    list-style: none;
}

.timeline li {
    position: relative;
    margin-bottom: 48px;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -39px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cyan);
    border: 2px solid var(--bg);
}

.period {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--violet);
    margin-bottom: 8px;
    display: block;
    font-weight: 600;
}

/* ==================
   5. Footer
   ================== */
footer {
    text-align: center;
    padding: 60px 24px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    list-style: none;
}

/* Responsive basique pour mobile */
@media (max-width: 768px) {
    nav ul {
        display: none; /* Cache le menu complet sur petit écran */
    }
    #hero {
        text-align: center;
        align-items: center;
    }
    .btn {
        margin-right: 8px;
    }
}