/* =========================================================
   Portfolio — Titouan San Jose
   Design system : "Network Ops" — sombre / clair
   ========================================================= */

:root {
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

    --accent: #3b82f6;
    --accent-2: #22d3ee;
    --grad: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
    --ok: #22c55e;
    --warn: #f59e0b;
    --danger: #f97316;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --pill: 999px;

    --ease: cubic-bezier(.16, 1, .3, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    --maxw: 1160px;
    --nav-h: 72px;
}

[data-theme="dark"] {
    --bg: #060b16;
    --bg-2: #0a1222;
    --surface: rgba(14, 23, 41, .72);
    --surface-solid: #0e1729;
    --surface-2: rgba(22, 34, 58, .6);
    --border: rgba(148, 163, 184, .13);
    --border-strong: rgba(148, 163, 184, .26);
    --text: #c9d4e5;
    --muted: #8d9bb3;
    --faint: #56647c;
    --heading: #f6f9fd;
    --accent-soft: rgba(59, 130, 246, .14);
    --accent-text: #7cb2ff;
    --glow: rgba(59, 130, 246, .22);
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, .75);
    --nav-bg: rgba(6, 11, 22, .72);
    --grid-line: rgba(148, 163, 184, .055);
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #f5f7fb;
    --bg-2: #edf1f8;
    --surface: rgba(255, 255, 255, .86);
    --surface-solid: #ffffff;
    --surface-2: rgba(241, 245, 251, .9);
    --border: rgba(15, 23, 42, .09);
    --border-strong: rgba(15, 23, 42, .18);
    --text: #3b4659;
    --muted: #64748b;
    --faint: #9aa6b8;
    --heading: #0b1324;
    --accent-soft: rgba(59, 130, 246, .1);
    --accent-text: #2563eb;
    --glow: rgba(59, 130, 246, .16);
    --shadow: 0 24px 50px -28px rgba(15, 23, 42, .28);
    --nav-bg: rgba(245, 247, 251, .8);
    --grid-line: rgba(15, 23, 42, .045);
    color-scheme: light;
}

/* ── Reset ─────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .4s ease, color .4s ease;
}
body::before {               /* trame "grille réseau" */
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
    pointer-events: none;
    z-index: -1;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
strong { color: var(--heading); font-weight: 700; }
code {
    font-family: var(--mono);
    font-size: .85em;
    background: var(--accent-soft);
    color: var(--accent-text);
    padding: 2px 7px;
    border-radius: 6px;
}
::selection { background: rgba(59, 130, 246, .35); color: var(--heading); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Scroll progress ───────────────────── */
.scroll-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 1100;
    box-shadow: 0 0 12px rgba(34, 211, 238, .6);
}

