/* ============ MTX portfolio — julien-martinez.tarroux.com ============ */
@import url("/assets/fonts/fonts.css");

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #9a9a9a;
  --dim: #6f6f6f;
  --gap: 6px;
  --maxw: 1600px;
  --pad: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); }
body {
  color: var(--fg);
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: #fff; color: #000; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.logo {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: block;
}
.logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  transition: opacity .18s var(--ease);
}
.logo .logo-hover { opacity: 0; }
.logo:hover .logo-hover, .logo:focus-visible .logo-hover { opacity: 1; }
.logo:hover .logo-normal, .logo:focus-visible .logo-normal { opacity: 0; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.site-nav a.nav-link {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .14em;
  color: var(--muted);
  transition: color .18s var(--ease);
  text-transform: uppercase;
}
.site-nav a.nav-link:hover, .site-nav a.nav-link.active { color: var(--fg); }
.site-nav a.nav-icon { display: inline-flex; color: var(--muted); transition: color .18s var(--ease); }
.site-nav a.nav-icon:hover { color: var(--fg); }
.site-nav a.nav-icon svg { width: 26px; height: 22px; fill: currentColor; }

/* burger */
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger i { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .25s var(--ease), opacity .2s; }
@media (max-width: 640px) {
  .site-nav { display: none; }
  .burger { display: block; }
  body.nav-open .site-nav {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.96);
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    z-index: 40;
  }
  body.nav-open .site-nav a.nav-link { font-size: 22px; }
  body.nav-open .burger { position: relative; z-index: 45; }
  body.nav-open .burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .burger i:nth-child(2) { opacity: 0; }
  body.nav-open .burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

main { flex: 1; }

/* ---------- gallery (home / julien) ---------- */
.covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  padding: var(--gap);
}
@media (max-width: 1100px) { .covers { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .covers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .covers { grid-template-columns: 1fr; } }

.cover {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
  background: #050505;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease), opacity .4s var(--ease);
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,0) 55%);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.cover .cover-meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  transform: translateY(10px);
  opacity: 0;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.cover .cover-title {
  font-weight: 800;
  font-size: clamp(17px, 1.6vw, 22px);
  letter-spacing: .02em;
  line-height: 1.2;
}
.cover .cover-desc {
  margin-top: 4px;
  color: #cfcfcf;
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cover:hover img, .cover:focus-visible img { transform: scale(1.035); }
.cover:hover::after, .cover:focus-visible::after { opacity: 1; }
.cover:hover .cover-meta, .cover:focus-visible .cover-meta { opacity: 1; transform: translateY(0); }
@media (hover: none) {
  .cover::after { opacity: 1; }
  .cover .cover-meta { opacity: 1; transform: none; }
}

/* ---------- project page ---------- */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad);
  width: 100%;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(28px, 6vh, 64px);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--dim);
  text-transform: uppercase;
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.crumb:hover { color: var(--fg); transform: translateX(-3px); }
.page-header {
  padding: clamp(20px, 4vh, 40px) 0 clamp(30px, 5vh, 52px);
  max-width: 880px;
}
.page-header h1 {
  font-size: clamp(36px, 6vw, 62px);
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.06;
  white-space: pre-wrap;
}
.page-header::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  background: #fff;
  margin-top: 26px;
}
.page-header .desc {
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17.5px);
  line-height: 1.75;
  max-width: 660px;
}

.modules { padding-bottom: 24px; display: flex; flex-direction: column; gap: clamp(30px, 5.5vh, 60px); }

/* button pill */
.btn-row { display: flex; justify-content: flex-start; }
.modules > .reveal:first-child .btn-row { margin-top: -10px; }
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .02em;
  padding: 13px 26px;
  border-radius: 999px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-pill::after { content: "\2197"; font-size: 12px; }
.btn-pill:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,255,255,.22); }

