/* ==========================================================================
   Maximo Malaiu — shared design system (v5)
   The printed portfolio, on screen: Anonymous Pro throughout, hairline rules,
   big mixed-case titles set against photographs, sideways-running text,
   black spreads for the work that lives on black, and one colour per
   project, taken from the work itself.
   ========================================================================== */

:root {
  color-scheme: light;

  --paper:   #ffffff;
  --paper-2: #f2f2f2;
  /* One ink. Hierarchy is carried by size, face and position - never by a
     paler grey. Every tier below is pure black so that old rules keep
     working without each one having to be rewritten. */
  --ink:     #000000;
  --ink-70:  #000000;
  --ink-60:  #000000;
  --ink-50:  #000000;
  --ink-28:  rgba(0, 0, 0, .25);      /* decoration only, never text */
  --draw:    rgba(0, 0, 0, .42);      /* drawn line work: strata, contours */
  --draw-2:  rgba(0, 0, 0, .20);
  --rule:    rgba(0, 0, 0, .14);
  --rule-2:  rgba(0, 0, 0, .30);

  --clay:   #a84d26;
  --accent: var(--clay);

  /* Two faces with two jobs. The grotesk is the voice: titles, leads and
     running text. The monospace is the apparatus: navigation, numbers,
     metadata and the names under photographs. Nothing is set in both. */
  --display: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Anonymous Pro", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gut: clamp(1.25rem, 3.2vw, 3.5rem);  /* page gutter */
  --bar-h: 3.5rem;

  --t-micro: .8125rem;   /* 13px  the one monospace size: labels, folios,
                                  facts, names under photographs */
  --t-small: .8125rem;   /* kept as an alias so older rules still read right */
  --t-body:  1.0625rem;  /* 17px  running text */
  --t-lead:  clamp(1.35rem, 2.4vw, 2rem);  /* 22-32px  lead paragraphs, set regular */

  --ease:    cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.77, 0, .18, 1);
}

/* One colour per project, sampled from the work. Each passes 4.5:1 on paper,
   so it can carry small text. The attribute works on any element — the page
   body, an index row, a "next project" card. */
