:root {
  --paper: #f2eee6;
  --mat: #f8f6f1;              /* the lighter paper used for mats */
  --ink: #1b1a17;
  --muted: #8a857c;
  --rule: #d8d1c3;
  --pad: clamp(16px, 2.4vw, 32px);
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* paper grain */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='.55' intercept='.5'/%3E%3CfeFuncG type='linear' slope='.55' intercept='.5'/%3E%3CfeFuncB type='linear' slope='.55' intercept='.5'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E");
  --mottle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='.22' intercept='.86'/%3E%3CfeFuncG type='linear' slope='.22' intercept='.86'/%3E%3CfeFuncB type='linear' slope='.22' intercept='.86'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23m%29'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  background: var(--paper); color: var(--ink);
  font: 400 13px/1.45 var(--sans); letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
  animation: arrive .5s ease both;
}
body::before {               /* paper texture, always behind the images */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain), var(--mottle);
  background-size: 220px 220px, 600px 600px;
  mix-blend-mode: multiply; opacity: .5;
}
body.leaving { animation: leave .3s ease forwards; }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes leave { to { opacity: 0; } }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
img { display: block; max-width: 100%; }
em { font-style: italic; }
::selection { background: var(--ink); color: var(--paper); }

/* ---------- header ---------- */
.site-head {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: var(--pad);
}
.wordmark {
  position: relative; z-index: 2;
  font: 700 13px/1 var(--sans); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
}
.wordmark .role {             /* only shown during the opening */
  position: absolute; left: 100%; top: 0; margin-left: 1.4em;
  font: 400 13px/1 var(--sans); letter-spacing: .005em; text-transform: none; color: var(--muted);
  opacity: 0; pointer-events: none;
}
.nav { display: flex; gap: 1.4em; transition: opacity .6s ease; }
.nav a[aria-current="page"] { color: var(--muted); }

/* ---------- the opening (index only) ---------- */
.curtain {
  position: fixed; inset: 0; z-index: 1; background: var(--paper);
  transition: opacity .7s ease;
}
.curtain::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain), var(--mottle); background-size: 220px 220px, 600px 600px;
  mix-blend-mode: multiply; opacity: .5;
}
body.opening .site-head { z-index: 40; }
body.opening .nav { opacity: 0; }
body.opening .curtain { z-index: 30; }
.curtain.gone { opacity: 0; pointer-events: none; }

/* ---------- page shell ---------- */
main.page { flex: 1; padding: 112px var(--pad) 72px; }
.page-foot { padding: 40px var(--pad) var(--pad); display: flex; justify-content: space-between; color: var(--muted); }
.page-foot a:hover { color: var(--ink); }