/* ── Reveal ────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; } .d3 { transition-delay: .24s; } .d4 { transition-delay: .32s; }

/* ── Buttons ───────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .92rem;
    white-space: nowrap;
    transition: transform .25s var(--spring), box-shadow .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(59, 130, 246, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -10px rgba(34, 211, 238, .7), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-ghost {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--heading);
    backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: .84rem; border-radius: 10px; }

.icon-btn {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--heading);
    transition: border-color .2s ease, transform .25s var(--spring), color .2s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent-text); transform: rotate(-8deg); }
.icon-btn svg { width: 18px; height: 18px; }
[data-theme="dark"] .icon-sun, [data-theme="light"] .icon-moon { display: none; }

/* ── Navbar ────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    transition: background .35s ease, border-color .35s ease, height .35s ease;
    border-bottom: 1px solid transparent;
}
.nav.is-scrolled, .nav.is-open {
    background: var(--nav-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom-color: var(--border);
}
.nav-inner {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--heading); }
.logo-mark {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: var(--grad);
    color: #fff;
    font-size: .9rem;
    letter-spacing: -.5px;
    box-shadow: 0 8px 22px -8px rgba(59, 130, 246, .8);
}
.logo-text { font-size: .98rem; letter-spacing: -.2px; }
.logo-text span { color: var(--accent-text); }

.nav-menu {
    display: flex;
    gap: 2px;
    padding: 5px;
    border-radius: var(--pill);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}
.nav-menu a {
    display: block;
    padding: 8px 16px;
    border-radius: var(--pill);
    font-size: .86rem;
    font-weight: 600;
    color: var(--muted);
    transition: color .2s ease, background .25s ease;
}
.nav-menu a:hover { color: var(--heading); }
.nav-menu a.is-active { color: var(--heading); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .3); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-burger { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nav-burger span { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s ease; }
.nav.is-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Hero ──────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 56px) 0 72px;
    overflow: hidden;
}
#net { position: absolute; inset: 0; z-index: 0; }
.hero-glow {
    position: absolute;
    width: 760px; height: 760px;
    top: -260px; right: -200px;
    background: radial-gradient(circle, rgba(59, 130, 246, .28), transparent 62%);
    filter: blur(20px);
    pointer-events: none;
    animation: drift 14s ease-in-out infinite alternate;
}
.hero-glow.alt {
    width: 520px; height: 520px;
    top: auto; right: auto;
    bottom: -220px; left: -160px;
    background: radial-gradient(circle, rgba(34, 211, 238, .18), transparent 62%);
    animation-duration: 18s;
}
@keyframes drift { to { transform: translate(-40px, 30px) scale(1.08); } }

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 56px;
    align-items: center;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px 7px 12px;
    border-radius: var(--pill);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    font-size: .8rem;
    font-weight: 600;
    color: var(--heading);
    backdrop-filter: blur(10px);
    margin-bottom: 26px;
    animation: rise .8s var(--ease) both;
}
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.pulse-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

.hero h1 {
    font-size: clamp(2.8rem, 6.4vw, 4.8rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -2.5px;
    color: var(--heading);
    margin-bottom: 20px;
    animation: rise .8s .08s var(--ease) both;
}
.hero-role {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 20px;
    min-height: 1.6em;
    animation: rise .8s .16s var(--ease) both;
}
.hero-role .typed { color: var(--accent-text); font-family: var(--mono); font-weight: 500; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--accent-2); margin-left: 3px; vertical-align: -3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc { max-width: 540px; color: var(--muted); font-size: 1.05rem; margin-bottom: 34px; animation: rise .8s .24s var(--ease) both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; animation: rise .8s .32s var(--ease) both; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .86rem; color: var(--muted); animation: rise .8s .4s var(--ease) both; }
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--accent-text); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Terminal */
.terminal {
    position: relative;
    border-radius: var(--radius-lg);
    background: rgba(7, 12, 24, .88);
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(59, 130, 246, .08), 0 0 60px -20px rgba(59, 130, 246, .45);
    overflow: hidden;
    backdrop-filter: blur(14px);
    animation: rise 1s .3s var(--ease) both, float 7s 1.3s ease-in-out infinite;
    color: #c9d4e5;
}
@keyframes float { 50% { transform: translateY(-10px); } }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid rgba(148, 163, 184, .12); background: rgba(255, 255, 255, .02); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.term-bar i:nth-child(2) { background: #f59e0b; }
.term-bar i:nth-child(3) { background: #22c55e; }
.term-bar span { margin-left: 10px; font-family: var(--mono); font-size: .76rem; color: #6b7a93; }
.term-body { padding: 20px 22px 24px; font-family: var(--mono); font-size: .82rem; line-height: 1.75; min-height: 330px; }
.t-line { opacity: 0; transform: translateY(4px); transition: opacity .3s ease, transform .3s ease; }
.t-line.is-shown { opacity: 1; transform: none; }
.t-prompt { color: #22d3ee; }
.t-prompt b { color: #7cb2ff; font-weight: 500; }
.t-out { color: #93a1b8; padding-left: 2px; }
.t-out .k { color: #e6edf7; }
.t-out .g { color: #4ade80; }
.t-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.t-chips span { padding: 1px 8px; border-radius: 5px; background: rgba(59, 130, 246, .14); color: #a5c8ff; font-size: .74rem; }
.t-caret { display: inline-block; width: 8px; height: 15px; background: #22d3ee; vertical-align: -2px; animation: blink 1s steps(1) infinite; }

.scroll-hint {
    position: absolute;
    left: 50%; bottom: 26px;
    transform: translateX(-50%);
    z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: .7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--faint);
}
.scroll-hint span { width: 22px; height: 36px; border: 2px solid var(--border-strong); border-radius: 12px; position: relative; }
.scroll-hint span::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent-2); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ── Stats ─────────────────────────────── */
.stats { position: relative; z-index: 2; margin-top: -10px; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: blur(14px);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.stat { padding: 28px 26px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat-num { font-size: 2.3rem; font-weight: 800; letter-spacing: -1.5px; color: var(--heading); line-height: 1; }
.stat-num sup { font-size: 1rem; color: var(--accent-text); margin-left: 2px; vertical-align: top; }
.stat-label { margin-top: 8px; font-size: .86rem; color: var(--muted); }

/* ── Sections ──────────────────────────── */
.section { padding: 120px 0; position: relative; }
.section-head { margin-bottom: 56px; max-width: 640px; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: .78rem;
    font-weight: 500;
    color: var(--accent-text);
    margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--grad); }
.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -1.2px; line-height: 1.12; color: var(--heading); }
.section-sub { margin-top: 14px; color: var(--muted); font-size: 1.04rem; }

.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    transition: transform .35s var(--ease), border-color .3s ease, box-shadow .35s ease;
    isolation: isolate;
}
.spot::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--mx, -500px) var(--my, -500px), var(--glow), transparent 45%);
    opacity: 0;
    transition: opacity .3s ease;
    z-index: -1;
    pointer-events: none;
}
.spot:hover::before { opacity: 1; }

/* ── About ─────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: stretch; }
.about-text { padding: 40px; }
.about-text p { font-size: 1.04rem; margin-bottom: 18px; }
.about-text p:last-child { margin-bottom: 0; }
.about-side { display: grid; gap: 20px; }
.status-card {
    padding: 32px;
    background: linear-gradient(150deg, #0d1d3d 0%, #0a1428 100%);
    border-color: rgba(59, 130, 246, .3);
    color: #c9d4e5;
    overflow: hidden;
}
.status-card::after { content: ''; position: absolute; width: 240px; height: 240px; top: -90px; right: -90px; background: radial-gradient(circle, rgba(34, 211, 238, .3), transparent 65%); pointer-events: none; }
.status-card h3 { font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: #7cb2ff; margin-bottom: 12px; }
.status-card p { font-size: 1.14rem; font-weight: 700; color: #f6f9fd; line-height: 1.4; margin-bottom: 18px; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--pill); background: rgba(34, 197, 94, .14); border: 1px solid rgba(34, 197, 94, .35); color: #86efac; font-size: .8rem; font-weight: 700; }
.edu { padding: 26px 28px; }
.edu-item { display: flex; gap: 14px; padding: 12px 0; }
.edu-item + .edu-item { border-top: 1px dashed var(--border-strong); }
.edu-ico { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.edu-ico svg { width: 18px; height: 18px; }
.edu-item h4 { font-size: .94rem; color: var(--heading); line-height: 1.35; }
.edu-item p { font-size: .84rem; color: var(--muted); }

/* ── Skills ────────────────────────────── */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skill-card { padding: 30px 26px; }
.skill-card:hover { transform: translateY(-6px); border-color: rgba(59, 130, 246, .4); box-shadow: var(--shadow); }
.skill-ico {
    width: 50px; height: 50px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    border: 1px solid rgba(59, 130, 246, .25);
    color: var(--accent-text);
    margin-bottom: 22px;
    transition: transform .4s var(--spring);
}
.skill-ico svg { width: 24px; height: 24px; }
.skill-card:hover .skill-ico { transform: scale(1.08) rotate(-6deg); }
.skill-card h3 { font-size: 1.04rem; color: var(--heading); margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
    padding: 5px 11px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
}

/* ── Timeline ──────────────────────────── */
.timeline { position: relative; max-width: 880px; }
.timeline::before { content: ''; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(to bottom, var(--accent), var(--accent-2) 60%, transparent); opacity: .6; }
.tl-item { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 26px; margin-bottom: 22px; }
.tl-dot { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-solid); border: 1px solid var(--border-strong); color: var(--accent-text); font-family: var(--mono); font-size: .72rem; font-weight: 700; transition: background .3s ease, color .3s ease, border-color .3s ease; }
.tl-item:hover .tl-dot { background: var(--grad); color: #fff; border-color: transparent; }
.tl-card { padding: 24px 28px; }
.tl-item:hover .tl-card { border-color: rgba(59, 130, 246, .38); transform: translateX(6px); }
.tl-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.tl-card h3 { font-size: 1.08rem; color: var(--heading); }
.tl-date { font-family: var(--mono); font-size: .76rem; color: var(--accent-text); padding: 3px 10px; border-radius: 7px; background: var(--accent-soft); }
.tl-company { font-size: .9rem; font-weight: 700; color: var(--accent-2); margin-bottom: 8px; }
[data-theme="light"] .tl-company { color: #0891b2; }
.tl-card p { font-size: .93rem; color: var(--muted); }

/* ── Projects ──────────────────────────── */
.projects-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
    padding: 8px 16px;
    border-radius: var(--pill);
    font-size: .84rem;
    font-weight: 600;
    color: var(--muted);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all .25s ease;
}
.filter-btn:hover { color: var(--heading); border-color: var(--border-strong); }
.filter-btn.is-active { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 8px 22px -10px rgba(59, 130, 246, .8); }
.filter-meta { font-family: var(--mono); font-size: .8rem; color: var(--faint); }
.filter-meta b { color: var(--accent-text); font-weight: 600; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card { display: flex; flex-direction: column; padding: 28px; min-height: 100%; }
.project-card.is-hidden { display: none; }
.project-card:hover { transform: translateY(-8px); border-color: rgba(59, 130, 246, .45); box-shadow: var(--shadow); }
.project-card.featured { grid-column: span 2; }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.pc-num { font-family: var(--mono); font-size: .8rem; color: var(--faint); }
.pc-num b { font-size: 1.6rem; font-weight: 700; color: var(--heading); letter-spacing: -1px; margin-right: 4px; }
.pc-status { display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 700; padding: 4px 11px; border-radius: var(--pill); }
.pc-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pc-status.done { color: #4ade80; background: rgba(34, 197, 94, .12); }
.pc-status.wip { color: #fbbf24; background: rgba(245, 158, 11, .12); }
[data-theme="light"] .pc-status.done { color: #16a34a; }
[data-theme="light"] .pc-status.wip { color: #b45309; }
.pc-cat { font-family: var(--mono); font-size: .74rem; color: var(--accent-text); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.project-card h3 { font-size: 1.22rem; color: var(--heading); line-height: 1.3; letter-spacing: -.3px; margin-bottom: 16px; }
.pc-ps { display: grid; gap: 12px; margin-bottom: 20px; flex: 1; align-content: start; }
.pc-ps div { font-size: .9rem; color: var(--muted); padding-left: 14px; border-left: 2px solid var(--border-strong); }
.pc-ps div:last-child { border-left-color: var(--accent); }
.pc-ps span { display: block; font-size: .7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--heading); margin-bottom: 2px; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; border-top: 1px solid var(--border); }
.pc-foot .chips { gap: 6px; }
.pc-foot .chip { font-size: .72rem; padding: 3px 9px; }
.pc-arrow { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border-strong); color: var(--heading); transition: all .3s var(--spring); }
.pc-arrow svg { width: 17px; height: 17px; transition: transform .3s var(--spring); }
.project-card:hover .pc-arrow { background: var(--grad); color: #fff; border-color: transparent; }
.project-card:hover .pc-arrow svg { transform: rotate(-45deg); }
.stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

/* ── Contact ───────────────────────────── */
.contact-wrap { padding: 64px 56px; overflow: hidden; text-align: center; }
.contact-wrap::after { content: ''; position: absolute; width: 520px; height: 520px; left: 50%; top: -300px; transform: translateX(-50%); background: radial-gradient(circle, rgba(59, 130, 246, .25), transparent 65%); pointer-events: none; z-index: -1; }
.contact-wrap .section-title { max-width: 680px; margin: 0 auto 14px; }
.contact-wrap .section-sub { max-width: 520px; margin: 0 auto 40px; }
.contact-wrap .eyebrow { justify-content: center; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 860px; margin: 0 auto; text-align: left; }
.contact-item { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); transition: border-color .25s ease, transform .3s var(--spring); }
.contact-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.ci-ico { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.ci-ico svg { width: 20px; height: 20px; }
.ci-text { min-width: 0; }
.ci-text small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.ci-text span { display: block; font-size: .9rem; font-weight: 600; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { position: relative; z-index: 2; margin-left: auto; width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); color: var(--muted); transition: all .2s ease; }
.copy-btn:hover { color: var(--accent-text); border-color: var(--accent); }
.copy-btn svg { width: 15px; height: 15px; }

/* ── Footer ────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; font-size: .86rem; color: var(--muted); }
.footer-inner .mono { font-size: .78rem; color: var(--faint); }

.to-top {
    position: fixed;
    right: 24px; bottom: 24px;
    z-index: 900;
    width: 46px; height: 46px;
    border-radius: 14px;
    display: grid; place-items: center;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 12px 28px -10px rgba(59, 130, 246, .8);
    opacity: 0;
    transform: translateY(16px) scale(.9);
    pointer-events: none;
    transition: opacity .3s ease, transform .35s var(--spring);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 18px; height: 18px; }

.toast {
    position: fixed;
    left: 50%; bottom: 28px;
    z-index: 1200;
    transform: translate(-50%, 20px);
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    color: var(--heading);
    font-size: .88rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 10px;
    opacity: 0;
    transition: opacity .3s ease, transform .4s var(--spring);
    pointer-events: none;
}
.toast::before { content: '✓'; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(34, 197, 94, .18); color: var(--ok); font-size: .75rem; }
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   Pages projet
   ========================================================= */
.doc-hero { position: relative; padding: calc(var(--nav-h) + 64px) 0 64px; overflow: hidden; border-bottom: 1px solid var(--border); }
.doc-hero .hero-glow { top: -340px; right: -180px; }
.doc-hero .container { position: relative; z-index: 1; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .84rem; color: var(--faint); margin-bottom: 30px; animation: rise .7s var(--ease) both; }
.crumbs a { color: var(--muted); transition: color .2s ease; }
.crumbs a:hover { color: var(--accent-text); }
.crumbs .cur { color: var(--heading); font-weight: 600; }
.doc-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-family: var(--mono); font-size: .82rem; color: var(--accent-text); animation: rise .7s .05s var(--ease) both; }
.doc-index { font-size: .78rem; padding: 4px 10px; border-radius: 8px; background: var(--grad); color: #fff; font-weight: 700; }
.doc-hero h1 { max-width: 820px; font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; color: var(--heading); margin-bottom: 20px; animation: rise .7s .1s var(--ease) both; }
.doc-hero .lead { max-width: 700px; font-size: 1.08rem; color: var(--muted); margin-bottom: 28px; animation: rise .7s .15s var(--ease) both; }
.doc-hero .chips { animation: rise .7s .2s var(--ease) both; }
.doc-hero .chip { font-size: .8rem; padding: 6px 13px; background: var(--surface); }

.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 56px; padding-top: 56px; padding-bottom: 40px; align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 28px); }
.toc-title { font-family: var(--mono); font-size: .74rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.toc-list { border-left: 1px solid var(--border); counter-reset: toc; }
.toc-list a { position: relative; display: block; padding: 7px 0 7px 18px; font-size: .86rem; color: var(--muted); line-height: 1.4; transition: color .2s ease; counter-increment: toc; }
.toc-list a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: .7rem; color: var(--faint); margin-right: 8px; }
.toc-list a::after { content: ''; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 2px; background: var(--grad); transform: scaleY(0); transition: transform .3s var(--ease); }
.toc-list a:hover { color: var(--heading); }
.toc-list a.is-active { color: var(--heading); font-weight: 600; }
.toc-list a.is-active::after { transform: scaleY(1); }
.toc-progress { margin-top: 22px; height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; }
.toc-progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .15s linear; }

.doc-content { min-width: 0; display: grid; gap: 24px; }
.doc-section { padding: 36px 38px; }
.doc-section h2 { display: flex; align-items: center; gap: 14px; font-size: 1.32rem; letter-spacing: -.4px; color: var(--heading); margin-bottom: 18px; }
.doc-section h2 .num { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; font-family: var(--mono); font-size: .78rem; background: var(--accent-soft); color: var(--accent-text); border: 1px solid rgba(59, 130, 246, .3); }
.doc-section h3 { font-size: 1rem; color: var(--heading); margin: 22px 0 10px; }
.doc-section > p, .doc-section .prose p { color: var(--text); margin-bottom: 12px; }
.doc-section .prose p:last-child { margin-bottom: 0; }

.check-list { display: grid; gap: 12px; margin: 16px 0 4px; }
.check-list li { position: relative; padding: 14px 18px 14px 50px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .94rem; transition: border-color .2s ease; }
.check-list li:hover { border-color: rgba(59, 130, 246, .35); }
.check-list li::before { content: ''; position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237cb2ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; }
.check-list li strong { display: block; margin-bottom: 2px; }

.issue { margin: 22px 0 6px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.issue-row { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 18px 20px; font-size: .93rem; }
.issue-row + .issue-row { border-top: 1px solid var(--border); }
.issue-label { display: inline-flex; align-items: center; gap: 8px; align-self: start; font-size: .72rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.issue-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.issue-problem { background: rgba(249, 115, 22, .07); }
.issue-problem .issue-label { color: var(--danger); }
.issue-fix { background: rgba(34, 197, 94, .06); }
.issue-fix .issue-label { color: var(--ok); }
.issue-title { padding: 12px 20px; font-size: .82rem; font-weight: 700; color: var(--heading); background: var(--surface-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }

.shot { margin: 26px 0 6px; }
.shot-frame { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong); background: #0a1120; box-shadow: var(--shadow); cursor: zoom-in; }
.shot-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: rgba(255, 255, 255, .03); border-bottom: 1px solid rgba(148, 163, 184, .12); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #475569; }
.shot-bar span { margin-left: 8px; font-family: var(--mono); font-size: .72rem; color: #6b7a93; }
.shot-frame img { width: 100%; transition: transform .6s var(--ease); }
.shot-frame:hover img { transform: scale(1.02); }
.shot-zoom { position: absolute; right: 12px; bottom: 12px; padding: 6px 10px; border-radius: 8px; background: rgba(6, 11, 22, .8); color: #e6edf7; font-size: .72rem; font-weight: 600; opacity: 0; transition: opacity .25s ease; }
.shot-frame:hover .shot-zoom { opacity: 1; }
.shot-missing { display: none; padding: 48px 20px; text-align: center; font-family: var(--mono); font-size: .8rem; color: #6b7a93; }
.shot.is-missing img, .shot.is-missing .shot-zoom { display: none; }
.shot.is-missing .shot-missing { display: block; }
.shot.is-missing .shot-frame { cursor: default; }
.shot figcaption { margin-top: 12px; font-size: .84rem; color: var(--muted); text-align: center; }

.arch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.arch-node { position: relative; padding: 20px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); transition: transform .3s var(--spring), border-color .25s ease; }
.arch-node:hover { transform: translateY(-4px); border-color: var(--accent); }
.arch-node .os { font-family: var(--mono); font-size: .7rem; color: var(--accent-text); text-transform: uppercase; letter-spacing: 1px; }
.arch-node h4 { font-size: .98rem; color: var(--heading); margin: 6px 0 12px; }
.arch-node .chips { gap: 5px; }
.arch-node .chip { font-size: .7rem; padding: 3px 8px; }
.arch-node:not(:last-child)::after { content: ''; position: absolute; right: -15px; top: 50%; width: 16px; height: 2px; background: var(--grad); opacity: .6; }

.callout-skills { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 22px 26px; }
.callout-skills > span { font-size: .8rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--heading); margin-right: 6px; }

.wip-box { padding: 48px 38px; text-align: center; }
.wip-ico { width: 64px; height: 64px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 18px; background: rgba(245, 158, 11, .12); color: var(--warn); border: 1px solid rgba(245, 158, 11, .3); }
.wip-ico svg { width: 28px; height: 28px; }
.wip-box h2 { justify-content: center; }
.wip-box p { color: var(--muted); max-width: 460px; margin: 0 auto; }
.wip-bar { max-width: 280px; height: 6px; border-radius: 6px; background: var(--border); margin: 26px auto 0; overflow: hidden; }
.wip-bar i { display: block; width: 40%; height: 100%; background: linear-gradient(90deg, var(--warn), #fbbf24); border-radius: 6px; animation: indet 1.8s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 40px; padding-bottom: 20px; }
.pager-link { padding: 22px 26px; display: flex; flex-direction: column; gap: 4px; }
.pager-link:hover { border-color: var(--accent); transform: translateY(-4px); }
.pager-link small { font-family: var(--mono); font-size: .76rem; color: var(--accent-text); }
.pager-link strong { font-size: 1rem; line-height: 1.35; }
.pager-link.next { text-align: right; align-items: flex-end; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 40px; background: rgba(3, 6, 14, .88); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(1200px, 100%); max-height: 80vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); transform: scale(.95); transition: transform .4s var(--spring); }
.lightbox.is-open img { transform: none; }
.lightbox-cap { margin-top: 14px; color: #93a1b8; font-size: .88rem; text-align: center; }
.lightbox-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.5rem; }

/* ── Responsive ────────────────────────── */
@media (max-width: 1080px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .project-card.featured { grid-column: span 2; }
    .arch { grid-template-columns: repeat(2, 1fr); }
    .arch-node::after { display: none; }
}
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .terminal { max-width: 560px; }
    .about-grid { grid-template-columns: 1fr; }
    .doc-layout { grid-template-columns: 1fr; gap: 0; padding-top: 32px; }
    .toc { display: none; }
    .contact-grid { grid-template-columns: 1fr; max-width: 460px; }
}
@media (max-width: 860px) {
    .nav-menu {
        position: fixed;
        top: var(--nav-h); left: 0; right: 0;
        flex-direction: column;
        gap: 4px;
        padding: 16px 20px 24px;
        border-radius: 0;
        border: 0;
        border-bottom: 1px solid var(--border);
        background: var(--nav-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s ease, transform .35s var(--ease);
    }
    .nav.is-open .nav-menu { opacity: 1; transform: none; pointer-events: auto; }
    .nav-menu a { padding: 12px 16px; font-size: 1rem; border-radius: 12px; }
    .nav-burger { display: flex; }
    .nav-cta { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: 0; }
    .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 680px) {
    .container, .nav-inner { padding: 0 20px; }
    .section { padding: 88px 0; }
    .skills-grid, .projects-grid { grid-template-columns: 1fr; }
    .project-card.featured { grid-column: auto; }
    .about-text, .doc-section { padding: 28px 24px; }
    .contact-wrap { padding: 48px 22px; }
    .logo-text { display: none; }
    .issue-row { grid-template-columns: 1fr; gap: 8px; }
    .arch { grid-template-columns: 1fr; }
    .doc-pager { grid-template-columns: 1fr; }
    .pager-link.next { text-align: left; align-items: flex-start; }
    .term-body { font-size: .74rem; min-height: 0; }
    .scroll-hint { display: none; }
    .tl-item { grid-template-columns: 32px 1fr; gap: 16px; }
    .tl-dot { width: 32px; height: 32px; font-size: .62rem; border-radius: 10px; }
    .timeline::before { left: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