[data-project="terracotta"]      { --accent: #a84d26; }  /* brick + clay      */
[data-project="ultra-processed"] { --accent: #6a3de8; }  /* scanned violet    */
[data-project="jose-ignacio"]    { --accent: #2e6782; }  /* Atlantic grey-blue */
[data-project="sports-complex"]  { --accent: #96600f; }  /* daylight amber    */
[data-project="chairs"]          { --accent: #5d6a2f; }  /* coastal grass     */
[data-project="mineral"]         { --accent: #96507f; }  /* mineral glaze     */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: var(--t-body);
  line-height: 1.55;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

/* The apparatus, set in Anonymous Pro: everything that points at the work
   rather than being the work. The grotesk is the default, so only these
   are named. */
.bar, .bar-nav, .label, .foot,
.idx-n, .idx-meta, .sc-top, .home-where,
.proj-no, .proj-facts, .block-label,
figcaption, .cta, .process h3,
.pn-label, .pn-all, .pn-meta,
.lb-top, .lb-cap,
.pc-k, .ai-n, .arc-section-label,
.cv-when, .contact-list .c-key, .places {
  font-family: var(--mono);
}

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 999;
}
.skip:focus { left: .5rem; top: .5rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- motion ------------------------------------------------------ */

/* Moving between pages crossfades, and a project's photograph travels from
   the index into its page. Browsers without this simply navigate. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .32s; }
::view-transition-group(hero) {
  animation-duration: .7s;
  animation-timing-function: var(--ease-io);
}
::view-transition-old(hero),
::view-transition-new(hero) {
  height: 100%;
  object-fit: cover;
  overflow: clip;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
}

@keyframes rise { from { opacity: 0; transform: translateY(1.1rem); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- shared atoms ---------------------------------------------- */

.label {
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--ink-60);
}

.measure { max-width: 36em; }

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.text-link {
  border-bottom: 1px solid var(--accent);
  transition: color .3s;
}
.text-link:hover { color: var(--accent); }

/* ---------- top bar ---------------------------------------------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--bar-h);
  padding: 0 var(--gut);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

/* the small square takes the colour of whichever project is in view */
.bar .mark {
  display: inline-flex;
  align-items: center;
  gap: .8em;
  font-size: var(--t-micro);
  font-weight: 400;
  letter-spacing: .01em;
  white-space: nowrap;
}
.bar .mark::before {
  content: "";
  flex: none;
  width: .62em;
  height: .62em;
  background: var(--accent);
  transition: background-color .6s ease;
}

.bar-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-size: var(--t-micro);
  letter-spacing: .01em;
}
.bar-nav a {
  position: relative;
  padding: .5rem 0;
  color: var(--ink-70);
  transition: color .25s;
}
.bar-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .3rem;
  border-bottom: 1px solid currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.bar-nav a:hover,
.bar-nav a[aria-current] { color: var(--ink); }
.bar-nav a:hover::after,
.bar-nav a[aria-current]::after { transform: scaleX(1); }

@media (max-width: 420px) {
  .bar { gap: .75rem; }
  .bar .mark { letter-spacing: .01em; gap: .6em; }
  .bar-nav { gap: .9rem; letter-spacing: .01em; }
}

/* reading progress, on long pages */
.progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- page shell ------------------------------------------------- */

.wrap { padding: 0 var(--gut); }

.page-head { padding: clamp(2.5rem, 8vw, 6rem) 0 clamp(1.5rem, 4vw, 3rem); }

.page-title {
  margin: 0;
  font-size: clamp(3.25rem, 13vw, 11rem);
  font-weight: 700;
  line-height: .88;
  letter-spacing: -.045em;
}

/* ---------- site footer ------------------------------------------------ */

.foot {
  margin-top: clamp(4rem, 12vw, 10rem);
  padding: 2.5rem var(--gut) 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--ink-60);
}
.foot a { border-bottom: 1px solid var(--rule-2); padding-bottom: 1px; transition: color .25s, border-color .25s; }
.foot a:hover { color: var(--ink); border-color: currentColor; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ---------- custom cursor (desktop, fine pointer only) ----------------- */

/* A small solid dot in the current project's colour. Over anything you can
   click it opens into a thin ring, so what's under it stays as it is. */
#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity .3s, width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease),
              background-color .2s, border-color .5s;
  will-change: transform;
}
#cursor-dot.ready { opacity: 1; }
#cursor-dot.big  { width: 38px; height: 38px; margin: -19px 0 0 -19px; background-color: transparent; }
#cursor-dot.view { width: 60px; height: 60px; margin: -30px 0 0 -30px; background-color: transparent; }

/* Hide the native cursor only once the custom one is proven to work, and
   only for a fine pointer. Any failure leaves the real cursor in place. */
@media (hover: hover) and (pointer: fine) {
  html.cursor-on,
  html.cursor-on a,
  html.cursor-on button { cursor: none; }
}

/* ==========================================================================
   HOME — big titles on the left, the work filling the right, and the
   practice statement running up the edge between them, as on the cover
   ========================================================================== */

.home { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }

.home-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: clamp(1.75rem, 5vw, 2.5rem);
  padding: clamp(1.5rem, 5vw, 2.25rem) var(--gut) 1rem;
}


.stage { display: none; }

.index { list-style: none; margin: 0; padding: 0; }

.index a {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  column-gap: .4rem;
  row-gap: .3rem;
}

.idx-n {
  grid-column: 1;
  grid-row: 1;
  padding-top: .55em;
  font-size: var(--t-micro);
  line-height: 1;
  letter-spacing: .01em;
  color: var(--ink-60);
  font-variant-numeric: tabular-nums;
  transition: color .35s;
}
.idx-t {
  grid-column: 2;
  grid-row: 1;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.035em;
  transition: color .35s, transform .55s var(--ease);
}
.idx-t .arrow {
  display: inline-block;
  margin-left: .25em;
  font-size: .55em;
  font-weight: 400;
  vertical-align: .15em;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-.6em);
  transition: opacity .3s, transform .45s var(--ease);
}
.idx-meta {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: baseline;
  gap: .6rem;
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--ink-60);
}
.idx-kind + .idx-year::before { content: "· "; }
.idx-year { font-variant-numeric: tabular-nums; }
.idx-dek {
  grid-column: 2;
  grid-row: 3;
  max-width: 30em;
  font-size: var(--t-body);
  line-height: 1.4;
  color: var(--ink);
}
.idx-thumb { display: none; }

