/* ==========================================================================
   Luke Montgomery · Portfolio
   ========================================================================== */

:root {
    --bg: #f6f4ef;
    --bg-alt: #eeebe3;
    --surface: #ffffff;
    --ink: #121214;
    --ink-2: #4a4a50;
    --ink-3: #7a7a82;
    --line: #dedad0;
    --accent: #e8492b;
    --accent-ink: #ffffff;
    --accent-soft: rgba(232, 73, 43, .1);
    --shadow: 0 1px 2px rgba(18, 18, 20, .04), 0 12px 32px -12px rgba(18, 18, 20, .14);

    /* Throwable (marque, identique dans les deux thèmes) */
    --tw-bg: #0b0b0d;
    --tw-ink: #fff8f2;
    --tw-ink-2: #c9bfb8;
    --tw-orange: #ff9f3c;
    --tw-coral: #ff5a4a;
    --tw-pink: #ff3d7f;
    --tw-grad: linear-gradient(120deg, var(--tw-orange), var(--tw-coral) 50%, var(--tw-pink));

    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

    --radius: 18px;
    --radius-sm: 10px;
    --container: 1180px;
    --gutter: 24px;
    --nav-h: 68px;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0e0e10;
        --bg-alt: #141417;
        --surface: #18181c;
        --ink: #f2f0ea;
        --ink-2: #b4b2ac;
        --ink-3: #85847f;
        --line: #2a2a30;
        --accent: #ff6a4a;
        --accent-ink: #120a08;
        --accent-soft: rgba(255, 106, 74, .14);
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0e0e10;
    --bg-alt: #141417;
    --surface: #18181c;
    --ink: #f2f0ea;
    --ink-2: #b4b2ac;
    --ink-3: #85847f;
    --line: #2a2a30;
    --accent: #ff6a4a;
    --accent-ink: #120a08;
    --accent-soft: rgba(255, 106, 74, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .3s, color .3s;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

strong {
    font-weight: 600;
    color: var(--ink);
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.1;
    letter-spacing: -.02em;
    font-weight: 600;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    background: var(--ink);
    color: var(--bg);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: top .2s;
}

.skip-link:focus {
    top: 12px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    font-family: var(--font-body);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .2s, background-color .2s, border-color .2s, color .2s;
}

.btn i {
    font-size: 20px;
    transition: transform .2s;
}

.btn:hover i {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--ink);
    color: var(--bg);
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-ghost {
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--ink);
}

.btn-block {
    width: 100%;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font-size: 20px;
    cursor: pointer;
    transition: border-color .2s, background-color .2s;
}

.icon-btn:hover {
    border-color: var(--ink);
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    z-index: 100;
    transition: background-color .3s, border-color .3s, backdrop-filter .3s;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom-color: var(--line);
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    margin-right: auto;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--ink);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-2);
    transition: color .2s, background-color .2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--ink);
    background: var(--bg-alt);
}

.nav-cta {
    color: var(--ink);
    border: 1px solid var(--line);
    margin-left: 6px;
}

.nav-tools {
    display: flex;
    gap: 8px;
}

.mobile-toggle {
    display: none;
}

/* ---------- Reveal ---------- */
/* Masqué seulement si le JS tourne (classe posée dans <head>). */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--d, 0s);
}

.js .reveal.visible {
    opacity: 1;
    transform: none;
}

/* ---------- Hero ---------- */
.hero {
    padding: calc(var(--nav-h) + 72px) 0 96px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 64px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .02em;
    color: var(--ink-2);
    padding: 6px 14px 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    margin-bottom: 28px;
}

.eyebrow a {
    color: var(--ink);
    font-weight: 500;
    background: var(--tw-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tw-coral);
    box-shadow: 0 0 0 0 rgba(255, 90, 74, .6);
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    70% {
        box-shadow: 0 0 0 10px rgba(255, 90, 74, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 90, 74, 0);
    }
}

.hero-title {
    font-size: clamp(44px, 6.4vw, 84px);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1;
    margin-bottom: 28px;
}

.hero-title-sub {
    display: block;
    margin-top: 14px;
    font-size: clamp(24px, 2.9vw, 38px);
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.15;
    color: var(--ink-2);
}

.hero-lead {
    font-size: 18px;
    color: var(--ink-2);
    max-width: 590px;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.hero-facts {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 0;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.hero-facts li {
    display: flex;
    flex-direction: column;
    padding-right: 28px;
    margin-right: 28px;
    border-right: 1px solid var(--line);
}

.hero-facts li:last-child {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
}

.fact-num {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.fact-num sup {
    font-size: .5em;
}

.fact-label {
    font-size: 14px;
    color: var(--ink-3);
    max-width: 170px;
    line-height: 1.4;
}

.hero-portrait {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 440px;
}

.hero-portrait picture img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 20%;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.portrait-tag {
    position: absolute;
    left: -36px;
    bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 10px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform .25s;
}

a.portrait-tag:hover {
    transform: translateY(-3px);
}

.portrait-tag img {
    border-radius: 10px;
}

.portrait-tag span {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.portrait-tag strong {
    font-size: 15px;
}

.portrait-tag small {
    font-size: 13px;
    color: var(--ink-3);
}

.portrait-tag--alt {
    left: auto;
    right: -28px;
    top: 36px;
    bottom: auto;
    padding: 10px 16px;
}

.portrait-tag--alt i {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 22px;
}

/* ---------- Throwable ---------- */
.throwable {
    position: relative;
    background: var(--tw-bg);
    color: var(--tw-ink);
    padding: 120px 0;
    overflow: hidden;
    overflow: clip; /* clip : coupe les halos sans casser position: sticky */
    isolation: isolate;
}

.throwable::before,
.throwable::after {
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .35;
}

.throwable::before {
    width: 520px;
    height: 520px;
    background: var(--tw-orange);
    top: -180px;
    right: -120px;
}

.throwable::after {
    width: 460px;
    height: 460px;
    background: var(--tw-pink);
    bottom: -220px;
    left: -140px;
    opacity: .25;
}

.throwable strong {
    color: var(--tw-ink);
}

.tw-head {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
}

.tw-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    box-shadow: 0 20px 50px -14px rgba(255, 90, 74, .55);
    flex-shrink: 0;
}

.tw-kicker {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--tw-orange);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.tw-title {
    font-size: clamp(48px, 7vw, 92px);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: .95;
    background: var(--tw-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: .08em;
}

.tw-tagline {
    font-size: 20px;
    color: var(--tw-ink-2);
    margin-top: 4px;
}

.tw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: start;
}

.tw-copy>p {
    color: var(--tw-ink-2);
    margin-bottom: 20px;
}

.tw-copy>p.tw-pitch {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.2vw, 28px);
    line-height: 1.3;
    letter-spacing: -.015em;
    color: var(--tw-ink);
}

.tw-steps {
    counter-reset: step;
    display: grid;
    gap: 14px;
    margin: 32px 0;
}

.tw-steps li {
    counter-increment: step;
    position: relative;
    padding-left: 48px;
    color: var(--tw-ink-2);
}

.tw-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--tw-grad);
    color: #1a0a06;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
}

