/* =========================================================
   Tristan Carron — feuille de style
   Palette d'origine conservée : terracotta #D89584 + gris clair
   Display : Fraunces · Texte : Manrope
   ========================================================= */

:root {
    /* couleurs d'origine */
    --terra:       #D89584;
    --terra-soft:  #e6b5a7;
    --terra-deep:  #b56b56;
    --terra-tint:  #D8958430;
    --paper:       #f6f4f1;
    --ink:         #211d3a;     /* dérivé du #1f1c3f d'origine */
    --ink-soft:    #4a456b;

    --bg:          #fbfaf8;
    --surface:     #ffffff;
    --line:        #e7e0d9;
    --text:        #2a2733;
    --muted:       #6b6678;

    --radius:      18px;
    --radius-sm:   12px;
    --shadow-card: 0 18px 40px -22px rgba(33,29,58,.45);
    --shadow-offset: 10px 10px 0 0 rgba(33,29,58,.10);
    --ease:        cubic-bezier(.22,.61,.36,1);
    --maxw:        1180px;
    --nav-h:       70px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
    margin: 0;
    font-family: "Manrope", system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.05; letter-spacing: -.01em; margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
b { color: var(--ink); font-weight: 700; }

/* grain léger */
.grain {
    position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
}

/* ---------- BOUTONS ---------- */
.btn {
    --bg-btn: var(--terra);
    display: inline-flex; align-items: center; gap: .5em;
    font-family: "Manrope", sans-serif; font-weight: 700; font-size: .92rem;
    padding: .72em 1.4em; border-radius: 999px; cursor: pointer; border: none;
    transition: transform .35s var(--ease), background .3s, color .3s, box-shadow .3s;
    letter-spacing: .01em;
}
.btn--solid { background: var(--terra); color: #fff; box-shadow: 0 12px 26px -12px var(--terra-deep); }
.btn--solid:hover { background: var(--ink); transform: translateY(-3px); }
.btn--ghost { color: #fff; border: 2px solid rgba(255,255,255,.7); background: rgba(0,0,0,.12); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; transform: translateY(-3px); }
.btn--block { display: flex; justify-content: center; width: 100%; }
.btn--back {
    background: transparent; color: var(--ink); padding-left: 0; font-weight: 700;
}
.btn--back:hover { color: var(--terra-deep); gap: .8em; }

/* ---------- NAV ---------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 1000;
    display: flex; align-items: center;
    transition: background .4s, box-shadow .4s, border-color .4s;
    border-bottom: 1px solid transparent;
}
.nav.is-scrolled, body[data-page="project"] .nav {
    background: rgba(251,250,248,.82);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom-color: var(--line);
    box-shadow: 0 6px 24px -20px rgba(0,0,0,.6);
}
.nav__inner {
    width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
    display: flex; align-items: center; gap: 24px;
}
.nav__brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.nav__mark {
    width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
    background: var(--terra); color: #fff; font-family: "Fraunces", serif; font-weight: 900;
    font-size: 1.05rem; box-shadow: var(--shadow-offset);
}
.nav__name { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.12rem; color: var(--ink); }
.nav.is-scrolled .nav__name, body[data-page="project"] .nav__name { color: var(--ink); }
/* sur le hero, nav transparent → texte clair */
body[data-page="home"] .nav:not(.is-scrolled) .nav__name,
body[data-page="home"] .nav:not(.is-scrolled) .nav__links a,
body[data-page="home"] .nav:not(.is-scrolled) .langs__current { color: #fff; }

.nav__links { display: flex; gap: 26px; }
.nav__links a {
    font-weight: 600; font-size: .94rem; position: relative; color: var(--text); padding: 4px 0;
    transition: color .25s;
}
.nav__links a::after {
    content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--terra);
    transition: width .3s var(--ease);
}
.nav__links a:hover { color: var(--terra-deep); }
.nav__links a:hover::after { width: 100%; }

.nav__right { display: flex; align-items: center; gap: 14px; }

/* sélecteur de langue */
.langs { position: relative; }
.langs__current {
    display: flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--line);
    border-radius: 999px; padding: 5px 10px; font-weight: 700; font-size: .82rem; cursor: pointer;
    color: var(--text); transition: border-color .25s, background .25s;
}
body[data-page="home"] .nav:not(.is-scrolled) .langs__current { border-color: rgba(255,255,255,.45); }
.langs__current img { border-radius: 4px; }
.langs__current:hover { border-color: var(--terra); }
.langs__current svg { transition: transform .3s; }
.langs.is-open .langs__current svg { transform: rotate(180deg); }
.langs__menu {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 168px; list-style: none;
    margin: 0; padding: 7px; background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: 0 20px 44px -20px rgba(33,29,58,.4);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .25s var(--ease);
}
.langs.is-open .langs__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.langs__menu a {
    display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
    font-weight: 600; font-size: .9rem; color: var(--text); transition: background .2s;
}
.langs__menu a:hover { background: var(--terra-tint); }
.langs__menu img { border-radius: 4px; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }
body[data-page="home"] .nav:not(.is-scrolled) .nav__burger span { background: #fff; }
.nav.is-menu .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-menu .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-menu .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__scrim { position: fixed; inset: 0; background: rgba(20,18,35,.5); z-index: 998; }

/* ---------- HERO ---------- */
.hero {
    position: relative; min-height: 100svh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; color: #fff;
    padding: var(--nav-h) 24px 80px; overflow: hidden;
}
.hero__bg {
    position: absolute; inset: 0; z-index: -2;
    background: url("../../IMG/cover_2.jpg") center/cover no-repeat;
    transform: scale(1.05);
}
.hero__veil {
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(120% 90% at 50% 10%, transparent 30%, rgba(33,29,58,.55) 100%),
        linear-gradient(180deg, rgba(33,29,58,.45) 0%, rgba(181,107,86,.35) 60%, rgba(33,29,58,.75) 100%);
}
.hero__contact {
    position: absolute; top: calc(var(--nav-h) + 18px); left: 18px; z-index: 3;
    display: flex; align-items: center; gap: 8px; padding: 8px 16px 8px 30px;
    border-left: 3px solid var(--terra); border-radius: 10px; font-size: .82rem;
}
.hero__contact-ic { height: 30px; position: absolute; left: -16px; top: 50%; transform: translateY(-50%); }
.hero__contact a { color: #fff; font-weight: 600; }
.glass { background: rgba(255,255,255,.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.18); }

.hero__content { position: relative; z-index: 2; max-width: 760px; animation: rise .9s var(--ease) both; }
.hero__avatar-ring {
    display: inline-grid; place-items: center; width: 150px; height: 150px; border-radius: 50%;
    padding: 5px; background: conic-gradient(from 200deg, var(--terra), #fff, var(--terra-soft), var(--terra));
    box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); margin-bottom: 22px;
}
.hero__avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: top; background: var(--terra); }
.hero__title { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 900; text-shadow: 0 4px 30px rgba(0,0,0,.35); }
.hero__title::after { content: ""; display: block; width: 64px; height: 4px; background: var(--terra); margin: 18px auto 0; border-radius: 4px; }
.hero__role { font-size: clamp(.95rem, 2vw, 1.15rem); color: rgba(255,255,255,.9); font-weight: 500; margin: 18px 0 26px; letter-spacing: .02em; }
.hero__actions { margin-bottom: 30px; }
.hero__chips { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.chip {
    font-weight: 600; font-size: .85rem; padding: 8px 18px; border-radius: 999px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(6px);
    transition: .3s var(--ease);
}
.chip:hover { background: var(--terra); border-color: var(--terra); transform: translateY(-3px); }

.hero__scroll {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
    display: flex; flex-direction: column; align-items: center; gap: 6px; color: rgba(255,255,255,.85);
    font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 700;
}
.hero__scroll svg { animation: bob 1.8s ease-in-out infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- SECTIONS GÉNÉRIQUES ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 96px 28px; }
.section--tint { max-width: none; background: var(--terra-tint); position: relative; }
.section--tint > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section--tint::before, .section--tint::after {
    content: ""; position: absolute; left: 0; right: 0; height: 60px;
    background: var(--bg); -webkit-mask: var(--tri) center/100% 100% no-repeat; mask: var(--tri) center/100% 100% no-repeat;
}
.section--tint::before { top: -1px; --tri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 100,0 50,10'/%3E%3C/svg%3E"); }
.section--tint::after  { bottom: -1px; --tri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpolygon points='0,10 100,10 50,0'/%3E%3C/svg%3E"); }

.section__head { text-align: center; margin-bottom: 54px; }
.section__head h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 900; color: var(--ink); }
.eyebrow {
    display: inline-block; font-family: "Manrope", sans-serif; font-weight: 700; font-size: .76rem;
    text-transform: uppercase; letter-spacing: .22em; color: var(--terra-deep); margin-bottom: 12px;
}

/* ---------- PRESENTATION ---------- */
.present { max-width: 760px; margin: 0 auto; padding: 84px 28px 30px; text-align: center; }
.present__line { width: 90px; height: 3px; background: var(--terra); margin: 0 auto 30px; border-radius: 3px; }
.present__text { font-family: "Fraunces", serif; font-size: clamp(1.5rem, 3.6vw, 2.3rem); font-weight: 400; line-height: 1.3; color: var(--ink); }
.present__text b { color: var(--terra-deep); font-weight: 600; }

/* ---------- ABOUT ---------- */
.about__grid { display: grid; grid-template-columns: minmax(0,.85fr) 1.15fr; gap: 60px; align-items: center; }
.about__photo { position: relative; }
.about__photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-card); position: relative; z-index: 2; }
.about__photo-accent { position: absolute; inset: 18px -18px -18px 18px; border: 3px solid var(--terra); border-radius: var(--radius); z-index: 1; }
.about__text h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 900; color: var(--ink); margin-bottom: 18px; }
.about__text .lead { font-size: 1.08rem; color: var(--text); }
.about__text .lead b { color: var(--terra-deep); }
.about__text .muted { color: var(--muted); font-size: .96rem; margin: 18px 0 26px; }
.about__text .muted b { color: var(--ink); }

/* ---------- GRILLES / CARTES ---------- */
.grid { display: grid; gap: 30px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
    display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-offset), var(--shadow-card); }
.card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; display: block; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.07); }
.card__shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%); transform: translateX(-100%); transition: transform .7s var(--ease); }
.card:hover .card__shine { transform: translateX(100%); }
.card__badge {
    position: absolute; top: 12px; left: 12px; background: var(--ink); color: #fff;
    font-size: .72rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; letter-spacing: .02em;
}
.card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__name { font-family: "Fraunces", serif; font-size: 1.22rem; font-weight: 600; color: var(--ink); }
.card__name b { color: var(--terra-deep); }
.card__tech { font-size: .8rem; color: var(--muted); font-weight: 600; }
.card__cta { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 7px; color: var(--terra-deep); font-weight: 700; font-size: .88rem; transition: gap .3s var(--ease); }
.card:hover .card__cta { gap: 12px; }