/* Phones and tablets: no hover, so each row carries its own photograph. */
@media (max-width: 899px) {
  .index { display: grid; gap: clamp(2.25rem, 7vw, 3rem); }
  .idx-thumb {
    display: block;
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin-bottom: .9rem;
    background: var(--paper-2);
  }
  .idx-n    { grid-row: 2; }
  .idx-t    { grid-row: 2; font-size: clamp(1.65rem, 7.4vw, 2.5rem); }
  .idx-meta { grid-row: 3; }
  .idx-dek  { grid-row: 4; margin-top: .3rem; }
  .idx-t .arrow { display: none; }
  .index > li .idx-n { color: var(--accent); }
}
@media (min-width: 600px) and (max-width: 899px) {
  .index { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.25rem, 3vw, 2rem); }
}

@media (min-width: 900px) {
  .home-main {
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
    column-gap: clamp(1.5rem, 3vw, 3rem);
    padding: clamp(1rem, 2.5vh, 1.75rem) 0 clamp(1rem, 2.5vh, 1.75rem) var(--gut);
  }
  .index { grid-column: 1; grid-row: 1; align-self: center; }


  .index a { padding: clamp(.3rem, 1.05vh, .7rem) 0; }
  .idx-t {
    font-size: clamp(1.9rem, min(4.2vw, 7.4vh), 4.4rem);
    color: var(--ink);
  }
  .idx-dek {               /* shown under the photograph instead */
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .index > li.active .idx-t        { color: var(--accent); transform: translateX(.18em); }
  .index > li.active .idx-n        { color: var(--accent); }
  .index > li.active .idx-t .arrow { opacity: 1; transform: none; }

  .stage {
    display: block;
    grid-column: 2;
    grid-row: 1;
    position: relative;
    min-height: 26rem;
    overflow: hidden;
    background: var(--paper-2);
  }
  .shots { position: absolute; inset: 0; z-index: 0; }   /* own stacking context: shots stay under the caption */

  /* each new photograph wipes up over the last one */
  .shot {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    clip-path: inset(100% 0 0 0);
    transform: scale(1.07);
    transform-origin: 50% 100%;
  }
  .shot.was { clip-path: inset(0); transform: none; }
  .shot.on {
    clip-path: inset(0);
    transform: none;
    transition: clip-path 1s var(--ease-io), transform 1.7s var(--ease);
    view-transition-name: hero;
  }
  .shot.on.snap { transition: none; }

  /* a paper tab on the corner of the photograph, like a caption pinned on */
  .stage-cap {
    position: absolute;
    left: 0; bottom: 0;
    z-index: 1;
    margin: 0;
    display: grid;
    gap: .3rem;
    max-width: min(30rem, 80%);
    padding: 1rem 1.6rem 0 0;
    background: var(--paper);
  }
  .sc-top {
    display: flex;
    gap: 1rem;
    font-size: var(--t-micro);
    letter-spacing: .01em;
    color: var(--ink-60);
  }
  .sc-n { color: var(--accent); font-variant-numeric: tabular-nums; transition: color .5s; }
  .sc-dek { font-size: var(--t-body); line-height: 1.4; max-width: 26em; }
}

/* fit the whole index on one screen whenever there's room for it */
@media (min-width: 900px) and (min-height: 600px) {
  .home { height: 100vh; height: 100svh; }
  .home-main { min-height: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .index > li { animation: rise .9s var(--ease) both; }
  .index > li:nth-child(2) { animation-delay: .06s; }
  .index > li:nth-child(3) { animation-delay: .12s; }
  .index > li:nth-child(4) { animation-delay: .18s; }
  .index > li:nth-child(5) { animation-delay: .24s; }
  .index > li:nth-child(6) { animation-delay: .30s; }
}

.home-foot {
  position: relative;
  padding: 1.25rem var(--gut) 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2.5rem;
  align-items: baseline;
  justify-content: flex-end;
}
.home-where {
  margin: 0;
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--ink-60);
}
.home-where a { border-bottom: 1px solid var(--rule-2); padding-bottom: 1px; transition: color .25s; }
.home-where a:hover { color: var(--ink); }

/* ==========================================================================
   PROJECT PAGES
   ========================================================================== */

/* Opening spread: number, title and facts on the left; the photograph from
   the index fills the right and runs off the edge of the page. */
.proj-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "intro" "hero" "facts";
  gap: clamp(1.5rem, 5vw, 2.25rem);
  padding: clamp(2rem, 7vw, 3.5rem) 0 clamp(2.5rem, 7vw, 4.5rem);
}
.proj-intro {
  grid-area: intro;
  display: grid;
  gap: clamp(.9rem, 2.5vw, 1.5rem);
  align-content: start;
}
.proj-no {
  margin: 0;
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--accent);
}
.proj-no a { border-bottom: 1px solid currentColor; }
.proj-title {
  margin: 0;
  font-size: clamp(2.6rem, 11vw, 5rem);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.proj-dek {
  margin: 0;
  max-width: 20em;
  font-size: var(--t-lead);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -.015em;
  text-wrap: pretty;
}

.proj-hero {
  grid-area: hero;
  position: relative;
  margin: 0 calc(-1 * var(--gut));
}
.proj-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-2);
  view-transition-name: hero;
}
.proj-hero figcaption { margin: .65rem var(--gut) 0; }