.tw-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    margin-bottom: 28px;
    font-size: 15px;
    color: var(--tw-ink-2);
}

.tw-features li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.45;
}

.tw-features i {
    color: var(--tw-orange);
    font-size: 19px;
    flex-shrink: 0;
    margin-top: 1px;
}

.tw-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 36px;
}

.tw-stack span {
    font-family: var(--font-mono);
    font-size: 12.5px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 248, 242, .14);
    color: var(--tw-ink-2);
}

.tw-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px 9px 14px;
    border-radius: 12px;
    background: var(--tw-ink);
    color: #0b0b0d;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.1;
    transition: transform .2s, box-shadow .2s;
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(255, 159, 60, .6);
}

.store-btn i {
    font-size: 28px;
}

.store-btn span {
    display: flex;
    flex-direction: column;
}

.store-btn small {
    font-size: 11px;
    font-weight: 500;
    opacity: .7;
}

.tw-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    font-weight: 500;
    color: var(--tw-orange);
}

.tw-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.tw-phones {
    position: sticky;
    top: calc(var(--nav-h) + 32px);
    height: min(680px, calc(100vh - var(--nav-h) - 64px));
    min-height: 560px;
}

.phone {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 232px;
    border-radius: 34px;
    padding: 7px;
    background: #1d1d21;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 40px 80px -30px rgba(0, 0, 0, .8);
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.phone img {
    border-radius: 28px;
    width: 100%;
    aspect-ratio: 600 / 1298;
    object-fit: cover;
}

.phone--center {
    z-index: 3;
    transform: translate(-50%, -50%);
    width: 270px;
}

.phone--left {
    z-index: 1;
    transform: translate(-112%, -46%) rotate(-8deg);
    opacity: .9;
}

.phone--right {
    z-index: 2;
    transform: translate(12%, -46%) rotate(8deg);
    opacity: .9;
}

.tw-phones:hover .phone--left {
    transform: translate(-120%, -48%) rotate(-10deg);
}

.tw-phones:hover .phone--right {
    transform: translate(20%, -48%) rotate(10deg);
}

/* ---------- Lecteur vidéo ---------- */
.vplayer {
    --vp-bg: #0a0a12;
    --vp-ink: #f3f1ff;
    --vp-ink-2: #b9b6cc;
    --vp-pink: #ff3d8b;
    --vp-violet: #b23cff;
    --vp-blue: #4f8bff;
    --vp-grad: linear-gradient(120deg, var(--vp-pink), var(--vp-violet) 55%, var(--vp-blue));

    position: relative;
    background: var(--vp-bg);
    color: var(--vp-ink);
    padding: 120px 0;
    overflow: hidden;
    overflow: clip;
    isolation: isolate;
}

.vplayer::before,
.vplayer::after {
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(100px);
}

.vplayer::before {
    width: 560px;
    height: 560px;
    background: var(--vp-violet);
    top: -200px;
    left: -160px;
    opacity: .28;
}

.vplayer::after {
    width: 480px;
    height: 480px;
    background: var(--vp-blue);
    bottom: -220px;
    right: -120px;
    opacity: .22;
}

.vplayer strong {
    color: var(--vp-ink);
}

.vp-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 72px;
    align-items: start;
}

.vp-visual {
    position: sticky;
    top: calc(var(--nav-h) + 40px);
}

.tv-stack {
    position: relative;
    aspect-ratio: 16 / 12.6;
}

.tv {
    position: absolute;
    width: 84%;
    padding: 7px;
    border-radius: 16px;
    background: #050508;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 40px 80px -30px rgba(0, 0, 0, .85);
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.tv img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
}

/* trois écrans en cascade : profils (fond), réglages (milieu), lecture (devant) */
.tv--back {
    top: 0;
    left: 0;
    width: 68%;
    opacity: .8;
}

.tv--mid {
    top: 10%;
    right: 0;
    width: 68%;
    opacity: .92;
}

.tv--front {
    left: 6%;
    bottom: 0;
    z-index: 1;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 40px 80px -30px rgba(0, 0, 0, .85),
        0 0 60px -20px rgba(178, 60, 255, .55);
}

.vp-visual:hover .tv--back {
    transform: translate(-8px, -8px);
}

.vp-visual:hover .tv--mid {
    transform: translate(8px, -6px);
}

.vp-visual:hover .tv--front {
    transform: translate(0, 8px);
}

.vp-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

.vp-platforms li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    font-size: 14px;
    font-weight: 500;
    color: var(--vp-ink);
}

.vp-platforms i {
    font-size: 17px;
    color: var(--vp-pink);
}

.vp-credit {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--vp-ink-2);
    opacity: .75;
}

.vp-credit a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.vp-head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.vp-icon {
    width: 80px;
    height: 80px;
    border-radius: 19px;
    flex-shrink: 0;
    /* anneau clair : le fond navy de l'icône se confond avec la section */
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 18px 44px -14px rgba(79, 139, 255, .6);
}

.vp-kicker {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--vp-pink);
    margin-bottom: 6px;
}

.vp-title {
    font-size: clamp(40px, 5.4vw, 72px);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: .98;
    background: var(--vp-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: .08em;
}

.vp-copy>p {
    color: var(--vp-ink-2);
    margin-bottom: 20px;
}

.vp-copy>p.vp-pitch {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.2vw, 28px);
    line-height: 1.3;
    letter-spacing: -.015em;
    color: var(--vp-ink);
}

.vp-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 28px;
    margin: 36px 0;
}

.vp-features li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.vp-features i {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    background: rgba(178, 60, 255, .14);
    color: #d6a6ff;
    font-size: 20px;
}

.vp-features strong {
    display: block;
    font-family: var(--font-display);
    font-size: 16.5px;
    margin-bottom: 3px;
}

.vp-features span {
    display: block;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--vp-ink-2);
}

.vp-facts {
    display: flex;
    gap: 0;
    padding: 22px 0;
    margin-bottom: 28px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.vp-facts li {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0 20px;
    font-size: 13.5px;
    line-height: 1.35;
    color: var(--vp-ink-2);
}

.vp-facts li:first-child {
    padding-left: 0;
}

.vp-facts li+li {
    border-left: 1px solid rgba(255, 255, 255, .1);
}

.vp-num {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--vp-ink);
    line-height: 1.15;
}

.vp-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.vp-stack span {
    font-family: var(--font-mono);
    font-size: 12.5px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(243, 241, 255, .14);
    color: var(--vp-ink-2);
}

@media (max-width: 1080px) {
    .vp-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .vp-visual {
        position: relative;
        top: auto;
    }
}

@media (max-width: 600px) {
    .vplayer {
        padding: 80px 0;
    }

    .vp-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .vp-icon {
        width: 68px;
        height: 68px;
        border-radius: 16px;
    }

    .vp-features {
        grid-template-columns: 1fr;
    }

    .vp-facts li {
        padding: 0 12px;
    }

    .vp-num {
        font-size: 22px;
    }

    .tv {
        padding: 5px;
        border-radius: 12px;
    }

    .tv img {
        border-radius: 8px;
    }

    .vp-platforms li {
        font-size: 13px;
        padding: 6px 11px;
    }
}

