:root {
    --bg: #0a0e14;
    --bg2: #0f1420;
    --ink: #eef2f7;
    --muted: #8b96a5;
    --accent: #6d8cff;
    --accent2: #7ef0c0;
    --border: rgba(255,255,255,.08);
    --card: rgba(255,255,255,.035);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
.scroll-bar {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    z-index: 30; transition: width .1s linear;
}
body {
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ─── Intro splash (motion-design, joué une fois au chargement) ─── */
.intro-splash {
    position: fixed; inset: 0; z-index: 100;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
    background: var(--bg);
    animation: introHold 1.55s linear forwards, introOut .55s ease-in 1.55s forwards;
}
.intro-splash.gone { display: none; }
@keyframes introHold { to { opacity: 1; } }
@keyframes introOut { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06); } }

.intro-ring { position: absolute; transform: rotate(-90deg); }
.intro-ring-track, .intro-ring-draw {
    fill: none; stroke-width: 2.5;
}
.intro-ring-track { stroke: rgba(255,255,255,.08); }
.intro-ring-draw {
    stroke: var(--accent);
    stroke-dasharray: 540;
    stroke-dashoffset: 540;
    stroke-linecap: round;
    animation: introRing 1.1s cubic-bezier(.3,.8,.3,1) .15s forwards;
}
@keyframes introRing { to { stroke-dashoffset: 0; } }

.intro-wordmark {
    position: relative; z-index: 1;
    display: flex; align-items: baseline;
    font-weight: 800; font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.02em;
    opacity: 0;
    animation: introZoomIn .5s cubic-bezier(.2,.7,.2,1) .95s forwards;
}
@keyframes introZoomIn { 0% { opacity: 0; transform: scale(1.5); filter: blur(8px); } 100% { opacity: 1; transform: scale(1); filter: blur(0); } }
.intro-letters span {
    display: inline-block;
    opacity: 0; transform: translateY(14px);
    animation: introLetter .4s ease-out forwards;
    animation-delay: calc(1.05s + (var(--i) * 0.045s));
}
@keyframes introLetter { to { opacity: 1; transform: translateY(0); } }
.intro-tld {
    color: var(--accent2);
    opacity: 0; transform: translateY(14px);
    animation: introLetter .4s ease-out 1.38s forwards;
}

@media (prefers-reduced-motion: reduce) {
    .intro-splash { display: none; }
}

/* ─── Header ─── */
.hdr {
    position: fixed; top: 0; left: 0; right: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px clamp(20px, 6vw, 64px);
    backdrop-filter: blur(10px);
    background: linear-gradient(to bottom, rgba(10,14,20,.7), transparent);
}
.hdr-logo { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.hdr-logo .dot { color: var(--accent); }
.hdr-nav { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.hdr-nav a:hover { color: var(--ink); }

/* ─── Hero ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 0 20px;
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .45;
    will-change: transform;
}
.blob-1 { width: 420px; height: 420px; left: 8%; top: 12%; background: radial-gradient(circle, var(--accent), transparent 70%); animation: drift1 11s ease-in-out infinite; }
.blob-2 { width: 380px; height: 380px; right: 6%; top: 36%; background: radial-gradient(circle, var(--accent2), transparent 70%); animation: drift2 13s ease-in-out infinite; }
.blob-3 { width: 320px; height: 320px; left: 38%; bottom: 4%; background: radial-gradient(circle, #a78bfa, transparent 70%); animation: drift3 15s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(120px,80px) scale(1.25); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-110px,70px) scale(.8); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(90px,-100px) scale(1.15); } }

.hero h1 .accent {
    background-size: 200% auto;
    animation: gradientShift 4s ease-in-out infinite;
}
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hero-content { position: relative; z-index: 1; max-width: 760px; text-align: center; }
.eyebrow {
    font-size: 13px; text-transform: uppercase; letter-spacing: .14em;
    color: var(--accent2); font-weight: 700; margin: 0 0 18px;
}
.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800; letter-spacing: -.03em; line-height: 1.08;
    margin: 0 0 20px;
}
.hero h1 .accent {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted); max-width: 560px; margin: 0 auto 34px; }
.hero-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 999px;
    border: 1px solid var(--border);
    font-weight: 600; font-size: 15px;
    transition: background .2s, border-color .2s, transform .2s;
}
.hero-cta:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.2); transform: translateY(-2px); }
.hero-cta .arrow { transition: transform .2s; }
.hero-cta:hover .arrow { transform: translateY(3px); }

/* ─── Reveal (JS ajoute .in) ─── */
.reveal { opacity: 0; transform: translateY(34px) scale(.96); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0) scale(1); }
.reveal[data-d="0"] { transition-delay: .05s; }
.reveal[data-d="1"] { transition-delay: .18s; }
.reveal[data-d="2"] { transition-delay: .31s; }
.reveal[data-d="3"] { transition-delay: .44s; }

/* ─── About ─── */
.about {
    max-width: 680px; margin: 0 auto; padding: 60px 24px 20px;
    text-align: center; color: var(--muted); font-size: 1.05rem;
}
.about strong { color: var(--ink); }
.skill-pills {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    margin-top: 26px;
}
.skill-pills span {
    font-size: .8rem; font-weight: 600;
    padding: 7px 16px; border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--ink);
    background: rgba(255,255,255,.03);
}

/* ─── Projects ─── */
.projects { padding: 80px clamp(20px, 6vw, 64px) 100px; max-width: 1180px; margin: 0 auto; }
.section-ttl {
    font-size: 13px; text-transform: uppercase; letter-spacing: .14em;
    color: var(--muted); text-align: center; margin: 0 0 40px; font-weight: 700;
}
.project-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 920px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .project-grid { grid-template-columns: 1fr; } }
.project-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px 22px;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.project-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(109,140,255,.4);
    background: rgba(109,140,255,.06);
}
.project-tag {
    display: inline-block; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--accent2); margin-bottom: 14px;
}
.project-name { font-size: 1.2rem; font-weight: 700; margin: 0 0 10px; letter-spacing: -.01em; }
.project-desc { font-size: .92rem; color: var(--muted); line-height: 1.5; margin: 0 0 18px; }
.project-link { font-size: .85rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.project-card:hover .project-link .arrow { transform: translateX(3px); }
.project-link .arrow { transition: transform .2s; display: inline-block; }

/* ─── Footer / contact ─── */
.ftr {
    text-align: center; padding: 60px 24px 40px;
    border-top: 1px solid var(--border);
}
.ftr-line { color: var(--muted); margin: 0 0 10px; font-size: .95rem; }
.ftr-mail { font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.ftr-mail:hover { color: var(--accent); }
.ftr-copy { color: var(--muted); font-size: .8rem; margin: 30px 0 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .blob, .hero h1 .accent { animation: none !important; }
    .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
    .scroll-bar { display: none; }
}
