/* ============================================================
   Matthieu Ferellec — Site CV
   Design : dark, audacieux, dégradés animés
   ============================================================ */

:root {
  /* ---- Tokens partagés ---- */
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1180px;
  --ease: cubic-bezier(.2,.7,.2,1);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* ---- Thème CLAIR (par défaut) ---- */
  --bg: #f5f6fb;
  --bg-2: #eceef6;
  --surface: #ffffff;
  --surface-2: #eef0f8;
  --border: #e2e4ee;
  --ink: #14141d;
  --ink-soft: #4a4a5e;
  --ink-dim: #8a8a9e;

  --c1: #6d3efc; /* violet */
  --c2: #0891b2; /* teal (lisible sur clair) */
  --c3: #e11d67; /* rose  */
  --accent-ink: #0787a3; /* texte d'accent lisible */

  --grad: linear-gradient(100deg, #6d3efc, #0aa2c0 55%, #e11d67);
  --grad-soft: linear-gradient(100deg, rgba(109,62,252,.10), rgba(8,145,178,.08), rgba(225,29,103,.09));

  --nav-bg: rgba(255,255,255,.78);
  --menu-bg: rgba(255,255,255,.97);
  --panel-2: rgba(255,255,255,.6);
  --grid-line: rgba(20,20,50,.05);
  --portrait-border: rgba(0,0,0,.06);
  --blob-op1: .26;
  --blob-op2: .18;
  --blob-op3: .16;
}

/* ---- Thème SOMBRE (option) ---- */
:root[data-theme="dark"] {
  --bg: #0b0b12;
  --bg-2: #101019;
  --surface: #15151f;
  --surface-2: #1c1c29;
  --border: #262636;
  --ink: #f3f3f8;
  --ink-soft: #a9a9c0;
  --ink-dim: #6d6d84;

  --c1: #6d5efc;
  --c2: #00e5ff;
  --c3: #ff3d7f;
  --accent-ink: #00e5ff;

  --grad: linear-gradient(100deg, #6d5efc, #00e5ff 55%, #ff3d7f);
  --grad-soft: linear-gradient(100deg, rgba(109,94,252,.18), rgba(0,229,255,.12), rgba(255,61,127,.14));

  --nav-bg: rgba(11,11,18,.72);
  --menu-bg: rgba(11,11,18,.97);
  --panel-2: rgba(11,11,18,.5);
  --grid-line: rgba(255,255,255,.03);
  --portrait-border: rgba(255,255,255,.06);
  --blob-op1: .55;
  --blob-op2: .38;
  --blob-op3: .32;
}

html { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

body, .nav, .blob, .bg-grid, .btn, .skill-card, .tl-item__card, .cert, .ia__col, .tri__col, .contact__inner, .chips li, .nav__logo-mark {
  transition-property: background-color, border-color, color;
  transition-duration: .35s;
  transition-timing-function: var(--ease);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong { color: var(--ink); font-weight: 600; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hl {
  color: var(--accent-ink);
  font-weight: 600;
}

/* ---------- Fonds décoratifs ---------- */
.bg-mesh, .bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: var(--blob-op1);
  will-change: transform;
}
.blob-1 { width: 46vw; height: 46vw; background: var(--c1); top: -12vw; left: -8vw; animation: float1 22s var(--ease) infinite; }
.blob-2 { width: 40vw; height: 40vw; background: var(--c2); top: 25vh; right: -12vw; opacity: var(--blob-op2); animation: float2 26s var(--ease) infinite; }
.blob-3 { width: 38vw; height: 38vw; background: var(--c3); bottom: -14vw; left: 20vw; opacity: var(--blob-op3); animation: float3 30s var(--ease) infinite; }

@keyframes float1 { 50% { transform: translate(8vw, 10vh) scale(1.15); } }
@keyframes float2 { 50% { transform: translate(-10vw, 6vh) scale(1.1); } }
@keyframes float3 { 50% { transform: translate(6vw, -8vh) scale(1.2); } }

.bg-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

.cursor-glow {
  position: fixed; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,.10), transparent 65%);
  transform: translate(-50%, -50%); pointer-events: none; z-index: -1;
  left: 50%; top: 30%; transition: opacity .3s; opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none !important; }
}

/* ---------- Barre de progression ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 100;
  box-shadow: 0 0 12px rgba(0,229,255,.6);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  transition: background .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__logo-mark {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  letter-spacing: .5px;
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--c2);
  transition: transform .3s var(--ease), border-color .3s;
}
.nav__logo:hover .nav__logo-mark { transform: rotate(-8deg) scale(1.05); border-color: var(--c2); }

.nav__links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav__links a {
  font-size: .92rem; color: var(--ink-soft); font-weight: 500;
  position: relative; padding: .2rem 0; transition: color .25s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--grad); transition: width .3s var(--ease);
}
.nav__links a:hover, .nav__links a.active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.active::after { width: 100%; }

.nav__burger { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav__burger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Bascule de thème */
.nav__theme {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 12px; cursor: pointer; color: var(--ink-soft);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .25s var(--ease), color .25s, border-color .25s, background .3s;
}
.nav__theme:hover { color: var(--c2); border-color: var(--c2); transform: translateY(-2px); }
.nav__theme svg { width: 20px; height: 20px; }
.nav__theme .icon-sun { display: none; }
.nav__theme .icon-moon { display: block; }
:root[data-theme="dark"] .nav__theme .icon-sun { display: block; }
:root[data-theme="dark"] .nav__theme .icon-moon { display: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: .7rem 1.3rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); transition: transform .25s var(--ease), box-shadow .3s, border-color .3s, background .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--grad); color: #0b0b12; border-color: transparent;
  box-shadow: 0 8px 30px -8px rgba(0,229,255,.5);
}
.btn--primary:hover { box-shadow: 0 14px 40px -8px rgba(109,94,252,.6); }
.btn--ghost { background: var(--surface); color: var(--ink); }
.btn--ghost:hover { border-color: var(--c2); }
.btn--nav { padding: .5rem 1rem; font-size: .85rem; background: var(--surface); }
.btn--nav:hover { border-color: var(--c2); color: var(--c2); }
.btn--lg { padding: .95rem 1.8rem; font-size: 1rem; }