/* ---------- Sections ---------- */
.section {
    padding: 112px 0;
}

.section--alt {
    background: var(--bg-alt);
}

.section-head {
    display: grid;
    grid-template-columns: 80px 1fr;
    column-gap: 24px;
    margin-bottom: 56px;
    max-width: 820px;
}

.section-num {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
    padding-top: 12px;
}

.section-head h2 {
    font-size: clamp(36px, 4.6vw, 56px);
    letter-spacing: -.035em;
}

.section-intro {
    grid-column: 2;
    margin-top: 14px;
    font-size: 18px;
    color: var(--ink-2);
}

/* ---------- Timeline ---------- */
.timeline {
    border-top: 1px solid var(--line);
}

.tl-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid var(--line);
}

.tl-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
}

.tl-when {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink);
}

.tl-where {
    font-size: 14px;
    color: var(--ink-3);
}

.tl-body h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.tl-body h3 a {
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 5px;
    text-decoration-thickness: 2px;
    transition: text-decoration-color .2s, color .2s;
}

.tl-body h3 a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.tl-body p {
    color: var(--ink-2);
    max-width: 720px;
}

/* ---------- Projects ---------- */
.projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    transition: transform .25s, border-color .25s, box-shadow .25s;
}

.project:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    box-shadow: var(--shadow);
}

.project-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 26px;
}

.project--span2 {
    grid-column: span 2;
}

/* ---------- Terminal Minishell interactif ---------- */
.project--shell {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.18fr);
    gap: 28px;
    align-items: start;
}

.project--shell:hover {
    transform: none;
}

.shell-copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.term {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #0d0f14;
    color: #d7dde8;
    font-family: var(--font-mono);
    font-size: 13px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 24px 48px -24px rgba(0, 0, 0, .55);
}

.term-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #171a22;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    font-size: 12px;
    color: #8b93a7;
}

.term-dots {
    display: inline-flex;
    gap: 6px;
}

.term-dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff5f57;
}

.term-dots i:nth-child(2) {
    background: #febc2e;
}

.term-dots i:nth-child(3) {
    background: #28c840;
}

.term-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.term-live {
    display: none;
    align-items: center;
    gap: 6px;
    color: #7bd64b;
}

.term-live::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.term--ready .term-live {
    display: inline-flex;
}

.term-screen {
    height: 360px;
    padding: 14px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    cursor: text;
    scrollbar-width: thin;
    scrollbar-color: #2b3040 transparent;
}

.term-row {
    min-height: 1.55em;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.term-row.err {
    color: #ff8f87;
}

.term-row.note {
    color: #8b93a7;
}

.term-row.banner {
    color: #7bd64b;
    white-space: pre;
    overflow: hidden;
    line-height: 1.2;
    min-height: 1.2em;
}

.term a {
    color: #6cb6ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tp-user {
    color: #7bd64b;
    font-weight: 600;
}

.tp-path {
    color: #6cb6ff;
    font-weight: 600;
}

.a-bold {
    font-weight: 700;
}

.a-red {
    color: #ff6b6b;
}

.a-green {
    color: #7bd64b;
}

.a-yellow {
    color: #ffd27a;
}

.a-blue {
    color: #6cb6ff;
}

.a-dim {
    color: #8b93a7;
}

.term-line,
.term-chips {
    display: none;
}

.js .term-line {
    display: flex;
    align-items: baseline;
    line-height: 1.55;
}

.term-prompt {
    flex-shrink: 0;
    white-space: pre;
}

.term-input {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    caret-color: #7bd64b;
}

.js .term-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: #11141b;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.term-chips button {
    padding: 4px 10px;
    font: inherit;
    font-size: 12px;
    color: #cfd6e4;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}

.term-chips button:hover,
.term-chips button:focus-visible {
    background: rgba(123, 214, 75, .14);
    border-color: rgba(123, 214, 75, .45);
}

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

@media (max-width: 600px) {
    .term {
        font-size: 12px;
    }

    .term-screen {
        height: 320px;
        padding: 12px;
    }

    .term-row.banner {
        font-size: 9px;
    }
}

/* évite le zoom automatique d'iOS sur les champs < 16px */
@media (pointer: coarse) {
    .term-input {
        font-size: 16px;
    }
}

/* ---------- Vision embarquée : détection d'objets en direct ---------- */
.project--vision {
    grid-row: span 2;
    min-width: 0;
    gap: 20px;
}

.project--vision:hover {
    transform: none;
}

.vision-copy {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.vision-copy .project-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vision-lede {
    padding-left: 12px;
    border-left: 3px solid var(--accent);
}

.vision {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #0d0f14;
    color: #d7dde8;
    font-family: var(--font-mono);
    font-size: 12px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 24px 48px -24px rgba(0, 0, 0, .55);
}

.vision-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #171a22;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: #8b93a7;
}

.vision-title {
    flex: 1;
    width: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vision-local {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #3ee6a0;
    white-space: nowrap;
}

.vision-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #07090d;
    overflow: hidden;
}

.vision-poster,
.vision-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.vision-poster {
    object-fit: cover;
    filter: saturate(.55) brightness(.42);
    transition: opacity .3s;
}

.vision-canvas {
    display: block;
}

.vision.has-frame .vision-poster {
    opacity: 0;
}

.vision-hud {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
    transition: opacity .3s;
}

.vision-hud span {
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(7, 9, 13, .74);
    border: 1px solid rgba(62, 230, 160, .22);
    color: #a9f5d2;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(6px);
}

.vision[data-phase="idle"] .vision-hud,
.vision[data-phase="loading"] .vision-hud {
    opacity: 0;
}

.vision-cta {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    padding: 20px;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(7, 9, 13, .62), rgba(7, 9, 13, .2) 70%);
}

.vision-cta[hidden],
.vision-load[hidden] {
    display: none;
}

.vision-go,
.vision-alt,
.vision-ctrl {
    display: none;
}

.js .vision.is-ready .vision-go,
.js .vision.is-ready .vision-alt {
    display: inline-flex;
}

.js .vision.is-ready .vision-ctrl {
    display: flex;
}

.vision-go {
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font: 600 15px/1 var(--font-body);
    cursor: pointer;
    box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 70%, transparent);
    transition: transform .2s, box-shadow .2s;
}

.vision-go i {
    font-size: 20px;
}

.vision-go:hover {
    transform: translateY(-2px);
}

.vision-alt {
    padding: 4px;
    border: 0;
    background: none;
    color: #e6eaf2;
    font: 500 13px/1.3 var(--font-body);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.vision .vision-size {
    margin: 0;
    color: #c3c9d6;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}

.vision-load {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    gap: 10px;
    justify-items: center;
    width: min(280px, 80%);
    transform: translate(-50%, -50%);
    color: #d7dde8;
}

.vision-load-bar {
    display: block;
    width: 100%;
    height: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .12);
    overflow: hidden;
}

.vision-load-bar i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #3ee6a0, #4fb3ff);
    transition: width .2s;
}

