/* ==========================================================================
   Priyanka Zemse — Studio
   A monochrome Swiss editorial system. One palette, one grid, one type
   family. Every section below shares the same surface; nothing switches to
   a different colour scheme halfway down the page.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surface — a single light warm grey carries the whole site. */
  --paper:      #f1f0ee;
  --paper-sunk: #e9e8e5;
  --paper-card: #ffffff;

  /* Ink */
  --ink:      #0b0b0a;
  --ink-80:   rgba(11, 11, 10, 0.80);
  --ink-60:   rgba(11, 11, 10, 0.60);
  --ink-45:   rgba(11, 11, 10, 0.45);
  --ink-28:   rgba(11, 11, 10, 0.28);
  --ink-12:   rgba(11, 11, 10, 0.12);
  --line:     rgba(11, 11, 10, 0.14);
  --line-soft:rgba(11, 11, 10, 0.08);

  /* The one accent. Defaults to ink so the palette stays monochrome; the
     customiser can shift it without any section going off-model. */
  --accent: #0b0b0a;

  /* Type */
  --sans: "Inter Tight", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Rhythm */
  --gut:    clamp(18px, 4vw, 56px);   /* page inline padding */
  --gap:    clamp(12px, 1.4vw, 22px); /* grid gap */
  --shell:  1520px;
  --section: clamp(72px, 11vh, 150px);

  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 68px;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.58;
  font-weight: 400;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; border: 0; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.94;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--ink); color: var(--paper); }

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

.pz-sr,
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Zero-size anchor aliases, so one section answers to several menu URLs. */
.pz-anchor {
  display: block;
  position: absolute;
  width: 0; height: 0;
  overflow: hidden;
}

.pz-skip {
  position: absolute;
  top: -60px; left: 12px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
}
.pz-skip:focus { top: 12px; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(48px, 7vh, 90px); }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* Type utilities ---------------------------------------------------------- */
.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.label--rule {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.label--rule::before {
  content: "";
  width: 46px;
  height: 1px;
  background: var(--ink-28);
}

.display {
  font-family: var(--sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  line-height: 0.84;
}

.display--xl { font-size: clamp(3.1rem, 12.2vw, 11.5rem); }
.display--lg { font-size: clamp(2.6rem, 8.6vw, 7.6rem); }
.display--md { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -0.045em; }

.title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 3.1rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-transform: none;
}

.lede {
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.62;
  color: var(--ink-80);
  max-width: 62ch;
}

.meta-sm {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-45);
}

/* Buttons ----------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 17px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  transition: transform 0.4s var(--ease), background 0.3s var(--ease-soft);
}
.pill:hover { transform: translateY(-2px); }
.pill svg { width: 12px; height: 12px; }

.pill--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.pill--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* An underline that wipes in from the left on hover. */
.ulink {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
.ulink::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.ulink:hover::after { transform: scaleX(1); transform-origin: left; }

/* Circular icon button (awards nav) --------------------------------------- */
.circ {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 0.35s var(--ease-soft), color 0.35s var(--ease-soft), border-color 0.35s var(--ease-soft);
}
.circ svg { width: 15px; height: 15px; }
.circ:hover:not(:disabled) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.circ:disabled { opacity: 0.3; cursor: default; }

/* --------------------------------------------------------------------------
   4. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding-inline: clamp(16px, 3vw, 34px);
  transition: transform 0.5s var(--ease), background 0.4s var(--ease-soft);
}
.nav.is-hidden { transform: translateY(-104%); }
.nav.is-stuck {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 1;
}
.brand i { font-style: normal; }
.brand img { max-height: 38px; width: auto; }

.nav__links-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.4vw, 22px);
}
.nav__links a {
  display: block;
  padding: 7px 12px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink);
  transition: opacity 0.3s var(--ease-soft), background 0.3s var(--ease-soft);
}
.nav__links a:hover { opacity: 0.55; }
.nav__links li.is-current > a {
  background: var(--ink);
  color: var(--paper);
}
.nav__links li.is-current > a:hover { opacity: 1; }

.nav__end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.burger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* A flex gap rather than grid rows: the two bars need a known distance
     between their centres for the close state to meet in the middle. */
  gap: 6px;
}
.burger span {
  display: block;
  width: 21px; height: 1.4px;
  background: var(--ink);
  transition: transform 0.45s var(--ease), opacity 0.3s;
}
.is-menu-open .burger span:first-child { transform: translateY(3.7px) rotate(45deg); }
.is-menu-open .burger span:last-child  { transform: translateY(-3.7px) rotate(-45deg); }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 88;
  background: var(--paper);
  padding: calc(var(--nav-h) + 28px) var(--gut) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s;
}
.is-menu-open .drawer { opacity: 1; visibility: visible; transform: none; }