.proj-facts {
  grid-area: facts;
  margin: 0;
  display: grid;
  align-content: end;
  border-top: 1px solid var(--rule-2);
}
.proj-facts > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-small);
}
.proj-facts dt {
  padding-top: .1em;
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--ink-60);
}
.proj-facts dd { margin: 0; }

@media (min-width: 900px) {
  .proj-head {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: 1fr auto;
    grid-template-areas: "intro hero" "facts hero";
    column-gap: clamp(2rem, 4.5vw, 5rem);
    row-gap: 2rem;
    min-height: calc(100vh - var(--bar-h));
    min-height: calc(100svh - var(--bar-h));
    margin-right: calc(-1 * var(--gut));
    padding: clamp(1.25rem, 3.5vh, 2.25rem) 0;
  }
  .proj-intro { padding-top: clamp(.5rem, 5vh, 3.5rem); }
  .proj-title { font-size: clamp(3.25rem, 6.8vw, 8rem); }
  .proj-facts { border-top: 0; }
  .proj-facts > div:first-child { border-top: 1px solid var(--rule-2); }

  .proj-hero { margin: 0; min-height: 26rem; }
  .proj-hero .zoom,
  .proj-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }
  .proj-hero figcaption {
    position: absolute;
    left: 0; bottom: 0;
    z-index: 1;
    margin: 0;
    max-width: min(26rem, 75%);
    padding: .8rem 1.5rem 0 0;
    background: var(--paper);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .proj-intro > * { animation: rise .9s var(--ease) both; }
  .proj-intro > :nth-child(2) { animation-delay: .07s; }
  .proj-intro > :nth-child(3) { animation-delay: .14s; }
  .proj-facts { animation: fade 1s ease .25s both; }
}

/* Content blocks: a sticky label in the left column, the content on the
   right. Figures marked .wide reach back across the label column. */