.vision-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 50px;
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.vision-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vision-counts li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .06);
    white-space: nowrap;
}

.vision-counts i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.vision-ctrl {
    gap: 6px;
    margin-left: auto;
}

.vision-ctrl button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 7px;
    background: transparent;
    color: #d7dde8;
    font: inherit;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.vision-ctrl button[hidden] {
    display: none;
}

.vision-ctrl button:hover:not(:disabled) {
    background: rgba(255, 255, 255, .08);
}

.vision-ctrl button[aria-pressed="true"] {
    border-color: rgba(62, 230, 160, .55);
    background: rgba(62, 230, 160, .12);
    color: #a9f5d2;
}

.vision-ctrl button:disabled {
    opacity: .4;
    cursor: default;
}

.vision .vision-status {
    margin: 0;
    font-size: 12px;
    padding: 0 12px 10px;
    color: #9aa3b7;
}

.vision .vision-status:empty {
    display: none;
}

.vision .vision-status.is-note {
    color: #ffcf7a;
}

.vision .vision-status.is-err {
    color: #ff8a8a;
}

.project .vision-credit {
    margin: 0;
    color: var(--ink-2);
    font-size: 12px;
}

.vision-credit a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 1080px) {
    .project--vision {
        grid-row: auto;
    }

    .project--transc {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .project--transc {
        grid-column: auto;
    }

    .vision-copy {
        flex-direction: column;
    }

    .vision-stage {
        aspect-ratio: 4 / 3;
    }

    .vision-hud span {
        font-size: 10px;
        padding: 3px 6px;
    }

    .vision-ctrl {
        margin-left: 0;
        width: 100%;
    }

    .vision-ctrl button {
        flex: 1;
        justify-content: center;
    }
}

/* ---------- Plugins Minecraft (monde voxel 3D) ---------- */
.minecraft {
    --mc-bg: #14111f;
    --mc-panel: #1e1930;
    --mc-panel-2: #2a2342;
    --mc-ink: #f1eeff;
    --mc-ink-2: #b9b3d1;
    --mc-grass: #7bd64b;
    --mc-gold: #ffd27a;
    --mc-pixel: 'Silkscreen', var(--font-mono);
    --mc-step: polygon(0 8px, 8px 8px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px,
            100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%,
            8px calc(100% - 8px), 0 calc(100% - 8px));

    position: relative;
    background-color: var(--mc-bg);
    background-image:
        linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--mc-ink);
    overflow: hidden;
    overflow: clip;
    isolation: isolate;
}

/* --- Héros : ciel de crépuscule + île 3D --- */
.mc-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    min-height: clamp(660px, 94vh, 880px);
    padding: 112px 0 88px;
    isolation: isolate;
}

.mc-sky {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(2px 2px at 8% 12%, #fff 60%, transparent 61%),
        radial-gradient(2px 2px at 22% 26%, rgba(255, 255, 255, .7) 60%, transparent 61%),
        radial-gradient(2px 2px at 37% 9%, #fff 60%, transparent 61%),
        radial-gradient(2px 2px at 48% 21%, rgba(255, 255, 255, .6) 60%, transparent 61%),
        radial-gradient(2px 2px at 63% 7%, #fff 60%, transparent 61%),
        radial-gradient(2px 2px at 71% 18%, rgba(255, 255, 255, .7) 60%, transparent 61%),
        radial-gradient(2px 2px at 84% 11%, #fff 60%, transparent 61%),
        radial-gradient(2px 2px at 93% 24%, rgba(255, 255, 255, .6) 60%, transparent 61%),
        radial-gradient(2px 2px at 56% 33%, rgba(255, 255, 255, .45) 60%, transparent 61%),
        linear-gradient(180deg, #0b0d2a 0%, #1d2058 30%, #4a3a7e 52%, #a2577f 70%, #ee8a5f 86%, #f7b679 100%);
}

/* lune carrée */
.mc-sun {
    position: absolute;
    right: 7%;
    top: 15%;
    width: 72px;
    height: 72px;
    background:
        linear-gradient(rgba(120, 110, 170, .22), rgba(120, 110, 170, .22)) 14px 16px / 14px 14px no-repeat,
        linear-gradient(rgba(120, 110, 170, .18), rgba(120, 110, 170, .18)) 42px 38px / 18px 18px no-repeat,
        linear-gradient(rgba(120, 110, 170, .2), rgba(120, 110, 170, .2)) 20px 48px / 10px 10px no-repeat,
        #eceaff;
    box-shadow: 0 0 0 10px rgba(220, 215, 255, .1), 0 0 90px 30px rgba(180, 170, 255, .28);
}

.mc-world {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.mc-world canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: pan-y;
    opacity: 0;
    transition: opacity .9s ease;
}

.mc-world--ready canvas {
    opacity: 1;
}

.mc-world.is-dragging canvas {
    cursor: grabbing;
}

.mc-hint {
    position: absolute;
    top: 28px;
    right: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-family: var(--mc-pixel);
    font-size: 12px;
    color: #fff;
    background: rgba(12, 10, 28, .55);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14);
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s;
}

.mc-world--ready .mc-hint {
    opacity: 1;
}

.mc-world.was-dragged .mc-hint {
    opacity: 0;
}

.mc-hero-top,
.mc-hero-bottom {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.mc-head,
.mc-facts {
    pointer-events: auto;
}

.mc-head {
    max-width: 540px;
    text-shadow: 0 2px 18px rgba(8, 6, 30, .55);
}

.mc-kicker {
    font-family: var(--mc-pixel);
    font-size: 13px;
    color: var(--mc-gold);
    margin-bottom: 14px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, .45);
}

.mc-title {
    font-family: var(--mc-pixel);
    font-weight: 700;
    font-size: clamp(40px, 4.8vw, 70px);
    line-height: .98;
    letter-spacing: 0;
    color: #fff;
    text-shadow: 5px 5px 0 #2b1d55, 9px 9px 0 rgba(0, 0, 0, .22);
    margin-bottom: 26px;
}

.mc-pitch {
    font-family: var(--font-display);
    font-size: clamp(21px, 2.1vw, 26px);
    line-height: 1.3;
    letter-spacing: -.015em;
    color: #fff;
    margin-bottom: 14px;
}

.mc-intro {
    color: rgba(238, 234, 255, .84);
}

/* barre d'inventaire */
.mc-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-width: 860px;
    padding: 6px;
    background: rgba(10, 8, 22, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 0 0 3px #08060f, inset 0 0 0 2px rgba(255, 255, 255, .08), 0 24px 50px -20px rgba(0, 0, 0, .6);
}

.mc-facts li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.35;
    color: #d2cce9;
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .08), inset -3px -3px 0 rgba(0, 0, 0, .35);
}

.mc-facts li:first-child {
    box-shadow: inset 0 0 0 3px #f4f1ff, inset 6px 6px 0 rgba(255, 255, 255, .06);
}

.mc-num {
    font-family: var(--mc-pixel);
    font-size: 24px;
    line-height: 1.2;
    color: var(--mc-gold);
    text-shadow: 2px 2px 0 #3d2a10;
    white-space: nowrap;
}

.mc-edge {
    position: absolute;
    left: 0;
    bottom: -1px;
    z-index: 0;
    width: 100%;
    height: 40px;
    fill: var(--mc-bg);
}

/* --- Plugins --- */
.mc-body {
    padding-top: 56px;
    padding-bottom: 120px;
}

/* bouton « Explorer l'île » */
.mc-play {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 14px 22px;
    font-family: var(--mc-pixel);
    font-size: 16px;
    color: #10230a;
    background: var(--mc-grass);
    box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .35), inset -4px -4px 0 rgba(0, 0, 0, .28), 0 0 0 3px #08060f,
        0 14px 30px -10px rgba(123, 214, 75, .55);
    cursor: pointer;
    transition: transform .15s, filter .15s;
}

.mc-play i {
    font-size: 22px;
}

.mc-play:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.mc-play:active {
    transform: translateY(1px);
}

.mc-play:disabled {
    opacity: .7;
    cursor: progress;
}

.mc-play-note {
    margin-top: 12px;
    font-size: 13.5px;
    color: rgba(238, 234, 255, .75);
}

.mc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.mc-actions .mc-play {
    margin-top: 0;
}

.mc-play--cam {
    color: #2a1a04;
    background: var(--mc-gold);
    box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .4), inset -4px -4px 0 rgba(0, 0, 0, .25), 0 0 0 3px #08060f,
        0 14px 30px -10px rgba(255, 210, 122, .55);
}

