﻿:root {
    --bg: #f3efff;
    --surface: #ffffff;
    --surface-soft: #faf7ff;
    --text: #24173a;
    --muted: #5f5576;
    --line: #dfd3f3;
    --accent: #6f38b1;
    --accent-2: #9a6be0;
    --shadow: 0 12px 28px rgba(59, 29, 96, 0.12);
    --radius: 14px;
    --max-width: 1120px;
    --transition: 240ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: clamp(0.98rem, 0.2vw + 0.94rem, 1.04rem);
    color: var(--text);
    line-height: 1.62;
    background:
        radial-gradient(circle at 12% 10%, rgba(154, 107, 224, 0.17), transparent 40%),
        radial-gradient(circle at 85% 0%, rgba(111, 56, 177, 0.12), transparent 35%),
        linear-gradient(160deg, #f8f4ff 0%, var(--bg) 55%, #efe7fb 100%);
}

.skip-link {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 0.6rem 0.85rem;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    z-index: 1000;
    text-decoration: none;
}

main {
    max-width: var(--max-width);
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 1.2rem 0.9rem 2rem;
    display: grid;
    align-items: start;
    gap: 1rem;
}

section,
header {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.15rem;
    width: 100%;
}

h1,
h2,
h3 {
    margin-top: 0;
    line-height: 1.25;
}

h1 {
    margin-bottom: 0.4rem;
    font-size: clamp(2rem, 6vw, 3rem);
    letter-spacing: 0.03em;
    color: #35145c;
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    color: #4b2280;
    margin-bottom: 0.8rem;
    position: relative;
    padding-bottom: 0.35rem;
    text-align: center;
    text-wrap: balance;
}

h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 54px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: translateX(-50%);
}

header {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-top: 1.25rem;
    background:
        linear-gradient(130deg, rgba(255, 255, 255, 0.96), rgba(247, 238, 255, 0.98)),
        var(--surface);
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, rgba(111, 56, 177, 0.08), transparent 42%);
}

.hero-role,
.hero-intro,
.hero-badges,
.contacts {
    position: relative;
    z-index: 1;
}

.hero-role {
    margin: 0 0 0.55rem;
    font-weight: 700;
    color: #4f2786;
    text-wrap: balance;
}

.hero-intro {
    margin: 0 0 0.85rem;
    color: var(--muted);
    max-width: 78ch;
    margin-inline: auto;
    text-wrap: pretty;
}

@media (min-width: 741px) {
    header > h1,
    header > .hero-role,
    header > .hero-intro,
    header > .hero-badges {
        max-width: min(100%, 760px);
        margin-left: auto;
        margin-right: auto;
    }
}

section > p {
    max-width: 74ch;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    text-wrap: pretty;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 0 0.95rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid #d4c2f0;
    background: var(--surface-soft);
    color: #4b2280;
    border-radius: 999px;
    padding: 0.36rem 0.72rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.contacts {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    width: auto;
    max-width: min(100%, 300px);
    text-align: right;
    justify-items: end;
}

.contacts li {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.48rem;
    flex-wrap: wrap;
}

.contacts i {
    color: var(--accent);
}

.contacts a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted #8f74bb;
}

.contacts a:hover,
.contacts a:focus-visible {
    border-bottom-style: solid;
    outline: none;
}

.spotlight-grid,
.tag-grid {
    display: grid;
    gap: 0.8rem;
}

.spotlight-grid {
    grid-template-columns: 1fr;
}

.spotlight-card,
.skill-card {
    border: 1px solid #ddcff4;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f8f1ff);
    padding: 0.92rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.spotlight-card:hover,
.skill-card:hover {
    transform: translateY(-3px);
    border-color: #b991eb;
    box-shadow: 0 10px 22px rgba(77, 38, 126, 0.16);
}

.spotlight-card h3,
.skill-card h3 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b2280;
}

.spotlight-card h3 i,
.skill-card h3 i {
    color: var(--accent);
}

.spotlight-card p,
.skill-card p {
    margin: 0;
    max-width: 64ch;
    margin-inline: auto;
}

.timeline {
    display: grid;
    gap: 0.75rem;
    max-width: 78ch;
    margin-inline: auto;
}

article {
    border-left: 4px solid var(--accent-2);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #f8f1ff);
    padding: 0.72rem 0.85rem;
}

article h3 {
    margin-bottom: 0.36rem;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

article p {
    margin: 0;
    color: var(--muted);
}

.experience-list {
    margin: 0.35rem 0 0;
    padding-left: 1rem;
}

.experience-list li {
    margin-bottom: 0.24rem;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 52px;
    border-radius: 999px;
    padding: 0.85rem 1rem;
    font-weight: 700;
    font-size: clamp(0.95rem, 0.45vw + 0.84rem, 1.04rem);
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition), color var(--transition);
}

