/* ==========================================================================
   Louis Pierre AMOUGOU — Portfolio v2
   White ground · Ink · Cobalt / Tangerine / Lime "data" palette
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #f4f4f1;
  --line: #e7e7e2;
  --ink: #0a0a0b;
  --ink-2: #2b2b30;
  --muted: #6b6b72;
  --cobalt: #2340ff;
  --tang: #ff6a3d;
  --lime: #d4f54a;

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --header-h: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.is-loading { overflow: hidden; }

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

::selection { background: var(--lime); color: var(--ink); }

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

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.accent { color: var(--tang); }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 1000;
  background: var(--ink); color: #fff; padding: 0.75rem 1rem; border-radius: 10px;
}
.skip-link:focus { top: 1rem; }

/* Split text helpers (SplitText adds these) */
.line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.split-line { overflow: hidden; padding-bottom: 0.08em; }

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-items: center;
  pointer-events: none;
}
.preloader__inner {
  position: relative; z-index: 2;
  width: min(420px, 80vw);
}
.preloader__panel {
  position: absolute; inset: 0;
  background: var(--bg);
  transform-origin: top;
}
.preloader__panel--2 { background: var(--cobalt); z-index: 1; }
.preloader__panel--1 { z-index: 1; background: var(--bg); }
.preloader__label { color: var(--muted); }
.preloader__count {
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.preloader__count sup { font-size: 0.35em; color: var(--tang); vertical-align: top; margin-left: 0.05em; }
.preloader__bar { height: 3px; background: var(--line); margin-top: 1.25rem; overflow: hidden; border-radius: 3px; }
.preloader__bar span { display: block; height: 100%; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.no-preloader .preloader { display: none; }

/* ============ CURSOR ============ */
.cursor { position: fixed; top: 0; left: 0; z-index: 950; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }
.cursor__dot, .cursor__ring {
  position: fixed; top: 0; left: 0; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor__dot { width: 6px; height: 6px; background: var(--ink); }
.cursor__ring {
  width: 38px; height: 38px;
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  transition: width 0.4s var(--ease), height 0.4s var(--ease), background-color 0.3s, border-color 0.3s;
}
.cursor__label {
  font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: #fff; opacity: 0; transform: scale(0.6);
  transition: opacity 0.25s, transform 0.3s var(--ease);
  white-space: nowrap;
}
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; background: rgba(35, 64, 255, 0.08); border-color: var(--cobalt); }
.cursor.is-label .cursor__ring { width: 92px; height: 92px; background: var(--ink); border-color: var(--ink); }
.cursor.is-label .cursor__label { opacity: 1; transform: scale(1); }
.cursor.is-label .cursor__dot, .cursor.is-hover .cursor__dot { opacity: 0; }
.cursor.is-grab .cursor__ring { width: 54px; height: 54px; border-style: dashed; border-color: var(--tang); }
/* Inverted cursor for dark areas (footer, black marquee, cobalt card, dark buttons) */
.cursor__dot { transition: opacity 0.2s, background-color 0.3s; }
.cursor.is-inverted .cursor__dot { background: #fff; }
.cursor.is-inverted .cursor__ring { border-color: #fff; }
.cursor.is-inverted.is-hover .cursor__ring { background: rgba(212, 245, 74, 0.12); border-color: var(--lime); }
.cursor.is-inverted.is-label .cursor__ring { background: #fff; border-color: #fff; }
.cursor.is-inverted.is-label .cursor__label { color: var(--ink); }

/* ============ PROGRESS ============ */
.progress {
  position: fixed; left: 0; right: 0; top: 0; z-index: 800; height: 3px; pointer-events: none;
}
.progress__bar {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--cobalt), var(--tang) 60%, var(--lime));
  transform: scaleX(0); transform-origin: left;
}
.progress__val {
  position: fixed; right: var(--pad); bottom: 1.25rem;
  background: var(--ink); color: #fff; padding: 0.35rem 0.6rem; border-radius: 999px;
  font-size: 0.68rem; font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity 0.3s;
}
.is-scrolled .progress__val { opacity: 1; }

/* ============ HEADER ============ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 700;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 var(--pad);
  transition: transform 0.5s var(--ease), background-color 0.3s, box-shadow 0.3s;
}
.header.is-solid { background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header.is-hidden { transform: translateY(-100%); }

.logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.logo__dots { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.logo__dots i { display: block; width: 5px; border-radius: 3px; transition: height 0.5s var(--ease); }
.logo__dots i:nth-child(1) { height: 8px; background: var(--lime); }
.logo__dots i:nth-child(2) { height: 13px; background: var(--tang); }
.logo__dots i:nth-child(3) { height: 18px; background: var(--cobalt); }
.logo:hover .logo__dots i:nth-child(1) { height: 18px; }
.logo:hover .logo__dots i:nth-child(3) { height: 6px; }

.nav ul { display: flex; gap: 0.25rem; }
.nav__link {
  position: relative; display: inline-block;
  font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.55rem 0.9rem; border-radius: 999px;
  transition: background-color 0.3s, color 0.3s;
}
.nav__link:hover { background: var(--surface); }
.nav__link.is-active { background: var(--ink); color: #fff; }

.header__right { display: flex; align-items: center; gap: 1rem; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; }
.clock__city { color: var(--ink); }

/* CV button: outlined pill, fills with ink on hover, the arrow drops like a download */
.cv-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.8rem; border: 1.5px solid var(--ink); border-radius: 999px;
  font-size: 0.72rem; line-height: 1; overflow: hidden;
  transition: background-color 0.3s, color 0.3s;
}
.cv-btn:hover { background: var(--ink); color: #fff; }
.cv-btn__icon { display: inline-block; transition: transform 0.4s var(--ease); }
.cv-btn:hover .cv-btn__icon { animation: cvDrop 0.6s var(--ease); }
@keyframes cvDrop { 0% { transform: translateY(0); } 45% { transform: translateY(120%); opacity: 0; } 46% { transform: translateY(-120%); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
.menu__cv { align-self: flex-start; margin-top: auto; margin-bottom: 1.5rem; }

.lang { position: relative; display: flex; background: var(--surface); border-radius: 999px; padding: 3px; }
.lang__btn { position: relative; z-index: 1; font-family: var(--mono); font-size: 0.72rem; padding: 0.35rem 0.65rem; border-radius: 999px; transition: color 0.3s; }
.lang__btn.is-active { color: #fff; }
.lang__pill {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  background: var(--ink); border-radius: 999px;
  transition: transform 0.45s var(--ease);
}
.lang[data-current="en"] .lang__pill { transform: translateX(100%); }

.burger { display: none; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: #fff; transition: transform 0.45s var(--ease); }
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 24px; }
.menu-open .burger span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* Mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 650;
  background: var(--bg);
  padding: calc(var(--header-h) + 2rem) var(--pad) 2rem;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: circle(0% at calc(100% - var(--pad) - 22px) 38px);
  transition: clip-path 0.8s var(--ease-in-out);
  visibility: hidden;
}
.menu-open .menu { clip-path: circle(150% at calc(100% - var(--pad) - 22px) 38px); visibility: visible; }
.menu__list a {
  display: block; font-size: clamp(2.8rem, 13vw, 5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1;
  transform: translateY(40px); opacity: 0;
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease), color 0.3s;
}
.menu__list li:nth-child(1) a { transition-delay: 0.15s; }
.menu__list li:nth-child(2) a { transition-delay: 0.2s; }
.menu__list li:nth-child(3) a { transition-delay: 0.25s; }
.menu__list li:nth-child(4) a { transition-delay: 0.3s; }
.menu-open .menu__list a { transform: none; opacity: 1; }
.menu__list a:hover { color: var(--cobalt); }
.menu__foot { color: var(--muted); }

/* ============ BUTTONS ============ */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 1rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1;
  transition: color 0.4s var(--ease), border-color 0.4s;
}
.btn::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 100%;
  width: 150%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, 0) scale(0);
  transition: transform 0.6s var(--ease);
}
.btn:hover::before { transform: translate(-50%, -55%) scale(1); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark::before { background: var(--cobalt); }
.btn--ghost { border: 1.5px solid var(--ink); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: #fff; }
.btn--small { padding: 0.6rem 1rem; font-size: 0.85rem; }
.btn__icon { display: inline-block; transition: transform 0.4s var(--ease); }
.btn:hover .btn__icon { transform: translate(3px, 3px) rotate(-10deg); }
.magnetic { will-change: transform; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 2rem) var(--pad) 2.5rem;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__inner { position: relative; z-index: 1; width: 100%; }

.status {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.5rem 0.9rem 0.5rem 0.75rem;
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}
.status__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #18c964; }
.status__dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #18c964;
  animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping { from { transform: scale(0.5); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

.hero__title {
  font-size: clamp(3.4rem, 13.5vw, 13.5rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.055em;
  margin-left: -0.04em;
}
.hero__title .line--2 { display: flex; align-items: center; gap: 0.12em; }
.hero__photo {
  flex: none;
  width: 1.55em; height: 0.78em;
  border-radius: 999px; overflow: hidden;
  background: var(--lime);
  transform-origin: left center;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; /* the file is pre-cropped around the face */ transition: transform 0.8s var(--ease); }
.hero__photo:hover img { transform: scale(1.12); }
.hero__star { font-size: 0.35em; color: var(--tang); align-self: flex-start; margin-top: 0.25em; display: inline-block; }

.hero__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 2rem 3rem;
  align-items: end;
  margin-top: clamp(2rem, 5vh, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.hero__lead { max-width: 34ch; color: var(--ink-2); }
.hero__lead strong { font-weight: 600; background: linear-gradient(transparent 62%, var(--lime) 62%); }
.hero__rotator-label { color: var(--muted); margin-bottom: 0.3rem; }
.rotator {
  position: relative; height: 1.15em; overflow: hidden;
  font-size: clamp(1.8rem, 3.4vw, 3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15;
}
/* No transform here: GSAP owns it. Without JS only the first word shows. */
.rotator__word { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; }
.rotator__word.is-active { opacity: 1; }
.rotator__word:nth-child(1) { color: var(--cobalt); }
.rotator__word:nth-child(2) { color: var(--tang); }
.rotator__word:nth-child(3) { color: var(--ink); }
.rotator__word:nth-child(4) { color: var(--cobalt); }
.hero__ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.hero__scroll {
  position: absolute; right: 0; top: -3.5rem;
  display: flex; align-items: center; gap: 0.6rem; color: var(--muted);
  writing-mode: vertical-rl;
}
.hero__scroll-line { width: 1px; height: 48px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: var(--ink);
  animation: scrollLine 1.8s var(--ease-in-out) infinite;
}
@keyframes scrollLine { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

/* ============ MARQUEE ============ */
.marquee { padding: clamp(3rem, 8vw, 6rem) 0; overflow: hidden; }
.marquee__row { overflow: hidden; white-space: nowrap; }
.marquee__row--1 { background: var(--ink); color: #fff; transform: rotate(-2.5deg) scale(1.05); position: relative; z-index: 1; }
.marquee__row--2 { background: var(--lime); color: var(--ink); transform: rotate(1.5deg) scale(1.05); margin-top: -0.5rem; }
.marquee__track { display: inline-flex; align-items: center; gap: 2rem; padding: 1.1rem 1rem; will-change: transform; }
.marquee__track span { font-size: clamp(1.8rem, 4.2vw, 3.6rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.marquee__track i { font-style: normal; font-size: clamp(1rem, 2vw, 1.6rem); color: var(--tang); }
.marquee__row--2 .marquee__track i { color: var(--cobalt); }

/* ============ SECTIONS ============ */
.section { padding: clamp(5rem, 12vw, 10rem) var(--pad); }
.section__head { display: flex; align-items: center; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__index {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border: 1px solid var(--ink); border-radius: 50%; font-size: 0.7rem;
}
.section__tag { color: var(--muted); }
.section__title {
  font-size: clamp(2.6rem, 7vw, 6.5rem); font-weight: 750; letter-spacing: -0.045em; line-height: 0.95;
  max-width: 14ch;
}

/* ============ ABOUT ============ */
.about__statement {
  font-size: clamp(1.7rem, 4.2vw, 3.9rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.12;
  max-width: 24ch;
}
.about__statement .word { color: #cfcfcf; transition: color 0.2s; }
.reduced .about__statement .word { color: var(--ink); }

.about__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 3rem;
  margin-top: clamp(3rem, 7vw, 6rem); align-items: start;
}
.about__text { display: grid; gap: 1rem; color: var(--ink-2); max-width: 46ch; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.stat { padding: 1.25rem 1rem 0 0; display: grid; gap: 0.25rem; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 1.25rem; }
.stat__num { font-size: clamp(3.2rem, 7vw, 6rem); font-weight: 800; letter-spacing: -0.06em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat:nth-child(1) .stat__num { color: var(--cobalt); }
.stat:nth-child(2) .stat__num { color: var(--tang); }
.stat__label { color: var(--muted); }

.cards {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  perspective: 1000px;
}
.card {
  position: relative;
  background: var(--surface); border-radius: var(--radius);
  padding: 1.5rem; min-height: 240px;
  display: flex; flex-direction: column; gap: 0.75rem;
  transform-style: preserve-3d;
  transition: box-shadow 0.4s var(--ease);
}
.card:hover { box-shadow: 0 30px 60px -30px rgba(10, 10, 11, 0.35); }
.card__icon { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: auto; transform: translateZ(30px); }
.card__tag { color: var(--muted); transform: translateZ(20px); }
.card__body { font-weight: 500; line-height: 1.35; transform: translateZ(20px); }
.card--cobalt { background: var(--cobalt); color: #fff; }
.card--cobalt .card__tag { color: rgba(255, 255, 255, 0.72); }
.card--lime { background: var(--lime); }
.card--lime .card__tag { color: rgba(10, 10, 11, 0.62); }

/* ============ PROCESS ============ */
.process { background: var(--surface); border-radius: calc(var(--radius) * 2); margin: 0 clamp(0.5rem, 1.5vw, 1.25rem); }
.pipeline { position: relative; margin-top: clamp(3rem, 7vw, 5rem); }
.pipeline__line { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 120px; overflow: visible; }
.pipeline__track, .pipeline__draw { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; }
.pipeline__track { stroke: #d6d6d0; stroke-dasharray: 2 8; stroke-linecap: round; }
.pipeline__draw { stroke: var(--cobalt); stroke-linecap: round; }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-top: 150px; }
.step { position: relative; }
.step__dot {
  position: absolute; left: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--ink);
  transform: translate(-50%, -50%);
  transition: background-color 0.3s, border-color 0.3s, transform 0.5s var(--ease);
}
.step.is-on .step__dot { background: var(--tang); border-color: var(--tang); transform: translate(-50%, -50%) scale(1.3); }
.step__num { color: var(--muted); }
.step h3 { font-size: clamp(1.5rem, 2.4vw, 2.2rem); font-weight: 700; letter-spacing: -0.03em; margin: 0.4rem 0 0.6rem; }
.step p { color: var(--ink-2); max-width: 30ch; }

/* ============ SKILLS ============ */
.skills__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.skills__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; }
.legend { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; }
.legend::before { content: ""; width: 12px; height: 12px; border-radius: 50%; }
.legend--cobalt::before { background: var(--cobalt); }
.legend--tang::before { background: var(--tang); }
.legend--lime::before { background: var(--lime); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }

.playground {
  position: relative; margin-top: 2.5rem;
  height: clamp(420px, 60vh, 560px);
  border-radius: calc(var(--radius) * 1.5);
  background: radial-gradient(circle at 1px 1px, #dcdcd6 1px, transparent 0) 0 0 / 22px 22px, var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
}
.playground__hint { position: absolute; left: 1.25rem; top: 1.1rem; color: var(--muted); pointer-events: none; }
.pills { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 3.5rem 1.25rem 1.25rem; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.4rem; border-radius: 999px;
  font-size: clamp(1rem, 1.6vw, 1.35rem); font-weight: 650; letter-spacing: -0.02em; white-space: nowrap;
  user-select: none; -webkit-user-select: none;
}
.pill--cobalt { background: var(--cobalt); color: #fff; }
.pill--tang { background: var(--tang); color: var(--ink); }
.pill--lime { background: var(--lime); color: var(--ink); }
.is-physics .pills { padding: 0; }
.is-physics .pill { position: absolute; left: 0; top: 0; will-change: transform; }
.is-physics.can-drag .pill { cursor: grab; }

/* ============ PROJECTS ============ */
.projects { position: relative; }
.projects__pin {
  min-height: 100svh; display: flex; align-items: center; gap: 4vw;
  padding: calc(var(--header-h) + 1rem) 0 3rem 0;
  overflow: hidden;
}
/* The intro panel masks the cards as they slide underneath it */
.projects__intro {
  flex: none; position: relative; z-index: 2; align-self: stretch;
  display: flex; flex-direction: column; justify-content: center;
  width: calc(min(30vw, 420px) + var(--pad)); padding-left: var(--pad);
  background: var(--bg);
}
.projects__intro::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 4vw;
  background: linear-gradient(90deg, var(--bg), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.projects__intro .section__title { font-size: clamp(2.6rem, 5vw, 5rem); }
.projects__counter { margin-top: 2rem; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.js-proj-current { color: var(--cobalt); font-weight: 500; }
.projects__track { display: flex; gap: 2vw; padding-right: var(--pad); will-change: transform; }

.project {
  position: relative; flex: none;
  width: clamp(300px, 42vw, 640px);
  display: flex; flex-direction: column; gap: 0.9rem;
  cursor: pointer;
}
.project__media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius); background: var(--surface);
}
.project__media img {
  position: absolute; top: 0; left: -8%; width: 116%; height: 100%; max-width: none;
  object-fit: cover; object-position: top center;
  transition: scale 1s var(--ease);
}
.project:hover .project__media img { scale: 1.06; }
.project__media::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(10, 10, 11, 0.06);
}
.project__meta { display: flex; justify-content: space-between; color: var(--muted); }
.project__title { font-size: clamp(1.5rem, 2.6vw, 2.4rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.project__open {
  position: absolute; right: 1rem; top: 1rem; z-index: 1;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center;
  transition: transform 0.5s var(--ease), background-color 0.3s;
}
.project:hover .project__open { transform: rotate(90deg); background: var(--tang); }
.project__live {
  position: absolute; left: 1rem; top: 1rem; z-index: 1;
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--bg); color: var(--ink); border-radius: 999px; padding: 0.45rem 0.75rem;
  box-shadow: 0 6px 20px -8px rgba(10, 10, 11, 0.35);
}
.project__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #18c964; box-shadow: 0 0 0 3px rgba(24, 201, 100, 0.2); }
.overlay__visit { margin-top: 1.5rem; }
.overlay__title.is-long { font-size: clamp(2rem, 4.6vw, 4rem); max-width: 24ch; }
.project--end {
  justify-content: center; align-items: flex-start; gap: 2rem; cursor: default;
  width: clamp(280px, 30vw, 440px);
}
.project__end-text { font-size: clamp(2rem, 3.4vw, 3.2rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; }

/* ============ CONTACT ============ */
.contact__title { font-size: clamp(2.8rem, 8.5vw, 8.5rem); font-weight: 800; letter-spacing: -0.055em; line-height: 0.92; max-width: 13ch; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); margin-top: clamp(3rem, 7vw, 5rem); }
.contact__info > p { color: var(--ink-2); max-width: 32ch; margin-bottom: 2rem; }
.contact__link {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: 1rem;
  padding: 1.25rem 0.5rem; border-top: 1px solid var(--line);
  font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em;
}
.contact__link:last-child { border-bottom: 1px solid var(--line); }
.contact__link .mono { color: var(--muted); font-weight: 400; }
.contact__link::before {
  content: ""; position: absolute; inset: 0; background: var(--lime); z-index: -1;
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease);
}
.contact__link:hover::before { transform: scaleY(1); }
.contact__arrow { transition: transform 0.4s var(--ease); }
.contact__link:hover .contact__arrow { transform: translate(4px, -4px); }

.form { display: grid; gap: 1.6rem; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1.15rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--line);
  padding: 1.5rem 0 0.6rem; resize: vertical; border-radius: 0;
  transition: border-color 0.3s;
}
.field textarea { min-height: 7rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--cobalt);
  transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease);
}
.field:focus-within::after { transform: scaleX(1); }
.field label {
  position: absolute; left: 0; top: 1.5rem; color: var(--muted); pointer-events: none;
  transform-origin: left top; transition: transform 0.4s var(--ease), color 0.3s;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.4rem) scale(0.72); color: var(--ink);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--tang); }
.field.is-invalid label { color: #c43d14; }

.btn--submit { justify-self: start; min-width: 15rem; justify-content: center; }
.btn__check { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.btn--submit.is-sent { background: #16a352; }
.btn--submit.is-sent .btn__text, .btn--submit.is-sent .btn__icon { opacity: 0; }
.btn--submit.is-sent .btn__check { stroke-dashoffset: 0; transition: stroke-dashoffset 0.6s 0.2s var(--ease); }
.form__status { min-height: 1em; color: var(--muted); text-transform: none; }

/* ============ FOOTER ============ */
.footer { background: var(--ink); color: #fff; padding: clamp(4rem, 10vw, 8rem) var(--pad) 1.5rem; overflow: hidden; border-radius: calc(var(--radius) * 2) calc(var(--radius) * 2) 0 0; }
.footer__big { display: flex; flex-direction: column; font-size: clamp(3rem, 10.5vw, 11rem); font-weight: 800; letter-spacing: -0.06em; line-height: 0.88; }
.footer__big span { display: block; }
.footer__big span:last-child { color: var(--lime); }
.footer__row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.65); }
.footer__top { color: #fff; }
.footer__top:hover { color: var(--lime); }

/* ============ OVERLAY ============ */
.overlay { position: fixed; inset: 0; z-index: 750; }
.overlay__bg { position: absolute; inset: 0; background: var(--bg); clip-path: circle(0 at var(--ox, 50%) var(--oy, 50%)); }
.overlay__scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
.overlay__close {
  position: fixed; top: 1.25rem; right: var(--pad); z-index: 2;
  width: 56px; height: 56px; border-radius: 50%; background: var(--ink);
  transition: transform 0.5s var(--ease), background-color 0.3s;
}
.overlay__close:hover { transform: rotate(90deg); background: var(--tang); }
.overlay__close span { position: absolute; left: 17px; right: 17px; top: 27px; height: 2px; background: #fff; }
.overlay__close span:first-child { transform: rotate(45deg); }
.overlay__close span:last-child { transform: rotate(-45deg); }
.overlay__content { max-width: 1200px; margin: 0 auto; padding: 7rem var(--pad) 4rem; }
.overlay__cat { color: var(--cobalt); margin-bottom: 1rem; }
.overlay__title { font-size: clamp(2.4rem, 7vw, 6rem); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; max-width: 16ch; }
.overlay__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; margin: 3rem 0; }
.overlay__desc { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--ink-2); max-width: 50ch; }
.overlay__label { color: var(--muted); margin-bottom: 0.75rem; }
.overlay__stack { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.overlay__stack li { border: 1px solid var(--ink); border-radius: 999px; padding: 0.4rem 0.85rem; font-size: 0.9rem; font-weight: 500; }
.overlay__media { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 40px 80px -40px rgba(10, 10, 11, 0.4); }
.overlay__media img { width: 100%; }
.overlay__nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; }
.overlay-open .header { transform: translateY(-100%); }
.overlay-open .progress { opacity: 0; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .hero__bottom { grid-template-columns: 1fr 1fr; }
  .hero__ctas { grid-column: 1 / -1; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clock { display: none; }
}
@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .nav { display: none; }
  .burger { display: block; }
  .hero__scroll { display: none; }
  .about__grid, .contact__grid, .overlay__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; padding-top: 0; gap: 2.5rem 1.5rem; }
  .pipeline__line, .step__dot { display: none; }
  .step { border-top: 3px solid var(--ink); padding-top: 1rem; transition: border-color 0.4s; }
  .step.is-on { border-color: var(--tang); }
  .projects__pin { display: block; min-height: 0; padding: 5rem var(--pad); }
  .projects__intro { width: auto; padding-left: 0; margin-bottom: 2.5rem; }
  .projects__intro::after { display: none; }
  .projects__counter { display: none; }
  .projects__track { flex-direction: column; gap: 3rem; padding: 0; }
  .project, .project--end { width: 100%; }
}
@media (max-width: 600px) {
  .header .cv-btn { display: none; } /* no room next to FR/EN + burger: the CV is in the menu */
  .hero__bottom { grid-template-columns: 1fr; }
  .hero__photo { width: 1.2em; }
  .stat + .stat { padding-left: 0.75rem; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card__icon { margin-bottom: 1rem; }
  .steps { grid-template-columns: 1fr; }
  .contact__link { grid-template-columns: 1fr auto; }
  .contact__link .mono { grid-column: 1 / -1; }
  .btn--submit { width: 100%; }
  .overlay__nav .btn { padding: 0.9rem 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ============ LANGUAGE WIPE ============ */
.wipe {
  position: fixed; inset: 0; z-index: 880; display: none; place-items: center;
  background: var(--cobalt); color: #fff; overflow: hidden;
}
.wipe__txt { font-size: clamp(6rem, 25vw, 22rem); font-weight: 800; letter-spacing: -0.06em; line-height: 1; }
.hero__title .char { will-change: transform; }