/* social icons */
.social-row { display: flex; justify-content: flex-start; gap: 16px; flex-wrap: wrap; }
.social-tile {
  width: 76px;
  height: 76px;
  background: #141414;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.social-tile svg { width: 30px; height: 30px; fill: #fff; transition: fill .2s var(--ease); }
.social-tile:hover { background: #fff; transform: translateY(-3px); }
.social-tile:hover svg { fill: #000; }

/* video */
.video-frame { width: 100%; display: flex; justify-content: center; }
.video-frame video {
  width: 100%;
  max-height: 80vh;
  background: #0a0a0a;
  outline: none;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.07);
}
.video-frame.portrait video { width: auto; max-width: 100%; max-height: 80vh; }
.video-frame iframe { border-radius: 12px; border: 1px solid rgba(255,255,255,.07); }

/* columns */
.cols { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
@media (max-width: 768px) { .cols { grid-template-columns: 1fr; } }
.cols .video-frame video { max-height: 76vh; }
.cols .col { display: flex; flex-direction: column; gap: 24px; }

/* single image module */
.img-module { display: flex; justify-content: center; }
.img-module img, .img-module video { width: 100%; height: auto; border-radius: 12px; }

/* justified grid */
.jgrid { display: flex; flex-wrap: wrap; gap: 10px; }
.jgrid-item {
  position: relative;
  flex-grow: calc(var(--r) * 100);
  flex-basis: calc(var(--r) * 220px);
  overflow: hidden;
  cursor: zoom-in;
  background: #070707;
  border-radius: 10px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.jgrid-item > img, .jgrid-item > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: var(--r);
  transition: transform .5s var(--ease);
}
.jgrid-item:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.55); }
.jgrid-item:hover > img { transform: scale(1.03); }
.jgrid-item.linked { cursor: pointer; }

/* uniform video-thumbnail grid (squeezie / m8) */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 900px) { .thumb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .thumb-grid { grid-template-columns: 1fr; } }
.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #070707;
  border-radius: 10px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.thumb:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.55); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 50%);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.thumb .thumb-title {
  position: absolute;
  left: 14px;
  right: 48px;
  bottom: 12px;
  z-index: 2;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.thumb .play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.thumb .play-badge svg { width: 12px; height: 12px; fill: #000; margin-left: 2px; }
.thumb:hover img { transform: scale(1.04); }
.thumb:hover::after, .thumb:hover .thumb-title, .thumb:hover .play-badge { opacity: 1; }
.thumb:hover .thumb-title { transform: translateY(0); }
@media (hover: none) {
  .thumb::after, .thumb .thumb-title, .thumb .play-badge { opacity: 1; transform: none; }
}

/* text module */
.text-module {
  color: #d6d6d6;
  font-size: 15px;
  line-height: 2.1;
  max-width: 760px;
}
.text-module.centered { margin: 0 auto; text-align: center; }
/* listes ➔ longues : 2 colonnes hors layout en colonnes */
.modules > .reveal > .text-module {
  column-count: 2;
  column-gap: 48px;
}
@media (max-width: 700px) { .modules > .reveal > .text-module { column-count: 1; } }
.text-module > div { break-inside: avoid; }

/* navigation projet précédent / suivant */
.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: clamp(28px, 5vh, 52px);
}
@media (max-width: 640px) { .project-nav { grid-template-columns: 1fr; } }
.project-nav a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
  background: #101010;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.project-nav a:hover { background: #1a1a1a; transform: translateY(-2px); }
.project-nav a.next { text-align: right; align-items: flex-end; }
.project-nav .pn-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--dim);
  text-transform: uppercase;
}
.project-nav .pn-title { font-weight: 800; font-size: 16px; line-height: 1.3; }

/* ---------- footer ---------- */
.back-top {
  text-align: center;
  padding: clamp(48px, 9vh, 110px) 20px 20px;
}
.back-top a {
  font-family: "Silkscreen", monospace;
  font-size: 13px;
  color: var(--dim);
  letter-spacing: .04em;
  transition: color .2s var(--ease);
}
.back-top a:hover { color: var(--fg); }
.back-top .arrow { display: block; font-size: 16px; margin-bottom: 6px; }

.site-footer {
  text-align: center;
  padding: 26px 20px 42px;
  color: var(--dim);
  font-size: 12.5px;
}
.site-footer a {
  color: var(--fg);
  font-weight: 700;
  padding: 10px 8px;
  margin: -10px -4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,.35);
}
.site-footer a:hover { text-decoration-color: #fff; }

/* fixed back-to-top */
.fab-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.fab-top svg { width: 18px; height: 18px; fill: #000; }
.fab-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(255,255,255,.94);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 90vh; object-fit: contain; box-shadow: 0 10px 60px rgba(0,0,0,.25); }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute;
  background: none;
  border: 0;
  cursor: pointer;
  color: #000;
  font-size: 34px;
  line-height: 1;
  padding: 16px;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
}
.lightbox .lb-close { top: 12px; right: 16px; }
.lightbox .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox .lb-prev, .lightbox .lb-next { font-size: 26px; } }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