.drawer__list a {
  display: block;
  padding: 10px 0;
  font-family: var(--sans);
  font-size: clamp(2.1rem, 10vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  line-height: 1;
}
.drawer__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-60);
}

@media (max-width: 900px) {
  .nav__links-wrap { display: none; }
  .burger { display: flex; }
  .nav__end .pill { display: none; }
}

/* Scroll progress hairline */
.progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 95;
  height: 2px;
  width: 0;
  background: var(--ink);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   5. Hero — the scroll-driven card flight

   The stacked layout below is the base case: it is what a phone, a
   reduced-motion preference and a visitor without JavaScript all get, and
   it needs nothing to be switched on. The flight is layered on top of it
   inside a single media query, so there is never a frame where the wrong
   layout is on screen.
   -------------------------------------------------------------------------- */
.hero { position: relative; }

.hero__stage {
  position: relative;
  padding-block: calc(var(--nav-h) + clamp(20px, 5vh, 46px)) clamp(24px, 4vw, 48px);
  /* Flex only so the name can be ordered above the cards here; the flight
     lifts all three out of flow anyway. */
  display: flex;
  flex-direction: column;
}

.hero__eyebrow { order: 1; display: block; padding-inline: var(--gut); margin-bottom: 14px; }

.hero__mark {
  order: 2;
  margin: 0;
  padding-inline: var(--gut);
  color: var(--ink);
}
.hero__mark span { display: block; }
.hero__mark span:nth-child(2) { margin-top: -0.06em; }

.flight {
  order: 3;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  padding-inline: var(--gut);
  margin-top: clamp(26px, 4vw, 44px);
}
.flight__card { margin: 0; }
.flight__card a { display: block; }
.flight__card img,
.flight__card video {
  width: 100%;
  height: auto;             /* natural aspect — nothing is cropped */
  background: var(--paper-sunk);
}
.flight__card figcaption {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 9px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: -0.01em;
}
.flight__card figcaption em { font-style: normal; color: var(--ink-45); }

.hero__now, .hero__hint { display: none; }

@media (max-width: 420px) {
  .flight { grid-template-columns: 1fr; }
}

