:root {
  --ink: #111;
  --muted: #3d3d3a;
  --paper: #ffffff;
  --gutter: clamp(16px, 3vw, 48px);
  --small: clamp(13px, 1.05vw, 16px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
}

/* tall track: scrolling through it drives the camera */
.track {
  position: relative;
  height: 165vh; /* the climb takes its time (the steps get most of the scroll) */
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  animation: appear 2s ease .4s backwards;
}

/* ---------- corners ---------- */
.bar {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: var(--small);
  font-weight: 500;
  letter-spacing: -0.01em;
  animation: appear 1.4s ease .6s backwards;
}
.bar.top { top: clamp(16px, 3.5vh, 36px); will-change: opacity; }
/* above the light overlay, so the level tag is still there when you step through */
.bar.bottom { bottom: clamp(16px, 3.5vh, 36px); align-items: flex-end; justify-content: flex-end; z-index: 4; }

.bar a, .bar button {
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.bar a:hover, .bar button:hover { text-decoration: underline; text-underline-offset: 3px; }
.bar a:focus-visible, .bar button:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.nav { display: flex; gap: clamp(16px, 2vw, 32px); }

.contact { display: flex; align-items: center; gap: 14px; }
.mail { display: inline-flex; align-items: center; gap: 8px; }
.contact svg { display: block; flex: none; }
.sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink); opacity: .45; flex: none; }
.icon { display: inline-flex; opacity: .85; }
.icon:hover { opacity: 1; }

.where { will-change: opacity; }
.where p { margin: 0; display: flex; align-items: center; gap: 8px; }
.where p + p { margin-top: 4px; }
.muted { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3c9a5f;
  box-shadow: 0 0 0 3px rgba(60, 154, 95, .15);
}

/* ---------- title block, like the annotations at the foot of a drawing sheet ----------
   open, not boxed: no fill and no outline, so the stair's shadow runs on behind it */
.titleblock {
  margin: 0;
  display: flex;
  align-items: flex-end;
  font-size: 12px;
  line-height: 1.2;
}
.titleblock > div {
  padding: 0 14px;
  border-left: 1px solid rgba(17, 17, 17, .25);
}
.titleblock > div:first-child { border-left: 0; padding-left: 0; }
.titleblock > div:last-child { padding-right: 0; }
.north dd { display: flex; align-items: center; gap: 10px; }
.north .heading { font-size: 11px; line-height: 1.35; font-weight: 400; }
#needleArrow { transform: rotate(-70deg); transition: transform .2s linear; }
.titleblock dt {
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 3px;
}
.titleblock dd { margin: 0; font-weight: 500; }
.titleblock svg { display: block; }