/* ---------- HERO ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(7rem, 14vh, 11rem) clamp(1.2rem, 4vw, 3rem) 3rem;
}
.hero__inner {
  display: grid; grid-template-columns: 1.4fr .8fr; gap: 3rem; align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .04em;
  color: var(--ink-soft); text-transform: uppercase;
  padding: .4rem .9rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #2ee6a6; box-shadow: 0 0 0 0 rgba(46,230,166,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(46,230,166,0); } 100% { box-shadow: 0 0 0 0 rgba(46,230,166,0);} }

.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.2rem, 9vw, 6.4rem); line-height: .95;
  letter-spacing: -.02em; margin: 1.2rem 0 .6rem;
}
.hero__title .line { display: block; }
.hero__role { font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--ink-soft); font-weight: 500; }
.hero__role strong { color: var(--ink); }
.hero__pitch { margin-top: 1.3rem; max-width: 52ch; color: var(--ink-soft); font-size: 1.05rem; }

.hero__cta { display: flex; gap: .9rem; margin-top: 2rem; flex-wrap: wrap; }
.hero__social { display: flex; gap: .7rem; margin-top: 1.8rem; }
.hero__social a {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft);
  transition: transform .25s var(--ease), color .25s, border-color .25s, background .25s;
}
.hero__social a:hover { color: var(--c2); border-color: var(--c2); transform: translateY(-3px); background: var(--surface-2); }

/* Portrait */
.hero__portrait { position: relative; justify-self: center; }
.portrait { position: relative; width: clamp(220px, 26vw, 320px); aspect-ratio: 1; }
.portrait img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  position: relative; z-index: 2;
  border: 3px solid var(--portrait-border);
}
.portrait__ring {
  position: absolute; inset: -14px; border-radius: 50%; z-index: 1;
  background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c1));
  filter: blur(2px); opacity: .8;
  animation: spin 8s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 16px), #000 calc(100% - 15px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 16px), #000 calc(100% - 15px));
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .portrait__ring { animation: none; } }