.block {
  --label-w: 10rem;
  --bgap: clamp(1.25rem, 3vw, 3rem);
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
  column-gap: var(--bgap);
  row-gap: 1.1rem;
  padding: clamp(2.75rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--rule);
}
.block-label {
  margin: 0;
  align-self: start;
  position: sticky;
  top: calc(var(--bar-h) + 1.5rem);
  font-size: var(--t-micro);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .01em;
  color: var(--ink-60);
}
.block-label::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 2px;
  margin-bottom: .9rem;
  background: var(--accent);
}
.block-label .bl-n {
  display: block;
  margin-bottom: .35rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
/* a label can't stay pinned where wide figures will pass under it */
.block:has(.wide) > .block-label { position: static; }

.block p { margin: 0 0 1.1em; max-width: 40em; }
.block p:last-child { margin-bottom: 0; }
.block .lede {
  max-width: 24em;
  font-size: var(--t-lead);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -.015em;
  text-wrap: pretty;
}

@media (min-width: 760px) {
  /* a wide figure as the block's own content gets a full row under the label;
     one further down, after some text, reaches back under where the label sat */
  .block > .wide { grid-column: 1 / -1; }
  .block > :not(.block-label) .wide { margin-left: calc(-1 * (var(--label-w) + var(--bgap))); }
}
@media (max-width: 759px) {
  .block { grid-template-columns: minmax(0, 1fr); }
  .block-label { position: static; }
}

/* black spreads, for work that lives on black */
.dark {
  --paper:   #060605;   /* matched to the renders, which sit on near-pure black */
  --paper-2: #151411;
  --ink:     #f1eee8;
  --ink-70:  #f1eee8;
  --ink-60:  #f1eee8;
  --ink-50:  #f1eee8;
  --ink-28:  rgba(241, 238, 232, .28);
  --draw:    rgba(241, 238, 232, .42);
  --draw-2:  rgba(241, 238, 232, .20);
  --rule:    rgba(241, 238, 232, .16);
  --rule-2:  rgba(241, 238, 232, .32);
  background: var(--paper);
  color: var(--ink);
}
.block.dark {
  margin-inline: calc(-1 * var(--gut));
  padding-inline: var(--gut);
  border-top: 0;
}
.block.dark + .block { border-top-color: transparent; }

/* text beside a figure, inside a block */
.split { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* figures */
.figs { display: grid; gap: clamp(1rem, 2.6vw, 2.5rem); margin: 0; align-items: start; }
.figs.two   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.figs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* pairs set off-beat, like prints pinned up rather than ruled into a grid */
.figs.stagger > :nth-child(even) { margin-top: clamp(2rem, 9vw, 8rem); }
@media (max-width: 759px) {
  .figs.two, .figs.three { grid-template-columns: minmax(0, 1fr); }
  .figs.stagger > :nth-child(even) { margin-top: 0; }
}

figure { margin: 0; }
figure img { width: 100%; }
/* A photograph is named, not explained. One line, two or three words, set
   in the monospace so it reads as a label pinned to the sheet rather than
   as more prose. The explaining is done once, in the block's text. */
figcaption {
  margin-top: .55rem;
  max-width: 24em;
  font-size: var(--t-small);
  line-height: 1.4;
  color: var(--ink);
}

.bleed { margin-top: clamp(1.5rem, 4vw, 3rem); }

/* drawings sit straight on the page, like the photographs; the white
   backing only shows on a black spread */
.plate { background: #fff; }
.plate.tall img { max-height: 78vh; width: auto; margin: 0 auto; }

/* a portrait sits centred at its own height rather than blown up */
figure.portrait img { max-height: 84vh; width: auto; margin: 0 auto; }

/* any figure image opens the viewer */
.zoom {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
  overflow: hidden;
}
.zoom img { transition: transform 1.1s var(--ease); }
@media (hover: hover) {
  .zoom:hover img { transform: scale(1.02); }
}

/* call to action — e.g. "open the interactive piece" */
.cta {
  display: inline-flex;
  align-items: center;
  gap: .9em;
  margin-top: .5rem;
  padding: .9em 1.5em;
  border: 1px solid var(--ink);
  font-size: var(--t-small);
  letter-spacing: .01em;
  transition: background .3s, border-color .3s, color .3s;
}
.cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.cta .arrow { transition: transform .3s var(--ease); }
.cta:hover .arrow { transform: translateX(.35em); }

/* Ultra Processed: three steps written across the top, the four objects
   they produced in a row beneath, each under the step that made it */
.process {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem clamp(1rem, 2.4vw, 2rem);
  align-items: start;
}
.process h3 {
  margin: 0 0 .5rem;
  font-size: var(--t-micro);
  font-weight: 400;
  letter-spacing: .01em;
  color: var(--accent);
}
.process p { margin: 0; font-size: var(--t-small); line-height: 1.55; }
.process figure { max-width: 34rem; }
@media (max-width: 899px) {
  .process > figure + div { margin-top: 1.5rem; }
}
@media (min-width: 900px) {
  .process { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 2rem; }
  .process figure { max-width: none; }
  .process > :nth-child(1) { grid-area: 1 / 1; }
  .process > :nth-child(2) { grid-area: 2 / 1; }
  .process > :nth-child(3) { grid-area: 1 / 2 / 2 / 4; }
  .process > :nth-child(4) { grid-area: 2 / 2; }
  .process > :nth-child(5) { grid-area: 2 / 3; }
  .process > :nth-child(6) { grid-area: 1 / 4; }
  .process > :nth-child(7) { grid-area: 2 / 4; }
  .process p { max-width: 30em; }
}

/* The page is a sheet lying over the next project. Scrolling to the end lifts
   the sheet off — its bottom edge casts a shadow — and the next project is
   revealed underneath, on a band of its own, rising into place. */
.sheet {
  position: relative;
  z-index: 1;
  background: var(--paper);
  box-shadow: 0 28px 44px -26px rgba(0, 0, 0, .32);
}
.sheet > main { padding-bottom: clamp(3.5rem, 9vw, 7rem); }
.sheet > .strata { margin-top: 0; }

.underneath {
  position: sticky;
  bottom: 0;
  z-index: 0;
  background: var(--paper-2);
}

/* Where the sheet is torn along the ground, the cut has to open onto the
   band underneath rather than onto bare paper - otherwise the page reads as
   a white rectangle with a drawing sitting on it. This reaches the band up
   behind the full height of the ground. It is a pseudo-element on purpose:
   padding here would change .underneath's offsetHeight, which site.js
   divides by to drive the reveal. */
[data-strata] .underneath::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: var(--strata-h, 170px);
  background: var(--paper-2);
  pointer-events: none;
}
.underneath .foot { margin-top: 0; border-top: 1px solid var(--rule); }

.next-up {
  padding: clamp(1.75rem, 4vw, 2.75rem) var(--gut) clamp(1.25rem, 3vw, 2rem);
  transform: translateY(calc((1 - var(--reveal, 1)) * 2.5rem));
  opacity: calc(.25 + .75 * var(--reveal, 1));
}

/* Like turning pages: back on the left, all projects in the middle, forward
   on the right. On a phone, back and all share the top row and the next
   project sits beneath, still to the right. */
.next-up {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "prev all" "next next";
  gap: 1.5rem 1rem;
  align-items: center;
}
@media (min-width: 760px) {
  .next-up {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "prev all next";
    gap: 2rem;
  }
}

.pn-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  white-space: nowrap;
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--ink-60);
}
.pn-label .pn-no { margin-left: .8rem; color: var(--accent); font-variant-numeric: tabular-nums; }

