/* ==========================================================================
   Lucas Van Haegenborgh — sculptor
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/cormorant-garamond.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/cormorant-garamond-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter.woff2") format("woff2");
}

/* Palette derived from the original site: forest green #0e250e,
   oxblood #730909 and warm grey #c9c1c1. Dark is the default theme. */
:root {
  color-scheme: dark;
  --bg: #0b1c0c;
  --bg-alt: #0e250e;
  --surface: #12301a;
  --ink: #ece7e4;
  --ink-soft: #c9c1c1;
  --muted: #8f8a86;
  --accent: #d0726b;
  --accent-strong: #730909;
  --accent-strong-hover: #8e1414;
  --line: rgba(201, 193, 193, 0.14);
  --header-bg: rgba(11, 28, 12, 0.9);
  --shadow: rgba(0, 0, 0, 0.55);
  --img-dim: brightness(0.93);

  --deep: #060f07;
  --deep-ink: #ece7e4;
  --deep-ink-soft: #c9c1c1;
  --deep-muted: #8f8a86;
  --deep-accent: #d0726b;
  --deep-line: rgba(201, 193, 193, 0.12);

  --lb-bg: #050c06;
  --lb-panel: #0c1b0d;
  --lb-ink: #ece7e4;
  --lb-muted: #9b9591;
  --lb-text: #d3cccb;
  --lb-accent: #d0726b;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 10vw, 8.5rem);
  --header-h: 76px;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f1ef;
  --bg-alt: #e9e3e1;
  --surface: #fbf9f8;
  --ink: #141a14;
  --ink-soft: #3d3a39;
  --muted: #736c69;
  --accent: #730909;
  --accent-strong: #730909;
  --accent-strong-hover: #540606;
  --line: rgba(20, 26, 20, 0.13);
  --header-bg: rgba(244, 241, 239, 0.92);
  --shadow: rgba(14, 37, 14, 0.3);
  --img-dim: none;

  --deep: #0e250e;
  --deep-muted: #a9a2a0;
  --deep-accent: #e08d86;
  --deep-line: rgba(236, 231, 228, 0.14);
}

/* Deep sections re-map the base tokens so shared components adapt. */
.section--dark, .site-footer {
  --ink: var(--deep-ink);
  --ink-soft: var(--deep-ink-soft);
  --muted: var(--deep-muted);
  --accent: var(--deep-accent);
  --line: var(--deep-line);
  --bg: var(--deep);
  background: var(--deep);
  color: var(--ink);
}

html { background: var(--bg); }
body, .section--alt { transition: background-color 0.4s var(--ease), color 0.4s var(--ease); }

/* Reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent-strong); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 0.6rem 1rem;
}
.skip-link:focus { top: 1rem; }

/* Layout helpers ---------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 820px; }
.section { padding: var(--section) 0; overflow-x: clip; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding: calc(var(--section) * 0.6) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; }
.display { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1; }
.h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.65; color: var(--ink-soft); }
.muted { color: var(--muted); }
.prose { max-width: 68ch; color: var(--ink-soft); }
.prose p + p { margin-top: 0; }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head .h2 { max-width: 18ch; }

/* Buttons & links --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.95rem 1.6rem;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--ink); border-radius: var(--radius);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn--solid { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn--solid:hover { background: var(--accent-strong-hover); border-color: var(--accent-strong-hover); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  padding-bottom: 0.3rem; border-bottom: 1px solid currentColor;
  transition: gap 0.3s var(--ease), color 0.3s var(--ease);
}
.link-arrow::after { content: "→"; font-size: 1rem; letter-spacing: 0; }
.link-arrow:hover { gap: 1rem; color: var(--accent); }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transition: background 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-scrolled { background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__inner { height: 100%; max-width: 1440px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.brand { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; letter-spacing: 0.01em; white-space: nowrap; }
.brand__role { font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); margin-top: 0.35rem; }

.nav { display: flex; align-items: center; gap: 2.5rem; }
.nav__list { display: flex; gap: 2rem; }
.nav__link {
  position: relative; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.4rem 0; white-space: nowrap;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.lang-switch { display: flex; align-items: center; gap: 0.15rem; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; }
.lang-switch button { padding: 0.35rem 0.45rem; color: var(--muted); transition: color 0.2s; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--accent); }
.lang-switch span { color: var(--line); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; position: relative; z-index: 2; }
.theme-toggle {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ink);
  transition: border-color 0.25s, color 0.25s, transform 0.5s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle { display: none; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform 0.35s var(--ease), opacity 0.2s; }
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 26px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* Page hero (inner pages) ------------------------------------------------- */
.page-hero { padding: calc(var(--header-h) + clamp(3.5rem, 9vw, 7rem)) 0 clamp(2.5rem, 6vw, 4.5rem); }
.page-hero .display { max-width: 14ch; }
.page-hero .display--wide { max-width: none; font-size: clamp(2.4rem, 5vw, 4.4rem); }
.page-hero .display::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 1.75rem; background: var(--accent-strong); }
.page-hero .lead { max-width: 52ch; margin-top: 1.75rem; }