/* notes masquées tant que l'île (et donc ses boutons) n'est pas prête */
.mc-head:not(:has(.mc-play:not([hidden]))) .mc-play-note {
    display: none;
}

.mc-play-note+.mc-play-note {
    margin-top: 4px;
}

.mc-avatar-msg {
    margin-top: 12px;
    padding: 10px 14px;
    max-width: 520px;
    font-size: 13.5px;
    color: #ffd9a0;
    background: rgba(10, 8, 22, .72);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 210, 122, .25);
}

.mc-avatar-msg[hidden] {
    display: none;
}

/* ---------- avatar piloté par la webcam (plein écran) ---------- */
.mc-world.mc-avatar-on {
    background:
        radial-gradient(2px 2px at 12% 14%, #fff 60%, transparent 61%),
        radial-gradient(2px 2px at 31% 8%, rgba(255, 255, 255, .7) 60%, transparent 61%),
        radial-gradient(2px 2px at 58% 12%, #fff 60%, transparent 61%),
        radial-gradient(2px 2px at 77% 6%, rgba(255, 255, 255, .7) 60%, transparent 61%),
        radial-gradient(2px 2px at 90% 19%, #fff 60%, transparent 61%),
        linear-gradient(180deg, #0b0d2a 0%, #1d2058 30%, #4a3a7e 55%, #a2577f 75%, #ee8a5f 92%, #f7b679 100%);
}

.mc-avatar-on canvas {
    cursor: default;
}

.mc-av .mc-hud-top {
    align-items: flex-start;
}

.mc-av-stat {
    margin-left: auto;
    padding: 8px 12px;
    font-family: var(--mc-pixel);
    font-size: 12px;
    color: #a9f5d2;
    background: rgba(10, 8, 22, .72);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(62, 230, 160, .18);
    font-variant-numeric: tabular-nums;
}

.mc-av-stat:empty {
    display: none;
}

.mc-av-pip {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: clamp(150px, 22vw, 300px);
    margin: 0;
    background: rgba(10, 8, 22, .8);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(255, 255, 255, .08);
}

.mc-av-cam {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #07090d;
}

.mc-av-cam video,
.mc-av-cam canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.mc-av-cam video {
    object-fit: fill;
    filter: saturate(.8) brightness(.9);
}

.mc-av-cam.is-mirror video,
.mc-av-cam.is-mirror canvas {
    transform: scaleX(-1);
}

.mc-av-pip figcaption {
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.3;
    color: #c9c3e2;
}

.mc-av-msg {
    position: absolute;
    left: 50%;
    bottom: 22px;
    translate: -50% 0;
    max-width: min(560px, calc(100% - 360px));
    padding: 10px 16px;
    text-align: center;
    font-size: 14px;
    color: #fff;
    background: rgba(10, 8, 22, .78);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .08);
}

.mc-av-msg:empty {
    display: none;
}

.mc-av-msg.is-warn {
    color: #ffd9a0;
}

.mc-av-bubble {
    position: absolute;
    left: 0;
    top: 0;
    padding: 8px 12px;
    font-family: var(--mc-pixel);
    font-size: 16px;
    color: #10230a;
    white-space: nowrap;
    background: #fff;
    box-shadow: 0 0 0 3px #08060f, inset -3px -3px 0 rgba(0, 0, 0, .12);
    opacity: 0;
    transition: opacity .2s;
}

.mc-av-bubble.is-on {
    opacity: 1;
}

.mc-av-load {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    display: grid;
    justify-items: center;
    gap: 12px;
    width: min(86vw, 360px);
    padding: 22px;
    text-align: center;
    color: #fff;
    background: rgba(22, 18, 40, .94);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .08);
}

.mc-av-load[hidden] {
    display: none;
}

.mc-av-load p:first-child {
    font-family: var(--mc-pixel);
    font-size: 14px;
}

.mc-av-bar {
    display: block;
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 0 0 2px #08060f;
}

.mc-av-bar i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--mc-grass);
    transition: width .2s;
}

.mc-av-pct {
    font-size: 12px;
    color: #c9c3e2;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
    .mc-av-quests {
        order: 3;
        flex-basis: 100%;
    }

    .mc-av-stat {
        font-size: 10px;
        padding: 6px 8px;
    }

    .mc-av-pip {
        right: 10px;
        bottom: 10px;
        width: clamp(96px, 28vw, 170px);
    }

    .mc-av-pip figcaption {
        display: none;
    }

    .mc-av-msg {
        left: 10px;
        right: calc(28vw + 20px);
        bottom: 10px;
        translate: none;
        max-width: none;
        font-size: 12.5px;
        padding: 8px 10px;
        text-align: left;
    }

    .mc-av-bubble {
        font-size: 13px;
    }
}

/* ---------- mode jeu (plein écran) ---------- */
html.mc-lock,
html.mc-lock body {
    overflow: hidden;
}

.mc-world.mc-playing {
    position: fixed;
    inset: 0;
    z-index: 3000;
    width: 100%;
    height: 100%;
    margin: 0;
    background: #0b0d2a;
    color: #fff;
    /* l'hôte est déplacé dans <body> : on redéclare les variables de la section */
    --mc-pixel: 'Silkscreen', var(--font-mono);
    --mc-gold: #ffd27a;
    --mc-grass: #7bd64b;
}

.mc-playing canvas {
    cursor: crosshair;
    touch-action: none;
}

.mc-playing .mc-hint {
    display: none;
}

.mc-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    font-family: var(--font-body, Inter, sans-serif);
    user-select: none;
    -webkit-user-select: none;
}

.mc-hud[hidden] {
    display: none;
}

