:root {
  --bg: #0b0b0c;
  --bg-2: #151517;
  --fg: #ededeb;
  --muted: #86868b;
  --line: rgba(237, 237, 235, 0.12);
  --font: "Inter Tight", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 3.5vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
ul { list-style: none; }
::selection { background: var(--fg); color: var(--bg); }
.label { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.mask { display: block; overflow: hidden; }
.mask > span { display: inline-block; }

/* LOADER */
.loader { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; align-items: flex-end; justify-content: space-between; padding: var(--gutter); font-size: 14px; }
.loader__name { font-weight: 500; }
.loader__pct { font-variant-numeric: tabular-nums; color: var(--muted); }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter); mix-blend-mode: difference; font-size: 15px;
}
.nav__logo { font-weight: 600; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: clamp(16px, 2.5vw, 36px); }
.nav__links a { position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 1000px) { .nav__links a[href="#cadrages"], .nav__links a[href="#perso"] { display: none; } }
@media (max-width: 760px) { .nav__links a[href="#photos"] { display: none; } }

/* HERO */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#gl:active { cursor: grabbing; }
.hero__fade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(11, 11, 12, 0.5), transparent 25%, transparent 55%, var(--bg) 100%); }
.hero__content { position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); pointer-events: none; }
.hero__title { font-weight: 600; font-size: clamp(56px, 16.2vw, 300px); line-height: 0.86; letter-spacing: -0.065em; margin-left: -0.05em; }
.hero__title .mask { padding-bottom: 0.06em; }
.hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.hero__sub { color: var(--muted); font-size: 15px; }
.roller { display: block; height: 1.15em; overflow: hidden; color: var(--fg); font-size: clamp(22px, 2.2vw, 32px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.roller__inner { display: flex; flex-direction: column; }
.roller__inner > span { display: block; height: 1.15em; }
.hero__based { display: block; margin-top: 6px; }
.hero__link { pointer-events: auto; font-size: 15px; }
.hero__link span { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color 0.3s; }
.hero__link:hover span { border-color: var(--fg); }
@media (max-width: 560px) { .hero__row { flex-direction: column; align-items: flex-start; } .hero__sub br { display: none; } }

/* ABOUT */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 100px); align-items: end; padding: clamp(100px, 14vw, 200px) var(--gutter); }
.about__photo { overflow: hidden; border-radius: 4px; aspect-ratio: 4/5; background: var(--bg-2); }
.about__photo img { width: 100%; height: 115%; object-fit: cover; object-position: 45% center; }
.about__lead { font-weight: 500; font-size: clamp(26px, 3vw, 44px); line-height: 1.12; letter-spacing: -0.03em; }
.about__p { margin-top: 28px; max-width: 54ch; color: var(--muted); font-size: 17px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 56px; border-top: 1px solid var(--line); padding-top: 22px; }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { font-size: clamp(36px, 4vw, 56px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about__photo { aspect-ratio: 4/3; } }

/* WORK */
.work { padding: 0 var(--gutter) clamp(100px, 12vw, 180px); }
.work__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; padding: 72px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 32px; position: sticky; top: 0; z-index: 20; background: var(--bg); }
.section-title { font-weight: 600; font-size: clamp(40px, 6vw, 96px); line-height: 0.95; letter-spacing: -0.05em; }
.section-title .mask { padding-bottom: 0.24em; margin-bottom: -0.18em; }
.idx { font-size: 0.22em; font-weight: 400; letter-spacing: 0; color: var(--muted); vertical-align: top; margin-right: 0.6em; position: relative; top: 0.5em; font-variant-numeric: tabular-nums; }
.section-title sup { font-size: 0.25em; font-weight: 400; letter-spacing: 0; color: var(--muted); vertical-align: top; margin-left: 4px; position: relative; top: 0.4em; }
.work__note { color: var(--muted); font-size: 15px; }
.filters { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; }
.filter { color: var(--muted); padding: 4px 0; position: relative; transition: color 0.3s; }
.filter span { font-size: 11px; vertical-align: top; margin-left: 1px; font-variant-numeric: tabular-nums; }
.filter:hover, .filter.is-active { color: var(--fg); }
.filter::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--fg); transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
.filter.is-active::after { transform: scaleX(1); }
@media (max-width: 760px) {
  .work__head { padding-top: 64px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + var(--gutter) * 2); margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 40px clamp(12px, 1.4vw, 20px); grid-auto-flow: dense; align-items: start; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; } }