/* Home hero --------------------------------------------------------------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 2rem) 0 4rem; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero__title { font-size: clamp(3rem, 7.4vw, 6.6rem); line-height: 0.95; letter-spacing: -0.02em; }
.hero__title em { display: block; font-style: italic; font-weight: 400; color: var(--accent); }
.hero__intro { margin: 2rem 0 2.5rem; max-width: 40ch; }
.hero__collage { position: relative; aspect-ratio: 1 / 1.02; }
.hero__collage figure { position: absolute; margin: 0; overflow: hidden; background: var(--bg-alt); box-shadow: 0 30px 60px -30px var(--shadow); }
.hero__collage img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.hero__collage figure:hover img { transform: scale(1.04); }
.hero__collage .c1 { inset: 8% 28% 24% 0; z-index: 1; }
.hero__collage .c2 { width: 48%; aspect-ratio: 1; right: 0; top: 3%; z-index: 2; }
.hero__collage .c3 { width: 44%; aspect-ratio: 1; right: 8%; bottom: 0; z-index: 3; }
.hero__caption { position: absolute; left: 0; bottom: 2%; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); max-width: 40%; }
.hero__scroll {
  position: absolute; bottom: 1.75rem;
  left: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  font-size: 0.68rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted);
  display: none; flex-direction: column; align-items: center; gap: 0.6rem;
}
.hero__scroll::after { content: ""; width: 1px; height: 42px; background: linear-gradient(var(--muted), transparent); animation: scrollLine 2.2s var(--ease) infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Quote ------------------------------------------------------------------- */
.quote { text-align: center; }
.quote blockquote { margin: 0 auto; max-width: 30ch; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.2; }
.quote blockquote::before { content: "“"; display: block; font-size: 4.5rem; line-height: 0.6; color: var(--accent); margin-bottom: 1.25rem; font-style: normal; }
.quote cite { display: block; margin-top: 2rem; font-style: normal; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
/* Work cards -------------------------------------------------------------- */
.card { display: block; position: relative; text-align: left; width: 100%; }
.card__media { position: relative; overflow: hidden; background: var(--bg-alt); aspect-ratio: 4 / 5; }
.card__media img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-dim); transition: transform 1s var(--ease), filter 0.6s var(--ease); }
.card:hover .card__media img, .card:focus-visible .card__media img { transform: scale(1.05); filter: none; }
.card__media .card__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0s 1.2s, transform 1s var(--ease), filter 0.6s var(--ease); }
.card__media .card__slide.is-active { opacity: 1; z-index: 1; transition: opacity 1.2s var(--ease), transform 1s var(--ease), filter 0.6s var(--ease); }
.card__thumbs { display: flex; gap: 0.35rem; margin-top: 0.6rem; }
.card__thumb { flex: 1 1 0; max-width: 2.6rem; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-alt); opacity: 0.4; outline: 1px solid transparent; outline-offset: 2px; transition: opacity 0.5s var(--ease), outline-color 0.5s var(--ease); }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__thumb.is-active, .card__thumb:hover { opacity: 1; }
.card__thumb.is-active { outline-color: var(--accent); }
.card__count {
  position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 2;
  font-size: 0.68rem; letter-spacing: 0.08em; padding: 0.3rem 0.55rem;
  background: rgba(6, 15, 7, 0.75); color: #fff; backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(6px); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.card:hover .card__count, .card:focus-visible .card__count { opacity: 1; transform: none; }
.card__body { padding-top: 1rem; }
.card__title { font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; }
.card__meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }

.featured-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); }
.featured-grid .card:nth-child(even) { margin-top: 3rem; }

/* Category tiles ---------------------------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; padding: 1px; }
.cat-tile { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #060f07; color: #fff; box-shadow: 0 0 0 1px var(--line); }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0.72; transition: transform 1.1s var(--ease), opacity 0.6s var(--ease); }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(6, 15, 7, 0.82)); }
.cat-tile::before { content: ""; position: absolute; left: 1.5rem; bottom: 0; z-index: 2; width: 0; height: 3px; background: var(--accent-strong); transition: width 0.5s var(--ease); }
.cat-tile:hover::before, .cat-tile:focus-visible::before { width: calc(100% - 3rem); }
.cat-tile:hover img { transform: scale(1.06); opacity: 0.9; }
.cat-tile__label { position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.4rem; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.cat-tile__name { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1; }
.cat-tile__count { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; white-space: nowrap; }

/* Split / feature blocks -------------------------------------------------- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; }
.split--reverse > :first-child { order: 2; }
.split > * { min-width: 0; }
.split__media { position: relative; max-width: 100%; }
.split__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split__media figcaption { margin-top: 0.75rem; font-size: 0.75rem; color: var(--muted); }
.split__media--offset::before { content: ""; position: absolute; inset: 2rem 0 -2rem 2rem; border: 1px solid var(--accent); z-index: -1; opacity: 0.5; }
.split .h2 { margin-bottom: 1.5rem; overflow-wrap: anywhere; }
.split .prose { margin-bottom: 2rem; }
.split .lead { overflow-wrap: anywhere; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 2.5rem 0; padding: 2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat__num { font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; }
.stat__label { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 0.5rem; overflow-wrap: anywhere; }
/* Contact CTA ------------------------------------------------------------- */
.cta { text-align: center; }
.cta .h2 { max-width: 20ch; margin: 0 auto 1.5rem; }
.cta .lead { max-width: 48ch; margin: 0 auto 2.5rem; }
.cta__mail { font-family: var(--serif); font-size: clamp(1.5rem, 3.4vw, 2.6rem); border-bottom: 1px solid currentColor; transition: color 0.3s; word-break: break-word; }
.cta__mail:hover { color: var(--accent); }

/* Work page --------------------------------------------------------------- */
.filters { position: sticky; top: 0; z-index: 20; background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: top 0.4s var(--ease); }
body.header-visible .filters { top: var(--header-h); }
.filters__list { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; padding: 0.9rem 0; }
.filters__list::-webkit-scrollbar { display: none; }
.filter-btn {
  flex: none; padding: 0.55rem 1.05rem; border: 1px solid transparent; border-radius: 999px;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.filter-btn:hover { color: var(--ink); }
.filter-btn[aria-pressed="true"] { color: var(--bg); background: var(--ink); }
.filter-btn sup { font-size: 0.65em; margin-left: 0.2rem; opacity: 0.7; }

.cat-intro { max-width: 62ch; margin: clamp(2rem, 5vw, 3.5rem) 0; min-height: 3rem; }
.cat-intro h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 0.75rem; }
.cat-intro p { color: var(--ink-soft); }