.mc-hud button {
    pointer-events: auto;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.mc-hud-top {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mc-quests,
.mc-stats,
.mc-chat p,
.mc-prompt,
.mc-help,
.mc-panel {
    background: rgba(10, 8, 22, .72);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .08);
}

.mc-quests {
    padding: 12px 14px;
    max-width: 290px;
}

.mc-quests p {
    font-family: var(--mc-pixel);
    font-size: 12px;
    color: var(--mc-gold);
    margin-bottom: 8px;
}

.mc-quests ol {
    display: grid;
    gap: 6px;
}

.mc-quests li {
    position: relative;
    padding-left: 22px;
    font-size: 13px;
    line-height: 1.35;
    color: #e6e2fa;
}

.mc-quests li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 12px;
    height: 12px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5);
}

.mc-quests li.is-done {
    color: #9fe07a;
    text-decoration: line-through;
    text-decoration-color: rgba(159, 224, 122, .5);
}

.mc-quests li.is-done::before {
    background: var(--mc-grass);
    box-shadow: inset 0 0 0 2px #3f7a22;
}

.mc-stats {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    font-family: var(--mc-pixel);
    font-size: 13px;
    color: #d8d2f0;
}

.mc-stats b {
    color: var(--mc-gold);
    font-weight: 700;
}

.mc-hud-btns {
    display: flex;
    gap: 8px;
}

.mc-hbtn,
.mc-pbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 14px;
    font-family: var(--mc-pixel) !important;
    font-size: 13px;
    background: #2a2342;
    box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .12), inset -3px -3px 0 rgba(0, 0, 0, .4), 0 0 0 2px #08060f;
}

.mc-hbtn i {
    font-size: 18px;
}

.mc-hbtn:hover,
.mc-pbtn:hover {
    background: #3d3463;
}

.mc-hbtn--exit {
    background: #5a2430;
}

.mc-hbtn--exit:hover {
    background: #74303e;
}

.mc-cross {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    translate: -50% -50%;
    background:
        linear-gradient(#fff, #fff) center / 2px 100% no-repeat,
        linear-gradient(#fff, #fff) center / 100% 2px no-repeat;
    mix-blend-mode: difference;
}

.mc-charge {
    position: absolute;
    left: 50%;
    top: calc(50% + 24px);
    width: 84px;
    height: 8px;
    translate: -50% 0;
    background: rgba(0, 0, 0, .55);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity .15s;
}

.mc-charge.is-on {
    opacity: 1;
}

.mc-charge span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #f6c744, #7bd64b);
}

.mc-bigtitle {
    position: absolute;
    left: 50%;
    top: 26%;
    translate: -50% 0;
    width: min(90vw, 760px);
    text-align: center;
    opacity: 0;
    transform: scale(.94);
    transition: opacity .25s, transform .25s;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, .45);
}

.mc-bigtitle.is-on {
    opacity: 1;
    transform: none;
}

.mc-bigtitle .t {
    font-family: var(--mc-pixel);
    font-weight: 700;
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.05;
    color: #fff;
}

.mc-bigtitle .s {
    margin-top: 8px;
    font-size: clamp(14px, 1.6vw, 18px);
    color: var(--mc-gold);
}

.mc-prompt {
    position: absolute;
    left: 50%;
    bottom: 118px;
    translate: -50% 0;
    padding: 8px 14px;
    font-family: var(--mc-pixel);
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .2s;
}

.mc-prompt.is-on {
    opacity: 1;
}

.mc-chat {
    position: absolute;
    left: 16px;
    bottom: 110px;
    display: grid;
    gap: 4px;
    max-width: min(520px, 60vw);
}

.mc-chat p {
    padding: 6px 10px;
    font-size: 13.5px;
    line-height: 1.35;
    transition: opacity .6s;
}

.mc-chat p.warn {
    color: #ff9b8f;
}

.mc-chat p.gold {
    color: var(--mc-gold);
}

.mc-chat p.is-old {
    opacity: 0;
}

.mc-slots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    translate: -50% 0;
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(10, 8, 22, .78);
    box-shadow: 0 0 0 3px #08060f, inset 0 0 0 2px rgba(255, 255, 255, .08);
}

.mc-slots button {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .08), inset -3px -3px 0 rgba(0, 0, 0, .35);
}

.mc-slots button.is-on {
    box-shadow: inset 0 0 0 3px #f4f1ff, inset 6px 6px 0 rgba(255, 255, 255, .06);
}

.mc-slots img {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
}

.mc-slots .k {
    position: absolute;
    top: 3px;
    left: 6px;
    font-family: var(--mc-pixel);
    font-size: 10px;
    color: rgba(255, 255, 255, .55);
}

.mc-slots .c {
    position: absolute;
    right: 5px;
    bottom: 3px;
    font-family: var(--mc-pixel);
    font-size: 11px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
}

.mc-slots .n {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    translate: -50% 0;
    padding: 3px 8px;
    font-family: var(--mc-pixel);
    font-size: 11px;
    white-space: nowrap;
    background: rgba(10, 8, 22, .85);
    opacity: 0;
    transition: opacity .2s;
}

.mc-slots button.is-on .n {
    opacity: 1;
}

.mc-help {
    position: absolute;
    left: 50%;
    top: 92px;
    translate: -50% 0;
    width: min(92vw, 820px);
    padding: 14px 18px;
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
    color: #e6e2fa;
    opacity: 0;
    transition: opacity .4s;
}

.mc-help.is-on {
    opacity: 1;
}

.mc-help-t {
    font-family: var(--mc-pixel);
    font-size: 16px;
    color: var(--mc-gold);
    margin-bottom: 4px;
}

.mc-help kbd,
.mc-panel kbd {
    display: inline-block;
    padding: 0 6px;
    font-family: var(--mc-pixel);
    font-size: 11px;
    line-height: 20px;
    color: #fff;
    background: #2a2342;
    box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .4);
}

/* panneaux : coffre, pause, victoire */
.mc-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    width: min(92vw, 560px);
    padding: 26px;
    text-align: center;
    pointer-events: auto;
    background: rgba(22, 18, 40, .94);
}

.mc-panel[hidden] {
    display: none;
}

.mc-panel-t {
    font-family: var(--mc-pixel);
    font-weight: 700;
    font-size: 26px;
    color: #fff;
    margin-bottom: 18px;
}

.mc-panel-n {
    font-size: 14px;
    color: #c9c3e2;
    margin: 14px 0 18px;
}

.mc-kit-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mc-kit-list button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .1), inset -3px -3px 0 rgba(0, 0, 0, .4), 0 0 0 2px #08060f;
    transition: background-color .15s, transform .15s;
}

.mc-kit-list button:hover,
.mc-kit-list button:focus-visible {
    background: rgba(123, 214, 75, .16);
    transform: translateY(-2px);
}

.mc-kit-list img {
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
}

.mc-kit-list b {
    font-family: var(--mc-pixel);
    font-size: 13px;
    line-height: 1.25;
}

.mc-kit-list span {
    font-size: 12.5px;
    color: #c9c3e2;
}

