/* =========================================================
   Lamine Ishola — Portfolio (style & animations "Nightfolio")
   HTML / CSS + main.js (vanilla, sans librairie)
   ========================================================= */

:root {
  --bg: #030303;
  --bg-2: #0f0f0f;
  --text: #f5f5f5;
  --muted: #bbbbbb;
  --dim: #6b6b6b;
  --border: #262626;
  --green: #22c55e;
  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body: "Poppins", system-ui, sans-serif;
  --dur: 1.5s;              /* --animation-duration du modèle */
  --hover: .5s;
  --pad: 16px;
  --name-size: 15.24vw;     /* 100 / (n - n*0.495) vw avec n = 13 lettres */
}
@media (min-width: 768px)  { :root { --pad: 32px; } }
@media (min-width: 1024px) { :root { --pad: 64px; } }
@media (min-width: 1536px) { :root { --pad: 96px; } }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--text); color: var(--bg); }

.container { width: 100%; max-width: 1536px; margin: 0 auto; padding: 0 var(--pad); }
main { position: relative; z-index: 2; background: var(--bg); }

/* =========================================================
   Animations partagées (identiques au modèle)
   ========================================================= */
@keyframes slide-up   { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes rotation   { to { transform: rotate(360deg); } }
@keyframes scrollX    { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes available-badge { from { transform: scale(1); opacity: .8; } to { transform: scale(1.8); opacity: 0; } }

.clip { overflow: hidden; }
.slide-up { display: block; animation: slide-up var(--dur) ease-out both; }

/* Texte qui se "remplit" au scroll (piloté par main.js) */
.fill-text {
  color: var(--text);
  -webkit-text-fill-color: rgba(255, 255, 255, .075);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  display: inline;
  will-change: background-size;
}
html.js .fill-text { background-size: 0% 100%; }

/* Ligne séparatrice qui se trace au scroll */
.separator {
  border: 0;
  border-top: 1px solid var(--text);
  transform-origin: center;
}
html.js .separator { transform: scaleX(0); }

.zoom-out-image { will-change: transform; }
html.js .zoom-out-image { transform: scale(1.25); }

/* Lien à texte "roulant" (nav, réseaux) */
.roll { display: inline-block; overflow: hidden; vertical-align: bottom; }
.roll > span { display: inline-block; position: relative; transition: transform var(--hover) cubic-bezier(.7,0,.3,1); }
.roll > span::after { content: attr(data-text); position: absolute; left: 0; top: 100%; }
.roll:hover > span { transform: translateY(-100%); }

/* Bouton texte roulant + flèche (Let's work / My work) */
.btn-roll {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--display); font-weight: 500; text-transform: uppercase; white-space: nowrap;
  font-size: clamp(30px, 3.2vw, 48px); line-height: 1;
}
.btn-roll--xl { font-size: clamp(36px, 4vw, 60px); }
.btn-roll__text { position: relative; display: inline-flex; flex-direction: column; overflow: hidden; line-height: 1.1; }
.btn-roll__text span { display: block; transition: transform var(--hover) cubic-bezier(.7,0,.3,1); }
.btn-roll__text span:first-child { position: absolute; inset: 0; transform: translateY(-100%); }
.btn-roll:hover .btn-roll__text span:first-child,
.btn-pill:hover .btn-roll__text span:first-child { transform: translateY(0); }
.btn-roll:hover .btn-roll__text span:last-child,
.btn-pill:hover .btn-roll__text span:last-child { transform: translateY(100%); }
.btn-roll__arrow { width: 1em; height: 1em; transition: transform var(--hover); }
.btn-roll:hover .btn-roll__arrow { transform: rotate(90deg); }

/* Bouton pilule blanc (View my CV) */
.btn-pill {
  display: inline-flex; align-items: center; gap: .75rem;
  height: 5rem; padding: 0 2.5rem; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-family: var(--display); font-weight: 500; text-transform: uppercase; font-size: clamp(22px, 2vw, 30px);
}
.btn-pill svg { width: 1.1em; height: 1.1em; transition: transform var(--hover); }
.btn-pill:hover svg { transform: rotate(45deg); }
.btn-pill--sm { height: 3rem; padding: 0 1.4rem; font-size: 18px; }

/* =========================================================
   Loader
   ========================================================= */
.loader { display: none; }
html.js .loader {
  position: fixed; inset: 0; z-index: 1000; display: block;
  color: var(--text); pointer-events: all;
}
html.is-loading, html.is-loading body { overflow: hidden; }
html.is-loading .slide-up { animation-play-state: paused; }

.loader__panel { position: absolute; left: 0; width: 100%; height: 50.5%; background: var(--bg); transition: transform 1.1s cubic-bezier(.76,0,.24,1); }
.loader__panel--top { top: 0; }
.loader__panel--bottom { bottom: 0; }
.loader.is-leaving .loader__panel--top { transform: translateY(-100%); }
.loader.is-leaving .loader__panel--bottom { transform: translateY(100%); }

.loader__inner {
  position: absolute; inset: 0; z-index: 1;
  display: grid; grid-template-rows: auto 1fr auto; padding: 2rem var(--pad);
  transition: opacity .5s ease, transform .6s cubic-bezier(.7,0,.3,1);
}
.loader__inner::before { /* fine grille "blueprint" */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.loader.is-done .loader__inner { opacity: 0; transform: translateY(-30px); }

.loader__top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; }
.loader__term { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; line-height: 1.8; color: var(--dim); min-height: 9.5em; }
.loader__cmd { color: var(--text); }
.loader__prompt { color: var(--muted); }
.loader__path { color: var(--dim); }
.loader__caret { display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--text); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
#loaderLog li { opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; white-space: nowrap; }
#loaderLog li.is-in { opacity: 1; transform: none; }
#loaderLog li b { color: var(--text); font-weight: 400; }
#loaderLog li em { font-style: normal; color: var(--muted); }

.loader__brand { display: flex; align-items: center; gap: .75rem; font-family: var(--display); font-size: 22px; color: var(--dim); }
.loader__brand img { width: 44px; height: 44px; object-fit: contain; filter: grayscale(1) brightness(1.4); }

.loader__center { position: relative; align-self: center; justify-self: center; width: min(720px, 100%); text-align: center; }
.loader__label { font-family: var(--display); text-transform: uppercase; letter-spacing: .3em; font-size: 14px; color: var(--dim); margin-bottom: .5rem; }
.loader__count {
  font-family: var(--display); font-weight: 800; line-height: .85; letter-spacing: -.02em;
  font-size: clamp(120px, 22vw, 300px); font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: flex-start;
}
.loader__count sup { font-size: .22em; font-weight: 500; margin: .35em 0 0 .15em; color: var(--dim); }
.loader__bar { position: relative; height: 2px; margin-top: 2rem; background: rgba(255,255,255,.08); overflow: hidden; }
.loader__bar i { position: absolute; inset: 0; background: var(--text); transform-origin: left; transform: scaleX(0); }
.loader__bar i::after { content: ""; position: absolute; right: 0; top: -3px; width: 60px; height: 8px; background: radial-gradient(closest-side, rgba(255,255,255,.9), transparent); }

.loader__foot {
  position: relative; display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: clamp(12px, 1.1vw, 16px); color: var(--dim);
}
.loader__foot span:first-child { color: var(--text); }
@media (max-width: 640px) {
  .loader__foot span:nth-child(2) { display: none; }
  .loader__term { font-size: 11px; }
  .loader__brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) { html.js .loader { display: none; } }

/* =========================================================
   Curseur personnalisé
   ========================================================= */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 999;
  width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference; pointer-events: none;
  box-shadow: 0 0 10px #fff;
  display: none; align-items: center; justify-content: center;
  transition: width .3s, height .3s, margin .3s;
  will-change: transform;
}
.has-cursor .cursor { display: flex; }
.cursor.is-hover, .cursor.is-view { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
.cursor.is-view { mix-blend-mode: normal; }
.cursor__label {
  font-family: var(--display); font-weight: 600; font-size: 30px; color: #000;
  transform: rotate(-12deg); opacity: 0; transition: opacity var(--hover);
}
.cursor.is-view .cursor__label { opacity: 1; }
@media (hover: none), (max-width: 1023px) { .cursor { display: none !important; } }

/* =========================================================
   Navigation
   ========================================================= */
.topnav {
  position: fixed; top: 0; left: 0; z-index: 40;
  width: 100%; height: 4rem; padding: 0 var(--pad); margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between;
  mix-blend-mode: difference; color: #fff;
  font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(16px, 1.6vw, 24px);
  transition: transform .6s cubic-bezier(.7,0,.3,1);
}
.topnav.is-hidden { transform: translateY(calc(-100% - 20px)); }

.burger {
  position: fixed; top: 1rem; left: 1rem; z-index: 45;
  width: 4rem; height: 4rem; border-radius: 50%;
  background: var(--text);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px;
  transform: scale(0); transition: transform .5s cubic-bezier(.7,0,.3,1);
}
.burger.is-visible { transform: scale(1); }
.burger span { display: block; width: 26px; height: 1.5px; background: var(--bg); transition: transform .4s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(5.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: translateY(-5.75px) rotate(-45deg); }

.sidenav {
  position: fixed; left: 0; top: 7rem; z-index: 44;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2rem;
  pointer-events: none;
}
.sidenav a {
  display: block; min-width: 180px;
  background: var(--text); color: var(--bg);
  font-family: var(--display); font-size: 24px; text-transform: uppercase; letter-spacing: .05em; text-align: center;
  padding: 1rem; border-radius: 0 .75rem .75rem 0;
  transform: translateX(-110%);
  transition: transform var(--d) cubic-bezier(.7,0,.3,1), background .3s;
}
.sidenav.is-open { pointer-events: auto; }
.sidenav.is-open a { transform: translateX(0); }
.sidenav a:hover { background: var(--muted); }

.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 45;
  width: 4rem; height: 4rem; border-radius: 50%;
  background: var(--text); color: var(--bg);
  display: grid; place-items: center;
  transform: scale(0); transition: transform .5s cubic-bezier(.7,0,.3,1);
}
.to-top.is-visible { transform: scale(1); }
.to-top svg { width: 26px; height: 26px; }

/* =========================================================
   HOME
   ========================================================= */
.home { position: relative; overflow: hidden; background: var(--bg); }
.home__inner { padding-top: 5rem; will-change: transform; }

.hero-name {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: var(--name-size); line-height: var(--name-size);
  text-align: center; white-space: nowrap; overflow: hidden;
  transform: scaleY(1.75);
  margin: calc(var(--name-size) * .375) 0;
}

.home__meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  text-align: center; font-size: clamp(18px, 2vw, 30px); font-weight: 400;
  margin-top: 3rem;
}
.home__meta .slide-up { animation-delay: .25s; }