.portrait__badge {
  position: absolute; z-index: 3;
  font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  padding: .45rem .8rem; border-radius: 999px;
  background: rgba(21,21,31,.9); border: 1px solid var(--border);
  backdrop-filter: blur(8px); box-shadow: 0 8px 24px -8px rgba(0,0,0,.6);
  animation: bob 4s ease-in-out infinite;
}
.portrait__badge--1 { top: 6%; left: -18%; color: var(--c2); }
.portrait__badge--2 { bottom: 16%; left: -22%; color: var(--c1); animation-delay: -1.3s; }
.portrait__badge--3 { bottom: 2%; right: -14%; color: var(--c3); animation-delay: -2.4s; }
@keyframes bob { 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .portrait__badge { animation: none; } }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid var(--border);
}
.stats li { display: flex; flex-direction: column; }
.stats__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1; }
.stats__plus { display: none; }
.stats li:has(.stats__plus) { position: relative; }
.stats__num[data-count] + .stats__plus { display: inline; }
.stats__inf { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats__label { color: var(--ink-dim); font-size: .9rem; margin-top: .3rem; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 1.1rem 0; background: rgba(255,255,255,.015);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: inline-flex; gap: 1.5rem; white-space: nowrap; animation: marquee 34s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--ink-soft); }
.marquee__track span:nth-child(odd) { color: var(--ink); }
.marquee__track span:nth-child(even) { color: var(--c2); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(4.5rem, 10vh, 8rem) clamp(1.2rem, 4vw, 3rem); }
.section__head { max-width: 640px; margin-bottom: 3rem; }
.section__num {
  font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  color: var(--c2); letter-spacing: .2em; display: inline-block; margin-bottom: .8rem;
}
.section__title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05;
}
.section__sub { margin-top: 1rem; color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Compétences ---------- */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.4rem; transition: transform .3s var(--ease), border-color .3s, background .3s;
  position: relative; overflow: hidden;
}
.skill-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: var(--grad-soft);
}
.skill-card:hover { transform: translateY(-6px); border-color: rgba(0,229,255,.4); }
.skill-card:hover::before { opacity: 1; }
.skill-card > * { position: relative; }
.skill-card__icon { font-size: 1.8rem; margin-bottom: .7rem; }
.skill-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li {
  font-size: .82rem; padding: .3rem .7rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-soft);
}
.chips--sm { margin-top: 1rem; }
.chips--sm li { font-size: .76rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: clamp(1.4rem, 3vw, 2.2rem); list-style: none; }
.timeline::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--c1), var(--c2), var(--c3));
  opacity: .5;
}
.tl-item { position: relative; padding-bottom: 1.6rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item__dot {
  position: absolute; left: calc(-1 * clamp(1.4rem, 3vw, 2.2rem) - 5px); top: 26px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--c2); box-shadow: 0 0 0 4px rgba(0,229,255,.12);
}
.tl-item__card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem 1.6rem; transition: transform .3s var(--ease), border-color .3s;
}
.tl-item__card:hover { transform: translateX(6px); border-color: rgba(109,94,252,.4); }
.tl-item__top { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-bottom: .5rem; }
.tl-item__date {
  font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  color: #0b0b12; background: var(--grad); padding: .25rem .7rem; border-radius: 999px;
}
.tl-item__company { color: var(--c2); font-weight: 600; font-size: .9rem; }
.tl-item h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: .7rem; }
.tl-item__team { font-family: var(--font-body); font-weight: 400; font-size: .82rem; color: var(--ink-dim); }
.tl-item ul:not(.chips) { display: flex; flex-direction: column; gap: .4rem; }
.tl-item ul:not(.chips) li { position: relative; padding-left: 1.2rem; color: var(--ink-soft); font-size: .96rem; }
.tl-item ul:not(.chips) li::before { content: "▹"; position: absolute; left: 0; color: var(--c2); }

