/* Fonts are self-hosted: nothing on this site calls a third party. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f5f1ea;
  --paper-2: #ebe5da;
  --ink: #1e1b18;
  --ink-2: #5d564d;
  --line: #d9d1c4;
  --accent: #c8431f;
  --accent-ink: #fff8f0;
  --shadow: 0 1px 2px rgb(30 27 24 / 0.06), 0 8px 24px -12px rgb(30 27 24 / 0.18);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --text: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 6px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161412;
    --paper-2: #221f1b;
    --ink: #f1ebe2;
    --ink-2: #a89f93;
    --line: #34302a;
    --accent: #f0764f;
    --accent-ink: #1b0d07;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px -12px rgb(0 0 0 / 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: var(--gutter); top: 0.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header */
.site-header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: clamp(18px, 3vw, 32px) var(--gutter);
}
.wordmark { font-family: var(--display); font-weight: 750; font-size: 1.5rem; letter-spacing: -0.03em; text-decoration: none; }
.wordmark::after { content: ""; display: inline-block; width: 0.32em; height: 0.32em; margin-left: 0.08em; border-radius: 50%; background: var(--accent); }
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.site-header nav a { font-weight: 500; text-decoration: none; color: var(--ink-2); padding: 0.25rem 0; border-bottom: 1.5px solid transparent; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }

/* Home intro */
.intro { padding: clamp(32px, 8vw, 112px) 0 clamp(40px, 7vw, 96px); max-width: 60rem; }
.intro h1 { font-size: clamp(2.25rem, 1.2rem + 4.6vw, 5rem); font-weight: 700; letter-spacing: -0.035em; text-wrap: balance; }
.intro-role { display: block; margin-top: 0.4em; font-size: 0.5em; font-weight: 450; letter-spacing: -0.015em; line-height: 1.25; color: var(--ink-2); max-width: 36ch; }
.intro p { margin: clamp(1.5rem, 3vw, 2.25rem) 0 0; max-width: 58ch; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem); color: var(--ink-2); text-wrap: pretty; }

/* Work grid: first project spans two columns, so 7 projects fill 2- and 3-column grids evenly. */
.work-grid {
  display: grid; gap: clamp(28px, 4vw, 48px) clamp(16px, 2.5vw, 32px);
  grid-template-columns: 1fr;
  padding-bottom: clamp(48px, 8vw, 112px);
  scroll-margin-top: 1rem;
}
@media (min-width: 640px) { .work-grid { grid-template-columns: repeat(2, 1fr); } .card:first-child { grid-column: span 2; } }
@media (min-width: 1100px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }

.card { text-decoration: none; display: block; }
.card-media {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius);
  background: var(--paper-2); box-shadow: var(--shadow);
}
.card:first-child .card-media { aspect-ratio: 16 / 9; }
@media (min-width: 640px) and (max-width: 1099px) { .card:first-child .card-media { aspect-ratio: 2 / 1; } }
.card-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card-contain .card-media { background: #fbf9f5; }
.card-contain .card-media img { object-fit: contain; padding: 10%; }
.card:hover .card-media img { transform: scale(1.035); }
.card-title { margin-top: 0.9rem; font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); }
.card:first-child .card-title { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); }
.card:hover .card-title { color: var(--accent); }
.card-meta { margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--ink-2); }

/* Project pages */
.project-head { padding: clamp(24px, 6vw, 80px) 0 clamp(28px, 4vw, 48px); max-width: 52rem; }
.eyebrow { margin: 0 0 0.75rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.project-head h1 { font-size: clamp(2.25rem, 1.4rem + 4vw, 4.5rem); letter-spacing: -0.035em; }
.project-head .prose { margin-top: 1.25rem; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); color: var(--ink-2); }

.gallery { columns: 1; column-gap: clamp(16px, 2.5vw, 32px); }
@media (min-width: 800px) { .gallery { columns: 2; } }
.gallery-single { columns: 1; max-width: 760px; }
.work { break-inside: avoid; margin: 0 0 clamp(16px, 2.5vw, 32px); }
.zoom { display: block; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); box-shadow: var(--shadow); cursor: zoom-in; }
.zoom img { width: 100%; transition: opacity 0.2s; }
.zoom:hover img { opacity: 0.94; }
.work figcaption, .video figcaption { margin-top: 0.6rem; font-size: 0.92rem; line-height: 1.5; color: var(--ink-2); max-width: 60ch; }

