/* ===== Page CV ===== */

.cv {
    --cv-section-gap: clamp(48px, 6vw, 96px);
}

/* ===== En-tête ===== */

.cv-header {
    padding: 160px 0 40px;
}

.cv-name {
    font-size: var(--fs-h1);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.02;
    margin: 18px 0 0;
    text-wrap: balance;
}

.cv-tagline {
    font-size: clamp(18px, 2vw, 24px);
    color: var(--text-dim);
    margin: 14px 0 0;
    font-family: var(--font-serif);
    font-style: italic;
}

.cv-stack-line {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dimmer);
    margin-top: 10px;
}

.cv-contacts {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    font-size: 14px;
    color: var(--text-dim);
}

.cv-contacts a {
    color: inherit;
    transition: color 0.18s ease;
}

.cv-contacts a:hover {
    color: var(--text);
}

.cv-contacts a[href^="mailto"] {
    color: var(--accent);
}

/* ===== Sections génériques ===== */

.cv-accroche,
.cv-projects,
.cv-experiences,
.cv-skills,
.cv-educations {
    padding: 40px 0;
}

.cv-divers {
    padding: 40px 0 120px;
}

.cv-section-title {
    margin-top: 0;
}

/* ===== Accroche ===== */

.cv-accroche-text {
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.55;
    color: var(--text);
    margin-top: 18px;
    max-width: 780px;
}

.cv-accroche-text strong {
    font-weight: 500;
    color: var(--text);
    background: linear-gradient(180deg, transparent 65%, rgba(0, 113, 227, 0.18) 65%);
    padding: 0 2px;
}

/* ===== Projets IA — grid de cards cliquables ===== */

.cv-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.cv-project-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "title year"
        "subtitle subtitle"
        "more more";
    gap: 6px 16px;
    align-items: baseline;
    padding: clamp(20px, 2vw, 28px);
    text-align: left;
    background: var(--glass-bg);
    border: 0.5px solid var(--line);
    border-radius: 14px;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    font-family: inherit;
}

.cv-project-card:hover,
.cv-project-card:focus-visible {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    background: rgb(var(--tint) / 0.055);
    outline: none;
}

.cv-project-card:focus-visible {
    box-shadow: 0 0 0 2px var(--accent);
}

.cv-project-card-title {
    grid-area: title;
    font-size: clamp(17px, 1.4vw, 19px);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text);
    line-height: 1.25;
}

.cv-project-card-subtitle {
    grid-area: subtitle;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.4;
}

.cv-project-card-year {
    grid-area: year;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dimmer);
    white-space: nowrap;
}

.cv-project-card-more {
    grid-area: more;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 0.5px solid var(--line);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.cv-project-card-more-arrow {
    transition: transform 0.18s ease;
}

.cv-project-card:hover .cv-project-card-more-arrow,
.cv-project-card:focus-visible .cv-project-card-more-arrow {
    transform: translateX(4px);
}

/* ===== Modal projet ===== */

.cv-modal {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    max-width: min(640px, 92vw);
    width: 100%;
    overflow: visible;
}

.cv-modal-halo {
    position: absolute;
    top: -64px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 113, 227, 0.45), transparent 70%);
    filter: blur(48px);
    opacity: 0.55;
    pointer-events: none;
}

.cv-modal::backdrop {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cv-modal[open] {
    animation: cv-modal-in 0.22s ease;
}

@keyframes cv-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cv-modal-content {
    position: relative;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 0.5px solid rgba(0, 113, 227, 0.25);
    border-radius: 18px;
    box-shadow:
        inset 0 1px rgb(var(--tint) / 0.09),
        0 0 60px rgba(0, 113, 227, 0.10),
        0 24px 64px rgba(0, 0, 0, 0.55);
    padding: clamp(24px, 3.5vw, 40px);
    max-height: 90vh;
    overflow-y: auto;
}

.cv-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 0.5px solid var(--line);
    color: var(--text-dim);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.cv-modal-close:hover {
    background: rgb(var(--tint) / 0.08);
    color: var(--text);
    border-color: var(--line-strong);
}

.cv-modal-header h3 {
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0;
    padding-right: 48px;
}

.cv-modal-subtitle {
    margin: 8px 0 0;
    color: var(--text-dim);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 16px;
}

.cv-modal-year {
    margin: 12px 0 0;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dimmer);
}

.cv-modal-description {
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.6;
    margin: 24px 0 0;
}

.cv-modal-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
}

.cv-modal-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding: 12px 22px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cv-modal-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.32);
}

/* ===== Expériences (timeline) ===== */

.cv-timeline {
    display: grid;
    gap: 32px;
    margin-top: 32px;
    position: relative;
}

.cv-experience {
    border-left: 2px solid var(--line);
    padding-left: clamp(16px, 2vw, 28px);
    position: relative;
    transition: border-color 0.25s ease;
}

.cv-experience::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--black-1);
    border: 2px solid var(--line-strong);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.cv-experience:hover {
    border-left-color: var(--accent);
}

.cv-experience:hover::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 113, 227, 0.55);
}

.cv-experience h3 {
    font-size: clamp(18px, 1.8vw, 22px);
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 0;
}

.cv-experience-meta {
    margin: 6px 0 0;
    color: var(--text-dim);
    font-size: 15px;
}

.cv-experience-meta strong {
    color: var(--text);
    font-weight: 500;
}

.cv-experience-dates {
    margin: 4px 0 0;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dimmer);
}

.cv-experience-description {
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.6;
    margin-top: 14px;
}

.cv-experience-description ul {
    padding-left: 18px;
    margin: 0;
}

.cv-experience-description li {
    margin: 4px 0;
}

.cv-experience-stack {
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dimmer);
    font-style: italic;
}

/* ===== Compétences ===== */

.cv-skills-groups {
    display: grid;
    gap: 32px;
    margin-top: 32px;
}

.cv-skill-group h3 {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.cv-skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cv-skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cv-skill-level {
    color: var(--accent);
    letter-spacing: 1px;
    font-size: 11px;
}

.cv-skill-level-dim {
    color: var(--text-dimmer);
}

/* ===== Formations ===== */

.cv-educations-list {
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
    display: grid;
    gap: 14px;
}

.cv-education-item {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.cv-education-item:last-child {
    border-bottom: 0;
}

.cv-education-degree {
    font-size: 15px;
    font-weight: 500;
}

.cv-education-school {
    color: var(--text-dim);
    font-size: 14px;
}

.cv-education-year {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dimmer);
}

/* ===== Divers ===== */

.cv-divers-text {
    margin-top: 18px;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.6;
}

/* ===== Responsive — 320px+ ===== */

@media (max-width: 640px) {
    .cv-header {
        padding-top: 120px;
    }

    .cv-contacts {
        gap: 8px 16px;
        font-size: 13px;
    }

    .cv-projects-grid {
        grid-template-columns: 1fr;
    }

    .cv-project-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "subtitle"
            "year"
            "more";
        gap: 8px;
    }

    .cv-project-card-year {
        justify-self: start;
    }

    .cv-modal-content {
        border-radius: 14px;
        padding: 24px;
    }

    .cv-experience h3 {
        font-size: 17px;
    }

    .cv-education-item {
        flex-direction: column;
        gap: 4px;
        padding: 12px 0;
    }

    .cv-education-year {
        margin-left: 0;
    }
}

@media (max-width: 380px) {
    .cv-name {
        font-size: 40px;
    }

    .cv-contacts {
        gap: 6px 12px;
        font-size: 12px;
    }

    .cv-tagline {
        font-size: 16px;
    }
}