.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 2.6vw, 2.25rem) clamp(1rem, 2.2vw, 2rem); padding-bottom: var(--section); }
.works-grid .card { animation: cardIn 0.6s var(--ease) both; }
.works-grid .card__media { aspect-ratio: 1 / 1; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Scan & Prints ----------------------------------------------------------- */
.steps { margin: 0; padding: 0; list-style: none; }
.steps .pillar { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.steps__title { margin: clamp(4rem, 8vw, 6.5rem) 0 0; }
.steps__title + .pillars { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.process-intro { align-items: start; }
.process-intro .split__media { position: sticky; top: 7rem; }
.era { color: var(--ink-soft); }
.era p { margin: 0; }
.era__label { margin-bottom: 0.75rem; font-family: var(--sans); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.stats--duo { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 2rem 0; }
.step__num { display: block; margin-bottom: 1rem; font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--accent); }

.scan-detail { padding: calc(var(--header-h) + clamp(1.5rem, 4vw, 3rem)) 0 var(--section); }
.scan-back {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  transition: color 0.2s, gap 0.3s var(--ease);
}
.scan-back::before { content: "←"; font-size: 1rem; letter-spacing: 0; }
.scan-back:hover { color: var(--ink); gap: 1rem; }
.scan-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.scan-stage {
  position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: calc(100svh - var(--header-h) - 3rem);
  background: radial-gradient(circle at 50% 42%, var(--surface), var(--bg-alt) 72%);
}
.scan-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.scan-stage canvas:active { cursor: grabbing; }
.scan-status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 2rem; text-align: center; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.scan-status[hidden] { display: none; }
.scan-hint { margin-top: 1.75rem; font-size: 0.8rem; color: var(--muted); }
.scan-info { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.scan-title { font-size: clamp(2.4rem, 4.5vw, 3.8rem); line-height: 1; }
.scan-title::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 1.5rem; background: var(--accent-strong); }
.scan-meta { display: grid; gap: 0.35rem; margin: 2rem 0; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.scan-meta div { display: flex; justify-content: space-between; gap: 1rem; }
.scan-meta dt { color: var(--muted); }
.scan-meta dd { margin: 0; text-align: right; }
.scan-missing { display: grid; justify-items: start; gap: 1.5rem; padding: clamp(2rem, 6vw, 5rem) 0; }

/* Lightbox ---------------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 300; display: none; background: var(--lb-bg); color: var(--lb-ink); }
.lightbox.is-open { display: grid; grid-template-columns: minmax(0, 1fr) 380px; animation: fadeIn 0.35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 4.5rem 5rem; min-height: 0; touch-action: pan-y; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; transition: opacity 0.25s; }
.lightbox__img.is-loading { opacity: 0; }
.lightbox__img[hidden], .lightbox__video[hidden] { display: none; }
.lightbox__video { display: block; min-width: 0; max-width: 100%; max-height: 100%; background: #000; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; transition: background 0.2s, border-color 0.2s; }
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.5); }
.lightbox__nav--prev { left: 1.25rem; }
.lightbox__nav--next { right: 1.25rem; }
.lightbox__close { position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.6rem; line-height: 1; }
.lightbox__counter { position: absolute; left: 1.5rem; top: 1.5rem; font-size: 0.75rem; letter-spacing: 0.15em; color: var(--lb-muted); }
.lightbox__panel { background: var(--lb-panel); padding: 4.5rem 2.25rem 2.25rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1.25rem; }
.lightbox__cat { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lb-accent); }
.lightbox__title { font-size: 2.3rem; }
.lightbox__meta { font-size: 0.85rem; color: var(--lb-muted); border-top: 1px solid rgba(255, 255, 255, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding: 0.9rem 0; display: grid; gap: 0.3rem; }
.lightbox__meta dt { display: inline; color: var(--lb-ink); }
.lightbox__meta dd { display: inline; margin: 0; }
.lightbox__text { font-size: 0.95rem; line-height: 1.75; color: var(--lb-text); }
.lightbox__text p + p { margin-top: 0.9em; }
.lightbox__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin-top: auto; padding-top: 1rem; }
.lightbox__thumbs button { aspect-ratio: 1; overflow: hidden; opacity: 0.45; transition: opacity 0.2s; outline-offset: -2px; }
.lightbox__thumbs button:hover, .lightbox__thumbs button[aria-current="true"] { opacity: 1; }
.lightbox__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__thumbs .is-video { position: relative; }
.lightbox__thumbs .is-video::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.1rem; background: rgba(0, 0, 0, 0.3); }
body.no-scroll { overflow: hidden; }

/* About page -------------------------------------------------------------- */
.chapters { display: grid; gap: clamp(3.5rem, 8vw, 6rem); }
.chapter { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.chapter__label { font-family: var(--serif); font-size: 1.1rem; font-style: italic; color: var(--accent); padding-top: 0.4rem; border-top: 1px solid var(--accent); }
.chapter__title { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 1.25rem; }
.chapter__media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.chapter__media figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 0.6rem; }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.pillar img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 1.5rem; }
.pillar h3 { font-size: 1.7rem; margin-bottom: 0.75rem; }
.pillar p { color: var(--ink-soft); font-size: 0.95rem; }

.book { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.book__specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; margin: 2rem 0 2.5rem; }
.book__specs dt { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.book__specs dd { margin: 0.25rem 0 0; font-family: var(--serif); font-size: 1.35rem; }
.book__media { display: grid; gap: 1rem; min-width: 0; }
.book__cover {
  display: block; width: min(100%, 360px); justify-self: center; cursor: zoom-in;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.55); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.book__cover:hover { transform: translateY(-4px); box-shadow: 0 32px 60px -24px rgba(0, 0, 0, 0.6); }
.book__cover img { width: 100%; height: auto; }
.book-carousel { position: relative; }
.book-carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 45%; gap: 0.75rem;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
}
.book-carousel__track::-webkit-scrollbar { display: none; }
.book-carousel__track button { cursor: zoom-in; overflow: hidden; }
.book-carousel__track img { width: 100%; aspect-ratio: 740 / 500; object-fit: cover; transition: transform 0.5s var(--ease); }
.book-carousel__track button:hover img { transform: scale(1.04); }
.book-carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); transition: opacity 0.25s, border-color 0.25s, color 0.25s;
}
.book-carousel__btn:hover { border-color: var(--accent); color: var(--accent); }
.book-carousel__btn--prev { left: 0.5rem; }
.book-carousel__btn--next { right: 0.5rem; }

/* Timeline ---------------------------------------------------------------- */
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 120px; width: 1px; background: var(--line); }
.tl-item { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 3rem; padding: 2.25rem 0; }
.tl-item::before { content: ""; position: absolute; left: 116px; top: 2.85rem; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); }
.tl-item:hover::before { background: var(--accent); }
.tl-year { font-family: var(--serif); font-size: 1.6rem; line-height: 1.4; padding-right: 2rem; color: var(--accent); }
.tl-body { padding-left: 1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: start; }
.tl-title { font-size: 1.65rem; margin-bottom: 0.5rem; }
.tl-place { font-size: 0.85rem; color: var(--muted); }
.tl-text { color: var(--ink-soft); margin-top: 0.5rem; max-width: 60ch; }
.tl-thumbs { display: flex; gap: 0.5rem; width: calc(92px * 3 + 1rem); }
.tl-thumbs button { width: 92px; height: 92px; overflow: hidden; background: var(--bg-alt); }
.tl-thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.tl-thumbs button:hover img { transform: scale(1.08); }
.section--alt .tl-item::before { background: var(--bg-alt); }

