/* =========================================================
   Franck Nguimkeu — Portfolio
   Design system: editorial, premium, dark/light
   ========================================================= */

:root {
  /* Palette — dark (default) */
  --bg: #08080a;
  --bg-soft: #0f0f12;
  --surface: #141418;
  --surface-2: #1b1b21;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f5;
  --text-soft: #b8b8c0;
  --text-mute: #7c7c88;

  --accent: #f5b820;
  --accent-2: #ffd45a;
  --accent-3: #ff9e2c;
  --grad: linear-gradient(100deg, #ffd76a 0%, #f5b820 45%, #e59400 100%);

  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
  --bg: #f6f6f4;
  --bg-soft: #eeeeeb;
  --surface: #ffffff;
  --surface-2: #f3f3f0;
  --border: rgba(0, 0, 0, 0.10);
  --border-strong: rgba(0, 0, 0, 0.18);
  --text: #0c0c0f;
  --text-soft: #40404a;
  --text-mute: #71717a;
  --accent: #b7791f;
  --grad: linear-gradient(100deg, #d99a2b, #b7791f 60%, #9a6410);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.18);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #1a1500; }

/* ---------- Background canvas + orbs ---------- */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55;
}
.orb {
  position: fixed; z-index: 0; border-radius: 50%; filter: blur(90px);
  pointer-events: none; opacity: 0.5;
}
.orb-1 {
  width: 520px; height: 520px; top: -160px; right: -120px;
  background: radial-gradient(circle, rgba(245,184,32,0.45), transparent 70%);
  animation: float1 18s var(--ease) infinite alternate;
}
.orb-2 {
  width: 460px; height: 460px; bottom: -180px; left: -140px;
  background: radial-gradient(circle, rgba(255,180,40,0.30), transparent 70%);
  animation: float2 22s var(--ease) infinite alternate;
}
:root[data-theme="light"] .orb { opacity: 0.35; }
@keyframes float1 { to { transform: translate(-60px, 80px) scale(1.15); } }
@keyframes float2 { to { transform: translate(70px, -60px) scale(1.1); } }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--grad); z-index: 100; transition: width 0.1s linear;
}

/* ---------- Layout helper ---------- */
main { position: relative; z-index: 1; }
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(70px, 11vw, 140px) var(--gutter);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 90; width: min(1180px, calc(100% - 28px));
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 12px 10px 18px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  transition: box-shadow 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}
.nav.scrolled { box-shadow: var(--shadow); }

.nav__brand { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.nav__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px var(--accent); flex: none; }
.nav__name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.nav__role { font-size: 12px; color: var(--text-mute); padding-left: 9px; border-left: 1px solid var(--border); }

.nav__links { display: flex; gap: 4px; }
.nav__links a {
  font-size: 13.5px; color: var(--text-soft); padding: 7px 13px; border-radius: var(--radius-pill);
  transition: color 0.25s, background 0.25s; position: relative;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a.active { color: var(--text); background: var(--surface-2); }

.nav__actions { display: flex; align-items: center; gap: 8px; }
.toggle {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.toggle:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.toggle__label { font-family: var(--font-display); font-weight: 600; font-size: 12px; }
.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

.nav__burger { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 500; font-size: 14.5px;
  padding: 12px 22px; border-radius: var(--radius-pill); border: 1px solid transparent;
  cursor: pointer; transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), background 0.28s, border-color 0.28s, color 0.28s;
  white-space: nowrap;
}
.btn--pill { padding: 9px 18px; font-size: 13.5px; }
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--text) 45%, transparent); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { transform: translateY(-3px); border-color: var(--text); background: var(--surface-2); }
.nav__cta { background: var(--grad); color: #1a1500; }
.nav__cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px var(--accent); }

/* ---------- Typography helpers ---------- */
.ital { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0.005em; }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}