/* ---- Flight mode ---------------------------------------------------- */
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {

  /* Scroll length comes from the card count, set inline by the template, so
     the section releases to the bio once the last project has passed. */
  .hero { height: calc(var(--slices, 6) * 100svh); }

  .hero__stage {
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: 560px;
    padding: 0;
    display: block;
    overflow: hidden;
    perspective: 1150px;
    /* The vanishing point sits up and to the right, which is what turns the
       run of cards into a receding diagonal rather than a head-on tunnel. */
    perspective-origin: 76% 26%;
  }

  .hero__eyebrow {
    position: absolute;
    left: var(--gut);
    top: calc(var(--nav-h) + clamp(16px, 4vh, 42px));
    z-index: 1;
    padding: 0;
    margin: 0;
  }

  .hero__mark {
    position: absolute;
    left: var(--gut);
    bottom: clamp(22px, 5vh, 58px);
    z-index: 1;
    padding: 0;
    pointer-events: none;
  }

  .flight {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    padding: 0;
    margin: 0;
    transform-style: preserve-3d;
    pointer-events: none;
  }

  .flight__card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(210px, 26vw, 420px);
    transform-style: preserve-3d;
    will-change: transform, opacity;
    pointer-events: auto;
    /* The script writes --x/--y/--z/--r/--o. With no script the first card
       is left at the origin at full opacity and the rest at zero, so the
       hero still reads as a composed frame. */
    transform:
      translate3d(-50%, -50%, 0)
      translate3d(var(--x, 0px), var(--y, 0px), var(--z, 0px))
      rotate(var(--r, 0deg));
    opacity: var(--o, 1);
  }

  .flight__card img,
  .flight__card video { box-shadow: 0 30px 70px -40px rgba(11, 11, 10, 0.5); }

  .flight__card figcaption {
    position: absolute;
    left: 0;
    top: calc(100% + 9px);
    margin: 0;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s var(--ease-soft);
  }
  .flight__card:hover figcaption { opacity: 1; }

  /* Read-out of whichever card is currently nearest the camera. */
  .hero__now {
    display: block;
    position: absolute;
    right: var(--gut);
    bottom: clamp(22px, 5vh, 58px);
    z-index: 3;
    text-align: right;
    max-width: min(46vw, 360px);
  }
  .hero__now-index {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    color: var(--ink-45);
  }
  .hero__now-title {
    font-family: var(--sans);
    font-size: clamp(1rem, 1.5vw, 1.35rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-top: 7px;
  }
  .hero__now-meta { font-size: 12px; color: var(--ink-45); margin-top: 3px; }

  .hero__hint {
    display: flex;
    position: absolute;
    left: 50%;
    bottom: clamp(22px, 5vh, 58px);
    transform: translateX(-50%);
    z-index: 3;
    align-items: center;
    gap: 9px;
    transition: opacity 0.4s var(--ease-soft);
  }
  .hero__hint i {
    display: block;
    width: 1px; height: 26px;
    background: linear-gradient(var(--ink-28), transparent);
    animation: hint 1.9s var(--ease-soft) infinite;
  }
  .hero.is-past .hero__hint { opacity: 0; }
}

@keyframes hint {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --------------------------------------------------------------------------
   6. Marquee
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: clamp(14px, 2vw, 22px);
  user-select: none;
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: slide 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  padding-right: clamp(24px, 4vw, 60px);
}
.marquee__group span {
  font-family: var(--sans);
  font-size: clamp(1.4rem, 3.4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.marquee__group i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-28);
  flex: none;
}
@keyframes slide { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* --------------------------------------------------------------------------
   7. Bio / statement
   -------------------------------------------------------------------------- */
.bio__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 84px);
  align-items: start;
}

.bio__figure {
  position: relative;
  /* Hug the image rather than stretching to the text column's height, so the
     caption stays pinned to the bottom-left of the photograph itself. */
  align-self: start;
}
.bio__figure img {
  width: 100%;
  height: auto;             /* uncropped portrait */
  background: var(--paper-sunk);
}
.bio__badge {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 9px 15px;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bio__body { padding-top: clamp(0px, 3vw, 42px); }
.bio__title {
  margin: 22px 0 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2rem, 4.1vw, 3.7rem);
  letter-spacing: -0.042em;
  line-height: 1.02;
}
.bio__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.bio__text { margin-top: 26px; }
.bio__text p + p { margin-top: 1.05em; }

.bio__more {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.bio__more svg { width: 12px; height: 12px; }

/* Stats strip */
.stats {
  margin-top: clamp(34px, 5vw, 64px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.stats__n {
  font-family: var(--sans);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}
.stats__l {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-45);
  line-height: 1.5;
}

/* Platform list */
.platforms {
  margin-top: clamp(30px, 4vw, 52px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.platforms span {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--ink-60);
}

@media (max-width: 860px) {
  .bio__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 22px; }
  .stats > div { padding-top: 18px; border-top: 1px solid var(--line-soft); }
  .stats > div:first-child { padding-top: 0; border-top: 0; }
}

/* --------------------------------------------------------------------------
   8. Awards & press
   -------------------------------------------------------------------------- */
.awards__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.awards__head h2 { margin-top: 18px; }

.awards__rule { margin-top: clamp(26px, 3.4vw, 46px); }

.awards__body {
  margin-top: clamp(34px, 4.6vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 60px);
  align-items: start;
}

.awards__side { display: flex; flex-direction: column; gap: 26px; }
.awards__nav { display: flex; align-items: center; gap: 12px; }
.awards__count {
  margin-left: 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-45);
  font-variant-numeric: tabular-nums;
}

.awards__stage { position: relative; min-height: 1px; }
.awards__quote {
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), visibility 0.55s;
}
.awards__quote.is-active { position: relative; opacity: 1; visibility: visible; transform: none; }
.awards__quote blockquote {
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.1vw, 2.9rem);
  letter-spacing: -0.038em;
  line-height: 1.1;
}
.awards__quote cite {
  display: block;
  margin-top: 24px;
  font-style: normal;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-45);
}