.mc-pbtn {
    width: 100%;
    margin-top: 10px;
    min-height: 48px;
    font-size: 15px;
    background: #3f7a22;
}

.mc-pbtn:hover {
    background: #4c9029;
}

.mc-pbtn--alt {
    background: #2a2342;
}

/* commandes tactiles */
@media (max-width: 480px) {
    .mc-hbtn--exit span {
        display: none;
    }

    .mc-stats {
        gap: 8px;
        font-size: 10px;
    }
}

.mc-touch {
    position: absolute;
    inset: 0;
    pointer-events: auto;
    touch-action: none;
}

.mc-joy {
    position: absolute;
    left: 28px;
    bottom: 110px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25);
    opacity: .55;
}

.mc-joy.is-on {
    opacity: 1;
}

.mc-joy span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
}

.mc-tbtn {
    position: absolute;
    display: grid;
    place-items: center;
    font-family: var(--mc-pixel) !important;
    font-size: 12px;
    background: rgba(42, 35, 66, .82);
    box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .12), inset -3px -3px 0 rgba(0, 0, 0, .4), 0 0 0 2px #08060f;
}

.mc-tbtn[hidden] {
    display: none;
}

.mc-tbtn i {
    font-size: 30px;
}

.mc-tbtn--act {
    right: 22px;
    bottom: 120px;
    width: 76px;
    height: 76px;
    background: rgba(90, 36, 48, .85);
}

.mc-tbtn--jump {
    right: 110px;
    bottom: 104px;
    width: 58px;
    height: 58px;
}

.mc-tbtn--use {
    right: 22px;
    bottom: 210px;
    padding: 0 14px;
    height: 46px;
    background: rgba(63, 122, 34, .9);
}

.mc-tbtn--off {
    right: 110px;
    bottom: 176px;
    padding: 0 12px;
    height: 40px;
}

@media (max-width: 860px) {
    .mc-hud-top {
        top: 10px;
        left: 10px;
        right: 10px;
        flex-wrap: wrap;
    }

    .mc-quests {
        order: 3;
        flex-basis: 100%;
        max-width: 250px;
        padding: 8px 10px;
    }

    .mc-quests li {
        font-size: 11.5px;
    }

    .mc-quests li.is-done {
        display: none;
    }

    .mc-stats {
        gap: 10px;
        padding: 8px 10px;
        font-size: 11px;
    }

    .mc-hbtn {
        min-height: 36px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .mc-slots button {
        width: 50px;
        height: 50px;
    }

    .mc-slots img {
        width: 30px;
        height: 30px;
    }

    .mc-chat {
        bottom: 250px;
        max-width: 70vw;
    }

    .mc-chat p {
        font-size: 12px;
    }

    .mc-prompt {
        bottom: 84px;
        font-size: 11px;
        white-space: normal;
        width: max-content;
        max-width: 80vw;
        text-align: center;
    }

    .mc-help {
        top: 34%;
        font-size: 13px;
    }

    .mc-stats {
        flex: 1;
        min-width: 0;
        justify-content: space-between;
    }

    .mc-kit-list {
        grid-template-columns: 1fr;
    }

    .mc-kit-list button {
        flex-direction: row;
        text-align: left;
        padding: 10px 12px;
    }

    .mc-kit-list img {
        width: 40px;
        height: 40px;
    }
}

.mc-plugins {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.mc-plugin {
    display: flex;
    flex-direction: column;
    background: var(--mc-panel);
    clip-path: var(--mc-step);
    box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .06), inset -4px -4px 0 rgba(0, 0, 0, .35);
    transition: transform .25s, background-color .25s;
}

.mc-plugin:hover {
    transform: translateY(-4px);
    background: #231d38;
}

.mc-screen {
    position: relative;
    margin: 16px 16px 0;
    padding: 6px;
    background: #07060d;
    clip-path: polygon(0 6px, 6px 6px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px,
            100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%,
            6px calc(100% - 6px), 0 calc(100% - 6px));
}

.mc-video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #111;
}

.mc-plugin-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 26px 26px;
}

.mc-plugin-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.mc-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    object-fit: contain;
    image-rendering: pixelated;
    box-shadow: 0 0 0 3px #08060f, 0 0 0 5px rgba(255, 255, 255, .12);
}

/* l'icône Lobby Fighting (épée noire, PNG transparent) a besoin d'un fond clair */
.mc-icon--light {
    background: #f4f1ea;
}

.mc-plugin h3 {
    font-family: var(--mc-pixel);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
}

.mc-tag {
    font-size: 14.5px;
    color: var(--mc-ink-2);
}

.mc-mech {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.mc-mech li {
    position: relative;
    padding-left: 22px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--mc-ink-2);
}

.mc-mech li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: .55em;
    width: 8px;
    height: 8px;
    background: var(--mc-grass);
    box-shadow: 2px 2px 0 #3f7a22;
}

.plugin-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--mc-ink-2);
}

.plugin-stats li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.plugin-stats i {
    font-size: 15px;
    color: var(--mc-gold);
}

.mc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
}

/* boutons pixel */
.mc-links a,
.mc-forge-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    font-family: var(--mc-pixel);
    font-size: 13px;
    color: #fff;
    background: var(--mc-panel-2);
    box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .12), inset -3px -3px 0 rgba(0, 0, 0, .4), 0 0 0 2px #08060f;
    transition: background-color .15s, transform .15s;
}

.mc-links a:hover,
.mc-forge-link:hover {
    background: #3d3463;
}

.mc-links a:active,
.mc-forge-link:active {
    transform: translateY(2px);
}

.mc-links a i,
.mc-forge-link i {
    font-size: 16px;
}

/* panneau en bois */
.mc-forge {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 24px;
    padding: 20px 26px;
    background-color: #5b3f26;
    background-image: repeating-linear-gradient(180deg, transparent 0 22px, rgba(0, 0, 0, .22) 22px 25px);
    clip-path: var(--mc-step);
    box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .08), inset -4px -4px 0 rgba(0, 0, 0, .3);
}

.mc-forge-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, .25);
    color: #a8f07a;
    font-size: 24px;
    box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .3);
}

.mc-forge-body {
    flex: 1;
    min-width: 0;
}

.mc-forge h3 {
    font-family: var(--mc-pixel);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
}

.mc-forge p {
    font-size: 14.5px;
    color: #f0e2cf;
}

.mc-forge-link {
    background: #3a2717;
}

.mc-forge-link:hover {
    background: #4a3220;
}