.home__stage {
  display: grid; grid-template-columns: 1fr minmax(260px, 36%) 1fr;
  align-items: center; gap: 2rem; margin-top: 4rem;
}

.hire { justify-self: center; position: relative; width: clamp(150px, 13vw, 210px); aspect-ratio: 1; display: grid; place-items: center; }
.hire__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: rotation 25s linear infinite; }
.hire__ring text { fill: #fff; font-family: var(--display); font-size: 34px; text-transform: uppercase; }
.hire__arrow { width: 40px; height: 40px; transition: transform var(--hover); }
.hire:hover .hire__arrow { transform: translateY(8px); }

.home__visual { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: transparent; border: 0; }
.home__visual-img {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: transparent;
  /* fondu doux sur tous les bords : l'image se fond dans le noir */
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 46%, #000 50%, rgba(0,0,0,.55) 75%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 46%, #000 50%, rgba(0,0,0,.55) 75%, transparent 100%);
}

.home__visual-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: grayscale(1) contrast(1.12) brightness(.96); }
.home__coords, .home__fullname {
  position: absolute; left: 0; right: 0; text-align: center; z-index: 1;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .15em; color: var(--muted);
}
.home__coords { top: 1.25rem; font-size: 14px; color: var(--dim); }
.home__fullname { bottom: 1.25rem; font-size: 18px; }