/* level datum: triangle on a line, value beside it; stays while you climb */
.level {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.level svg { margin-bottom: 1px; }

/* ---------- cursor: a small ring that follows, swells over links and the steps ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.custom-cursor, html.custom-cursor * { cursor: none !important; }
  /* the About panel sits above everything, so it keeps the normal cursor */
  html.custom-cursor .about, html.custom-cursor .about * { cursor: auto !important; }
  html.custom-cursor .about .close { cursor: pointer !important; }
  .cursor {
    display: grid;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 1px solid #fff;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    place-items: center;
    opacity: 0;
    transition: width .25s ease, height .25s ease, margin .25s ease, background-color .25s ease, opacity .3s ease;
    will-change: transform;
  }
  .cursor.on { opacity: 1; }
  /* over a link: a larger hollow ring */
  .cursor.link { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  /* over a step: a soft grey filled disc */
  .cursor.step {
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    border-color: transparent;
    background: rgba(255, 255, 255, .14);
  }
  /* over a project window or a photo: a larger ring that says what a click does */
  .cursor.open { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
  .cursor.open::after { content: "Open"; color: #fff; font: 500 12px "Space Grotesk", sans-serif; letter-spacing: .02em; }
  html.custom-cursor .lightbox, html.custom-cursor .lightbox * { cursor: auto !important; }
}

/* ---------- name ---------- */
/* a little above centre; main.js sets the exact font-size */
.hero {
  position: absolute;
  left: 0;
  right: 0;
  top: 41%;
  transform: translateY(-50%);
  text-align: center;
  pointer-events: none;
  will-change: opacity, transform;
}
.name {
  margin: 0;
  font-weight: 500;
  font-size: 12vw;
  line-height: .9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: appear 1.4s ease backwards;
}
/* table: own line, but shrink-wrapped so main.js can measure each word */
.name.stacked span { display: table; margin: 0 auto; }

.line {
  margin: clamp(14px, 2.2vh, 26px) auto 0;
  padding: 0 var(--gutter);
  max-width: 40em;
  text-wrap: balance;
  font-size: clamp(15px, 1.35vw, 21px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
  animation: appear 1.4s ease .9s backwards;
}


/* the invitation to go on: right under the name, clear and dark */
.cue {
  margin: clamp(18px, 3.4vh, 34px) auto 0; display: inline-flex; align-items: center; gap: .75em; padding: .85em 1.5em; border: 1.5px solid #1c1c1e; border-radius: 999px;
  background: transparent; color: #1c1c1e; font: 500 clamp(13px, 1.05vw, 17px)/1 "Space Grotesk", sans-serif; letter-spacing: .14em; text-transform: uppercase;
  pointer-events: none; cursor: default;
  animation: appear 1.4s ease 1.2s backwards;
}
/* a hint, not a button: nothing happens on hover or click */
/* the small parrot in the home screen's corner: fly the whole way again (guide.js) */
.fly-again {
  /* fixed and above the sections that overlap the first screen, so a click always reaches it */
  position: fixed; left: var(--gutter); bottom: clamp(16px, 3.5vh, 36px); z-index: 60;
  display: inline-flex; align-items: center; gap: .55em; height: 46px; padding: 0 1.1em 0 .7em; border: 1.5px solid #1c1c1e; border-radius: 999px;
  background: rgba(255,255,255,.88); color: #1c1c1e; font: 500 13px/1 "Space Grotesk", sans-serif; letter-spacing: .02em;
  cursor: pointer; transition: scale .25s ease, background-color .25s ease, color .25s ease, opacity .3s ease;
}
.fly-again svg { flex: none; transition: rotate .4s ease; }
.fly-again:hover { scale: 1.04; background: #fff; }
.fly-again:hover svg { rotate: -12deg; }
.fly-again:focus-visible { outline: 2px solid #1c1c1e; outline-offset: 3px; }
/* on: filled dark, the parrot bobbing, the words say what is happening */
.fly-again.riding { background: #1c1c1e; color: #fff; }
.fly-again.riding svg { animation: fly-bob .7s ease-in-out infinite alternate; }
/* only on the first screen: it fades away as soon as you move on */
.fly-again.gone { opacity: 0; pointer-events: none; }
@keyframes fly-bob { from { translate: 0 1.5px; rotate: -6deg; } to { translate: 0 -1.5px; rotate: 4deg; } }
@media (prefers-reduced-motion: reduce) { .fly-again.riding svg { animation: none; } }
.fly-again[hidden] { display: none; }
.cue-touch { display: none; }
@media (hover: none) { .cue-mouse { display: none; } .cue-touch { display: inline; } }
.cue-arrow { display: inline-block; animation: cue-nudge 1.8s ease-in-out infinite; }
@keyframes cue-nudge { 0%, 100% { translate: 0 -2px; } 50% { translate: 0 3px; } }
@media (prefers-reduced-motion: reduce) { .cue-arrow { animation: none; } }

/* the guide parrot (guide.js): flies with you from the stairs to the chhatri */
.guide { position: fixed; left: 0; top: 0; z-index: 45; width: clamp(64px, 6.5vw, 96px); margin: calc(clamp(64px, 6.5vw, 96px) * -0.3) 0 0 calc(clamp(64px, 6.5vw, 96px) * -0.5); pointer-events: none; opacity: 0; will-change: translate, scale, opacity; }
.guide svg { display: block; width: 100%; overflow: visible; filter: drop-shadow(0 6px 8px rgba(0,0,0,.18)); }
/* Flight from behind, after real parrots: each wing is an arm and a hand. Upstroke: the arms rise into a deep V
   and the hands fold in at the wrist. Downstroke (quicker, stronger): the wings sweep wide and low, the finger
   feathers trailing. The tail fan opens on each downstroke and steers from side to side; the body lifts with
   every downstroke. One beat drives them all, so they stay together. (The right wing is the left one mirrored.) */
.guide .arm, .guide .hand, .guide .tail, .guide .fan, .guide .body, .guide .head { transform-box: view-box; }
.guide .arm { transform-origin: 55px 36px; }
.guide .hand { transform-origin: 33px 31px; }
.guide .fan { transform-origin: 60px 54px; scale: 1.1 1; }
.guide .tail { transform-origin: 60px 54px; }
.guide .body { transform-origin: 60px 42px; }
.guide .head { transform-origin: 60px 28px; }
/* the wingbeat, the tail, the head and the lean are all set frame by frame in guide.js, from one beat and from where the bird is heading */

/* the slit's light: as you step into it, warm light fills the screen from the centre line out */
.light {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #ffc24a 0%, #ffd35c 25%, #ffe580 42%, #fff9d6 50%, #ffe580 58%, #ffd35c 75%, #ffc24a 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

/* ---------- about ---------- */
.about {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  padding: clamp(28px, 5vw, 56px);
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55;
}
.about::backdrop { background: rgba(255, 255, 255, .7); backdrop-filter: blur(6px); }
.about[open] { animation: rise .5s cubic-bezier(.2, .7, .2, 1); }
.about h2 {
  margin: 0 0 1em;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  text-transform: uppercase;
}
.about p { margin: 0 0 1em; }
.about p:last-of-type { margin-bottom: 0; }
.close {
  position: absolute;
  top: clamp(16px, 2.5vw, 28px);
  right: clamp(16px, 2.5vw, 28px);
  font: 500 14px "Space Grotesk", sans-serif;
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: var(--ink);
}
.close:hover { text-decoration: underline; text-underline-offset: 3px; }

@keyframes appear {
  from { opacity: 0; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
}

@media (max-width: 600px) {
  /* phones: the address collapses to its icon so Work and About still fit */
  .mail .addr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bar.bottom { gap: 10px; }
  .titleblock > div { padding: 0 10px; }
  .north .heading { display: none; } /* too long for a phone row; the turning arrow carries it */
}

@media (prefers-reduced-motion: reduce) {
  .scene, .name, .line, .bar, .about[open] { animation: none; }
}

/* =====================================================================
   The journey after the landing
   Palette stays small: white, ink, a soft stone, and the warm light from the slit.
   Colour arrives only where the brief asks for it (tinted glass, the parrots).
   ===================================================================== */
:root {
  --stone: #e9e1d3;
  --wall: #f4efe7;
  --gold: #ffd35c;
  --glow: #fff3c9;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.label {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* floating bar */
.float {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: 9px 10px 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(17,17,17,.06), 0 8px 30px rgba(17,17,17,.08);
  font-size: 14px;
  font-weight: 500;
  transform: translate(-50%, -140%);
  opacity: 0;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .4s ease;
}
.float.on { transform: translate(-50%, 0); opacity: 1; }
.float a { color: var(--ink); text-decoration: none; }
.float .links { display: flex; gap: 2px; }
.float .links a, .float .links button { padding: 5px 10px; border-radius: 999px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.float .links a:hover, .float .links button:hover { background: rgba(17,17,17,.06); }
.float .mark { text-transform: uppercase; letter-spacing: -.02em; white-space: nowrap; }
.float .home { display: grid; place-items: center; width: 34px; height: 34px; margin: -4px 0; border-radius: 50%; transition: background-color .2s; }
.float .home:hover { background: rgba(17,17,17,.06); }
/* where you are: the current item is filled */
.float .links .current, .float .links .current:hover, .float .home.current, .float .home.current:hover { background: #1c1c1e; color: #fff; }
.float .home svg { display: block; }
@media (max-width: 600px) {
  .float { width: calc(100vw - 24px); justify-content: space-between; padding-left: 14px; font-size: 13px; }
  .float .mark { display: grid; }
  .float .links { width: 100%; justify-content: space-between; }
}

/* pinned chapters */
.chapter { position: relative; }
.chapter .pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* ---------- 02 · passage ---------- */
.passage { height: 170vh; }
.passage .pin {
  /* starts exactly where the landing ends: the slit's light filling the screen */
  background:
    radial-gradient(ellipse 45% 55% at 50% 52%, #fffbe8 0%, #fff0b8 35%, rgba(255,232,150,0) 75%),
    linear-gradient(to right, #ffc24a 0%, #ffd35c 25%, #ffe580 42%, #fff9d6 50%, #ffe580 58%, #ffd35c 75%, #ffc24a 100%);
}
.tunnelcanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the landing ends in the slit's light; the arches come out of it */
.from-gold {
  position: absolute; inset: 0; z-index: 100; pointer-events: none;
  background: linear-gradient(to right, #ffc24a 0%, #ffd35c 25%, #ffe580 42%, #fff9d6 50%, #ffe580 58%, #ffd35c 75%, #ffc24a 100%);
  opacity: calc(1 - min(1, var(--p, 0) * 9));
}
.tunnel svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  will-change: transform;
}
.passage .caption {
  position: absolute;
  left: 0; right: 0;
  bottom: 12vh;
  z-index: 200;
  text-align: center;
  padding: 0 var(--gutter);
  opacity: calc(min(1, max(0, (var(--p, 0) - .12) * 6)) * min(1, max(0, (.7 - var(--p, 0)) * 6)));
}
.say {
  margin: 0;
  font-size: clamp(36px, 6.4vw, 104px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.05em;
  text-transform: uppercase;
}
.sub { margin: 14px 0 0; font-size: clamp(15px, 1.35vw, 20px); color: var(--muted); }
/* the light dims as you leave the passage, into the dark of the threshold */
.dusk {
  position: absolute; inset: 0; z-index: 300; pointer-events: none;
  background: linear-gradient(#cfe6f6, #e8f2f8 70%, #f6f3ec);
  opacity: calc(min(1, max(0, (var(--p, 0) - .74) * 4)));
}

/* ---------- 03 · selected works: the floating chhatri ---------- */
/* the screen is divided in two: the chhatri in the left third, four projects in the sky on the right */
/* pulled up over the landing's last screen, so you go straight from the slit's light into the arches */
.pavilion { height: 635vh; margin-top: -100vh; margin-top: -100svh; } /* a slow flight through the arches and clouds, then four screens of work */
.pavilion .pin { visibility: hidden; }
.pavilion .pin { background: #ffd98a; }
.pavilion .tunnelcanvas { z-index: 1; }
.pavilion .from-gold { z-index: 2; opacity: 1; }
/* the heading and projects arrive with the chhatri, as you come out into the sky */
.sel-head, .pav-grid, .pav-foot { z-index: 3; opacity: var(--e, 0); }
.pav-grid { transform: translateY(calc((1 - var(--e, 0)) * 30px)); }
.skycanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* you arrive from the passage's pale light, which clears into the sky */
.from-light {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(#cfe6f6, #e8f2f8 70%, #f6f3ec);
  opacity: calc(1 - min(1, var(--p, 0) * 12));
}
.sel-head {
  position: absolute;
  left: var(--gutter);
  top: clamp(72px, 10vh, 100px);
  width: 36vw;
  color: #0e1b2a;
}
.sel-head h2 {
  margin: 0;
  font-size: clamp(36px, 4.4vw, 72px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1;
}
.sel-sub { display: block; margin: 10px 0 0; max-width: 38ch; min-height: 2.8em; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.4; color: rgba(14,27,42,.72); transition: opacity .35s ease; }

.pav-grid {
  position: absolute;
  left: 42vw;
  right: var(--gutter);
  top: clamp(72px, 10vh, 100px);
  bottom: clamp(60px, 9vh, 90px);
}
.pv-page {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: clamp(14px, 1.6vw, 26px);
  pointer-events: none;
}
.pv-page.on { pointer-events: auto; }
/* a set with fewer than four sits as one row, centred */
.pv-page.few { grid-template-rows: 1fr; align-content: center; height: 54%; top: 23%; bottom: auto; }
.pv {
  min-height: 0;
  display: flex; flex-direction: column;
  padding: 10px 10px 12px;
  border-radius: 16px;
  background: rgba(250,251,253,.93);
  box-shadow: 0 24px 50px rgba(18,60,105,.18), 0 1px 0 rgba(255,255,255,.7) inset;
  color: #111;
  text-decoration: none;
  /* each card floats in a moment after the one before */
  opacity: 0;
  transform: translateY(26px) scale(.98);
  transition: opacity .55s ease calc(var(--k) * 70ms), transform .8s cubic-bezier(.2,.7,.2,1) calc(var(--k) * 70ms), box-shadow .4s ease;
}
.pv-page.on .pv { opacity: 1; transform: none; }
.pv:hover { box-shadow: 0 30px 60px rgba(18,60,105,.26), 0 1px 0 rgba(255,255,255,.7) inset; }
.pv-page:not(.on) .pv { transition-delay: 0s; }
.pv-thumb {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 9px;
  overflow: hidden;
  background: var(--room);
}
.pv-thumb .art { position: absolute; inset: 0; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.pv:hover .pv-thumb .art { transform: scale(1.04); }
.pv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; padding: 0 4px; }
.pv-title { font-size: clamp(15px, 1.3vw, 21px); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-no { color: #9a9a9a; margin-right: 8px; font-variant-numeric: tabular-nums; }
.pv-year { font-size: clamp(13px, 1.1vw, 17px); color: #8a8a8a; font-variant-numeric: tabular-nums; }
.pv-sub { margin-top: 4px; padding: 0 4px; font-size: clamp(12px, 1vw, 15px); color: #8a8a8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pav-foot {
  transition: opacity .5s ease;
  position: absolute;
  left: 42vw;
  right: var(--gutter);
  bottom: clamp(22px, 4vh, 38px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  color: #0e1b2a; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.pav-dots { display: flex; gap: 10px; }
.pav-dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(14,27,42,.6); background: transparent; cursor: pointer;
  transition: background .3s ease, transform .3s ease;
}
.pav-dots button.on { background: #0e1b2a; transform: scale(1.25); }
@media (max-aspect-ratio: 21/20) {
  .sel-head { width: auto; right: var(--gutter); top: clamp(70px, 9vh, 90px); }
  .sel-head h2 { font-size: clamp(30px, 8vw, 48px); }
  .pav-grid { left: var(--gutter); top: 58%; bottom: clamp(50px, 7vh, 70px); }
  .pv-page { gap: 10px; }
  .pv { padding: 6px 6px 8px; border-radius: 12px; }
  .pv-row { margin-top: 6px; }
  .pv-title { font-size: 13px; }
  .pv-year, .pv-sub { display: none; }
  .pav-foot { left: var(--gutter); bottom: 16px; }
}

/* ---------- 05 · work: a wall of arched windows ---------- */
.work {
  position: relative;
  background: var(--wall);
  padding: clamp(80px, 14vh, 160px) var(--gutter) clamp(80px, 12vh, 140px);
}
.work-head {
  max-width: 1240px; margin: 0 auto clamp(48px, 8vh, 96px);
  opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.work-head.in { opacity: 1; transform: none; }
.work-head h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 80px);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: .95;
  max-width: 14ch;
}
.facade {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr .3fr 1fr;
  column-gap: clamp(24px, 4vw, 72px);
  row-gap: clamp(56px, 9vh, 110px);
  align-items: start;
}
.row-title {
  grid-column: 1 / -1;
  margin: clamp(10px, 3vh, 40px) 0 -20px;
  display: flex; align-items: center; gap: 18px;
  font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
}
.row-title::after { content: ""; flex: 1; height: 1px; background: rgba(17,17,17,.18); }

.window { display: block; color: inherit; text-decoration: none; opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.window.in { opacity: 1; transform: none; }
.window .pane {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 1000px 1000px 0 0;
  overflow: hidden;
  background: var(--room, #fff);
  /* a deep reveal, as if cut into the wall */
  box-shadow: inset 0 18px 34px rgba(60, 45, 20, .16), inset 0 -2px 0 rgba(17,17,17,.05);
  isolation: isolate;
}
.window .pane::after { /* the sill */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; z-index: 3;
  background: linear-gradient(rgba(17,17,17,.06), rgba(17,17,17,.12));
}
.window .art { position: absolute; inset: 0; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.window .sheen {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(255,236,170,.55), rgba(255,236,170,0));
  opacity: 0;
  transition: opacity .6s ease;
}
a.window:hover .art, a.window:focus-visible .art { transform: scale(1.045); }
a.window:hover .sheen, a.window:focus-visible .sheen { opacity: 1; }
a.window:focus-visible { outline: none; }
a.window:focus-visible .pane { outline: 2px solid var(--ink); outline-offset: 6px; }
.window .cap { display: block; padding-top: 22px; }
.window .no { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.window .ttl { display: block; margin-top: 8px; font-size: clamp(26px, 2.6vw, 40px); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.window .ln { display: block; margin-top: 10px; max-width: 34ch; font-size: clamp(15px, 1.1vw, 17px); line-height: 1.45; color: var(--muted); }
/* a window with nothing in it: just light */
.window.empty { align-self: center; margin-top: -60px; }
.window.empty .pane {
  aspect-ratio: 1 / 2.4;
  background: linear-gradient(#fffdf4, #fff3c9 70%, #ffe7a3);
  box-shadow: inset 0 14px 24px rgba(60, 45, 20, .12);
}
@media (max-width: 760px) {
  .facade { grid-template-columns: 1fr; }
  .window.empty { display: none; }
}

/* project art (also used large on each project's page) */
.art svg, .art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.art-map { background: #fbf0ec; }
.art-map .pulse { transform-origin: 170px 215px; animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(.4); opacity: .5; } to { transform: scale(2.2); opacity: 0; } }
.art-friends { background: #fdf3ea; }
.art-calm { background: #f1f4fa; }
.art-calm .now { animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.art-name {
  background: radial-gradient(ellipse at 30% 10%, #2a3140, #0d0f14 65%);
  display: grid; place-items: center;
}
.art-name .glass {
  width: 74%;
  padding: 22px 20px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 20px 40px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.25);
  color: #f2f4f8;
  display: grid; gap: 10px;
  font-size: clamp(11px, 1vw, 14px);
}
.art-name .nm { font-size: clamp(22px, 2.4vw, 34px); font-weight: 500; letter-spacing: -.03em; }
.art-name .tld { color: #9aa3b5; }
.art-name .ok { display: flex; align-items: center; gap: 8px; color: #8fe0a8; }
.art-name .ok i { width: 7px; height: 7px; border-radius: 50%; background: #5fd38a; box-shadow: 0 0 10px #5fd38a; }
.art-name .alt { color: #9aa3b5; display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.08); padding-top: 8px; }
.art-name .alt b { font-weight: 500; color: #e88f8f; } .art-name .alt b.y { color: #8fe0a8; }
.art-kaleido { background: #1b1430; overflow: hidden; }
.art-kaleido .k {
  position: absolute; left: 50%; top: 50%; width: 170%; aspect-ratio: 1; margin: -85% 0 0 -85%;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.art-kaleido .k1 { background: repeating-conic-gradient(from 0deg, #ff6fa8 0 10deg, transparent 10deg 30deg); animation: spin 40s linear infinite; opacity: .8; }
.art-kaleido .k2 { background: repeating-conic-gradient(from 15deg, #5ad1e6 0 7deg, transparent 7deg 30deg); animation: spin 28s linear infinite reverse; opacity: .8; }
.art-kaleido .k3 { background: radial-gradient(circle, #ffe08a 0 6%, transparent 6.5% 14%, #b78cff 14.5% 18%, transparent 18.5% 30%, #ffe08a 30.5% 31.5%, transparent 32%); animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 06 · about: light through tinted glass ---------- */
.glassroom {
  position: relative;
  overflow: hidden;
  background: #fbf9f6;
  padding: clamp(80px, 14vh, 160px) var(--gutter);
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.tints { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; }
.tints i {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(60px); opacity: .5;
  animation: drift 26s ease-in-out infinite alternate;
}
.tints i:nth-child(1) { background: #8fd0cc; left: -10vmax; top: 4%; }
.tints i:nth-child(2) { background: #f3b2c0; right: -12vmax; top: 30%; animation-duration: 32s; }
.tints i:nth-child(3) { background: #ffe08a; left: 30%; bottom: -18vmax; animation-duration: 38s; }
@keyframes drift { to { transform: translate(8vmax, -6vmax) scale(1.15); } }
.glass-inner { position: relative; max-width: 1240px; margin: 0 auto; }
.me {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) 1.2fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
  opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.me.in, .lens.in { opacity: 1; transform: none; }
.portrait {
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 1000px 1000px 0 0;
  overflow: hidden;
  background: linear-gradient(#fffdf4, #ffeeb8);
  position: relative;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.missing img { visibility: hidden; }
.portrait.missing::after {
  content: attr(data-ph);
  position: absolute; inset: auto 0 18px; text-align: center; font-size: 12px; color: var(--muted);
}
.me-text h2 { margin: 0 0 24px; font-size: clamp(34px, 4.6vw, 72px); font-weight: 500; letter-spacing: -.05em; line-height: .95; }
.me-text p { margin: 0 0 1em; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; max-width: 38em; }
.sofar { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid rgba(17,17,17,.18); max-width: 38em; }
.sofar li { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(17,17,17,.18); font-size: 15px; }
.sofar .yr { font-weight: 500; font-variant-numeric: tabular-nums; }
.todo-inline { color: #9a6a00; font-style: italic; }
.lens { margin-top: clamp(80px, 14vh, 160px); opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); }
.lens h3 { margin: 0; font-size: clamp(30px, 3.6vw, 56px); font-weight: 500; letter-spacing: -.05em; }
.photos {
  margin-top: 36px;
  columns: 3 260px;
  column-gap: 18px;
}
.photo {
  display: block; width: 100%; margin: 0 0 18px; padding: 0; border: 0; background: rgba(255,255,255,.6);
  break-inside: avoid; position: relative; cursor: pointer; overflow: hidden; font: inherit;
}
.photo img { width: 100%; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.photo:hover img { transform: scale(1.03); }
.photo .ph { display: none; }
.photo.missing { aspect-ratio: 4 / 5; cursor: default; border: 1px dashed rgba(17,17,17,.22); }
.photo.missing:nth-child(3n+2) { aspect-ratio: 1; }
.photo.missing:nth-child(4n+3) { aspect-ratio: 3 / 4.6; }
.photo.missing .ph { display: block; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); }
.photo.missing img { position: absolute; }
@media (max-width: 760px) {
  .me { grid-template-columns: 1fr; }
  .portrait { max-width: 300px; }
}
.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(255,255,255,.92); backdrop-filter: blur(6px); }
.lightbox img { max-width: 92vw; max-height: 84vh; display: block; }
.lightbox p { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.lightbox .close { position: fixed; top: 20px; right: 24px; }

/* ---------- 07 · out into the open ---------- */
.open { height: 280vh; }
.open .pin { background: #fff; }
.lone-arch {
  position: absolute;
  left: 50%; top: 50%;
  width: clamp(140px, 16vw, 240px);
  aspect-ratio: 1 / 1.5;
  transform: translate(-50%, -50%) scale(calc(1 - var(--p, 0) * .25));
  border-radius: 1000px 1000px 0 0;
  background: linear-gradient(#fff9e3, #ffe9a8 70%, #ffdb75);
  box-shadow: 0 0 120px rgba(255, 214, 110, .45);
  opacity: calc(1 - min(1, max(0, (var(--p, 0) - .62) * 3)));
}
.flock { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.end {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-content: center; text-align: center; padding: 0 var(--gutter);
  opacity: calc(min(1, max(0, (var(--p, 0) - .62) * 4)));
  pointer-events: none;
}
.end.live { pointer-events: auto; }
.end h2 { margin: 0; font-size: clamp(44px, 8vw, 140px); font-weight: 500; letter-spacing: -.06em; line-height: .92; text-transform: uppercase; }
.big-mail {
  display: inline-block; margin: 26px auto 0; color: var(--ink);
  font-size: clamp(18px, 2.2vw, 32px); letter-spacing: -.02em;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
}
.end-links { margin: 24px 0 0; display: flex; justify-content: center; gap: 26px; font-size: 15px; font-weight: 500; }
.end-links a { color: var(--ink); text-decoration: none; }
.end-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.colophon { position: absolute; left: 0; right: 0; bottom: 22px; margin: 0; text-align: center; font-size: 12px; color: var(--muted); z-index: 2; }

/* thumbnails scale their own drawing to whatever size the card is, so nothing gets cut off */
.pv-thumb { container-type: size; }
.pv-thumb .art-name .glass { width: 78%; padding: 6cqh 6cqw; gap: 3cqh; font-size: max(9px, 4cqw); border-radius: 4cqw; }
.pv-thumb .art-name .nm { font-size: max(14px, 9cqw); }

/* ---------- 03 · the project cards, v4: rectangular glass cards that revolve round the chhatri ----------
   (overrides the earlier card rules above) */
.pv-page {
  position: absolute; inset: 0; height: auto; top: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(14px, 1.6vw, 26px);
  visibility: hidden; pointer-events: none;
}
.pv-page.on { visibility: visible; pointer-events: auto; }
.pv {
  flex: 0 1 210px;
  max-width: 23%;
  min-height: 0;
  display: flex; flex-direction: column;
  padding: 7px 7px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .18);           /* frosted, see-through glass */
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, .55);     /* a hairline frame */
  box-shadow: 0 18px 40px rgba(16, 60, 110, .14), inset 0 1px 0 rgba(255, 255, 255, .45);
  color: #0e1b2a;
  text-decoration: none;
  opacity: 1; transform: none;
  transition: box-shadow .4s ease, background .4s ease;
  transform-origin: 50% 50%;
  will-change: transform, opacity, filter;
}
.pv:hover { background: rgba(255, 255, 255, .3); box-shadow: 0 24px 50px rgba(16, 60, 110, .2), inset 0 1px 0 rgba(255, 255, 255, .5); }
.pv-thumb {
  position: relative;
  flex: none;
  aspect-ratio: 4 / 5;                            /* plenty of room for the picture */
  border-radius: 9px;
  overflow: hidden;
  background: var(--room);
}
.pv-title {
  margin-top: 12px; padding: 0 6px;
  font-size: clamp(14px, 1.15vw, 18px); letter-spacing: -.02em; line-height: 1.2;
  white-space: normal; overflow: visible;
}
.pv-no { display: block; margin: 0 0 3px; font-size: 11px; color: rgba(14, 27, 42, .55); font-variant-numeric: tabular-nums; }
.pv-sub { margin-top: 4px; padding: 0 6px; font-size: clamp(11px, .9vw, 13px); color: rgba(14, 27, 42, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-aspect-ratio: 21/20) {
  .pv-page { gap: 8px; }
  .pv { max-width: 24%; padding: 4px 4px 8px; }
  .pv-title { margin-top: 6px; padding: 0 3px; font-size: 11px; }
  .pv-no { font-size: 9px; }
  .pv-sub { display: none; }
}

/* ---------- the parrots: one quiet glass button under the chhatri ---------- */
.parrots-go {
  position: absolute; z-index: 3;
  left: 21vw; bottom: clamp(22px, 4vh, 38px); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px; border-radius: 999px;
  font: 500 13px/1 "Space Grotesk", sans-serif; letter-spacing: -.01em; color: #0e1b2a;
  background: rgba(255, 255, 255, .28);
  backdrop-filter: blur(14px) saturate(1.35); -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 10px 28px rgba(16, 60, 110, .14);
  cursor: pointer; opacity: var(--e, 0);
  transition: background .3s ease, box-shadow .3s ease, color .3s ease;
}
.parrots-go svg { width: 18px; height: 18px; color: #3f9a3a; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.parrots-go:hover { background: rgba(255, 255, 255, .42); box-shadow: 0 14px 34px rgba(16, 60, 110, .2); }
.parrots-go:hover svg { transform: translateY(-2px) rotate(-8deg); }
.parrots-go:focus-visible { outline: 2px solid #0e1b2a; outline-offset: 3px; }
.parrots-go:disabled { cursor: default; color: rgba(14, 27, 42, .55); }
.parrots-go.flying svg { animation: parrot-bob .5s ease-in-out infinite alternate; }
@keyframes parrot-bob { to { transform: translateY(-3px) rotate(-6deg); } }
@media (max-aspect-ratio: 21/20) {
  /* the cards fill the bottom here: it waits just above them, at the right, beside the chhatri */
  .parrots-go { left: auto; right: var(--gutter); bottom: auto; top: calc(58% - 46px); transform: none; padding: 7px 13px 7px 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .parrots-go.flying svg { animation: none; } }

/* ---------- 04 · the pattern: overlaps the chhatri's last screen, which holds still underneath ---------- */
.pattern { height: 780vh; margin-top: -100vh; margin-top: -100svh; z-index: 4; pointer-events: none; }
.pavilion .pin.held { position: fixed; top: 0; left: 0; right: 0; }
.pattern-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- 05b · also, by hand: a row of the round joinery drawings, then a link to the rest ---------- */
.byhand { position: relative; z-index: 6; background: #fff; padding: clamp(56px, 12vh, 120px) var(--gutter) 0; color: #0e1b2a; text-align: center; }
.byhand h2 { margin: 0; font-weight: 500; font-size: clamp(26px, 3vw, 44px); line-height: 1.05; letter-spacing: -0.03em; }
.byhand-s { margin: .8em auto 0; max-width: 46ch; color: var(--muted); font-size: clamp(15px, 1.2vw, 19px); line-height: 1.45; }
.byhand .talk-k { margin-bottom: 1em; }
.byhand-art { display: grid; grid-template-columns: repeat(9, 1fr); gap: clamp(8px, 1.4vw, 20px); max-width: 1400px; margin: clamp(28px, 5vh, 48px) auto 0; text-decoration: none; }
/* each disc is a window onto one of the round drawings on a portfolio page (2000 × 1414; the drawing 232 px across) */
.byhand .disc {
  aspect-ratio: 1; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 8px 22px rgba(60,40,10,.15);
  background-repeat: no-repeat; background-size: 862% auto; transition: translate .25s ease;
}
.byhand .disc:nth-child(even) { translate: 0 14px; }
.byhand-art:hover .disc { translate: 0 -4px; }
.byhand-art:hover .disc:nth-child(even) { translate: 0 10px; }
.byhand-more { margin-top: clamp(30px, 5vh, 50px); }
@media (max-width: 900px) { .byhand-art { grid-template-columns: repeat(5, 1fr); } .byhand .disc:nth-child(even) { translate: none; } }

/* ---------- 06 · let's talk: a white page that scrolls up over the photos ---------- */
.talk {
  position: relative; z-index: 6; min-height: 100vh; min-height: 100svh; background: #fff; color: #0e1b2a;
  display: grid; place-content: center; justify-items: center; text-align: center; gap: 0; padding: 12vh var(--gutter) 10vh;
  box-shadow: 0 -24px 60px rgba(14,27,42,.08);
}
.talk-k { margin: 0 0 1.4em; font-size: clamp(12px, 1vw, 15px); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.talk-h { margin: 0; font-weight: 500; font-size: clamp(56px, 11vw, 190px); line-height: .88; letter-spacing: -0.06em; text-transform: uppercase; }
.talk-s { margin: 1.3em 0 0; max-width: 32ch; font-size: clamp(15px, 1.3vw, 21px); line-height: 1.4; color: var(--muted); text-wrap: balance; }
.talk-links { margin-top: clamp(26px, 5vh, 48px); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.talk-pill, .talk-icon {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; border: 1.5px solid #1c1c1e; border-radius: 999px;
  color: #1c1c1e; text-decoration: none; font-size: clamp(14px, 1.1vw, 17px); transition: background-color .2s, color .2s;
}
.talk-pill { padding: 0 1.4em; }
.talk-icon { width: 48px; }
.talk-pill:hover, .talk-icon:hover { background: #1c1c1e; color: #fff; }
.talk-foot { margin: clamp(40px, 9vh, 90px) 0 0; font-size: 13px; letter-spacing: .08em; color: var(--muted); }

/* ---------- 05 · the photo wall: white-framed photos, pinned by the blue stars (pattern.js) ---------- */
.wall { position: absolute; inset: 0; visibility: hidden; }
.pin-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.ph {
  position: absolute; margin: 0; box-sizing: border-box; background: #fff; opacity: 0; pointer-events: none;
  translate: 0 var(--dy, 0px); rotate: calc(var(--r, 0deg) + var(--dr, 0deg)); scale: var(--ds, 1);
  box-shadow: 0 10px 26px rgba(14,27,42,.16), 0 1px 3px rgba(14,27,42,.12);
  transition: scale .35s cubic-bezier(.2,.8,.2,1), rotate .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.ph img { display: block; width: 100%; height: auto; background: #eef1f6; }
.wall.live .ph { pointer-events: auto; }
.wall.live .ph:hover { scale: 1.08; rotate: calc(var(--r, 0deg) * .3); box-shadow: 0 24px 50px rgba(14,27,42,.24), 0 2px 6px rgba(14,27,42,.14); }
.wall .pin { position: absolute; translate: -50% -50%; clip-path: var(--star-clip); background: #16348f; opacity: 0; pointer-events: none; }
.wall .pin::after { content: ""; position: absolute; inset: 27.5%; clip-path: var(--star-clip); background: #2a52b0; }
.wall > .pin { z-index: 1500; } /* the loose stars: over the photos, but under the one you point at */
.wall.live .ph:hover { z-index: 2000 !important; }
.wall .ph .pin { transition: opacity .25s; }
.wall.live .ph:hover .pin { opacity: 0; } /* nothing on the photo you're looking at */
.wall .pin.on { opacity: 1; animation: pin-press .35s cubic-bezier(.2,.8,.2,1); }
@keyframes pin-press { from { scale: 1.35; } to { scale: 1; } } /* pressed in as it lands */

/* the chhatri screen's words and cards go down with the view as it lifts into the pattern (pattern.js sets --lift) */
.pavilion .sel-head, .pavilion .pav-grid, .pavilion .pav-foot, .pavilion .parrots-go { translate: 0 var(--lift, 0px); opacity: calc(var(--e, 0) * (1 - var(--liftk, 0))); }

/* ---------- pixel mode: the scene redrawn as living grain (pixel.js) ---------- */
.pixel-layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.nav .pixelToggle { padding: 4px 10px; margin: -4px 0; border-radius: 999px; }
.pixelToggle { display: inline-flex; align-items: center; gap: 6px; }
.pixelToggle svg { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.pixelToggle[aria-pressed="true"] { background: #111 !important; color: #fff !important; }
.pixelToggle[aria-pressed="true"] svg { transform: rotate(45deg) scale(.9); }

/* the 3D | Pixels switch under the Selected Works heading: a small glass segmented control */
.view-switch {
  display: inline-flex; margin-top: 14px; padding: 3px; gap: 2px; border-radius: 999px;
  background: rgba(255,255,255,.35); border: 1px solid rgba(255,255,255,.65);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}
.view-switch button {
  font: 500 12px/1 "Space Grotesk", sans-serif; letter-spacing: .01em; color: #0e1b2a;
  padding: 7px 14px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  transition: background .35s ease, color .35s ease;
}
.view-switch button[aria-pressed="true"] { background: #0e1b2a; color: #fff; }
.view-switch button:focus-visible { outline: 2px solid #0e1b2a; outline-offset: 2px; }
.sel-head .view-switch { display: flex; width: max-content; }

/* the floating bar's Pixels button: only where pixel mode applies (the chhatri screen and the pattern) */
.float .pixelToggle { transition: opacity .35s ease, max-width .35s ease, padding .35s ease, margin .35s ease; max-width: 120px; overflow: hidden; white-space: nowrap; }
.float .pixelToggle.off-here { opacity: 0; max-width: 0; padding-left: 0; padding-right: 0; pointer-events: none; }

/* ---------- the three screens of work ---------- */
.pv-page { display: grid; align-content: center; justify-content: center; align-items: start; grid-auto-rows: auto; grid-template-rows: auto auto; gap: clamp(14px, 1.6vw, 24px); row-gap: 14px; }
.pv-page .pv { max-width: none; flex: none; width: 100%; }
.pv-cat {
  grid-column: 1 / -1; margin: 0 0 2px; display: flex; align-items: baseline; gap: 10px;
  font: 500 13px/1 "Space Grotesk", sans-serif; letter-spacing: .02em; text-transform: uppercase; color: #0e1b2a;
}
.pv-cat span { font-variant-numeric: tabular-nums; color: rgba(14,27,42,.5); }
.pv-big .pv-thumb, .pv-small .pv-thumb { aspect-ratio: 10 / 7; }
.pv-thumb .art-shot img { object-fit: cover; }
/* case studies: two big cards side by side */
.pv-page[data-layout="pair"] { grid-template-columns: repeat(2, minmax(0, min(27vw, 540px, 62vh))); }
.pv-page[data-layout="pair"] .pv-title, .pv-page[data-layout="systems"] .pv-title { font-size: clamp(17px, 1.45vw, 24px); }
/* design systems: however many there are, three to a row */
.pv-page[data-layout="systems"] { grid-template-columns: repeat(auto-fit, minmax(0, min(27vw, 540px, 62vh))); }
.pv-soon { opacity: .92; }
.pv-soon .pv-title { color: rgba(14,27,42,.75); }
/* built with AI: the two big ones first, the two small ones stacked beside them */
.pv-page[data-layout="ai"] { grid-template-columns: minmax(0, min(19.5vw, 400px, 46vh)) minmax(0, min(19.5vw, 400px, 46vh)) minmax(0, min(12.5vw, 260px, 30vh)); grid-template-rows: auto auto; }
.pv-page[data-layout="ai"] .pv-big { grid-row: 1 / span 2; align-self: end; } /* level with the bottom of the small pair */
.pv-page[data-layout="ai"] .pv-small { grid-column: 3; }
.pv-small { padding: 5px 5px 10px; }
.pv-small .pv-title { font-size: clamp(12px, .95vw, 15px); margin-top: 8px; }
.pv-small .pv-sub { font-size: 11px; }
@media (max-aspect-ratio: 21/20) {
  .pv-page { gap: 8px; align-content: start; }
  .pv-cat { font-size: 11px; }
  .pv-page[data-layout="pair"], .pv-page[data-layout="systems"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-page[data-layout="ai"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .pv-page[data-layout="ai"] .pv-big { grid-row: auto; }
  .pv-page[data-layout="ai"] .pv-small { grid-column: auto; }
}

/* the cards sit in the sky, above the lake: the grid ends well above the waterline, and the cards are sized to fit it */
@media (min-aspect-ratio: 21/20) {
  .pav-grid { top: clamp(80px, 11vh, 110px); bottom: 24.5vh; }
  .pv-page { align-content: end; } /* resting on the water: the cards' bottoms just above the waterline */
}

/* the bottom bar: the three kinds of work as tabs (the only place they are named); the current one is dark */
.pav-foot { justify-content: center; }
.pav-dots { gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.32); border: 1px solid rgba(255,255,255,.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.pav-dots button {
  width: auto; height: auto; padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; transform: none;
  font: 500 13px/1 "Space Grotesk", sans-serif; color: #0e1b2a; white-space: nowrap; cursor: pointer;
  transition: background .35s ease, color .35s ease;
}
.pav-dots button:hover { background: rgba(255,255,255,.45); }
.pav-dots button.on { background: #0e1b2a; color: #fff; transform: none; }
.pav-dots button:focus-visible { outline: 2px solid #0e1b2a; outline-offset: 2px; }
@media (max-aspect-ratio: 21/20) { .pav-dots button { padding: 7px 10px; font-size: 12px; } }

.pav-of { font-variant-numeric: tabular-nums; opacity: .7; }


/* pixel mode: the glass cards turn to solid paper (frosted glass over the grains blurred them into a blue haze) */
html.pixel .pavilion .pv { background: rgb(251, 250, 246); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 12px 30px rgba(14, 27, 42, .1); }
html.pixel .pavilion .parrots-go { background: rgba(251, 250, 246, .95); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------- phones: one consistent scale for words and buttons ----------
   every button at least 40px tall (easy to tap), text a step larger where it was small, cards in a row the same height */
@media (max-aspect-ratio: 21/20) {
  .pv-page { align-items: stretch; align-content: center; } /* a two-line title no longer makes one card taller than its neighbour; the set sits centred in its space */
}
@media (max-width: 600px) {
  .float { padding: 6px 8px; font-size: 14px; }
  .float .links a, .float .links button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; }
  .float .home { width: 40px; height: 40px; margin: 0; }
  .view-switch button { padding: 11px 16px; font-size: 13px; }
  .pav-dots button { padding: 11px 9px; font-size: 13px; }
  .parrots-go { min-height: 40px; padding: 0 14px 0 11px; font-size: 13px; }
  .pv-title, .pv-page[data-layout="pair"] .pv-title, .pv-page[data-layout="systems"] .pv-title { font-size: 15px; line-height: 1.25; }
  .pv-no { font-size: 10px; }
  .talk-links { gap: 10px; }
  .talk-mail { flex: 1 1 100%; max-width: 300px; }  /* the email on its own line, the three buttons centred under it */
}
/* narrow screens: a set with a single card (design systems) sits centred, at the same size as the others */
@media (max-aspect-ratio: 21/20) {
  .pv-page[data-layout="systems"] { grid-template-columns: repeat(auto-fit, calc(50% - 4px)); justify-content: center; }
}
