/* Pierre Defossez — portfolio */
@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #F5F4F0;
  --tile: #EAE8E2;
  --ink: #17181B;
  --muted: #5B5E66;
  --soft: #8A8D94;
  --rule: #DAD7CF;
  --rule-strong: #CFCBC2;
  --accent: #C23A26;
  --accent-hover: #A5301F;
  --dark: #17181B;
  --dark-text: #F2F1ED;
  --dark-muted: #A9ACB3;
  --dark-body: #C9CBD0;
  --dark-rule: #34363C;
  --dark-accent: #F07A66;
  --ok: #2F8F5B;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(20px, 5.5vw, 80px);
  --max: 1440px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-size: 16px; font-weight: 500; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn-ghost { border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 76px; }
.brand { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brand span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 36px; }
.nav a:not(.btn) { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 12px 0; }
.nav a:not(.btn):hover, .nav a[aria-current="true"] { color: var(--ink); }
.menu-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--rule-strong); border-radius: 999px; background: transparent; color: var(--ink); }
.back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 500; text-decoration: none; }
.back:hover { color: var(--accent); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(40px, 7vw, 96px); align-items: end; padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 112px); }
.hero-id { display: none; }
.eyebrow { color: var(--muted); margin-bottom: 24px; }
.hero h1 { font-size: clamp(46px, 6.2vw, 88px); line-height: .98; font-weight: 500; letter-spacing: -0.035em; margin-bottom: 32px; text-wrap: balance; }
.hero h1 span { color: var(--soft); }
.lede { font-size: clamp(17px, 1.4vw, 20px); max-width: 640px; margin-bottom: 40px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 64px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.facts > div { padding: 20px 24px 0; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--rule); }
.facts > div:first-child { padding-left: 0; border-left: 0; }
.facts strong { font-size: 18px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.facts span { font-size: 14px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.portrait img { width: 100%; height: 320px; object-fit: cover; border-radius: 4px; }

/* Crop marks */
.marks { --m: var(--soft); padding: 14px; background:
  linear-gradient(var(--m),var(--m)) 0 13px/9px 1px no-repeat, linear-gradient(var(--m),var(--m)) 13px 0/1px 9px no-repeat,
  linear-gradient(var(--m),var(--m)) 100% 13px/9px 1px no-repeat, linear-gradient(var(--m),var(--m)) calc(100% - 13px) 0/1px 9px no-repeat,
  linear-gradient(var(--m),var(--m)) 0 calc(100% - 13px)/9px 1px no-repeat, linear-gradient(var(--m),var(--m)) 13px 100%/1px 9px no-repeat,
  linear-gradient(var(--m),var(--m)) 100% calc(100% - 13px)/9px 1px no-repeat, linear-gradient(var(--m),var(--m)) calc(100% - 13px) 100%/1px 9px no-repeat; }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 112px); border-top: 1px solid var(--rule); }
.sec-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 32px; align-items: end; margin-bottom: 40px; }
.sec-head > div { grid-column: span 7; display: flex; flex-direction: column; gap: 16px; }
.sec-head > p { grid-column: span 5; color: var(--muted); }
.kicker { color: var(--accent); }
h2 { font-size: clamp(36px, 3.9vw, 56px); line-height: 1; font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; }

/* Filters */
.filters { display: flex; gap: 8px; margin-bottom: 48px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); font-size: 14px; font-weight: 500; transition: background-color .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--ink); }
.chip .n { color: var(--muted); margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] .n { color: inherit; opacity: .6; }

/* Project grid */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 32px; }
.card { display: flex; flex-direction: column; gap: 20px; }
.card.wide { grid-column: span 2; }
.grid.filtered .card.wide { grid-column: auto; }
.card[hidden] { display: none; }
.tile { display: block; height: 380px; padding: 28px; background: var(--tile); border-radius: 6px; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.card:hover .tile img { transform: scale(1.025); }
.card-body { display: flex; flex-direction: column; gap: 8px; }
.card-meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: " →"; color: var(--accent); opacity: 0; transition: opacity .15s; }
.card:hover h3 a::after, .card h3 a:focus-visible::after { opacity: 1; }
.card p { font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 560px; }