/* back, on the left */
.pn-prev { grid-area: prev; justify-self: start; display: grid; gap: .45rem; }
.pn-prev .pn-label > span:first-child { display: inline-block; margin-right: .55em; transition: transform .45s var(--ease); }
@media (max-width: 759px) {
  .pn-prev .pn-no { display: none; }      /* keep the way back to one line */
}
.pn-prev-title {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--ink);
  transition: color .3s;
}
.pn-prev:hover .pn-prev-title { color: var(--accent); }
.pn-prev:hover .pn-label > span:first-child { transform: translateX(-.3em); }

/* every project, in the middle */
.pn-all {
  grid-area: all;
  justify-self: end;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule-2);
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--ink-70);
  transition: color .3s, border-color .3s;
}
.pn-all:hover { color: var(--ink); border-color: currentColor; }
@media (min-width: 760px) {
  .pn-all { justify-self: center; }
}

/* forward, on the right: text set to the right, the picture at the edge */
.pn-next {
  grid-area: next;
  justify-self: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(6.5rem, 14vw, 10rem);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: center;
  text-align: right;
}
@media (max-width: 759px) {
  .pn-next { justify-self: stretch; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
}
.pn-text { display: grid; gap: .4rem; justify-items: end; }
.pn-next .pn-label { justify-content: flex-end; }
.pn-img {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--paper);
}
.pn-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.pn-title {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  transition: color .3s;
}
.pn-title .arrow {
  display: inline-block;
  margin-left: .3em;
  font-size: .62em;
  font-weight: 400;
  vertical-align: .12em;
  color: var(--accent);
  transition: transform .45s var(--ease);
}
.pn-meta {
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--ink-60);
}
.pn-next:hover .pn-title { color: var(--accent); }
.pn-next:hover .pn-title .arrow { transform: translateX(.3em); }
.pn-next:hover .pn-img img { transform: scale(1.05); }

/* ==========================================================================
   IMAGE VIEWER
   ========================================================================== */

.lb {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
}
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb::backdrop { background: var(--paper); }

.lb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--bar-h);
  padding: 0 var(--gut);
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-micro);
  letter-spacing: .01em;
}
.lb-count { color: var(--ink-60); font-variant-numeric: tabular-nums; }
.lb-close {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .6rem 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.lb-close span { font-size: 1.5em; line-height: 1; }

.lb-stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(.75rem, 2.5vw, 2rem) clamp(3.25rem, 7vw, 6.5rem);
}
.lb-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity .35s ease;
}
.lb-img.ready { opacity: 1; }

