:root {
  --ink: #0d0d0c;
  --ink-2: #161614;
  --paper: #eceae6;
  --paper-dim: #a9a6a0;
  --rule: #2b2a27;
  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', serif;
  --text: 'Hanken Grotesk', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 17px/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0 0 1em; }

:focus-visible { outline: 1px solid var(--paper); outline-offset: 4px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--paper); color: var(--ink); padding: 8px 12px;
}
.skip:focus { left: 8px; z-index: 100; }

.meta {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
}
.link-arrow::after { content: '→'; transition: transform 0.3s ease; }
a:hover .link-arrow::after,
.link-arrow:hover::after { transform: translateX(4px); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
}
.is-home .site-header {
  position: fixed; left: 0; right: 0;
  background: linear-gradient(var(--ink), transparent);
  backdrop-filter: none;
}
.brand { font-family: var(--display); font-size: 22px; letter-spacing: 0.01em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.site-nav a { color: var(--paper-dim); transition: color 0.2s; }
.site-nav a:hover,
.site-nav a[aria-current='page'] { color: var(--paper); }

/* Hero */
.hero { position: relative; height: 100svh; min-height: 520px; overflow: hidden; background: var(--ink-2); }
.hero__image { width: 100%; height: 100%; object-fit: cover; animation: develop 2.4s ease-out both; }
@keyframes develop { from { opacity: 0; filter: brightness(1.6) contrast(0.6); } }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgb(13 13 12 / 0.85), transparent 45%); pointer-events: none; }
.hero__text { position: absolute; z-index: 1; left: var(--gutter); bottom: clamp(40px, 9vh, 96px); max-width: 900px; }
.hero__text h1 { font-size: clamp(52px, 10vw, 148px); }
.hero__text p { margin: 14px 0 0; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--paper-dim); }
.hero__caption { position: absolute; z-index: 1; right: var(--gutter); bottom: clamp(40px, 9vh, 96px); font-size: 13px; color: var(--paper-dim); max-width: 32ch; text-align: right; }
.hero__caption:hover { color: var(--paper); }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 10vw, 140px) var(--gutter); }
.section-head,
.page-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 80px); }
.section-head h2 { font-size: clamp(36px, 5vw, 64px); }
.page-head h1 { font-size: clamp(44px, 7vw, 96px); }
.section-head p,
.page-head p { margin-top: 18px; color: var(--paper-dim); font-size: 19px; max-width: 56ch; }
.crumbs { display: flex; gap: 10px; margin-bottom: 18px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); }
.crumbs a + a::before { content: '/'; margin-right: 10px; opacity: 0.5; }
.crumbs a:hover { color: var(--paper); }

/* Doors (one per universe) */
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 2px; background: var(--ink); }
.door { position: relative; display: block; aspect-ratio: 4 / 5; max-height: 92svh; width: 100%; overflow: hidden; }
.door img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.72); transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s; }
.door:hover img { transform: scale(1.03); filter: brightness(0.92); }
.door__label { position: absolute; left: var(--gutter); bottom: var(--gutter); display: grid; gap: 10px; }
.door__name { font-family: var(--display); font-size: clamp(44px, 6vw, 88px); line-height: 1; }

/* Series rows */
.series-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 72px); align-items: end; padding: clamp(28px, 4vw, 56px) 0; border-top: 1px solid var(--rule); }
.series-row.is-flipped { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.series-row.is-flipped .series-row__image { order: 2; }
.series-row__image { overflow: hidden; background: var(--ink-2); }
.series-row__image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.series-row:hover .series-row__image img { transform: scale(1.025); }
.series-row__text { display: grid; gap: 16px; justify-items: start; padding-bottom: 8px; }
.series-row__text h3 { font-size: clamp(32px, 4vw, 56px); }
.series-row__text p { margin: 0; color: var(--paper-dim); max-width: 42ch; }

/* Gallery: justified rows, each item grows with its aspect ratio */
.gallery { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.4vw, 36px); }
.gallery::after { content: ''; flex-grow: 999; }
.gallery__item { flex: calc(var(--r) * 1) 1 calc(var(--r) * 300px); display: grid; gap: 12px; align-content: start; }
.gallery__item img { width: 100%; aspect-ratio: var(--r); object-fit: cover; background: var(--ink-2); transition: opacity 0.3s; }
.gallery__item:hover img { opacity: 0.86; }
.gallery__title { font-size: 14px; color: var(--paper-dim); }
.gallery__item:hover .gallery__title { color: var(--paper); }