/* ---------- Hero (fullscreen cinematic) ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: 128px var(--gutter) 96px; overflow: hidden;
  /* Force a dark cinematic palette inside the hero, in both themes */
  --bg: #08080a; --surface: #17171c; --surface-2: #212128;
  --border: rgba(255,255,255,0.14); --border-strong: rgba(255,255,255,0.30);
  --text: #f5f5f7; --text-soft: #d7d7df; --text-mute: #a6a6b3;
  --accent: #f5b820; --grad: linear-gradient(100deg, #ffd76a 0%, #f5b820 45%, #e59400 100%);
}
.hero__inner { position: relative; z-index: 3; max-width: 920px; width: 100%; margin: 0 auto; }

/* media layers */
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.hero__video.is-active { display: block; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,6,9,0.55) 0%, rgba(6,6,9,0.30) 42%, rgba(6,6,9,0.92) 100%),
    radial-gradient(120% 85% at 72% 18%, rgba(245,184,32,0.20), transparent 55%),
    radial-gradient(90% 70% at 15% 90%, rgba(255,190,50,0.12), transparent 55%);
}
.hero__grid-lines {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 35%, #000 30%, transparent 78%);
  mask-image: radial-gradient(120% 80% at 50% 35%, #000 30%, transparent 78%);
}

/* hero phase progress (synced with the DataHero animation) */
.hero__phases {
  position: absolute; left: var(--gutter); bottom: 30px; z-index: 3; margin: 0; padding: 0;
  list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 126px)); gap: 12px;
  max-width: min(690px, 62vw);
}
.hero__phases li { display: flex; flex-direction: column; gap: 9px; }
.hp-line { height: 1px; background: rgba(255,255,255,0.16); transition: background 0.8s var(--ease); }
.hp-txt { display: flex; gap: 6px; white-space: nowrap; font-family: var(--font-display); font-size: 11px; letter-spacing: 0.03em; color: var(--text-mute); transition: color 0.8s var(--ease); }
.hp-txt b { color: var(--accent); font-weight: 600; }
.hero__phases li.done .hp-line { background: var(--accent); }
.hero__phases li.active .hp-txt { color: #fff; }
@media (max-width: 880px) { .hero__phases { display: none; } }

/* scroll indicator */
.hero__scroll {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--text-mute); transition: color 0.25s;
}
.hero__scroll:hover { color: var(--text); }
.hero__scroll-line { position: relative; width: 1.5px; height: 50px; background: rgba(255,255,255,0.14); overflow: hidden; border-radius: 2px; }
.hero__scroll-line::after {
  content: ""; position: absolute; left: 0; top: -50%; width: 100%; height: 50%;
  background: linear-gradient(var(--accent), transparent); animation: scrollPulse 1.8s var(--ease) infinite;
}
@keyframes scrollPulse { 0% { top: -60%; } 100% { top: 110%; } }
@media (prefers-reduced-motion: reduce) { .hero__scroll-line::after { animation: none; } }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-soft);
  background: var(--surface); border: 1px solid var(--border); padding: 8px 16px;
  border-radius: var(--radius-pill); margin-bottom: 30px; max-width: 100%; flex-wrap: wrap;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 6.4vw, 4.7rem); line-height: 1.04; letter-spacing: -0.03em;
  margin-bottom: 28px;
}
.hero__title .ital { font-size: 1.06em; }
.hero__sub { font-size: clamp(1rem, 2vw, 1.18rem); color: var(--text-soft); max-width: 660px; margin-bottom: 22px; }
.hero__skills { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 32px; }
.hero__skills span {
  position: relative; font-family: var(--font-display); font-weight: 500; font-size: 13px;
  color: var(--text-soft); padding: 0 16px; white-space: nowrap;
}
.hero__skills span:first-child { padding-left: 0; }
.hero__skills span:not(:last-child)::after {
  content: ""; position: absolute; right: -2px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 14px; color: var(--text-mute); }
.hero__meta a { color: var(--text-soft); border-bottom: 1px solid var(--border-strong); padding-bottom: 1px; transition: color 0.2s, border-color 0.2s; }
.hero__meta a:hover { color: var(--accent); border-color: var(--accent); }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--text-mute); }

