/* Tokens live in tokens.css */

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

/* ============================================
   BASE
   ============================================ */
body {
  font-family: var(--font-body);
  font-size: var(--fs-text);
  font-weight: 400;
  line-height: var(--lh-text);
  color: var(--color-ink);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   PAGE FADE-IN
   ============================================ */
.page {
  opacity: 0;
  transition: opacity 380ms ease;
}
.page.is-ready { opacity: 1; }

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */
.accent { color: var(--color-accent); }
.italic { font-style: italic; }
.bold   { font-weight: 700; }

.label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 400;
  color: var(--color-ink-label);
      text-transform: uppercase;
}

.h1 {
  font-family: var(--font-title);
  font-size: var(--fs-h1);
  letter-spacing: -0.5px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-accent);
}

.h2 {
  font-family: var(--font-title);
  font-size: var(--fs-h2);
  letter-spacing: -0.3px;
  color: var(--color-ink);
  line-height: 1.2;
  font-weight: 400;
}

.h3 {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--color-ink);
  line-height: 1.25;
  font-weight: 600;
}

/* ============================================
   CONTAINERS
   ============================================ */
.container {
  max-width: var(--container-md);
  margin: 0 auto;
}

.container--lg {
  max-width: var(--container-lg);
  margin: 0 auto;
}

/* ============================================
   SITE HEADER  — noise + cursor glow zone
   ============================================ */
.site-header {
  position: relative;
  overflow: hidden;
  /* background-color: var(--color-bg);
  border-bottom: var(--border);*/
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 1000;
  transform: translateY(0);
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: transform 280ms ease,
              background-color 220ms ease,
              border-color 220ms ease;
}

.nav > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav--hidden { transform: translateY(-100%); }

.nav--scrolled {
  background-color: var(--color-bg);
  border-bottom-color: var(--color-border);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-ink);
}

.nav__brand-mark {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: block;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: var(--sp-24);
}

.nav__links {
  display: flex;
  gap: var(--sp-32);
  font-size: var(--fs-text);
  font-weight: 500;
}

.nav__link { color: var(--color-ink-secondary); transition: color 150ms ease; }
.nav__link:hover,
.nav__link[aria-current="page"] { color: var(--color-accent); font-weight: 700; }


/* ============================================
   HERO
   ============================================ */
.hero {
  padding: clamp(150px, 22vh, 300px) 0 var(--sp-64) 0;
}

.hero__content {
  display: flex;
  max-width: 1000px;
  flex-direction: column;
  gap: var(--sp-32);
}

.hero__title {
  font-weight: 400;
  color: var(--color-ink2);
}

.hero__title span { font-weight: 600; }

.hero__desc {
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.5;
  color: var(--color-ink-secondary);
}

/* ============================================
   MAIN FRAME  — vertical stack of .block
   ============================================ */
.frame {
  display: flex;
  flex-direction: column;
  gap: clamp(72px, 11vw, 140px);
  padding: 64px 0;
}

/* ============================================
   BLOCK  — bordered content card
   ============================================ */
.block {
  border: var(--border);
}

.block > *:last-child { border-bottom: none; }

/* Vertical stack with 48px gap — no border */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-48);
}

/* Constrain a block to md width inside an lg container */
.block--md {
  max-width: var(--container-md);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* ============================================
   SECTION HEAD
   ============================================ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-rule);
  padding-top: var(--sp-32);
}

.section-head h2,
.section-head h3 {
  font-family: var(--font-title);
  font-size: var(--fs-h2);
  font-weight: 400;
  color: var(--color-ink2);
  line-height: 1;
}

.section-head__mark {
  flex-shrink: 0;
}

/* ============================================
   PROJECT LIST + ROW
   ============================================ */
.projects {
  display: flex;
  flex-direction: column;
  gap: var(--sp-64);
}

.project {
  display: grid;
  /* text 1/3 · image 2/3 */
  grid-template-columns: 1fr 2fr;
  align-items: flex-start;
  gap: var(--sp-32);
}

.project__media {
  display: block;
  border-radius: var(--radius);
}

.project__media-inner {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--color-accent);
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-img);
  transition: box-shadow 300ms ease, transform 300ms ease;
}