/* ---------- index: matted prints, like a picture book ---------- */
main.page.home { display: grid; place-items: center; padding-top: 96px; padding-bottom: 32px; }
.cards {
  width: 100%; max-width: 1480px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px) clamp(18px, 2.4vw, 40px);
}
.card { display: block; }
.card:hover { color: inherit; }
.card .pic { aspect-ratio: 16 / 9; overflow: hidden; background: var(--rule); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.card:hover .pic img { opacity: .85; }
.card .label { padding: 9px 0 0; font-size: 11px; line-height: 1.35; color: var(--muted); }
.card:hover .label { color: var(--ink); }
.card .label .k { color: var(--muted); white-space: nowrap; }

/* ---------- contents: the project list ---------- */
.work-list { list-style: none; }
.work-list li { border-top: 1px solid var(--rule); }
.work-list li:last-child { border-bottom: 1px solid var(--rule); }
.work-list a {
  display: grid; grid-template-columns: 4em minmax(0, 1fr) 12em;
  gap: 16px; padding: 14px 0; align-items: baseline;
}
.work-list .n, .work-list .k { color: var(--muted); }
.work-list .k { text-align: right; }
.work-list:hover a { color: var(--muted); }
.work-list:hover a:hover { color: var(--ink); }
.peek {
  position: fixed; left: 0; top: 0; z-index: 20; pointer-events: none;
  width: clamp(180px, 16vw, 280px); height: auto;
  opacity: 0; transition: opacity .2s ease;
}
.peek.on { opacity: 1; }

/* ---------- project page: a small gallery ---------- */
.project { width: 100%; max-width: 1180px; margin: 0 auto; }
.project-head { margin-bottom: 40px; }
.project-head h1 { font: inherit; font-weight: 500; }
.project-head .meta { color: var(--muted); }
.video { position: relative; width: 100%; margin: 0 0 clamp(72px, 12vh, 140px); aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.project-nav {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 40px; padding-top: 12px; border-top: 1px solid var(--rule);
}
.project-nav .label { color: var(--muted); margin-right: .8em; }

/* ---------- gallery walls (thumbs + project pages) ---------- */
.wall { padding-top: 6vh; }
main.page > .wall { max-width: 1400px; margin: 0 auto; }
.bay {                        /* one stretch of wall: pieces hung on a shared centre line */
  display: flex; align-items: center;
  margin: 0 0 clamp(44px, 7vh, 96px);
}
.bay.room { margin-top: clamp(24px, 4vh, 56px); }
main.page > .wall .bay { margin-bottom: clamp(36px, 6vh, 72px); }
.project .bay { margin-bottom: clamp(48px, 8vh, 96px); }
.bay a { flex: none; cursor: zoom-in; }
.bay img { height: 100%; width: auto; background: var(--rule); transition: opacity .2s; }
.bay a:hover img { opacity: .88; }
.wall-text {                  /* a wall label you read on the way past */
  flex: none; width: var(--tw, 300px);
  font-size: 13px; line-height: 1.6;
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: var(--paper);
  display: none; place-items: center; padding: 64px var(--pad); cursor: e-resize;
}
.lightbox::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain), var(--mottle); background-size: 220px 220px, 600px 600px;
  mix-blend-mode: multiply; opacity: .5;
}
.lightbox.open { display: grid; }
.lightbox.prev-zone { cursor: w-resize; }
.lightbox img { position: relative; max-width: 100%; max-height: calc(100vh - 128px); width: auto; height: auto; }
.lightbox .lb-bar { position: fixed; inset: auto 0 0 0; padding: var(--pad); display: flex; justify-content: space-between; color: var(--muted); }
.lightbox .lb-close { position: fixed; top: var(--pad); right: var(--pad); background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; }

/* ---------- info ---------- */
.info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px 32px; align-items: start; }
.info .bio p { max-width: 34em; margin-bottom: 1em; }
.info .contact { margin-top: 32px; max-width: 34em; padding-top: 12px; border-top: 1px solid var(--rule); display: flex; gap: 16px; }
.info .contact span { color: var(--muted); width: 7em; }
.info .portrait img { width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 200px); margin-left: auto; }

/* ---------- small screens ---------- */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-head { flex-direction: column; gap: 8px; }
  main.page { padding-top: 96px; }
  main.page.home { display: block; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .card .label { font-size: 11px; flex-direction: column; gap: 2px; }
  .work-list a { grid-template-columns: 2.4em minmax(0, 1fr) auto; }
  .peek { display: none; }
  .info { grid-template-columns: 1fr; }
  .bay { margin-bottom: 48px; }
  .bay.room { margin-top: 40px; }
  .wall-text { width: 100%; }
}

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

/* ---------- thumbs: even rows ---------- */
.rows { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; justify-content: center; }
.row a { flex: none; cursor: zoom-in; }
.row img { height: 100%; width: auto; background: var(--rule); transition: opacity .2s; }
.row a:hover img { opacity: .85; }
@media (max-width: 760px) { .rows { gap: 8px; } }

/* ---------- project extras ---------- */
.project-head .ext { display: inline-block; margin-top: 10px; border-bottom: 1px solid var(--rule); }
.project-head .ext:hover { color: var(--ink); border-color: var(--ink); }
.wall-text .notes { margin-top: 1.2em; color: var(--muted); }
.wall-text .notes p { margin: 0 0 .3em; }
.wall-text .notes a { color: var(--ink); border-bottom: 1px solid var(--rule); }
.video.poster { display: block; cursor: pointer; overflow: hidden; }
.video.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.video.poster:hover img { opacity: 1; }
.video.poster span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 13px; padding: 10px 16px; border: 1px solid rgba(255,255,255,.8); }