.lb-prev,
.lb-next {
  position: absolute;
  top: 0; bottom: 0;
  width: clamp(3.25rem, 7vw, 6.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color .25s;
}
.lb-prev { left: 0; }
.lb-next { right: 0; }
.lb-prev:hover, .lb-next:hover { color: var(--accent); }
.lb.single .lb-prev, .lb.single .lb-next { display: none; }

.lb-cap {
  margin: 0;
  min-height: 3.6rem;
  padding: .9rem var(--gut) 1.4rem;
  font-size: var(--t-small);
  line-height: 1.5;
  text-align: center;
  color: var(--ink-60);
}

html.lb-open { overflow: hidden; }
html.cursor-on .lb { cursor: default; }
html.cursor-on .lb button { cursor: pointer; }

/* ==========================================================================
   ARCHIVE
   ========================================================================== */

.arc-head { display: grid; gap: clamp(1.75rem, 5vw, 3rem); }
@media (min-width: 900px) {
  .arc-head { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: end; }
}
.arc-intro {
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  max-width: 26em;
  font-size: var(--t-lead);
  line-height: 1.28;
  letter-spacing: -.015em;
}

/* the printed portfolio, as an object you can pick up */
.pdf-card {
  display: grid;
  grid-template-columns: clamp(6rem, 12vw, 8.5rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  transition: color .3s;
}
.pdf-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.pdf-card:hover .pc-t { color: var(--accent); }
.pdf-card:hover img { transform: rotate(-2deg) scale(1.03); }
.pc-body { display: grid; gap: .3rem; }
.pc-k { font-size: var(--t-micro); letter-spacing: .01em; color: var(--accent); }
.pc-t { font-size: 1.15rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.pc-m { font-size: var(--t-small); color: var(--ink-70); }

/* jump straight to a study */
.arc-index {
  list-style: none;
  margin: clamp(2.5rem, 6vw, 4rem) 0 clamp(1rem, 3vw, 2rem);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(.75rem, 1.6vw, 1.5rem);
}
.arc-index a { display: grid; gap: .55rem; }
.ai-img { display: block; aspect-ratio: 1; overflow: hidden; background: var(--paper-2); }
.ai-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.arc-index a:hover .ai-img img { transform: scale(1.05); }
.ai-n { font-size: var(--t-micro); letter-spacing: .01em; color: var(--accent); font-variant-numeric: tabular-nums; }
.ai-t { font-size: var(--t-small); line-height: 1.3; transition: color .3s; }
.arc-index a:hover .ai-t { color: var(--accent); }
@media (max-width: 899px) {
  .arc-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 559px) {        /* a strip you swipe along */
  .arc-index {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 42%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gut));
    padding: 0 var(--gut) .5rem;
    scroll-padding-inline: var(--gut);
    scrollbar-width: none;
  }
  .arc-index::-webkit-scrollbar { display: none; }
  .arc-index li { scroll-snap-align: start; }
}

.arc-section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 1rem;
  border-top: 1px solid var(--rule-2);
  font-size: var(--t-micro);
  font-weight: 400;
  letter-spacing: .01em;
  color: var(--ink-60);
}

/* ==========================================================================
   CHAIRS — the full set, hung loosely on one wall
   ========================================================================== */

.wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
  align-items: start;
  padding-top: clamp(1rem, 3vw, 2rem);
}
.wall figure:nth-child(3n + 1) { grid-column: 1 / -1; }
.wall figcaption { margin-top: .5rem; font-size: var(--t-micro); letter-spacing: .01em; }
@media (min-width: 760px) {
  .wall {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(1rem, 2.2vw, 2.25rem);
    row-gap: clamp(1.5rem, 3vw, 3rem);
  }
  .wall figure,
  .wall figure:nth-child(3n + 1) {
    grid-column: var(--c, auto / span 4);
    margin-top: var(--y, 0);
  }
}