/* ---------- CONTACT ---------- */
.contact__card {
    display: flex; align-items: center; gap: 34px; max-width: 840px; margin: 0 auto;
    background: linear-gradient(135deg, #fff, var(--terra-tint)); border: 1px solid var(--line);
    border-radius: 24px; padding: 40px; box-shadow: var(--shadow-card);
}
.contact__avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--terra); flex: none; box-shadow: var(--shadow-offset); }
.contact__body h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 900; color: var(--ink); margin-bottom: 8px; }
.contact__body p { color: var(--muted); margin: 0 0 20px; }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 26px 28px; display: flex; align-items: center; gap: 16px; }
.footer__brand { font-family: "Fraunces", serif; font-weight: 600; color: var(--ink); }
.footer__made { margin: 0 auto; color: var(--muted); font-size: .9rem; }
.heart { color: var(--terra); }
.footer__top { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); transition: .3s var(--ease); }
.footer__top:hover { background: var(--terra); color: #fff; border-color: var(--terra); transform: translateY(-3px); }

/* ---------- PAGE PROJET ---------- */
.proj__banner { position: relative; height: 230px; margin-top: var(--nav-h); display: flex; align-items: flex-end; }
.proj__banner-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.proj__banner-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(33,29,58,.35), rgba(33,29,58,.7)); }
.contact-pill { position: absolute; top: 18px; right: 20px; z-index: 2; color: #fff; border: 2px solid rgba(255,255,255,.7); background: rgba(0,0,0,.18); backdrop-filter: blur(4px); padding: .6em 1.2em; border-radius: 999px; font-weight: 700; font-size: .82rem; transition: .3s var(--ease); }
.contact-pill:hover { background: #fff; color: var(--ink); border-color: #fff; }

.proj__head { max-width: var(--maxw); margin: 0 auto; padding: 34px 28px 8px; }
.proj__title { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 900; color: var(--ink); margin-top: 6px; }
.proj__title b { color: var(--terra-deep); }

.proj__layout { max-width: var(--maxw); margin: 0 auto; padding: 30px 28px 20px; display: grid; grid-template-columns: 1fr minmax(0, 430px); gap: 50px; align-items: start; }
.proj__content { border-left: 4px solid var(--terra); padding-left: 22px; }
.proj__content p { margin: 0 0 16px; color: var(--text); }
.proj__content ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.proj__content ul.keys li, .proj__content ul.cmds li { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: .95rem; }
kbd { font-family: "Manrope", sans-serif; font-weight: 700; min-width: 30px; text-align: center; padding: 4px 9px; background: var(--ink); color: #fff; border-radius: 7px; font-size: .82rem; box-shadow: 0 2px 0 rgba(0,0,0,.25); flex: none; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; background: var(--terra-tint); color: var(--terra-deep); padding: 3px 8px; border-radius: 6px; font-size: .85rem; font-weight: 700; flex: none; }
.proj__content .warn { background: #fff4f0; border: 1px solid var(--terra-soft); color: var(--terra-deep); padding: 12px 16px; border-radius: 12px; font-weight: 600; }

.proj__tech { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.proj__tech-label { display: block; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); margin-bottom: 12px; }
.proj__tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: .8rem; padding: 6px 13px; border-radius: 999px; }

.proj__media { position: sticky; top: calc(var(--nav-h) + 24px); }
.proj__frame { position: relative; display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-offset), var(--shadow-card); margin-bottom: 16px; }
.proj__frame img, .proj__frame video { width: 100%; display: block; }
.proj__frame--static, .proj__frame--video { box-shadow: var(--shadow-card); }
.proj__play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.4rem; color: #fff; background: rgba(33,29,58,.32); opacity: 0; transition: opacity .35s; }
.proj__frame:hover .proj__play { opacity: 1; }
.notice { padding: 11px 15px; border-radius: 12px; font-size: .82rem; font-weight: 600; margin: 0 0 14px; text-align: center; }
.notice--warn { background: #fdeceb; color: #b23b2e; border: 1px solid #f3c2bc; }
.notice--wip { background: #fff7e6; color: #a9791b; border: 1px solid #f0dca8; }

/* ---------- 404 ---------- */
.error { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; color: #fff; padding: var(--nav-h) 24px 0; overflow: hidden; }
.error__bg { position: absolute; inset: 0; z-index: -2; background: url("../../IMG/cover_2.jpg") center/cover; }
.error__veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(33,29,58,.6), rgba(181,107,86,.5)); }
.error__content { position: relative; z-index: 1; }
.error__code { font-family: "Fraunces", serif; font-weight: 900; font-size: clamp(5rem, 18vw, 11rem); line-height: 1; display: block; color: var(--terra-soft); text-shadow: 0 10px 40px rgba(0,0,0,.4); }
.error__content h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 6px 0 10px; }
.error__content p { color: rgba(255,255,255,.85); margin-bottom: 26px; }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
    .hero__content { animation: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .about__grid { grid-template-columns: 1fr; gap: 36px; }
    .about__photo { max-width: 440px; }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .proj__layout { grid-template-columns: 1fr; gap: 32px; }
    .proj__media { position: static; max-width: 480px; }
}

@media (max-width: 760px) {
    .nav__links {
        position: fixed; top: var(--nav-h); right: 0; bottom: 0; width: min(80vw, 320px); z-index: 999;
        flex-direction: column; gap: 0; background: var(--surface); padding: 16px;
        transform: translateX(100%); transition: transform .4s var(--ease); box-shadow: -20px 0 50px -30px rgba(0,0,0,.5);
    }
    .nav.is-menu .nav__links { transform: none; }
    .nav__links a { padding: 14px 10px; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--text) !important; }
    .nav__burger { display: flex; }
    .section { padding: 70px 20px; }
    .present { padding-top: 64px; }
    .grid--2, .grid--3 { grid-template-columns: 1fr; }
    .contact__card { flex-direction: column; text-align: center; padding: 32px 24px; gap: 20px; }
    .hero__contact { left: 12px; font-size: .74rem; padding: 7px 12px 7px 26px; }
    .hero__avatar-ring { width: 116px; height: 116px; }
    .footer__inner { flex-direction: column; text-align: center; gap: 12px; }
}

/* =========================================================
   DARK MODE  —  opt-in via <html data-theme="dark">
   Light stays the default. The UI is variable-driven, so dark
   mode re-points the palette, then overrides the few places that
   hard-coded light colours (scrolled nav, badges, kbd, notices,
   contact card). The image-based hero is intentionally unchanged.
   ========================================================= */
[data-theme="dark"] {
    --terra:       #dd9a88;
    --terra-soft:  #ecc0b4;
    --terra-deep:  #e8ab97;   /* lighter so accent text reads on dark */
    --terra-tint:  #dd9a8822;

    --paper:       #16131f;
    --ink:         #f3f0f7;   /* now the light, prominent text colour */
    --ink-soft:    #c9c4d6;

    --bg:          #141019;
    --surface:     #1e1a2b;
    --line:        #332d45;
    --text:        #dcd8e6;
    --muted:       #9a94ab;

    --shadow-card:  0 22px 48px -24px rgba(0,0,0,.72);
    --shadow-offset: 10px 10px 0 0 rgba(0,0,0,.30);
}

/* scrolled / project nav: light glass → dark glass */
[data-theme="dark"] .nav.is-scrolled,
[data-theme="dark"] body[data-page="project"] .nav {
    background: rgba(20,17,28,.82);
    border-bottom-color: var(--line);
    box-shadow: 0 6px 24px -20px rgba(0,0,0,.8);
}

/* spots that used var(--ink) as a DARK chip background — keep them dark */
[data-theme="dark"] .card__badge { background: #12101a; color: #fff; }
[data-theme="dark"] kbd          { background: #12101a; color: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.5); }
[data-theme="dark"] .btn--solid:hover { background: #100e18; color: #fff; }

/* light-coloured panels / notices → dark equivalents */
[data-theme="dark"] .contact__card {
    background: linear-gradient(135deg, var(--surface), var(--terra-tint));
}
[data-theme="dark"] .proj__content .warn {
    background: rgba(221,154,136,.12); border-color: var(--terra-soft); color: var(--terra-deep);
}
[data-theme="dark"] .notice--warn {
    background: rgba(178,59,46,.16); color: #f0a99f; border-color: rgba(240,120,105,.4);
}
[data-theme="dark"] .notice--wip {
    background: rgba(169,121,27,.16); color: #e8c777; border-color: rgba(240,200,120,.4);
}

/* ---------- Theme toggle (next to the language selector) ---------- */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 34px; padding: 0; flex: none;
    background: transparent; border: 1px solid var(--line); border-radius: 999px;
    color: var(--text); cursor: pointer;
    transition: border-color .25s, background .25s, color .25s, transform .25s var(--ease);
}
.theme-toggle:hover { border-color: var(--terra); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .ic-sun { display: none; }
[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
[data-theme="dark"] .theme-toggle .ic-sun  { display: block; }
/* on the transparent hero nav, match the light treatment of the lang pill */
body[data-page="home"] .nav:not(.is-scrolled) .theme-toggle { border-color: rgba(255,255,255,.45); color: #fff; }