.home__socials {
  justify-self: center; display: flex; flex-direction: column; gap: .6rem;
  font-family: var(--display); text-transform: uppercase; font-size: clamp(20px, 1.8vw, 30px);
}

.home__cta { position: relative; z-index: 1; display: flex; justify-content: center; padding-top: 3rem; padding-bottom: 3rem; background: linear-gradient(to bottom, transparent, var(--bg) 35%); }

.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg); position: relative; z-index: 1; }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats__item { padding: 2.5rem 1rem; text-align: center; display: flex; flex-direction: column; gap: .25rem; }
.stats__item + .stats__item { border-left: 1px solid var(--border); }
.stats__item strong { font-family: var(--display); font-weight: 600; font-size: clamp(48px, 6vw, 96px); line-height: 1; }
.stats__item span { font-family: var(--display); text-transform: uppercase; color: var(--muted); font-size: clamp(14px, 1.3vw, 20px); letter-spacing: .05em; }

.home__quote { position: relative; z-index: 1; background: var(--bg); padding-top: 6rem; padding-bottom: 12rem; }
.home__quote .separator { margin-bottom: 2rem; }
.home__quote-row { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.home__quote-row p { max-width: 35rem; font-size: clamp(18px, 1.6vw, 24px); font-weight: 400; }

/* Galerie (grille 3 colonnes qui dézoome, colonne du milieu en parallaxe) */
.gallery {
  position: relative; z-index: 1; overflow: hidden; background: #000;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  aspect-ratio: 16 / 10;
}
@media (min-width: 768px)  { .gallery { aspect-ratio: 16 / 9; } }
@media (min-width: 1024px) { .gallery { aspect-ratio: 1.5 / 1; } }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; transform-origin: center top; will-change: transform; }
@media (min-width: 768px) { .gallery__grid { gap: 1rem; } }
html.js .gallery__grid { transform: scale(1.5); }
.gallery__col { display: grid; gap: .5rem; align-content: start; }
@media (min-width: 768px) { .gallery__col { gap: 1rem; } }
.gallery__mover { will-change: transform; }
.gallery__cell { position: relative; aspect-ratio: 16 / 12; overflow: hidden; border-radius: .75rem; background: #111; }
.gallery__cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Marquee */
.marquee { overflow: hidden; background: var(--bg); padding: 1.5rem 0; position: relative; }
.marquee__track { display: flex; width: max-content; animation: scrollX 30s linear infinite; }
.marquee__track span { font-family: var(--display); font-weight: 600; text-transform: uppercase; white-space: nowrap; font-size: clamp(40px, 5vw, 80px); color: var(--dim); }
.marquee--big .marquee__track { animation-duration: 25s; }
.marquee--big .marquee__track span { font-size: clamp(90px, 14vw, 240px); color: var(--text); line-height: 1.05; }

/* =========================================================
   Sections + titres
   ========================================================= */
.section { position: relative; background: var(--bg); padding-bottom: 12rem; }
.section > .separator, .portfolio > .separator { margin-bottom: 12rem; }

.section-title { margin-bottom: 12rem; }
.section-title--sub { margin: 12rem 0 6rem; }
.section-title--center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.section-title__label {
  display: flex; align-items: center; gap: .5rem; margin-bottom: 2rem;
  font-size: 20px; text-transform: uppercase; font-weight: 400;
}
.section-title__label i { width: 14px; height: 14px; border-radius: 50%; background: var(--text); }
.section-title--center .section-title__label { justify-content: center; }
.section-title__big {
  font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: -.01em;
  font-size: clamp(90px, 12vw, 12vw); line-height: clamp(80px, 9vw, 9vw);
}
.section-title__big--md { font-size: clamp(72px, 9vw, 9vw); line-height: clamp(66px, 7vw, 7vw); }

/* About */
.about__bio { max-width: 1100px; margin-bottom: 12rem; font-size: clamp(20px, 2.4vw, 38px); line-height: 1.35; font-weight: 400; }

.work-steps { display: grid; grid-template-columns: 1fr; gap: 4rem; margin-bottom: 12rem; }
@media (min-width: 1024px) { .work-steps { grid-template-columns: auto 1fr; gap: 8rem; } }
.work-steps__title { align-self: start; }
@media (min-width: 1024px) { .work-steps__title { position: sticky; top: 4rem; } }
.work-steps__title h3 { font-family: var(--display); font-weight: 500; text-transform: uppercase; letter-spacing: -.01em; font-size: clamp(60px, 6vw, 96px); line-height: .95; }
.work-steps__list { display: grid; gap: 6rem; }
.work-steps__item { display: grid; gap: .5rem; }
.work-steps__num, .work-steps__text { font-family: var(--display); font-size: clamp(24px, 2.4vw, 37px); line-height: 1.25; text-transform: uppercase; }

.about__extra { display: grid; grid-template-columns: 1fr; gap: 4rem; }
@media (min-width: 900px) { .about__extra { grid-template-columns: 1fr 1fr; gap: 6rem; } }
.lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.lines li:first-child { border-top: 1px solid var(--border); }
.lines strong { font-family: var(--display); font-weight: 500; text-transform: uppercase; font-size: clamp(24px, 2.4vw, 36px); }
.lines span { color: var(--muted); display: flex; gap: 1.25rem; font-size: 16px; }

/* Compétences (barres façon "My Skills") */
@media (min-width: 1024px) { .work-steps.skills { grid-template-columns: 1fr 1fr; gap: 6rem; } }
.work-steps > * { min-width: 0; }
@media (max-width: 600px) { .work-steps__title h3 { font-size: clamp(40px, 11vw, 56px); overflow-wrap: anywhere; } }
.skills__list { display: grid; gap: 2rem; margin-top: .5rem; }
.skill { padding: 4px; border: 2px solid var(--border); border-radius: 999px; overflow: hidden; transition: border-color .4s; }
.skill:hover { border-color: var(--text); }
.skill__inner {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 2rem;
  padding: 1rem 1.25rem; border-radius: 999px; overflow: hidden;
  font-size: clamp(20px, 2vw, 30px); font-weight: 400;
}
.skill__bar { position: absolute; top: 0; left: 0; height: 100%; background: var(--text); border-radius: 999px; transform-origin: left; }
html.js .skill__bar { transform: scaleX(0); }
.skill__name, .skill__pct { position: relative; z-index: 1; color: #fff; mix-blend-mode: difference; }
.skill__name { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.skill__name span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skill__num { font-family: var(--display); font-size: 24px; opacity: .5; transition: opacity .4s; }
.skill:hover .skill__num { opacity: 1; }
.skill__pct { font-size: clamp(18px, 1.6vw, 24px); }
@media (max-width: 1023px) { .skill__num { display: none; } }
@media (max-width: 600px) { .skill__inner { font-size: 16px; padding: .85rem 1rem; gap: 1rem; } .skill__name span:last-child { white-space: normal; } }

/* Stack : cercles d'outils */
.stack { display: grid; gap: 6rem; }
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 640px)  { .tools { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .tools { grid-template-columns: repeat(5, 1fr); gap: 2rem; } }
@media (min-width: 1400px) { .tools { grid-template-columns: repeat(6, 1fr); } }
.tool {
  aspect-ratio: 1; border: 1px solid var(--border); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem;
  will-change: transform, opacity;
}
.tool img { width: 30%; filter: grayscale(1) brightness(1.15) contrast(.9); opacity: .8; transition: filter .4s, opacity .4s, transform .4s; }
.tool img.inv { filter: grayscale(1) invert(1) brightness(.9); }
.tool__txt { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 2.6vw, 44px); color: var(--muted); line-height: 1; }
.tool span { font-family: var(--display); text-transform: uppercase; color: var(--muted); font-size: clamp(13px, 1.1vw, 18px); letter-spacing: .05em; }
.tool:hover img { filter: none; opacity: 1; transform: scale(1.08); }
.tool:hover img.inv { filter: invert(1); }

/* Expérience */
.available { display: flex; align-items: center; gap: .6rem; margin: 3rem 0 2rem; font-family: var(--display); text-transform: uppercase; font-size: 18px; }
#experience .section-title { margin-bottom: 8rem; }

.xp { max-width: 1400px; margin: 0 auto; border-top: 1px solid var(--border); }
.xp > li { position: relative; }
.xp .separator { opacity: .35; }
.xp__row {
  position: relative; display: grid; align-items: center;
  grid-template-columns: 3rem 7.5rem 1fr auto 2.5rem; gap: 2rem;
  padding: 2.5rem 1.5rem; isolation: isolate;
}
.xp__row::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--text);
  transform: scaleY(0); transform-origin: bottom; transition: transform .6s cubic-bezier(.7,0,.3,1);
}
.xp__row:hover::before { transform: scaleY(1); transform-origin: top; }
.xp__row, .xp__row * { transition: color .45s, border-color .45s, opacity .45s; }
.xp__num { font-family: var(--display); font-size: 20px; color: var(--dim); align-self: start; padding-top: .6rem; }
.xp__logo {
  width: 7.5rem; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
}
.xp__logo { position: relative; }
.xp__logo img { position: absolute; top: 50%; left: 50%; width: 72%; max-height: 60%; object-fit: contain; translate: -50% -50%; transition: opacity .45s; }
.xp__logo-mono { filter: brightness(0) invert(1); opacity: .75; }
.xp__logo-color { opacity: 0; }
.xp__main { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.xp__role { font-family: var(--display); font-weight: 500; text-transform: uppercase; font-size: clamp(28px, 3vw, 48px); line-height: 1; }
.xp__co { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-size: clamp(15px, 1.2vw, 18px); }
.xp__detail { color: var(--dim); font-size: 15px; max-width: 46rem; }
.xp__period { display: flex; align-items: baseline; gap: .6rem; font-family: var(--display); font-size: clamp(22px, 2vw, 32px); white-space: nowrap; }
.xp__period b { font-weight: 500; }
.xp__period i { font-style: normal; color: var(--dim); }
.xp__arrow { width: 2.2rem; height: 2.2rem; justify-self: end; }

/* Survol : la ligne s'inverse (fond blanc, texte noir) */
.xp__row:hover { color: var(--bg); }
.xp__row:hover .xp__co, .xp__row:hover .xp__detail, .xp__row:hover .xp__num, .xp__row:hover .xp__period i { color: #444; }
.xp__row:hover .xp__logo { border-color: var(--bg); }
.xp__row:hover .xp__logo-mono { opacity: 0; }
.xp__row:hover .xp__logo-color { opacity: 1; }


@media (max-width: 1023px) {
  .xp__row { grid-template-columns: 5.5rem 1fr auto; grid-template-areas: "logo period arrow" "main main main"; gap: 1.25rem 1rem; padding: 2rem .5rem; }
  .xp__num { display: none; }
  .xp__logo { grid-area: logo; width: 5.5rem; }
  .xp__period { grid-area: period; font-size: 22px; }
  .xp__arrow { grid-area: arrow; }
  .xp__main { grid-area: main; }
  .xp__row:hover .xp__main { transform: none; }
}

/* =========================================================
   PORTFOLIO — cinematic
   ========================================================= */
.portfolio { position: relative; background: var(--bg); }
.portfolio__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 8rem; }
.portfolio__head .section-title { margin-bottom: 0; }

.frame { position: relative; display: block; height: 100vh; overflow: clip; }
.frame__rail { position: relative; height: 300vh; top: -100vh; }
.frame__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.frame__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transform: translateY(25px) scale(1.08); will-change: transform; }
.frame__bg--type { display: grid; place-items: center; background: radial-gradient(90% 90% at 70% 20%, color-mix(in srgb, var(--accent) 45%, #000) 0%, #050505 70%); }
.frame__bg--type span { font-family: var(--display); font-weight: 800; font-size: 40vw; line-height: 1; color: rgba(255,255,255,.05); }
.frame__veil { position: absolute; inset: 0; background: rgba(0,0,0,.7); }
.frame__content {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 1.75rem; padding: 0 var(--pad); color: #fff;
}
.frame__nums {
  position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%);
  display: flex; justify-content: space-between; padding: 0 4rem;
  font-family: var(--display); font-weight: 300; font-size: clamp(28px, 3vw, 48px);
}
.frame h3 { position: relative; z-index: 2; font-family: var(--body); font-weight: 500; font-size: clamp(36px, 5vw, 72px); text-align: center; white-space: nowrap; line-height: 1.1; }
.frame__shot { position: relative; z-index: 2; width: min(46rem, 88vw, 82vh); aspect-ratio: 3 / 2; overflow: hidden; background: #111; border-radius: .75rem; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.frame__shot img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.frame__shot--type {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1rem; padding: 2rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 35%, #0b0b0b) 0%, #0b0b0b 70%);
  border: 1px solid rgba(255,255,255,.15); font-size: 17px;
}
.frame__client { position: relative; z-index: 2; margin-top: -1.25rem; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-size: clamp(16px, 1.4vw, 22px); text-align: center; }
.frame__tags { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.frame__tags span { border: 1px solid currentColor; border-radius: .5rem; padding: .25rem 1rem; font-size: 15px; }
@media (max-width: 767px) { .frame__nums { display: none; } .frame__tags span { font-size: 13px; padding: .2rem .6rem; } }

/* =========================================================
   APPS — slider horizontal épinglé
   ========================================================= */
.apps { position: relative; background: var(--bg); padding-top: 12rem; }
.apps__head .section-title { margin-bottom: 6rem; }
.hscroll { position: relative; }
.hscroll__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hscroll__track { display: flex; gap: 2rem; padding: 0 var(--pad); will-change: transform; }
.app-card {
  flex: 0 0 min(88vw, 860px); height: min(76vh, 620px);
  display: grid; grid-template-columns: 36% 1fr;
  border: 1px solid var(--border); background: var(--bg-2); overflow: hidden;
}
.app-card__img {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  padding: 1.75rem 1rem; min-height: 0; min-width: 0;
  background: radial-gradient(circle at 50% 45%, #1a1f22 0%, #0a0a0a 72%);
  border-right: 1px solid var(--border);
}
/* Téléphone identique à lamine-ishola.com */
.phone {
  position: relative; height: 100%; max-width: 100%; aspect-ratio: 240 / 505;
  padding: 7px; border-radius: 38px; overflow: hidden;
  background: linear-gradient(165deg, #2c3236, #12181c);
  border: 2px solid hsla(39, 39%, 93%, .16);
  transition: border-color .6s, transform .9s cubic-bezier(.16,1,.3,1);
}
.phone__shine {
  position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
  background: linear-gradient(125deg, hsla(0,0%,100%,.14), transparent 42%, transparent);
  opacity: 0; transition: opacity .6s;
}
.phone__notch { position: absolute; top: 18px; left: 50%; z-index: 3; width: 78px; height: 20px; border-radius: 14px; background: #0a1216; transform: translateX(-50%); }
.phone__screen { width: 100%; height: 100%; border-radius: 28px; overflow: hidden; background: #0a1216; display: grid; place-items: center; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; user-select: none; -webkit-user-drag: none; pointer-events: none; transform: scale(1.02); transition: transform .9s cubic-bezier(.16,1,.3,1); }
.phone__home { position: absolute; bottom: 16px; left: 50%; z-index: 3; width: 84px; height: 4px; border-radius: 4px; background: #f4efe659; transform: translateX(-50%); transition: background .6s; }
@keyframes shine-sweep { from { opacity: 0; transform: translateX(-30%); } to { opacity: 1; transform: translateX(0); } }
.app-card:hover .phone { border-color: #f4efe647; transform: translateY(-6px); }
.app-card:hover .phone__shine { opacity: 1; animation: shine-sweep 1.1s cubic-bezier(.16,1,.3,1); }
.app-card:hover .phone__screen img { transform: scale(1); }
.app-card:hover .phone__home { background: #f4efe6b3; }
.app-card__body { display: flex; flex-direction: column; justify-content: center; gap: 1rem; padding: clamp(1.25rem, 3vw, 3rem); }
.app-card__num { font-family: var(--display); color: var(--dim); font-size: 22px; }
.app-card h3 { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: clamp(36px, 4vw, 64px); line-height: .95; }
.app-card__client { font-family: var(--display); text-transform: uppercase; color: var(--muted); font-size: 20px; }
.app-card__body > p:not(.app-card__client) { color: var(--muted); font-size: 16px; }
.app-card .frame__tags { justify-content: flex-start; color: var(--muted); }
.app-card__links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
@media (max-width: 700px) {
  .app-card { grid-template-columns: 1fr; grid-template-rows: 50% 1fr; height: min(86vh, 720px); }
  .app-card__img { padding: 1rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .phone { padding: 5px; border-radius: 28px; }
  .phone__notch { top: 12px; width: 54px; height: 14px; border-radius: 10px; }
  .phone__screen { border-radius: 22px; }
  .phone__home { bottom: 10px; width: 56px; }
  .app-card__body { justify-content: flex-start; gap: .5rem; padding: 1rem 1.25rem; }
  .app-card h3 { font-size: 34px; }
  .app-card__client { font-size: 16px; }
  .btn-pill--sm { height: 2.5rem; font-size: 15px; padding: 0 1rem; }
  .app-card__body > p:not(.app-card__client) { font-size: 14px; }
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact { position: relative; background: var(--bg); padding-bottom: 8rem; }
.contact > .separator { margin-bottom: 4rem; }
.contact .marquee { padding: 0 0 6rem; }
.contact__grid { display: grid; grid-template-columns: 1fr; gap: 6rem; }
@media (min-width: 1024px) { .contact__grid { grid-template-columns: 1fr 1fr; gap: 8rem; } }
.contact__q { font-family: var(--display); font-weight: 500; text-transform: uppercase; font-size: clamp(44px, 4.6vw, 72px); line-height: 1; margin-bottom: 4rem; }
.contact__info { display: grid; gap: 2.5rem; }
.contact__info li { display: flex; flex-direction: column; gap: .25rem; }
.contact__info a, .contact__info p { font-family: var(--display); font-weight: 500; text-transform: uppercase; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.1; word-break: break-word; }
.contact__info a:hover { color: var(--muted); }
.contact__info span { color: var(--dim); font-size: 16px; }

.contact__form { display: grid; gap: 3rem; align-content: start; }
.contact__form input, .contact__form textarea {
  width: 100%; background: transparent; color: var(--text);
  border: 0; border-bottom: 1px solid var(--border); outline: none; border-radius: 0;
  padding: 1rem 0; font-family: var(--display); font-size: clamp(22px, 2vw, 30px); text-transform: uppercase; resize: vertical;
  transition: border-color .3s;
}
.contact__form textarea { text-transform: none; font-family: var(--body); font-size: 18px; }
.contact__form ::placeholder { color: var(--dim); text-transform: uppercase; font-family: var(--display); font-size: clamp(22px, 2vw, 30px); }
.contact__form input:focus, .contact__form textarea:focus { border-color: var(--text); }
.contact__form .btn-roll { justify-self: start; }
.contact__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact__form { position: relative; }
.contact__form.is-sending .btn-roll { opacity: .45; pointer-events: none; }
.contact__form.is-sending .btn-roll__arrow { animation: rotation 1s linear infinite; }
.contact__form input.is-invalid, .contact__form textarea.is-invalid { border-color: #ff6b6b; }
.contact__status { min-height: 1.5em; font-size: 16px; color: var(--muted); display: flex; align-items: center; gap: .6rem; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; }
.contact__status.is-visible { opacity: 1; transform: none; }
.contact__status.is-ok { color: var(--text); }
.contact__status.is-ok::before { content: "✺"; }
.contact__status.is-error { color: #ff8a8a; }

/* =========================================================
   FOOTER — révélé derrière le contenu
   ========================================================= */
.footer { position: relative; height: 100vh; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); background: var(--bg-2); }
.footer__fixed { position: fixed; left: 0; bottom: 0; width: 100%; height: 100vh; }
.footer__bg { position: absolute; inset: 0; display: grid; place-items: center; }
.footer__bg img { height: 100%; width: auto; max-width: none; object-fit: contain; opacity: .35; filter: grayscale(1); -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 95%); mask-image: linear-gradient(to bottom, #000 40%, transparent 95%); }
.footer__inner {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--pad) 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 2rem; text-align: center;
  will-change: transform;
}
.footer__copy { font-size: clamp(16px, 1.6vw, 24px); color: var(--muted); }
.footer__copy a { color: var(--text); text-transform: uppercase; }
.footer__copy a:hover { text-decoration: underline; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 2.5rem; font-family: var(--display); text-transform: uppercase; font-size: clamp(18px, 1.6vw, 26px); }
.hero-name--footer { width: 100%; margin-bottom: calc(var(--name-size) * .375 - 2rem); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1023px) {
  .topnav { display: none; }
  .burger { transform: scale(1); }
  .section, .home__quote { padding-bottom: 8rem; }
  .section > .separator, .portfolio > .separator { margin-bottom: 8rem; }
  .section-title, .about__bio, .work-steps { margin-bottom: 8rem; }
}
@media (max-width: 767px) {
  .home__inner { padding-top: 6rem; }
  .home__meta { grid-template-columns: 1fr; gap: .5rem; }
  .home__stage { grid-template-columns: 1fr 1fr; }
  .home__visual { grid-column: 1 / -1; order: -1; width: 100%; max-width: 420px; justify-self: center; }
  .stats__item { padding: 1.5rem .5rem; }
  .section-title__big { font-size: clamp(64px, 18vw, 120px); line-height: .9; }
  .section-title__big--md { font-size: clamp(56px, 15vw, 100px); }
  .portfolio__head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .fill-text { background-size: 100% 100%; }
  html.js .separator, html.js .zoom-out-image, html.js .skill__bar, html.js .gallery__grid { transform: none; }
}