/* Projects ---------------------------------------------------------------- */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.project img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 1.1rem; }
.project h3 { font-size: 1.55rem; }
.project__meta { font-size: 0.8rem; color: var(--muted); margin: 0.25rem 0 0.75rem; }
.project p { font-size: 0.95rem; color: var(--ink-soft); }
/* Legal ------------------------------------------------------------------- */
.legal h2 { font-size: 1.9rem; margin: 3rem 0 1rem; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1.1em; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Footer ------------------------------------------------------------------ */
.site-footer { border-top: 4px solid var(--accent-strong); padding: clamp(4rem, 8vw, 6rem) 0 2rem; }
.footer__top { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 3rem; padding-bottom: 3.5rem; border-bottom: 1px solid var(--line); }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; }
.footer__brand .brand__name { font-size: 2rem; line-height: 1.1; }
.footer__brand .brand__role { color: var(--muted); margin-top: 0.5rem; }
.footer__brand p { margin-top: 1.5rem; max-width: 36ch; color: var(--muted); font-size: 0.92rem; }
.footer__heading { font-family: var(--sans); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.25rem; }
.footer__links { display: grid; gap: 0.6rem; }
.footer__links a { transition: color 0.2s; }
.footer__links a:hover { color: var(--accent); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 2rem; font-size: 0.78rem; color: var(--muted); }