/* Work */
.work { max-width: var(--max); margin: 0 auto; padding: clamp(16px, 3vw, 40px) var(--gutter) clamp(64px, 8vw, 120px); }
.work__figure { margin: 0 0 clamp(40px, 6vw, 80px); display: flex; justify-content: center; }
.work__zoom { all: unset; cursor: zoom-in; display: block; }
.work__zoom img { max-height: calc(100svh - 140px); width: auto; margin: 0 auto; }
.work__body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 110px); }
.work__head h1 { font-size: clamp(36px, 4.4vw, 64px); }
.work__facts { margin-top: 20px; color: var(--paper-dim); font-size: 15px; }
.work__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.work__text { color: #cfccc6; font-size: 17px; max-width: 64ch; }
.button { display: inline-block; padding: 15px 22px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--paper); transition: background 0.2s, color 0.2s; }
.button:hover { background: transparent; color: var(--paper); }
.button--ghost { background: transparent; color: var(--paper); }
.button--ghost:hover { background: var(--paper); color: var(--ink); }
.work__pager { display: grid; grid-template-columns: 1fr 1fr; margin-top: clamp(56px, 8vw, 110px); border-top: 1px solid var(--rule); }
.work__pager a { display: grid; gap: 8px; padding: 28px 0; font-family: var(--display); font-size: clamp(20px, 2.2vw, 28px); }
.work__pager a[rel='next'] { text-align: right; border-left: 1px solid var(--rule); padding-left: 24px; }
.work__pager a[rel='prev'] { padding-right: 24px; }
.work__pager a:hover { color: var(--paper-dim); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: #000; cursor: zoom-out; padding: 2vmin; }
.lightbox img { max-width: 100%; max-height: 96svh; width: auto; height: auto; }

/* About, contact, bio */
.intro-bio { max-width: 980px; }
.lead { font-family: var(--display); font-size: clamp(24px, 2.8vw, 38px); line-height: 1.3; margin-bottom: 36px; }
.about__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 7vw, 120px); }
.about__text p:first-child { font-family: var(--display); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.35; }
.about__text { color: #cfccc6; }
.about__aside h2 { font-family: var(--text); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-dim); margin: 0 0 14px; }
.about__aside h2:not(:first-child) { margin-top: 40px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 12px 0; border-top: 1px solid var(--rule); }
.contact__lines { display: grid; gap: 26px; justify-items: start; }
.contact__big { font-family: var(--display); font-size: clamp(30px, 5vw, 64px); border-bottom: 1px solid var(--rule); }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding: 40px var(--gutter); border-top: 1px solid var(--rule); font-size: 13px; color: var(--paper-dim); }
.site-footer p { margin: 0; }
.footer-links { display: flex; gap: 24px; }
.footer-links a:hover { color: var(--paper); }

@media (max-width: 860px) {
  .site-header { flex-direction: column; gap: 10px; padding-top: 16px; padding-bottom: 16px; }
  .site-nav { gap: 6px 18px; font-size: 12px; }
  .series-row,
  .series-row.is-flipped { grid-template-columns: 1fr; }
  .series-row.is-flipped .series-row__image { order: 0; }
  .work__body,
  .about__grid { grid-template-columns: 1fr; }
  .hero__caption { display: none; }
  .gallery__item { flex-basis: 100%; }
  .door { aspect-ratio: 4 / 5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Home header turns solid once the hero is behind it */
.is-home .site-header { transition: background 0.3s; }
.is-home .site-header.is-solid { background: color-mix(in srgb, var(--ink) 92%, transparent); backdrop-filter: blur(10px); }