.card { cursor: pointer; }
.card.is-hidden { display: none; }
.card--land { grid-column: span 2; }
.card__media { position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 9/16; background: var(--bg-2); }
.card--land .card__media { aspect-ratio: 16/9; }
.card__media img, .card__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity 0.4s; }
.card__media video { opacity: 0; }
.card.is-playing .card__media video { opacity: 1; }
.card:hover .card__media img, .card:hover .card__media video { transform: scale(1.03); }
.card__dur { position: absolute; right: 8px; bottom: 8px; font-size: 12px; font-variant-numeric: tabular-nums; background: rgba(11, 11, 12, 0.7); padding: 1px 6px; border-radius: 3px; }
.card__info { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 14px; }
.card__title { font-weight: 500; font-size: 15px; line-height: 1.3; }
.card__sub { color: var(--muted); text-align: right; flex: none; }
@media (max-width: 520px) { .card__info { flex-direction: column; gap: 0; } .card__sub { text-align: left; font-size: 13px; } }

/* CONTACT */
.contact { padding: clamp(120px, 14vw, 200px) var(--gutter) 28px; min-height: 100vh; display: flex; flex-direction: column; }
.contact__title { font-weight: 600; font-size: clamp(40px, 7.4vw, 128px); line-height: 0.98; letter-spacing: -0.055em; }
.dim { color: var(--muted); }
.contact__mail { align-self: flex-start; font-size: clamp(20px, 2.4vw, 32px); font-weight: 500; letter-spacing: -0.02em; border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color 0.3s; max-width: 100%; overflow-wrap: anywhere; }
.contact__mail:hover { border-color: var(--fg); }
.contact__mail { display: inline-flex; gap: 12px; align-items: baseline; }
.contact__mail i { font-style: normal; transition: transform 0.5s var(--ease); }
.contact__mail:hover i { transform: translate(4px, -4px); }
.socials { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 32px; font-size: 15px; }
.socials a { color: var(--muted); transition: color 0.3s; }
.socials a:hover { color: var(--fg); }
.socials span { color: var(--muted); }
.handle { margin-top: 14px; font-size: 13px; color: var(--muted); }
.footer { margin-top: auto; padding-top: 120px; font-size: 13px; color: var(--muted); }
.footer__row { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 18px; }
.wordmark { overflow: hidden; margin: 28px 0 -0.12em; line-height: 0.82; }
.wordmark span { display: block; font-size: 19.6vw; font-weight: 600; letter-spacing: -0.07em; color: var(--fg); white-space: nowrap; margin-left: -0.04em; }
.footer a:hover { color: var(--fg); }