/* ---------- Stats ---------- */
.stats { max-width: var(--maxw); margin: 0 auto; padding: 30px var(--gutter) 0; }
.stats__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 16px; }
.stats__head .eyebrow { margin-bottom: 0; }
.stats__link { font-family: var(--font-display); font-size: 13px; color: var(--text-soft); border-bottom: 1px solid var(--border-strong); padding-bottom: 1px; white-space: nowrap; transition: color 0.2s, border-color 0.2s; }
.stats__link:hover { color: var(--accent); border-color: var(--accent); }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: color-mix(in srgb, var(--surface) 55%, transparent); backdrop-filter: blur(10px);
}
.stat { padding: 34px 26px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat__num {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -0.02em; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { display: block; margin-top: 10px; font-size: 13.5px; color: var(--text-mute); }

/* ---------- Section head ---------- */
.section__head { margin-bottom: 54px; max-width: 720px; }
.section__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.08; letter-spacing: -0.025em;
}
.section__title .ital { font-size: 1.08em; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.about__text p { color: var(--text-soft); font-size: 1.05rem; margin-bottom: 18px; }
.about__ambition { color: var(--text) !important; font-weight: 500; }
.about__cards { display: grid; gap: 14px; }
.mini-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.mini-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.mini-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; margin-bottom: 7px; }
.mini-card p { color: var(--text-mute); font-size: 0.94rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--border-strong), transparent); }
.tl-item { position: relative; padding: 4px 0 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item__marker {
  position: absolute; left: -30px; top: 8px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--grad); box-shadow: 0 0 0 4px var(--bg), 0 0 14px var(--accent);
}
.tl-item__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; align-items: flex-start; margin-bottom: 6px; }
.tl-item__id { display: flex; align-items: center; gap: 14px; }
.tl-logo { width: 54px; height: 54px; flex: none; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--border); padding: 4px; box-shadow: 0 6px 18px -8px rgba(0,0,0,0.5); }
.tl-logo--mono { display: grid; place-items: center; padding: 0; border: none; background: var(--grad); color: #1a1500; font-family: var(--font-display); font-weight: 700; font-size: 27px; line-height: 1; }
.tl-item__role { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; }
.tl-item__org { font-size: 0.95rem; color: var(--accent); font-weight: 500; }
.tl-item__date { font-size: 0.85rem; color: var(--text-mute); font-family: var(--font-display); white-space: nowrap; }
.tl-item__punch { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; line-height: 1.35; color: var(--text); margin: 8px 0 6px; max-width: 60ch; }
.tl-item__tag { font-size: 0.92rem; color: var(--text-soft); margin: 4px 0 12px; font-style: italic; }
.tl-chain { display: flex; flex-wrap: wrap; align-items: center; row-gap: 6px; margin: 0 0 16px; }
.tl-chain span { font-family: var(--font-display); font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.tl-chain span:not(:last-child)::after { content: "→"; margin: 0 9px; color: var(--accent); font-weight: 600; }
.tl-item__list { list-style: none; display: grid; gap: 9px; margin-bottom: 16px; }
.tl-item__list li { position: relative; padding-left: 20px; font-size: 0.96rem; color: var(--text-soft); }
.tl-item__list li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.7; }
.tl-item__list strong { color: var(--text); font-weight: 600; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-size: 12.5px; color: var(--text-soft); background: var(--surface-2);
  border: 1px solid var(--border); padding: 5px 12px; border-radius: var(--radius-pill);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.chips span:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.chips--lg span { font-size: 13.5px; padding: 7px 15px; }

/* ---------- Projects ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.proj-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 26px; display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
  position: relative; overflow: hidden;
}
.proj-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  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: 0; transition: opacity 0.35s;
}
.proj-card:hover { transform: translateY(-6px); }
.proj-card:hover::after { opacity: 1; }
.proj-card__top { display: flex; justify-content: space-between; align-items: center; }
.proj-card__year { font-family: var(--font-display); font-size: 13px; color: var(--text-mute); }
.proj-card__ico { font-size: 26px; }
.proj-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; line-height: 1.25; letter-spacing: -0.01em; }
.proj-card p { color: var(--text-mute); font-size: 0.93rem; flex: 1; }

/* ---------- Skills ---------- */
.skills__grid { display: grid; gap: 16px; }
.skill-group {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 26px; display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: center;
}
.skill-group h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; }

/* ---------- Education ---------- */
.edu__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); }
.edu__colhead { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-mute); margin-bottom: 18px; }
.edu__colhead--mt { margin-top: 34px; }
.edu-item { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.edu-item:first-of-type { border-top: none; }
.edu-item__date { font-family: var(--font-display); font-size: 12.5px; color: var(--text-mute); white-space: nowrap; padding-top: 3px; min-width: 82px; }
.edu-item__badge {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); font-family: var(--font-display);
  font-weight: 600; font-size: 12px; color: var(--accent);
}
.edu-item h4 { font-family: var(--font-display); font-weight: 500; font-size: 1rem; }
.edu-item p { font-size: 0.88rem; color: var(--text-mute); }
.lang-row { display: flex; flex-wrap: wrap; gap: 10px; }
.lang-pill { font-size: 13.5px; color: var(--text-soft); background: var(--surface); border: 1px solid var(--border); padding: 8px 15px; border-radius: var(--radius-pill); }
.lang-pill strong { color: var(--accent); font-family: var(--font-display); margin-right: 4px; }