.btn-primary {
    border: 1px solid transparent;
    color: #fff;
    background: linear-gradient(120deg, #6f38b1 0%, #9a6be0 60%, #b48cec 100%);
    box-shadow: 0 10px 20px rgba(72, 34, 122, 0.28);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(72, 34, 122, 0.34);
    outline: none;
}

.btn-secondary {
    color: #43206f;
    border: 1px solid #cdb6ec;
    background: rgba(255, 255, 255, 0.82);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    color: #fff;
    background: #4b2280;
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(72, 34, 122, 0.24);
    outline: none;
}

.bottom-actions.unified-hub {
    position: relative;
    overflow: hidden;
    text-align: center;
    border: 1px solid rgba(116, 72, 182, 0.35);
    background:
        radial-gradient(circle at 12% 24%, rgba(154, 107, 224, 0.2), transparent 42%),
        radial-gradient(circle at 88% 72%, rgba(111, 56, 177, 0.18), transparent 45%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(245, 235, 255, 0.94));
}

#contact.bottom-actions {
    text-align: center;
}

.bottom-actions.unified-hub::before {
    content: "";
    position: absolute;
    inset: -140% -40%;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.42) 50%, transparent 68%);
    transform: translateX(-35%);
    animation: sweepLight 9s linear infinite;
}

.bottom-actions-title,
.hub-caption,
.social-links,
.hub-divider,
.bottom-actions-row,
.hub-copy {
    position: relative;
    z-index: 1;
}

.bottom-actions-title {
    margin: 0 0 0.42rem;
    color: #4a237d;
    font-weight: 800;
    font-size: clamp(1.04rem, 0.9vw + 0.78rem, 1.28rem);
    width: 100%;
    text-align: center;
}

.hub-caption {
    margin: 0 0 0.9rem;
    color: #5f4a82;
    max-width: 56ch;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.62rem;
    margin-top: 0.15rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    text-decoration: none;
    color: #4c2181;
    border: 1px solid #ccb5ee;
    background: #fff;
    transition: transform var(--transition), background-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.social-links a:hover,
.social-links a:focus-visible {
    color: #fff;
    background: linear-gradient(120deg, #6f38b1 0%, #9a6be0 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(72, 34, 122, 0.22);
    outline: none;
}

.hub-divider {
    width: min(340px, 62%);
    height: 1px;
    margin: 0.95rem auto 1rem;
    background: linear-gradient(90deg, transparent, rgba(111, 56, 177, 0.45), transparent);
}

.bottom-actions-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.hub-copy {
    margin: 0.85rem 0 0;
    color: #5f4a82;
    font-size: 0.92rem;
    width: 100%;
    text-align: center;
}

#contact .bottom-actions-title,
#contact .hub-caption,
#contact .hub-copy {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 540ms ease, transform 540ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.bottom-actions.reveal.is-visible .btn {
    animation: riseIn 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bottom-actions.reveal.is-visible .btn:nth-child(2) {
    animation-delay: 130ms;
}

@keyframes sweepLight {
    0% {
        transform: translateX(-55%);
    }

    100% {
        transform: translateX(55%);
    }
}

@keyframes riseIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (min-width: 981px) {
    main {
        display: block;
        columns: 2;
        column-gap: 1rem;
        padding: 1.45rem 1rem 2.3rem;
    }

    main > header,
    main > section {
        break-inside: avoid;
        display: inline-block;
        width: 100%;
        margin: 0 0 1rem;
    }

    #accueil,
    #contact.bottom-actions {
        column-span: all;
        display: block;
        margin-bottom: 1rem;
    }

    #contact.bottom-actions {
        margin-bottom: 0;
    }

    .spotlight-grid {
        grid-template-columns: 1fr;
    }

    #competences .tag-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #competences .tag-grid .skill-card:last-child {
        grid-column: 1 / -1;
        max-width: 420px;
        justify-self: center;
        width: 100%;
    }

    #experiences .timeline article {
        max-width: 72ch;
        margin-inline: auto;
    }
}

@media (max-width: 980px) {
    main {
        grid-template-columns: 1fr;
    }

    .spotlight-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 740px) {
    section,
    header {
        padding: 1rem;
    }

    header {
        padding-right: 1rem;
        padding-top: 1.08rem;
    }

    main {
        padding: 0.9rem 0.65rem 1.35rem;
        gap: 0.8rem;
    }

    body {
        line-height: 1.56;
    }

    h1 {
        letter-spacing: 0.02em;
    }

    .bottom-actions-row {
        grid-template-columns: 1fr;
        gap: 0.62rem;
    }

    .social-links a {
        width: 100%;
    }

    .hero-badges {
        gap: 0.42rem;
    }

    .hero-badge {
        font-size: 0.85rem;
    }

    .contacts {
        position: static;
        width: fit-content;
        max-width: min(100%, 420px);
        margin: 0 auto;
        justify-items: center;
        text-align: center;
    }

    .contacts li {
        justify-content: center;
        text-align: center;
    }

    .timeline article,
    .experience-list {
        text-align: left;
    }

    .btn {
        min-height: 54px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.82rem 0.52rem 1.2rem;
    }

    section,
    header {
        padding: 0.92rem;
    }

    .hero-role {
        font-size: 0.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bottom-actions.unified-hub::before,
    .bottom-actions.reveal.is-visible .btn {
        animation: none;
    }

    .btn,
    .social-links a,
    .reveal,
    .spotlight-card,
    .skill-card {
        transition: none;
    }
}
