/* =====================================================================
   DESIGN SETTINGS  —  change the look of the whole site right here.
   Everything below this block reads from these values.
   See DESIGN-GUIDE.md for what each one does.
   ===================================================================== */
:root {
  /* Colors */
  --bg:        #f6f5f2;   /* page background (keep neutral so the work stands out) */
  --surface:   #ffffff;   /* cards, header, image backgrounds */
  --ink:       #17171a;   /* main text */
  --muted:     #5b5b63;   /* secondary text */
  --line:      #dcdad4;   /* thin borders and dividers */
  --accent:    #c4421a;   /* the ONE accent color: buttons, links, focus */
  --accent-ink:#ffffff;   /* text on top of the accent color */

  /* Fonts (two maximum). If you change these, also change the Google Fonts
     <link> in the <head> of every .html page. */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Shape and spacing */
  --radius:     6px;      /* corner rounding: 0 = sharp, 12px = soft */
  --gap:        1.25rem;  /* space between grid items */
  --max:        1180px;   /* content width */
  --gutter:     16px;     /* side padding on small screens */
  --header-h:   64px;

  /* Image grids: how many columns at each width */
  --cols-sm: 2;
  --cols-md: 3;
  --cols-lg: 3;

  /* Motion */
  --ease: 180ms ease;
}

/* =====================================================================
   BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 760px) { :root { --gutter: 28px; } }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; border-radius: var(--radius); }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 .75rem; }
.muted { color: var(--muted); }

/* =====================================================================
   HEADER / NAV
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.nav-toggle { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; font: inherit; color: var(--ink); cursor: pointer; }
.nav-list { display: none; list-style: none; margin: 0; padding: 0; position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1rem; }
.nav-list.is-open { display: block; }
.nav-list a { display: block; padding: .7rem 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--accent); }
@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .nav-list { display: flex; gap: 1.75rem; position: static; background: none; border: 0; padding: 0; }
  .nav-list a { padding: .4rem 0; border-bottom: 2px solid transparent; }
  .nav-list a[aria-current="page"] { border-bottom-color: var(--accent); }
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: var(--radius); font: inherit; font-weight: 600; text-decoration: none; border: 2px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer; transition: background var(--ease), color var(--ease), border-color var(--ease); }
.btn:hover { background: var(--ink); color: var(--bg); text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* =====================================================================
   HOME HERO
   ===================================================================== */
.hero { padding: clamp(2.5rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero h1 { margin-bottom: .25em; }
.hero .headline { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted); font-weight: 500; margin-bottom: 1.25rem; }
.hero .value { font-size: clamp(1.15rem, 2.4vw, 1.5rem); max-width: 34ch; line-height: 1.35; }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.page-title { padding: clamp(2rem, 6vw, 4rem) 0 1rem; }
.page-title p { max-width: 60ch; color: var(--muted); font-size: 1.1rem; }

/* =====================================================================
   PROJECT CARDS GRID  (Home + Work)
   ===================================================================== */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(var(--cols-sm), minmax(0, 1fr)); }
@media (min-width: 760px)  { .grid { grid-template-columns: repeat(var(--cols-md), minmax(0, 1fr)); } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(var(--cols-lg), minmax(0, 1fr)); } }
.card { display: block; color: inherit; text-decoration: none; }
.card-img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.card:hover .card-img img, .card:focus-visible .card-img img { transform: scale(1.04); }
.card-body { padding: .7rem .1rem 0; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.25; margin: 0; }
.card:hover .card-title { color: var(--accent); }
.card-meta { font-size: .85rem; color: var(--muted); margin: .15rem 0 0; }
@media (max-width: 520px) { .card-title { font-size: .95rem; } .card-meta { font-size: .78rem; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; }
.chip { font: inherit; font-size: .9rem; font-weight: 500; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: all var(--ease); }
.chip:hover { border-color: var(--ink); }
a.chip { text-decoration: none; display: inline-block; }
.noscript-note { color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.count { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }

/* =====================================================================
   PROJECT PAGE
   ===================================================================== */
.crumbs { font-size: .9rem; color: var(--muted); padding-top: 1.5rem; }
.crumbs a { color: var(--muted); }
.project-head { padding: .5rem 0 1.5rem; }
.project-head .lede { font-size: 1.2rem; max-width: 52ch; color: var(--ink); }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem 1.5rem; margin: 1.5rem 0 0; padding: 1.25rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta dt { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.meta dd { margin: .15rem 0 0; font-weight: 500; }
.story { display: grid; gap: 2rem; padding: 2rem 0 1rem; }
@media (min-width: 900px) { .story { grid-template-columns: 1fr 1fr; gap: 3rem; } .story .full { grid-column: 1 / -1; } }
.story h2 { font-size: 1.25rem; }
.story ol { padding-left: 1.2em; }
.story li { margin-bottom: .5rem; }
.gallery-section { padding: 1.5rem 0 1rem; }
.gallery { column-gap: var(--gap); columns: 1; }
@media (min-width: 700px) { .gallery { columns: 2; } }
.gallery--wide { columns: 1; }
.shot { break-inside: avoid; margin: 0 0 var(--gap); }
.shot .zoom { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.shot img { width: 100%; height: auto; transition: opacity var(--ease); }
.shot .zoom:hover img { opacity: .92; }
.shot figcaption { font-size: .88rem; color: var(--muted); padding-top: .4rem; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--accent); text-decoration: underline; cursor: pointer; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: 2.5rem 0 1rem; border-top: 1px solid var(--line); margin-top: 2rem; }
.pager a { display: block; text-decoration: none; color: var(--ink); }
.pager a span { display: block; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.pager a strong { font-family: var(--font-display); font-size: 1.1rem; }
.pager a:hover strong { color: var(--accent); }
.pager .next { text-align: right; }

/* =====================================================================
   LIGHTBOX (native <dialog>: Esc closes, focus is trapped for us)
   ===================================================================== */
.lightbox { border: 0; padding: 0; background: transparent; width: 100vw; height: 100vh; max-width: none; max-height: none; color: #fff; }
.lightbox::backdrop { background: rgba(10, 10, 12, .92); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: grid; grid-template-rows: 1fr auto; padding: 56px 16px 16px; gap: .75rem; }
.lightbox img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; min-height: 0; }
.lightbox-stage { min-height: 0; display: flex; }
.lightbox-cap { text-align: center; font-size: .95rem; min-height: 1.5em; }
.lb-btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* =====================================================================
   ABOUT / RÉSUMÉ / CONTACT
   ===================================================================== */
.prose { max-width: 68ch; }
.two-col { display: grid; gap: 2rem 3rem; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.4fr 1fr; } }
.tags { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { border: 1px solid var(--line); background: var(--surface); padding: .3rem .8rem; border-radius: 999px; font-size: .92rem; }
.entry { margin-bottom: 1.5rem; }
.entry h3 { margin-bottom: .1em; }
.entry .when { color: var(--muted); font-size: .92rem; margin-bottom: .4rem; }
.entry ul { margin-bottom: 0; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: space-between; }
.contact-list .label { color: var(--muted); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.contact-list a { font-size: 1.15rem; font-weight: 500; }
.card-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0 3rem; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; }
.site-footer a { color: var(--muted); }

[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