/* ---------- Certifications ---------- */
.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cert {
  position: relative; text-align: center; padding: 1.8rem 1rem 1.4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s var(--ease), border-color .3s;
}
.cert:hover { transform: translateY(-6px); border-color: rgba(0,229,255,.4); }
.cert__glow {
  position: absolute; inset: auto 0 -60% 0; height: 120%;
  background: radial-gradient(circle at 50% 100%, rgba(0,229,255,.18), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.cert:hover .cert__glow { opacity: 1; }
.cert__badge {
  font-size: 2rem; width: 62px; height: 62px; margin: 0 auto .8rem;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border); position: relative;
}
.cert h3 { font-family: var(--font-display); font-size: .98rem; line-height: 1.25; min-height: 2.4em; position: relative; }
.cert__tier {
  display: inline-block; margin-top: .7rem; font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; padding: .25rem .7rem; border-radius: 999px;
  position: relative;
}
.cert__tier--f { color: #0369a1; background: rgba(2,132,199,.12); }
.cert__tier--a { color: #5b21b6; background: rgba(109,94,252,.14); }
.cert__tier--e { color: #b45309; background: rgba(217,119,6,.14); }
.cert__tier--x { color: #047857; background: rgba(5,150,105,.14); }
.cert__tier--as { color: #0e7490; background: rgba(8,145,178,.13); }

:root[data-theme="dark"] .cert__tier--f { color: #7fd0ff; background: rgba(0,140,255,.14); }
:root[data-theme="dark"] .cert__tier--a { color: #b7a5ff; background: rgba(109,94,252,.16); }
:root[data-theme="dark"] .cert__tier--e { color: #ffd27f; background: rgba(255,170,0,.14); }
:root[data-theme="dark"] .cert__tier--x { color: #7fffc4; background: rgba(0,220,140,.14); }
:root[data-theme="dark"] .cert__tier--as { color: #67e8f9; background: rgba(6,182,212,.16); }

/* ---------- Section IA ---------- */
.ia { position: relative; }
.ia__inner {
  background: var(--grad-soft);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  position: relative; overflow: hidden;
}
.ia__inner::before {
  content: "🤖"; position: absolute; right: -1rem; top: -2rem; font-size: 12rem; opacity: .05; pointer-events: none;
}
.ia .section__head { margin-bottom: 2.5rem; }
.ia__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.ia__col {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.7rem; backdrop-filter: blur(6px);
}
.ia__col-title { font-family: var(--font-display); font-size: 1.15rem; display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.ia__pin {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad); color: #0b0b12; font-weight: 700; font-size: .9rem;
}
.ia__list { display: flex; flex-direction: column; gap: .8rem; }
.ia__list li { position: relative; padding-left: 1.5rem; color: var(--ink-soft); }
.ia__list li::before { content: "✦"; position: absolute; left: 0; color: var(--c2); }
.ia__tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.ia__tool {
  font-family: var(--font-display); font-size: .82rem; font-weight: 600;
  padding: .4rem .9rem; border-radius: 999px; color: var(--ink);
  background: rgba(0,229,255,.08); border: 1px solid rgba(0,229,255,.3);
}
.ia__quote {
  margin-top: 2rem; font-family: var(--font-display); font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  line-height: 1.5; font-weight: 500; text-align: center; color: var(--ink);
  max-width: 46ch; margin-inline: auto; padding: 0 1rem;
}

/* ---------- Tri (formation / soft / loisirs) ---------- */
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.tri__col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.7rem; }
.tri__title { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 1.3rem; }
.tri__item { padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: .2rem; }
.tri__item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.tri__item strong { font-size: 1rem; }
.tri__item span { color: var(--ink-soft); font-size: .92rem; }
.tri__item em { color: var(--c2); font-style: normal; font-size: .85rem; font-weight: 600; }
.tri__tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tri__tags li {
  padding: .5rem 1rem; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--ink-soft); font-size: .9rem;
}

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact__inner {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; position: relative; overflow: hidden;
}
.contact__inner::after {
  content: ""; position: absolute; inset: -2px; border-radius: var(--radius-lg); padding: 2px;
  background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .35; pointer-events: none;
}
.contact .section__num { position: relative; }
.contact__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 5vw, 3rem); margin: .4rem 0 .8rem; }
.contact__sub { color: var(--ink-soft); font-size: 1.05rem; }
.contact__actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0 1.5rem; }
.contact__links { display: flex; gap: 1.5rem; justify-content: center; }
.contact__links a { color: var(--ink-soft); font-weight: 500; transition: color .25s; }
.contact__links a:hover { color: var(--c2); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw); margin: 0 auto; padding: 2rem clamp(1.2rem, 4vw, 3rem);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--border); color: var(--ink-dim); font-size: .88rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__portrait { order: -1; justify-self: start; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .ia__grid { grid-template-columns: 1fr; }
  .tri { grid-template-columns: 1fr; }

  .nav__links {
    position: fixed; inset: 0 0 auto 0; top: 0; flex-direction: column; gap: 0;
    background: var(--menu-bg); backdrop-filter: blur(16px);
    padding: 5.5rem 2rem 2rem; transform: translateY(-110%); transition: transform .4s var(--ease);
    border-bottom: 1px solid var(--border); margin-left: 0;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { padding: 1rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--border); }
  .nav__burger { display: flex; order: 3; }
  .btn--nav { order: 2; }
}

@media (max-width: 520px) {
  .certs { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero__cta .btn { flex: 1; justify-content: center; }
  .portrait__badge--1 { left: 0; }
  .portrait__badge--2 { left: -4%; }
  .portrait__badge--3 { right: 0; }
  .footer { justify-content: center; text-align: center; }
}