@media (max-width: 860px) {
  .awards__body { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   9. Project index — natural aspect ratios, never cropped
   -------------------------------------------------------------------------- */
.index__head {
  padding-top: calc(var(--nav-h) + clamp(24px, 6vh, 70px));
}
.index__head h1 { line-height: 0.82; }

/* The front page puts a link opposite the heading. */
.index__head--row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}
@media (max-width: 760px) {
  .index__head--row { grid-template-columns: 1fr; justify-items: start; }
}

/* Discipline pills, above the grid. Built from whatever terms exist. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(28px, 4vw, 46px);
}

.chip {
  padding: 9px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-60);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft),
    background 0.3s var(--ease-soft);
}
.chip:hover { color: var(--ink); border-color: var(--ink-28); }
.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* Load more */
.loadmore {
  display: flex;
  justify-content: center;
  margin-top: clamp(30px, 4vw, 52px);
}
.loadmore[hidden] { display: none; }
.loadmore__count {
  font-variant-numeric: tabular-nums;
  color: var(--ink-45);
}
.pill .loadmore__count { color: inherit; opacity: 0.55; }

/* Masonry: CSS columns keep every image at its own height so nothing has to
   be cropped to line up a row. */
/* Two layouts, same markup.

   The default is CSS multi-column: bulletproof, needs no script, and lets
   every tile keep its own height. Its one drawback is that it fills column
   by column, so the running order reads top-to-bottom rather than
   left-to-right. Where the script can measure the tiles it upgrades the
   container to `is-grid`, which is row-ordered masonry built on grid row
   spans — same uncropped result, correct reading order. If anything about
   that fails the column layout is what stays on screen. */
.masonry {
  --cols: 2;
  columns: var(--cols);
  column-gap: var(--gap);
  margin-top: clamp(28px, 4vw, 52px);
}
.chips + .masonry { margin-top: clamp(24px, 3vw, 40px); }
.masonry > * {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: var(--gap);
}

.masonry--3 { --cols: 3; }
.masonry--4 { --cols: 4; }
@media (max-width: 1180px) { .masonry--4 { --cols: 3; } }
@media (max-width: 900px)  { .masonry--3, .masonry--4 { --cols: 2; } }
@media (max-width: 760px)  { .masonry { --cols: 1; } }
@media (max-width: 620px)  { .masonry--3, .masonry--4 { --cols: 1; } }

.masonry.is-grid {
  columns: auto;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
  grid-auto-rows: 8px;
}
.masonry.is-grid > * {
  margin-bottom: 0;
  align-self: start;      /* content height, so the span maths is stable */
}

/* Project card */
.pcard { position: relative; display: block; }
.pcard__media {
  position: relative;
  overflow: hidden;
  background: var(--paper-sunk);
}
.pcard__media img,
.pcard__media video {
  width: 100%;
  height: auto;                 /* full frame, no crop */
  transition: transform 0.9s var(--ease), opacity 0.5s var(--ease-soft);
}
.pcard:hover .pcard__media img,
.pcard:hover .pcard__media video { transform: scale(1.028); }

.pcard__badge {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-100%);
  padding: 6px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
@media (max-width: 1080px) { .pcard__badge { transform: none; } }

.pcard__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}
.pcard__name {
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.032em;
  line-height: 1.12;
}
.pcard__year {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-45);
  flex: none;
  font-variant-numeric: tabular-nums;
}
.pcard__sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-45);
}

.pcard.is-out { display: none; }

.index__empty {
  padding-block: 90px;
  text-align: center;
  color: var(--ink-45);
}

/* --------------------------------------------------------------------------
   10. Single project
   -------------------------------------------------------------------------- */
.proj__head { padding-top: calc(var(--nav-h) + clamp(24px, 6vh, 70px)); }
.proj__title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.6vw, 4.6rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.proj__title span { display: block; font-weight: 400; color: var(--ink-45); }