/* ---------- Contact ---------- */
.contact__card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(40px, 7vw, 80px); text-align: center; position: relative; overflow: hidden;
}
.contact__card::before {
  content: ""; position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px; background: radial-gradient(circle, rgba(245,184,32,0.16), transparent 65%);
  pointer-events: none;
}
.contact__title { position: relative; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 5vw, 3.3rem); line-height: 1.08; letter-spacing: -0.025em; margin: 12px 0 18px; }
.contact__title .ital { font-size: 1.08em; }
.contact__sub { position: relative; max-width: 560px; margin: 0 auto 32px; color: var(--text-soft); }
.contact__links { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact__loc { position: relative; margin-top: 22px; font-size: 14px; color: var(--text-mute); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw); margin: 0 auto; padding: 34px var(--gutter) 44px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
  border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text-mute);
}
.footer__top { margin-left: auto; color: var(--text-soft); transition: color 0.2s; }
.footer__top:hover { color: var(--accent); }

/* ---------- About: quote + interest note ---------- */
.about__quote {
  font-family: var(--font-serif); font-style: italic; font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.35; color: var(--text); margin-bottom: 24px; padding-left: 20px;
  border-left: 2px solid var(--accent);
}
.mini-card__note { color: var(--text-mute); font-size: 0.9rem; margin-top: 14px; }
.mini-card .chips { margin-top: 6px; }

/* ---------- Experience: context toggle + panel ---------- */
.ctx-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  font-family: var(--font-display); font-size: 13px; font-weight: 500; color: var(--accent);
  background: transparent; border: 1px solid var(--border); padding: 8px 15px; border-radius: var(--radius-pill);
  cursor: pointer; transition: background 0.25s, border-color 0.25s;
}
.ctx-toggle:hover { background: var(--surface); border-color: var(--accent); }
.ctx-toggle__ico { transition: transform 0.3s var(--ease); }
.ctx-toggle[aria-expanded="true"] .ctx-toggle__ico { transform: rotate(180deg); }
.ctx-panel {
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.55s var(--ease), opacity 0.4s var(--ease), margin 0.4s var(--ease), padding 0.4s var(--ease);
  border-left: 2px solid var(--border-strong);
}
.ctx-panel.open { max-height: 2800px; opacity: 1; margin-top: 16px; padding: 2px 0 2px 18px; }

