/* =========================================================
   Sturo — Portfolio styles
   Dark, sober, editorial. Inspiration: MillionViewClub.
   ========================================================= */

:root {
  --bg: #0a0a0a;
  --bg-elev: #111111;
  --line: #1c1c1c;
  --text: #f5f5f4;
  --text-dim: #a1a1a1;
  --text-mute: #6b6b6b;
  --gold: #d4a24a;
  --gold-soft: #e2c07a;
  --accent: var(--gold);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1200px;
  --pad-x: clamp(20px, 5vw, 64px);
  --section-y: clamp(80px, 12vw, 160px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, iframe { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.serif { font-family: var(--serif); font-weight: 300; font-style: italic; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad-x);
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav__logo {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--gold);
}
.nav__links {
  list-style: none;
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--text-dim);
}
.nav__links a { transition: color 0.2s ease; }
.nav__links a:hover { color: var(--gold); }
@media (max-width: 620px) {
  .nav__links { gap: 20px; font-size: 13px; }
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 120px var(--pad-x) 80px;
  max-width: var(--max);
  margin: 0 auto;
}
.hero__kicker {
  position: relative;
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 32px;
  padding-left: 28px;
}
.hero__kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  background: var(--gold);
  transform: translateY(-50%);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.hero__serif { display: inline-block; }
.hero__serif--italic {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-soft);
}
.hero__sub {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 48px;
}
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary {
  background: var(--text);
  color: var(--bg);
}
.btn--primary:hover {
  transform: translateY(-1px);
  background: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--text);
}

/* ---------- SECTION LABEL ---------- */
.section__label {
  position: relative;
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  padding-left: 28px;
}
.section__label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  background: var(--gold);
  transform: translateY(-50%);
}

/* ---------- ABOUT ---------- */
.about {
  padding: var(--section-y) var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.about__title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin: 0;
}
.about__top {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 56px;
}
.about__photo {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 720px) {
  .about__top {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }
  .about__photo { max-width: 130px; border-radius: 12px; }
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 900px;
}
.about__col p {
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.7;
}
@media (max-width: 720px) {
  .about__grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- WORK ---------- */
.work {
  padding: var(--section-y) var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.work__title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
}
.projects {
  display: flex;
  flex-direction: column;
  gap: 80px;
}
.project {
  border-top: 1px solid var(--line);
  padding-top: 40px;
}
.project__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.project__name {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-family: var(--sans);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.project__name .serif { font-size: 1em; }
.project__logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.project__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.project__role {
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 0.02em;
  margin: 0;
}
.project__scope {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.9;
  margin: 0;
}
.project__embeds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.project__embeds[data-layout="long"] {
  grid-template-columns: 1fr;
  max-width: 860px;
}

/* Short (9:16) */
.embed-short {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.embed-short:hover { transform: translateY(-2px); border-color: var(--gold); }
.embed-short iframe { width: 100%; height: 100%; border: 0; }

/* Long (16:9) */
.embed-long {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.embed-long iframe { width: 100%; height: 100%; border: 0; }

/* ---------- CONTACT ---------- */
.contact {
  padding: var(--section-y) var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  text-align: left;
}
.contact__title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  max-width: 800px;
}
.contact__sub {
  color: var(--text-dim);
  font-size: 17px;
  margin-bottom: 48px;
  max-width: 560px;
}
.contact__links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- FOOTER ---------- */
.footer {
  padding: 40px var(--pad-x);
  border-top: 1px solid var(--line);
  color: var(--text-mute);
  font-size: 13px;
  text-align: center;
}

/* ---------- MODAL (LinkedIn) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.is-open { display: flex; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}
.modal__panel {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 56px 44px 44px;
  max-width: 520px;
  width: 100%;
  animation: modalIn 0.35s cubic-bezier(.2, 0, .1, 1);
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}
.modal__close:hover { background: var(--line); color: var(--gold); }
.modal__kicker {
  position: relative;
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  padding-left: 28px;
}
.modal__kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  background: var(--gold);
  transform: translateY(-50%);
}
.modal__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 6vw, 48px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.modal__title {
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.modal__bio {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 32px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
body.modal-open { overflow: hidden; }

/* ---------- REVEAL ON SCROLL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   MOBILE (≤ 720px) — carrousel horizontal pour les shorts
   ========================================================= */
@media (max-width: 720px) {
  /* Resserre le rythme entre projets */
  .projects { gap: 56px; }
  .project { padding-top: 32px; }
  .project__head {
    margin-bottom: 24px;
    gap: 12px;
    align-items: flex-start;
  }
  .project__role { font-size: 13px; }
  .project__scope { font-size: 11px; }
  .project__logo { width: 40px; height: 40px; }
  .project__name { gap: 12px; }
  .project__meta {
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }

  /* Modale pleine largeur sur mobile */
  .modal { padding: 16px; }
  .modal__panel { padding: 52px 28px 28px; border-radius: 16px; }

  /* Carrousel horizontal pour les shorts */
  .project__embeds:not([data-layout="long"]) {
    display: flex;
    grid-template-columns: none;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Permet à la 1re carte de toucher le bord gauche
       et laisse respirer la dernière sur la droite */
    margin-inline: calc(var(--pad-x) * -1);
    padding: 4px var(--pad-x);
    scroll-padding-inline: var(--pad-x);
    /* Masque le dégradé de la dernière carte pour un effet doux */
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
  }
  .project__embeds:not([data-layout="long"])::-webkit-scrollbar {
    display: none;
  }
  .project__embeds:not([data-layout="long"]) .embed-short {
    flex: 0 0 72vw;
    max-width: 280px;
    scroll-snap-align: start;
  }

  /* Vidéo longue reste en pleine largeur */
  .project__embeds[data-layout="long"] {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  /* Hero un peu plus compact */
  .hero {
    min-height: 88vh;
    padding-top: 100px;
    padding-bottom: 60px;
  }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1; text-align: center; }

  /* Section label un chouïa plus petite */
  .section__label {
    font-size: 11px;
    padding-left: 22px;
  }
  .section__label::before { width: 16px; }
  .hero__kicker { padding-left: 22px; font-size: 12px; }
  .hero__kicker::before { width: 16px; }
}