/* PLAYER */
.player { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; visibility: hidden; }
.player.is-open { visibility: visible; }
.player__bg { position: absolute; inset: 0; background: rgba(11, 11, 12, 0.94); opacity: 0; }
.player__inner { position: relative; display: flex; gap: clamp(20px, 3vw, 48px); align-items: flex-end; padding: 72px var(--gutter) 40px; max-width: 100%; max-height: 100%; }
.player__video { border-radius: 4px; overflow: hidden; background: #000; height: min(82vh, 860px); aspect-ratio: 9/16; }
.player.is-land .player__video { height: auto; width: min(68vw, 1200px); aspect-ratio: 16/9; }
.player__video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__meta { width: 260px; flex: none; }
.player__cat { font-size: 13px; color: var(--muted); }
.player__meta h3 { font-weight: 600; font-size: clamp(28px, 3vw, 44px); line-height: 1; letter-spacing: -0.04em; margin: 10px 0 8px; }
.player__sub { color: var(--muted); font-size: 15px; }
.player__nav { display: flex; gap: 8px; margin-top: 28px; }
.player__nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); transition: border-color 0.3s; }
.player__nav button:hover { border-color: var(--fg); }
.player__close { position: fixed; top: 22px; right: var(--gutter); font-size: 15px; }
.player__close:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 860px) {
  .player__inner { flex-direction: column; align-items: stretch; padding-top: 64px; gap: 16px; }
  .player__video { height: min(68vh, 700px); margin: 0 auto; }
  .player.is-land .player__video { width: calc(100vw - 32px); height: auto; }
  .player__meta { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .player__meta h3 { font-size: 24px; margin: 2px 0; }
  .player__cat, .player__meta h3, .player__sub { grid-column: 1; }
  .player__nav { grid-column: 2; grid-row: 1 / 4; margin: 0; }
}

@media (prefers-reduced-motion: reduce) { .card__media img, .card__media video { transition: none; } }

/* PHOTOS */
.photos { padding: 0 0 clamp(100px, 12vw, 180px); }
.photos__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; padding-bottom: 20px; margin: 0 var(--gutter) 32px; border-bottom: 1px solid var(--line); }
.photos__head .work__note { margin-top: 10px; }
.photos__ctrl { display: flex; align-items: center; gap: 8px; }
.photos__idx { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 10px; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); transition: border-color 0.3s, opacity 0.3s; }
.round-btn:hover { border-color: var(--fg); }
.round-btn:disabled { opacity: 0.3; cursor: default; border-color: var(--line); }
.photos__track { display: flex; gap: clamp(10px, 1.2vw, 16px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); padding: 0 var(--gutter); scrollbar-width: none; cursor: grab; overscroll-behavior-x: contain; }
.photos__track::-webkit-scrollbar { display: none; }
.photos__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.photos__track.is-animating { scroll-snap-type: none; }
.photos__track.is-dragging img { pointer-events: none; }
.photo { flex: none; scroll-snap-align: start; aspect-ratio: 1; height: clamp(280px, 62vh, 640px); border-radius: 4px; overflow: hidden; background: var(--bg-2); }
.photo img { height: 100%; width: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity 0.6s; opacity: 0; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.photo img.is-loaded { opacity: 1; }
.photo:hover img { transform: scale(1.025); }
@media (max-width: 560px) { .photo { height: 58vh; } .photos__idx { display: none; } }

/* LIGHTBOX */
.lightbox { position: fixed; inset: 0; z-index: 160; background: rgba(11, 11, 12, 0.96); display: grid; place-items: center; visibility: hidden; opacity: 0; }
.lightbox.is-open { visibility: visible; }
.lightbox img { max-width: calc(100vw - 2 * var(--gutter) - 120px); max-height: calc(100vh - 140px); width: auto; height: auto; border-radius: 4px; }
.lightbox__close { position: fixed; top: 22px; right: var(--gutter); font-size: 15px; }
.lightbox__close:hover { text-decoration: underline; text-underline-offset: 4px; }
.lightbox__prev, .lightbox__next { position: fixed; top: 50%; margin-top: -22px; }
.lightbox__prev { left: var(--gutter); } .lightbox__next { right: var(--gutter); }
.lightbox__idx { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 180px); }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; margin: 0; }
}

/* CURSOR PILL */
.pill { position: fixed; top: 0; left: 0; z-index: 120; pointer-events: none; padding: 7px 14px; margin: 14px 0 0 14px; border-radius: 99px; background: var(--fg); color: var(--bg); font-size: 13px; font-weight: 500; transform-origin: 0 0; scale: 0; transition: scale 0.35s var(--ease); }
.pill.is-on { scale: 1; }
@media (hover: none), (pointer: coarse) { .pill { display: none; } }

/* CADRAGES — vertical + horizontal side by side at the same height */
.grid--cad { display: flex; gap: clamp(12px, 1.4vw, 20px); align-items: flex-start; }
.grid--cad .card { flex: 0.5625 1 0; min-width: 0; grid-column: auto; }
.grid--cad .card--land { flex: 1.7778 1 0; }
@media (max-width: 640px) { .grid--cad { flex-direction: column; } .grid--cad .card { width: 100%; flex: none; } .grid--cad .card:not(.card--land) { width: 62%; } }
.work--cad { padding-bottom: clamp(100px, 12vw, 180px); }

/* SERIES */
.series { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.series__name { font-weight: 500; font-size: clamp(24px, 2.6vw, 38px); letter-spacing: -0.035em; line-height: 1.1; }
.series__meta { color: var(--muted); font-size: 15px; max-width: 60ch; }

/* SCROLL PROGRESS */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--fg); transform-origin: 0 50%; transform: scaleX(0); }

/* CONTACT EXTRAS */
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 48px; }
.copy-btn { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; transition: color 0.3s, border-color 0.3s; }
.copy-btn:hover, .copy-btn.is-done { color: var(--fg); border-color: var(--fg); }

/* ACTIVE NAV LINK */
.nav__links a.is-current::after { transform: scaleX(1); }