/* Reveal animations ------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: 0.12s; }
.js .reveal[data-delay="2"] { transition-delay: 0.24s; }
.js .reveal[data-delay="3"] { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1100px) {
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-grid .card:nth-child(even) { margin-top: 0; }
  .featured-grid .card:nth-child(4n+2), .featured-grid .card:nth-child(4n+4) { margin-top: 2.5rem; }
  .chapter { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
  .chapter__label { grid-column: 1 / -1; max-width: 200px; }
  .lightbox.is-open { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (min-width: 1121px) {
  .header-actions { display: none; }
}

@media (min-width: 1121px) and (max-width: 1280px) {
  .brand__name { font-size: 1.3rem; }
  .site-header__inner { gap: 1.25rem; }
  .nav { gap: 1.25rem; }
  .nav__list { gap: 1.1rem; }
  .nav__link { font-size: 0.72rem; letter-spacing: 0.08em; }
}

@media (max-width: 1120px) {
  :root { --header-h: 66px; }
  .nav-toggle { display: block; z-index: 2; }
  .nav {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; gap: 3rem;
    background: var(--bg); opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; align-items: center; gap: 1.25rem; }
  .nav__link { font-family: var(--serif); font-size: 2.2rem; font-weight: 500; letter-spacing: 0; text-transform: none; }
  .site-header.nav-open { background: var(--bg); transform: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .brand { position: relative; z-index: 2; }
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding-bottom: 5rem; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__collage { max-width: 560px; width: 100%; margin: 0 auto; }
  .hero__scroll { display: none; }
  .split, .book { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .split__media--offset::before { inset: 1rem 0 -1rem 1rem; }
  .process-intro .split__media { position: relative; top: auto; }
  .stats { gap: 1rem 0.75rem; }
  .stat__num { font-size: clamp(2rem, 9vw, 2.8rem); }
  .stat__label { font-size: 0.68rem; letter-spacing: 0.08em; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .works-grid, .projects, .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }

  .lightbox.is-open { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lightbox__stage { padding: 4rem 1rem 1rem; }
  .lightbox__nav { width: 44px; height: 44px; background: rgba(0, 0, 0, 0.4); }
  .lightbox__nav--prev { left: 0.5rem; }
  .lightbox__nav--next { right: 0.5rem; }
  .lightbox__panel { max-height: 42vh; padding: 1.5rem 1.25rem 1.5rem; gap: 0.8rem; }
  .lightbox__title { font-size: 1.8rem; }
  .lightbox__thumbs { grid-template-columns: repeat(6, 1fr); }

  .timeline::before { left: 0; }
  .tl-item { grid-template-columns: 1fr; padding: 1.75rem 0 1.75rem 1.75rem; }
  .tl-item::before { left: -4px; top: 2.4rem; }
  .tl-year { font-size: 1.3rem; }
  .tl-body { padding-left: 0; grid-template-columns: 1fr; gap: 1rem; }
  .tl-thumbs { width: auto; }

  .scan-layout { grid-template-columns: 1fr; }
  .scan-stage { max-height: 72svh; }
  .scan-info { position: static; }
}

@media (max-width: 600px) {
  .featured-grid .card:nth-child(4n+2), .featured-grid .card:nth-child(4n+4) { margin-top: 0; }
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .card__title { font-size: 1.2rem; }
  .cat-grid, .projects, .pillars { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 0.9rem; }
  .stats { grid-template-columns: 1fr; gap: 1.25rem; }
  .stats--duo { grid-template-columns: 1fr 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .chapter { grid-template-columns: 1fr; }
  .book__specs { grid-template-columns: 1fr 1fr; }
  .tl-thumbs button { width: 72px; height: 72px; }
}