.project__media:hover .project__media-inner {
  transform: translateY(8px);
  box-shadow: var(--shadow-img-flat);
}

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project__info {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.project__header {
  display: flex;
  flex-direction: column;
}

.project__title {
  display: block;
  color: var(--color-ink);
  transition: color 70ms ease;
}
.project__title:hover { color: var(--color-accent); }

.project__desc {
  margin-top: var(--sp-12);    /* 8px: title → description */
  font-size: var(--fs-text);
  line-height: var(--lh-text);
  color: var(--color-ink-secondary);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  margin-top: var(--sp-16);   /* 16px: description → tags */
}

.tag {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-accent);
  background-color: var(--color-accent-subtle);
  padding: var(--sp-4) var(--sp-8);
  border-radius: 4px;
  line-height: 1;
}

.project__meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12); margin-top: var(--sp-24); } /* 24px: tags → metrics */
.project__meta-item { display: flex; flex-direction: column; gap: 2px; }
.project__meta-value { font-size: 18px; font-weight: 400; }
.project__meta-value--accent { color: var(--color-accent); }

/* ============================================
   BUTTON  — filled, "raised" element that presses down on hover.
   Shared base for .project__cta and .about-social__link.
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-weight: 500;
  /* hard bottom edge → looks like a raised, physical button */
  box-shadow: 0 4px 0 var(--shadow-btn-edge);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

/* Hover: sink into the surface — drop down and lose the bottom edge */
.btn:hover,
.btn:focus-visible {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--shadow-btn-edge);
}

/* Project / "En savoir plus" CTA — label + arrow that rotates on hover */
.project__cta {
  margin-top: var(--sp-32);   /* tags → CTA */
  align-self: flex-start;
  gap: var(--sp-8);
  padding: 12px 16px;
  font-size: 15px;
}

.project__cta svg {
  transition: transform 120ms ease;
}

.project__cta:hover svg,
.project__cta:focus-visible svg {
  transform: rotate(-45deg);
}

/* ============================================
   ROW LINK
   ============================================ */
.row-link {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  padding: var(--sp-16) var(--sp-24);
  font-size: var(--fs-text);
  border-bottom: var(--border);
  transition: color 150ms ease;
}
.row-link:hover { color: var(--color-accent); }

/* ============================================
   ABOUT TEASER  — editorial: layered portrait + bio
   ============================================ */
.about {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--sp-64);
  align-items: center;
}

/* No-photo variant: single column, text left-aligned */
.about--no-media {
  grid-template-columns: 1fr;
}
.about--no-media .about__lead { max-width: 100%; }
.about--no-media .about__bio { max-width: 100%; }

/* Same treatment as the About-page portrait: clipping frame with an oversized
   image inside (scroll parallax) that tilts in 3D toward the cursor. */
.about__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-img);
  will-change: transform;
  backface-visibility: hidden;
}

.about__media img {
  position: absolute;
  top: -20%;          /* centres the 140%-tall image → ±20% of slack */
  left: 0;
  width: 100%;
  height: 140%;
  object-fit: cover;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .about__media { transform: none !important; }
  .about__media img { transform: none !important; }
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-24);
}

/* Big serif statement line */
.about__lead {
  font-family: var(--font-title);
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  color: var(--color-ink);
  max-width: 20ch;
}

.about__bio {
  font-size: 18px;
  line-height: 1.55;
  color: var(--color-ink-secondary);
  max-width: 100%;
}

/* Metrics strip — big serif values over a hairline */
.about__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-32);
}

.about__metric {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.about__metric dd {
  font-size: 24px;
    font-weight: 500;
    font-family: var(--font-title);
    color: var(--color-accent);
}

.about__cta { margin-top: var(--sp-8); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: var(--border);
  margin-top: var(--sp-64);
  padding: var(--sp-24) 0;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-ink-label);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-16);
}

.footer__right {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
}

.footer__pin {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1300px) {
  .container--lg {
    padding: 0 24px;
  }
}
   
@media (max-width: 1200px) {
  .container {
    padding: 0 24px;
  }
}

@media (max-width: 820px) {
  .meta { grid-template-columns: 1fr; }
  .meta__cell { border-right: none !important; }

  .project {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--sp-24);
  }

  .about {
    grid-template-columns: 1fr;
    gap: var(--sp-32);
  }
  .about__media { max-width: 380px; }

  .footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-8);
  }
}

@media (max-width: 560px) {
  .nav__links { gap: var(--sp-16); }
  .nav__brand { font-size: 20px; }
  .about__metrics { display: flex; flex-direction: column; gap: var(--sp-16); }
  .frame {
      padding: 32px 0;
  }
  .h3 {
    font-size: 22px;
  }
  .nav__brand {
    gap: var(--sp-8);
  }
}