@media (max-width: 860px) {
    .mc-hero {
        min-height: 0;
        gap: 0;
        padding: 88px 0 72px;
    }

    .mc-hero-top {
        order: 1;
    }

    .mc-world {
        order: 2;
        position: relative;
        inset: auto;
        height: 380px;
        margin: 4px 0 20px;
    }

    .mc-hero-bottom {
        order: 3;
    }

    .mc-sun {
        display: none;
    }

    .mc-hint {
        top: auto;
        bottom: 6px;
        right: 50%;
        translate: 50% 0;
        white-space: nowrap;
    }

    .mc-facts {
        grid-template-columns: repeat(2, 1fr);
    }

    .mc-plugins {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .mc-world {
        height: 320px;
    }

    .mc-num {
        font-size: 19px;
    }

    .mc-facts li {
        padding: 12px;
    }

    .mc-body {
        padding-top: 40px;
        padding-bottom: 80px;
    }

    .mc-plugin-body {
        padding: 20px;
    }

    .mc-screen {
        margin: 12px 12px 0;
    }

    .mc-forge {
        flex-wrap: wrap;
        padding: 20px;
    }

    .mc-forge-body {
        flex: 1 1 calc(100% - 66px);
    }

    .mc-forge-link {
        margin-left: 66px;
    }
}

.project-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-kind {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--ink-3);
    margin-bottom: 6px;
}

.project h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.project p {
    color: var(--ink-2);
    font-size: 15.5px;
}

.project code,
.project kbd {
    font-family: var(--font-mono);
    font-size: .86em;
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--bg-alt);
    color: var(--ink);
    white-space: nowrap;
}

.section--alt .project code,
.section--alt .project kbd {
    background: var(--bg);
}

.project kbd {
    border: 1px solid var(--line);
    border-bottom-width: 2px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 0;
}

.tags li {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-alt);
    color: var(--ink-2);
}

.section--alt .tags li {
    background: var(--bg);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 20px;
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    align-self: flex-start;
    transition: color .2s;
}

.project-link:hover {
    color: var(--accent);
}

/* ---------- Skills ---------- */
.skills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 72px;
}

.skill-group {
    padding: 32px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.skill-icon {
    font-size: 30px;
    color: var(--accent);
    margin-bottom: 18px;
}

.skill-group h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.skill-group p {
    color: var(--ink-2);
    font-size: 15.5px;
    margin-bottom: 20px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chips li {
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink);
}

.services-title {
    font-size: 26px;
    margin-bottom: 24px;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
}

.services-list li {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 24px 8px 0;
}

.services-list li+li {
    padding-left: 24px;
    border-left: 1px solid var(--line);
}

.services-list i {
    font-size: 26px;
    color: var(--ink);
}

.services-list strong {
    display: block;
    font-family: var(--font-display);
    font-size: 18px;
    margin-bottom: 4px;
}

.services-list span {
    color: var(--ink-2);
    font-size: 15px;
}

/* ---------- Contact ---------- */
.section--contact {
    background: var(--bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: start;
}

.contact-copy .section-num {
    padding: 0;
    margin-bottom: 12px;
}

.contact-copy h2 {
    font-size: clamp(40px, 5vw, 64px);
    letter-spacing: -.04em;
    margin-bottom: 20px;
}

.contact-copy>p {
    font-size: 18px;
    color: var(--ink-2);
    margin-bottom: 32px;
    max-width: 480px;
}

.contact-links {
    display: grid;
    gap: 6px;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-weight: 500;
    font-size: 17px;
    transition: color .2s;
    overflow-wrap: anywhere;
}

.contact-links a:hover {
    color: var(--accent);
}

.contact-links i {
    font-size: 22px;
    color: var(--ink-3);
}

.contact-form {
    padding: 32px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.form-row {
    margin-bottom: 18px;
}

.form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    transition: border-color .2s, box-shadow .2s;
}

.form-row textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
    color: var(--ink-3);
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--ink-3);
    text-align: center;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--line);
    padding: 28px 0;
    font-size: 14px;
    color: var(--ink-3);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.footer-links a {
    display: inline-flex;
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--ink);
}

.footer-links i {
    font-size: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .hero-grid {
        gap: 48px;
    }

    .portrait-tag {
        left: -16px;
    }

    .portrait-tag--alt {
        right: -12px;
    }

    .tw-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .tw-phones {
        position: relative;
        top: auto;
        height: 560px;
        min-height: 0;
    }

    .projects {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-list li:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .services-list li:nth-child(n+3) {
        border-top: 1px solid var(--line);
        margin-top: 20px;
    }
}

@media (max-width: 860px) {
    :root {
        --nav-h: 62px;
    }

    .mobile-toggle {
        display: grid;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        padding: 12px var(--gutter) 24px;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s, transform .2s, visibility .2s;
    }

    .nav-menu.open {
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .navbar:has(.nav-menu.open) {
        background: var(--bg);
        border-bottom-color: var(--line);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .nav-link {
        padding: 12px 14px;
        font-size: 17px;
        border-radius: var(--radius-sm);
    }

    .nav-cta {
        margin: 8px 0 0;
        text-align: center;
    }

    .hero {
        padding: calc(var(--nav-h) + 40px) 0 72px;
    }

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

    .hero-portrait {
        justify-self: center;
        max-width: 400px;
        order: -1;
    }

    .section-head {
        grid-template-columns: 1fr;
    }

    .section-num {
        padding: 0 0 8px;
    }

    .section-intro {
        grid-column: 1;
    }

    .tl-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tl-meta {
        flex-direction: row;
        gap: 12px;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 600px) {
    :root {
        --gutter: 16px;
    }

    body {
        font-size: 16px;
    }

    .logo-name {
        display: none;
    }

    .hero-portrait {
        max-width: 300px;
    }

    .portrait-tag {
        left: -8px;
        bottom: 20px;
    }

    .portrait-tag--alt {
        display: none;
    }

    .hero-facts {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hero-facts li {
        flex-direction: row;
        align-items: baseline;
        gap: 12px;
        border-right: 0;
        margin-right: 0;
        padding-right: 0;
    }

    .fact-num {
        min-width: 64px;
        font-size: 22px;
    }

    .fact-label {
        max-width: none;
    }

    .hero-facts li:last-child .fact-num {
        min-width: 0;
    }

    .hero-facts li:last-child {
        flex-direction: column;
        gap: 0;
    }

    .throwable {
        padding: 80px 0;
    }

    .tw-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        margin-bottom: 36px;
    }

    .tw-icon {
        width: 76px;
        height: 76px;
        border-radius: 18px;
    }

    .tw-phones {
        height: 420px;
    }

    .phone {
        width: 160px;
        border-radius: 26px;
        padding: 5px;
    }

    .phone img {
        border-radius: 22px;
    }

    .phone--center {
        width: 184px;
    }

    .phone--left {
        transform: translate(-100%, -46%) rotate(-8deg);
    }

    .phone--right {
        transform: translate(0%, -46%) rotate(8deg);
    }

    .tw-phones:hover .phone--left {
        transform: translate(-100%, -46%) rotate(-8deg);
    }

    .tw-phones:hover .phone--right {
        transform: translate(0%, -46%) rotate(8deg);
    }

    .tw-features {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 80px 0;
    }

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

    .project {
        padding: 24px;
    }

    .project--span2 {
        grid-column: auto;
    }

    .services-list {
        grid-template-columns: 1fr;
    }

    .services-list li,
    .services-list li+li {
        padding: 22px 0 0;
        border-left: 0;
        margin-top: 0;
    }

    .services-list li+li {
        border-top: 1px solid var(--line);
        margin-top: 22px;
    }

    .contact-form {
        padding: 24px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}