/* ==========================================================================
   ABOUT
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}

.about-lede {
  max-width: 22em;
  margin: 0 0 1.5em;
  font-size: var(--t-lead);
  line-height: 1.28;
  letter-spacing: -.015em;
  text-wrap: pretty;
}
.about-body p { margin: 0 0 1.2em; max-width: 38em; }

.cv { display: grid; gap: 0; }
.cv-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: .85rem 0;
  border-top: 1px solid var(--rule);
  font-size: var(--t-small);
}
.cv-row .cv-when {
  padding-top: .15em;
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--ink-60);
  font-variant-numeric: tabular-nums;
}
.cv-row .cv-what { margin: 0; }
.cv-row .cv-where { color: var(--ink-60); }

.contact-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.contact-list li { border-top: 1px solid var(--rule); }
.contact-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 0;
  font-size: var(--t-small);
  transition: padding-left .3s var(--ease), color .3s;
}
.contact-list a:hover { padding-left: .6rem; color: var(--accent); }
.contact-list .c-key {
  font-size: var(--t-micro);
  letter-spacing: .01em;
  color: var(--ink-60);
}

.places { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; }
.places li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-small);
}
.places li span:last-child { color: var(--ink-60); }

/* ==========================================================================
   PATTERNS (page heads) and STRATA (feet of the pages about ground). Both
   are drawn by site.js, sit behind the content and are purely decorative;
   the page is complete without them.
   ========================================================================== */

[data-pattern] { position: relative; isolation: isolate; }
.pattern {
  position: absolute;
  top: 0;
  left: calc(-1 * var(--gut));
  width: calc(100% + 2 * var(--gut));
  height: 100%;               /* site.js sets the real height: down to the photograph's bottom edge */
  z-index: -1;
  pointer-events: none;
  /* the lines thin out and are gone just before the photograph ends */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 96%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 96%);
}
@media (min-width: 900px) {
}
@media (min-width: 900px) {
  .proj-head > .pattern { width: calc(100% + var(--gut)); }   /* head already runs to the right edge */
}
@media (prefers-reduced-motion: no-preference) {
  .pattern { animation: fade 1.2s ease both; }
}

.strata {
  margin-top: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
  line-height: 0;
}
.strata svg { display: block; width: 100%; height: auto; overflow: visible; }
.st-surface { fill: none; stroke: var(--draw); stroke-width: 1.25; }
.st-line    { fill: none; stroke: var(--draw-2); stroke-width: 1; }
.st-band    { fill: transparent; stroke: none; }
.st-dots         { fill: url(#st-dots); }
.st-dots-accent  { fill: url(#st-dots-a); }
.st-tint         { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.st-dot   { fill: var(--draw-2); }
.st-dot-a { fill: var(--accent); }
.st-layer { transition: transform 1s var(--ease); }


/* inside a split the column is half as wide, so the lede steps down */
.split .lede { font-size: clamp(1.25rem, 1.75vw, 1.6rem); }

/* facts sit on the survey like labels pinned to the sheet */
.proj-facts > div { background: color-mix(in srgb, var(--paper) 90%, transparent); }

/* a pattern on an element that already spans the page (the 404) */
main[data-pattern] > .pattern { left: 0; width: 100%; }

/* Home, wide screens: the list is just number and title. The kind and year
   of the project you're pointing at sit in the caption under its photograph. */
@media (min-width: 900px) {
  .idx-meta {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Home, wide screens: each photograph is shown whole — never cropped — sitting
   at the bottom left of its panel, beside the list, with its caption beneath. */
@media (min-width: 900px) {
  .home-main { padding-right: 0; }
  .stage {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    background: none;
  }
  .shots { position: relative; inset: auto; }
  .shot {
    background-color: var(--paper);
    background-size: contain;
    background-position: left bottom;
    background-repeat: no-repeat;
  }
  .stage-cap { position: static; max-width: 36rem; padding: .9rem 0 0; background: none; }
}

.about-portrait { margin-top: clamp(2rem, 5vw, 3rem); max-width: 26rem; }

/* "All projects" sits at the bottom left, under the way back */
.next-up {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "prev" "next" "all";
}
.pn-all { justify-self: start; align-self: end; }
@media (min-width: 760px) {
  .next-up {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "prev next" "all next";
    row-gap: 1.25rem;
  }
  .pn-all { justify-self: start; }
}

/* Project opening photographs: running off the right edge again, but in a box
   close to the photograph's own shape, so the crop only trims the edges.
   A page can set --hero-ratio for a tall photograph. */
@media (min-width: 900px) {
  .proj-hero {
    align-self: end;
    min-height: 0;
    aspect-ratio: var(--hero-ratio, 4 / 3);
    max-height: calc(100svh - var(--bar-h) - 4.5rem);   /* never taller than the screen */
  }
}