/* experience media (demo videos + screenshots) */
.media-grid { display: grid; gap: 18px; margin-top: 4px; }
.media-video-wrap { margin: 0; }
.media-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #000; }
.media-video iframe, .media-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.media-cap { font-family: var(--font-display); font-size: 12.5px; color: var(--text-mute); margin-top: 8px; }
.media-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.media-imgs a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); transition: border-color 0.25s, transform 0.25s; }
.media-imgs a:hover { border-color: var(--accent); transform: translateY(-2px); }
.media-imgs img { width: 100%; height: 120px; object-fit: cover; display: block; }
.media-empty { color: var(--text-mute); font-size: 0.92rem; }
.ctx-panel p { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 12px; }
.ctx-panel strong { color: var(--text); }
.ctx-panel em { color: var(--accent); font-style: italic; }
.ctx-panel__sub { color: var(--text) !important; font-weight: 600; font-family: var(--font-display); }
.ctx-list { list-style: none; display: grid; gap: 9px; }
.ctx-list li { position: relative; padding-left: 18px; font-size: 0.94rem; color: var(--text-soft); }
.ctx-list li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Photos marquee ---------- */
.photos { padding-bottom: 26px; }
.marquee {
  position: relative; z-index: 1; width: 100%; overflow: hidden; padding: 6px 0 46px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track { display: flex; gap: 18px; width: max-content; animation: marquee 44s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }
.photo-slide {
  position: relative; flex: none; width: clamp(300px, 36vw, 440px); aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-strong);
  background:
    linear-gradient(135deg, rgba(245,184,32,0.18), rgba(255,190,50,0.10)),
    var(--surface-2);
}
.marquee--live .photo-slide { cursor: pointer; transition: transform 0.35s var(--ease), border-color 0.35s; }
.marquee--live .photo-slide:hover { transform: translateY(-4px); border-color: var(--accent); }
.photo-slide__ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.photo-slide__ph span { font-size: 44px; opacity: 0.7; }
.photo-slide__ph::after {
  content: "Photo à venir"; font-family: var(--font-display); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute);
}
.photo-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform 0.5s var(--ease); }
.marquee--live .photo-slide:hover img { transform: scale(1.05); }
.photo-slide__zoom {
  position: absolute; top: 12px; right: 12px; z-index: 3; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; font-size: 15px; color: #fff;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.25);
  opacity: 0; transform: scale(0.8); transition: opacity 0.3s, transform 0.3s;
}
.photo-slide:hover .photo-slide__zoom { opacity: 1; transform: scale(1); }
.photo-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px;
  font-family: var(--font-display); font-size: 13.5px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.78));
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; gap: 8px; padding: clamp(16px, 4vw, 48px);
  background: rgba(5,5,8,0.9); backdrop-filter: blur(10px);
}
.lightbox.open { display: flex; animation: lbFade 0.28s var(--ease); }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage { position: relative; max-width: 1100px; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox__img { max-width: 100%; max-height: 82vh; border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8); object-fit: contain; }
.lightbox__bar { display: flex; align-items: center; gap: 16px; color: #fff; font-family: var(--font-display); font-size: 14px; }
.lightbox__cap { color: #f0f0f2; }
.lightbox__counter { color: rgba(255,255,255,0.55); font-size: 12.5px; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute; z-index: 2; display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.22); color: #fff;
  border-radius: 50%; transition: background 0.25s, transform 0.25s;
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,0.22); transform: scale(1.08); }
.lightbox__close { top: 20px; right: 22px; width: 44px; height: 44px; font-size: 20px; }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); width: 50px; height: 50px; font-size: 30px; line-height: 1; }
.lightbox__prev { left: 18px; }
.lightbox__next { right: 18px; }
.lightbox__prev:hover, .lightbox__next:hover { transform: translateY(-50%) scale(1.08); }
@media (max-width: 640px) {
  .lightbox__prev, .lightbox__next { width: 42px; height: 42px; font-size: 24px; }
  .lightbox__prev { left: 8px; } .lightbox__next { right: 8px; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .orb { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about__grid, .edu__grid { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
  .skill-group { grid-template-columns: 1fr; gap: 14px; }
  .nav__role { display: none; }
}

@media (max-width: 720px) {
  .nav__links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 12px; box-shadow: var(--shadow); }
  .nav.open .nav__links { display: flex; }
  .nav__links a { padding: 12px 16px; }
  .nav__cta { display: none; }
  .nav__burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
  .nav__burger span { display: block; width: 16px; height: 2px; margin: 0 auto; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
  .nav.open .nav__burger span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
  .nav.open .nav__burger span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .proj-grid, .stats__grid { grid-template-columns: 1fr; }
  .stat { border-right: none !important; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .hero { padding-top: 130px; }
  .tl-item__head { flex-direction: column; }
}
