body {
    --bg: #0f1115;
    /* darker, cooler background */
    --text: #e0e6ed;
    /* slightly off-white text for readability */
    --primary: #00E5FF;
    /* keep turquoise */
    --secondary: #A259FF;
    /* keep violet */
    --accent: #FF6B35;
    /* keep orange */
    --muted: #1e2128;
    /* darker card background */
    --glass: rgba(255, 255, 255, 0.03);
    --radius: 16px;
    --gap: 24px;
    background-color: var(--bg);
    color: var(--text);
    font-family: "Archivo", sans-serif;
    line-height: 1.6;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

header {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.brand p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(224, 230, 237, 0.6);
}

.brand h1 {
    margin: 0;
    font-family: 'Electrolize', sans-serif;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: grid;
    place-items: center;
    font-weight: 700;
    font-family: 'Electrolize', sans-serif;
    color: var(--bg);
    font-size: 1.2rem;
    box-shadow: 0 8px 24px rgba(0, 229, 255, 0.25);
}

/* Nav Actions */
header nav {
    display: flex;
    gap: 1rem;
}

nav #intro {
    margin-top: 3rem;
    max-width: 800px;
}

#intro {
    font-weight: 300;
    font-size: 1.5rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.sous_titre_index {
    margin-top: 4rem;
    margin-bottom: 2rem;
    font-family: 'Electrolize', sans-serif;
    position: relative;
    padding-bottom: 1rem;
}

.sous_titre_index::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.btn {
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    transition: all 0.3s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: var(--bg);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    /* Override default hover bg */
}

/* Projects Grid */
.projets_recents,
#projets {
    margin-top: 2rem;
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.projet {
    background-color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.projet:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.miniature {
    width: 100%;
    height: 220px;
    background-color: #252830;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.miniature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.projet:hover .miniature img {
    transform: scale(1.05);
}

.titre_minia {
    font-weight: 700;
    font-size: 1.25rem;
    text-align: left;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    color: white;
}

.description {
    font-size: 0.95rem;
    text-align: left;
    padding: 0 1.5rem;
    margin-top: 0.5rem;
    font-weight: 400;
    color: rgba(224, 230, 237, 0.7);
    flex-grow: 1;
    /* Pushes tools down */
}

.outils_utilises {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.5rem;
    margin: 0;
}

.outil {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text);
    margin: 0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Skills Section */
.main_competences {
    margin-top: 2rem;
    margin-bottom: 4rem;
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.competences .competence {
    flex: 2;
    min-width: 300px;
    background-color: var(--muted);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.competences .outils {
    flex: 1;
    min-width: 200px;
    background-color: var(--muted);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skills-title,
.outils p {
    font-family: "Electrolize", sans-serif;
    color: white;
    font-size: 1.25rem;
    margin: 0 0 1.5rem;
}

.outils ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.outils li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1rem;
    color: rgba(224, 230, 237, 0.8);
}

.outils li:last-child {
    border-bottom: none;
}

/* Individual Skill Bars */
.skill {
    margin-bottom: 2rem;
}

.skill:last-child {
    margin-bottom: 0;
}

.skill .label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill .value {
    font-size: 0.9rem;
    color: rgba(224, 230, 237, 0.6);
    font-family: 'Electrolize', sans-serif;
}

.skill .track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.skill .fill {
    height: 100%;
    width: 0;
    /* JS handles width */
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 6px;
    box-shadow: 0 0 12px 2px rgba(0, 229, 255, 0.4);
    /* Neon effect */
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Footer & CV */
.cv_right {
    margin: 4rem 0;
    display: flex;
    justify-content: center;
}

#telecharger a {
    padding: 1rem 2rem;
    font-size: 1rem;
}

footer {
    color: rgba(224, 230, 237, 0.5);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    header nav {
        width: 100%;
        justify-content: space-between;
    }

    .brand {
        width: 100%;
    }

    .brand h1 {
        font-size: 1.1rem;
    }

    #intro {
        font-size: 1.2rem;
    }

    .main_competences {
        flex-direction: column;
    }

    .cv_right {
        width: 100%;
    }

    #telecharger a {
        width: 100%;
        text-align: center;
        display: block;
        box-sizing: border-box;
    }
}