/* Click-to-play video: nothing loads from YouTube until the visitor presses play. */
.video { margin: 0 0 clamp(32px, 5vw, 56px); max-width: 1040px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video-frame img, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-play {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem;
  color: #fff; text-decoration: none; background: linear-gradient(to top, rgb(0 0 0 / 0.45), rgb(0 0 0 / 0.05) 60%);
}
.video-play:hover { color: #fff; }
.play-icon { width: clamp(64px, 9vw, 92px); aspect-ratio: 1; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 6px 24px rgb(0 0 0 / 0.35); transition: transform 0.25s; }
.play-icon::before { content: ""; margin-left: 12%; border-style: solid; border-width: 0.9em 0 0.9em 1.5em; border-color: transparent transparent transparent #fff; font-size: clamp(12px, 1.6vw, 17px); }
.video-play:hover .play-icon { transform: scale(1.07); }
.play-label { font-weight: 600; font-size: 0.95rem; text-shadow: 0 1px 6px rgb(0 0 0 / 0.5); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: clamp(32px, 5vw, 64px) 0 clamp(48px, 8vw, 96px); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-family: var(--display); font-weight: 600; font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem); letter-spacing: -0.02em; line-height: 1.2; }
.pager span { display: block; margin-bottom: 0.3rem; font-family: var(--text); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.pager-prev span::before { content: "← "; }
.pager-next { text-align: right; }
.pager-next span::after { content: " →"; }

/* Prose pages */
.prose { max-width: 40rem; text-wrap: pretty; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.about-body { padding: clamp(24px, 6vw, 80px) 0 clamp(48px, 8vw, 112px); }
.about-body h1 { font-size: clamp(2.25rem, 1.4rem + 4vw, 4.5rem); letter-spacing: -0.035em; margin-bottom: 1.5rem; }
.about-body h2 { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.8rem); margin: 2.75rem 0 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.about-body .lede { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); line-height: 1.5; color: var(--ink-2); }
.about-body strong { font-weight: 650; color: var(--ink); }
.notfound { padding: clamp(48px, 10vw, 140px) 0; }
.notfound h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem); margin-bottom: 1rem; }

/* Footer */
.site-footer {
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 2rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  font-size: 0.9rem; color: var(--ink-2);
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.site-footer nav a { text-decoration: none; }

/* Lightbox (progressive enhancement: without JS, images open as plain files) */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(14 12 10 / 0.94); color: #f1ebe2;
}
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; grid-column: 2; height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 0 1.25rem; min-width: 0; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 7rem); object-fit: contain; border-radius: 3px; }
.lightbox figcaption { margin-top: 0.85rem; max-width: 60ch; text-align: center; font-size: 0.92rem; color: #c9c0b3; padding: 0 1rem; }
.lightbox figcaption:empty { display: none; }
.lightbox button {
  font: inherit; color: inherit; background: rgb(255 255 255 / 0.08); border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; line-height: 1; margin: 0 clamp(6px, 2vw, 24px);
}
.lightbox button:hover { background: rgb(255 255 255 / 0.18); }
.lightbox-close { position: absolute; top: 12px; right: 0; font-size: 1.8rem !important; }
.lightbox-prev { grid-column: 1; }
.lightbox-next { grid-column: 3; }
.lightbox.single .lightbox-prev, .lightbox.single .lightbox-next { visibility: hidden; }
@media (max-width: 640px) {
  .lightbox[open] { grid-template-columns: 1fr; }
  .lightbox figure { grid-column: 1; grid-row: 1; padding-inline: 0.5rem; }
  .lightbox-prev, .lightbox-next { position: absolute; bottom: 14px; grid-row: 1; }
  .lightbox-prev { left: 0; } .lightbox-next { right: 0; }
  .lightbox img { max-height: calc(100dvh - 9rem); }
}

.cover-only { max-width: 760px; }
.cover-only img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Home grid closes evenly with 7 or 8 projects.
   2 columns: the first card is wide; with 8 projects the last one is wide too. */
@media (min-width: 640px) and (max-width: 1099px) {
  .card:nth-child(8):last-child { grid-column: span 2; }
  .card:nth-child(8):last-child .card-media { aspect-ratio: 2 / 1; }
}
/* 3 columns: row 1 is "wide + tall" (cards 1+2). With 7 projects row 3 mirrors it (cards 6+7);
   with 8, rows 2 and 3 are three equal cards each. The tall card stretches to the wide one. */
@media (min-width: 1100px) {
  .card:nth-child(6):nth-last-child(2) { grid-column: span 2; }
  .card:nth-child(6):nth-last-child(2) .card-media { aspect-ratio: 16 / 9; }
  .card:is(:nth-child(1), :nth-child(2), :nth-child(6):nth-last-child(2), :nth-child(7):last-child) .card-title { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); }
  .card:is(:nth-child(2), :nth-child(7):last-child) { display: flex; flex-direction: column; }
  .card:is(:nth-child(2), :nth-child(7):last-child) .card-media { flex: 1; aspect-ratio: auto; position: relative; min-height: 0; }
  .card:is(:nth-child(2), :nth-child(7):last-child) .card-media img { position: absolute; inset: 0; }
}