/* Prepress */
.dark { background: var(--dark); color: var(--dark-text); border-top: 0; }
.dark .kicker { color: var(--dark-accent); }
.dark .sec-head > p { color: var(--dark-muted); }
.skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--dark-rule); margin-top: 56px; }
.skill { padding: 32px 32px 0; border-left: 1px solid var(--dark-rule); display: flex; flex-direction: column; gap: 14px; }
.skill:first-child { padding-left: 0; border-left: 0; }
.skill:last-child { padding-right: 0; }
.skill .num { font-family: var(--mono); font-size: 13px; color: var(--soft); }
.skill h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.skill p { font-size: 15px; color: var(--dark-body); }
.skill .tags { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--soft); }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; }
.contact-intro { grid-column: span 5; display: flex; flex-direction: column; gap: 16px; }
.contact-intro p { color: var(--muted); max-width: 440px; }
.contact-list { grid-column: 7 / span 6; border-top: 1px solid var(--ink); }
.row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.row .label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.row .value { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; overflow-wrap: anywhere; }
.row .value:hover { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 24px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Project page */
.p-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: end; padding-block: clamp(48px, 6vw, 88px) clamp(32px, 4vw, 64px); }
.p-head > div { grid-column: span 8; display: flex; flex-direction: column; gap: 20px; }
.p-head h1 { font-size: clamp(44px, 5.6vw, 80px); line-height: .98; font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
.p-facts { grid-column: 9 / span 4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; border-top: 1px solid var(--ink); padding-top: 20px; }
.p-facts div { display: flex; flex-direction: column; gap: 4px; }
.p-facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.p-facts dd { font-size: 16px; }
.p-hero .frame { height: min(720px, 56vw); min-height: 260px; padding: clamp(20px, 4vw, 56px); background: var(--tile); border-radius: 6px; }
.p-hero img { width: 100%; height: 100%; object-fit: contain; }
.p-text { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; padding-block: clamp(56px, 7vw, 96px); }
.p-text > div { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--rule); padding-top: 20px; }
.p-text > div:first-child { grid-column: 1 / span 5; }
.p-text > div:last-child { grid-column: 7 / span 6; }
.p-text h2 { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.p-text p { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; letter-spacing: -0.01em; }
.p-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.p-more .frame { height: 420px; padding: clamp(20px, 4vw, 48px); background: var(--tile); border-radius: 6px; }
.p-more img { width: 100%; height: 100%; object-fit: contain; }
.p-more figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.next { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: center; margin-block: clamp(72px, 9vw, 120px) clamp(56px, 7vw, 96px); padding-top: 32px; border-top: 1px solid var(--ink); text-decoration: none; }
.next-title { display: flex; flex-direction: column; gap: 12px; }
.next-title strong { font-size: clamp(36px, 3.9vw, 56px); line-height: 1; font-weight: 500; letter-spacing: -0.03em; }
.next-title strong span { color: var(--accent); display: inline-block; transition: transform .2s; }
.next:hover .next-title strong span { transform: translateX(8px); }
.next .frame { height: 200px; padding: 20px; background: var(--tile); border-radius: 6px; }
.next .frame img { width: 100%; height: 100%; object-fit: contain; }

/* Legal */
.legal { max-width: 760px; padding-block: clamp(48px, 6vw, 88px); }
.legal h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1; font-weight: 500; letter-spacing: -0.03em; margin-bottom: 40px; }
.legal h2 { font-size: 22px; letter-spacing: -0.01em; margin: 40px 0 12px; }
.legal p { color: var(--muted); margin-bottom: 8px; }

/* ≤ 1080 */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill { padding: 32px 32px 32px; }
  .skill:nth-child(odd) { padding-left: 0; border-left: 0; }
  .skill:nth-child(n+3) { border-top: 1px solid var(--dark-rule); }
  .contact-intro, .contact-list { grid-column: 1 / -1; }
  .p-head > div, .p-facts { grid-column: 1 / -1; }
}

/* ≤ 760 : mobile */
@media (max-width: 760px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 72px; }
  .site-header .wrap { min-height: 64px; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
  .nav .btn { margin-top: 16px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 40px; }
  .hero-id { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
  .hero-id img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; }
  .hero-id .eyebrow { margin: 0; line-height: 1.5; }
  .hero > div > .eyebrow, .portrait { display: none; }
  .actions { flex-direction: column; margin-bottom: 36px; }
  .actions .btn { width: 100%; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div, .facts > div:first-child { flex-direction: row; justify-content: space-between; padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .facts strong { font-size: 15px; }
  .sec-head > div, .sec-head > p { grid-column: 1 / -1; }
  .sec-head { margin-bottom: 24px; }
  .filters { margin: 0 calc(-1 * var(--gutter)) 32px; padding-inline: var(--gutter); }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .card.wide { grid-column: auto; }
  .card { gap: 16px; }
  .tile { height: 240px; padding: 18px; }
  .card h3 { font-size: 22px; }
  .card p { font-size: 15px; }
  .skills { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .skill, .skill:nth-child(odd) { padding: 24px 0; border-left: 0; border-top: 1px solid var(--dark-rule); }
  .skill:first-child { border-top: 0; }
  .row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 18px 0; }
  .row .label { grid-column: 1 / -1; }
  .row .value { font-size: 17px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .p-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-text > div:first-child, .p-text > div:last-child { grid-column: 1 / -1; }
  .p-text { gap: 32px; }
  .p-more { grid-template-columns: minmax(0, 1fr); }
  .p-more .frame { height: 260px; }
  .next { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .header-cta { display: none; }
}