/* Meta strip: four tiny label/value columns under a hairline. */
.proj__meta {
  margin-top: clamp(30px, 4vw, 56px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px var(--gap);
}
.proj__meta dt {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-45);
}
.proj__meta dd {
  margin: 7px 0 0;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: -0.015em;
  line-height: 1.6;
}
.proj__meta dd span { display: block; }
@media (max-width: 760px) { .proj__meta { grid-template-columns: repeat(2, 1fr); } }

.proj__intro {
  margin-top: clamp(30px, 4vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr);
  gap: var(--gap);
}
.proj__intro-body {
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--ink-80);
}
.proj__intro-body p + p { margin-top: 1em; }
@media (max-width: 860px) { .proj__intro { grid-template-columns: 1fr; } }

.proj__video {
  margin-top: clamp(30px, 4vw, 54px);
  position: relative;
  background: var(--paper-sunk);
}
.proj__video iframe,
.proj__video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.proj__shots { margin-top: clamp(30px, 4vw, 54px); }
.proj__shot { background: var(--paper-sunk); }
.proj__shot img,
.proj__shot video { width: 100%; height: auto; }   /* natural ratio */
.proj__shot figcaption { margin-top: 9px; font-size: 12px; color: var(--ink-45); }

.proj__quote {
  margin-top: clamp(48px, 7vw, 100px);
  text-align: center;
  max-width: 62ch;
  margin-inline: auto;
}
.proj__quote p {
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.75;
  color: var(--ink-80);
}
.proj__quote cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-45);
}

/* Prev / next: names pinned to the outer edges, like the reference. */
.pager {
  margin-top: clamp(56px, 8vw, 110px);
  padding-block: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.pager a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-size: clamp(1rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 1;
  transition: opacity 0.3s var(--ease-soft);
}
.pager a:hover { opacity: 0.55; }
.pager svg { width: 14px; height: 14px; flex: none; }
.pager__next { margin-left: auto; text-align: right; }

/* --------------------------------------------------------------------------
   11. Gallery page
   -------------------------------------------------------------------------- */
.gal__head {
  padding-top: calc(var(--nav-h) + clamp(24px, 6vh, 70px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: end;
}
.gal__count {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-45);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) { .gal__head { grid-template-columns: 1fr; } }

.gal__intro { margin-top: 22px; max-width: 58ch; }

.gshot {
  display: block;
  width: 100%;
  position: relative;
  background: var(--paper-sunk);
  cursor: zoom-in;
  overflow: hidden;
}
.gshot img,
.gshot video {
  width: 100%;
  height: auto;                  /* big and uncropped */
  transition: transform 0.9s var(--ease);
}
.gshot:hover img,
.gshot:hover video { transform: scale(1.02); }
.gshot__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 14px 12px;
  background: linear-gradient(transparent, rgba(11, 11, 10, 0.6));
  color: #fff;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: -0.01em;
  opacity: 0;
  transition: opacity 0.35s var(--ease-soft);
}
.gshot:hover .gshot__cap { opacity: 1; }

/* Lightbox */
.lbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 54px);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-soft), visibility 0.35s;
}
.lbox.is-open { opacity: 1; visibility: visible; }
.lbox img,
.lbox video {
  max-width: 100%;
  max-height: 84svh;
  width: auto;
  object-fit: contain;          /* whole frame, never cropped */
  box-shadow: 0 40px 90px -50px rgba(11, 11, 10, 0.6);
}
.lbox img[hidden], .lbox video[hidden] { display: none; }
.lbox__bar {
  position: absolute;
  inset: auto 0 clamp(14px, 3vw, 30px) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.lbox__close {
  position: absolute;
  top: clamp(14px, 3vw, 26px);
  right: clamp(14px, 3vw, 26px);
}
.lbox__idx {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-45);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   12. CTA + footer
   -------------------------------------------------------------------------- */
.cta { border-top: 1px solid var(--line); }
.cta__title {
  margin-top: 20px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.6vw, 5rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
  max-width: 16ch;
}
.cta__title em { font-style: italic; font-weight: 400; color: var(--accent); }
.cta__row {
  margin-top: clamp(28px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.foot {
  border-top: 1px solid var(--line);
  padding-top: clamp(38px, 5vw, 64px);
  overflow: hidden;
}
.foot__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px var(--gap);
}
.foot__col .label { display: block; margin-bottom: 14px; }
.foot__col a,
.foot__col span {
  display: block;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: -0.02em;
  line-height: 1.85;
  color: var(--ink-80);
}
.foot__col a:hover { color: var(--ink); }
@media (max-width: 760px) { .foot__grid { grid-template-columns: repeat(2, 1fr); } }

/* The oversized wordmark that closes the page. */
.foot__mark {
  margin-top: clamp(40px, 6vw, 80px);
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2.6rem, 12.4vw, 11rem);
  letter-spacing: -0.06em;
  line-height: 0.82;
  text-transform: uppercase;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.foot__legal {
  margin-top: clamp(22px, 3vw, 34px);
  padding-block: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-45);
}

/* --------------------------------------------------------------------------
   13. Editorial pages, posts, comments, 404
   -------------------------------------------------------------------------- */
.page__head { padding-top: calc(var(--nav-h) + clamp(24px, 6vh, 70px)); }
.entry {
  max-width: 74ch;
  margin-top: clamp(28px, 4vw, 48px);
  font-size: 1.02rem;
  line-height: 1.72;
}
.entry h2 { margin: 1.8em 0 0.5em; font-size: 1.7rem; letter-spacing: -0.03em; }
.entry h3 { margin: 1.6em 0 0.5em; font-size: 1.3rem; letter-spacing: -0.025em; }
.entry ul, .entry ol { margin: 0 0 1.1em 1.2em; }
.entry ul { list-style: disc; }
.entry ol { list-style: decimal; }
.entry li { margin-bottom: 0.35em; }
.entry a { text-decoration: underline; text-underline-offset: 3px; }
.entry blockquote {
  margin: 1.6em 0;
  padding-left: 22px;
  border-left: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  line-height: 1.3;
}
.entry img { margin-block: 1.4em; }
.entry code, .entry pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--paper-sunk);
}
.entry code { padding: 2px 5px; }
.entry pre { padding: 16px; overflow-x: auto; }
.entry table { width: 100%; border-collapse: collapse; margin-block: 1.4em; }
.entry th, .entry td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }

.postlist { display: grid; gap: 1px; background: var(--line); margin-top: clamp(28px, 4vw, 48px); }
.postlist article { background: var(--paper); padding: 24px 0; }
.postlist h2 { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -0.035em; }
.postlist time { display: block; margin-bottom: 8px; }

.pagination {
  margin-top: 44px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 14px;
}
.pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 38px; height: 38px;
  padding-inline: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.comments { max-width: 74ch; margin-top: clamp(40px, 6vw, 72px); }
.comments ol { list-style: none; }
.comments .comment-body { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comments input[type="text"],
.comments input[type="email"],
.comments input[type="url"],
.comments textarea,
.searchform input[type="search"] {
  width: 100%;
  padding: 11px 14px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 2px;
  font: inherit;
  color: inherit;
}
.comments .submit,
.searchform button {
  margin-top: 12px;
  padding: 11px 22px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.searchform { display: flex; gap: 8px; max-width: 460px; }
.searchform button { margin-top: 0; }

.e404 {
  min-height: 74svh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 20px;
}

/* --------------------------------------------------------------------------
   14. Reveal on scroll
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .pcard__media img, .pcard__media video, .gshot img, .gshot video { transition: none; }
  .hero__hint i { animation: none; }
  .chip, .pill { transition: none; }
}

/* A looping video is decoration, so it carries no controls and sits on the
   same placeholder as an image while it loads. */
video.pzs-loop {
  display: block;
  background: var(--paper-sunk);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   15. WordPress admin bar offset
   -------------------------------------------------------------------------- */
body.admin-bar .nav { top: 32px; }
body.admin-bar .hero__stage { height: calc(100svh - 32px); }
body.admin-bar .drawer { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .nav { top: 46px; }
  body.admin-bar .hero__stage { height: calc(100svh - 46px); }
  body.admin-bar .drawer { top: 46px; }
}
