/* fonts:start */
@font-face { font-family: "Inter"; font-style: italic; font-weight: 300; font-display: swap; src: url("Assets/fonts/inter-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 300; font-display: swap; src: url("Assets/fonts/inter-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("Assets/fonts/inter-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("Assets/fonts/inter-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* fonts:end */
:root {
  color-scheme: light;
  --ground: #fff;
  --ink: #111;
  --muted: #666;
  --line: #e6e6e6;
  --head-bg: rgba(255, 255, 255, .82);
  --contact-bg: #111;
  --contact-fg: #fff;
  --contact-line: rgba(255, 255, 255, .22);
  --contact-dim: rgba(255, 255, 255, .68);
  --hero-fade: 255, 255, 255;
  --hero-overlay: .32;
  --hero-grain: .72;
  --accent: #ffc72c;   /* swap for the club's primary color */
  --button: #0b1b2e;   /* swap for the club's secondary color */
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --gap: clamp(.5rem, 1vw, 1rem);
  --head-h: 4.5rem;
  --display: "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

/* Dark mode: toggled by the button in the header and remembered between visits */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0b0c0d;
  --ink: #edeeeb;
  --muted: #9b9fa3;
  --line: #26282a;
  --head-bg: rgba(11, 12, 13, .82);
  --contact-bg: #1a1b1d;
  --contact-fg: #edeeeb;
  --contact-line: rgba(237, 238, 235, .2);
  --contact-dim: rgba(237, 238, 235, .66);
  --hero-fade: 11, 12, 13;
  --hero-overlay: .45;
  --hero-grain: .68;
}
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 3.25rem; }

body {
  margin: 0;
  padding-top: var(--head-h);
  background: var(--ground);
  color: var(--ink);
  font: 500 1.125rem/1.5 var(--body);
  letter-spacing: -.05em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.display {
  font-family: var(--display);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -.05em;
}
.label {
  display: block;
  font-family: var(--display);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: -.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 40;
  padding: .75rem 1rem;
  background: var(--ink);
  color: var(--ground);
}
.skip:focus { top: .5rem; }

/* Header: logo left; links and the theme toggle right. A translucent bar that keeps its look on every page,
   except the home page, where it floats transparently over the hero until you scroll. */

.page-home { padding-top: 0; }
.head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: calc(var(--head-h) - 1.25rem * var(--shrink, 0));
  padding-inline: var(--gutter);
  background: var(--head-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--ink);
  transition: background-color .3s ease;
}
.page-home .head.at-top { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.head.can-top { cursor: pointer; }
.progress:disabled { pointer-events: none; cursor: default; }
.head-links { display: flex; align-items: center; align-self: stretch; gap: 1.75rem; margin-left: auto; }
/* Top-level nav: Inter Regular, Inter Bold on hover. The hidden ::after reserves the bold width so neighbours don't shift. */
.head-links > a,
.dd > a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--display);
  font-size: .9375rem;
  font-weight: 400;
  letter-spacing: -.05em;
  text-transform: uppercase;
  padding-block: .5rem;
}
.head-links > a::after,
.dd > a::after {
  content: attr(data-text);
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
}
.head-links > a:hover,
.dd > a:hover,
.dd:hover > a,
.dd:focus-within > a { font-weight: 700; }
/* z-index keeps the dropdown's hover area above the progress line, so the menu stays open while the cursor travels into it */
.dd { position: relative; z-index: 1; align-self: stretch; display: flex; align-items: center; }
.dd-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -1rem;
  min-width: 15rem;
  padding: .5rem 0;
  background: var(--ground);
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 0;
}
.dd:hover .dd-menu,
.dd:focus-within .dd-menu { display: block; }
.dd-menu a {
  display: block;
  padding: .55rem 1rem;
  font-size: .9375rem;
  font-weight: 400;
  letter-spacing: -.05em;
}
.dd-menu a[aria-current] { font-weight: 700; }
.dd-menu a:hover { background: var(--line); }
.mark { display: grid; place-items: center; height: 2.5rem; }
.mark img { display: block; height: calc(2.5rem - .75rem * var(--shrink, 0)); width: auto; transition: opacity .2s ease; }
.mark:hover img { opacity: .7; }
/* "Top" link: a shallow roof-shaped arrow only. Appears once the page is scrolled; click to go back to the top. Centred in the header on wider screens, next to the logo on phones. */
.to-top {
  display: inline-grid; place-items: center; flex: none; margin-right: auto; padding: .7rem .6rem; font-size: .9375rem;
  border: 0; background: none; color: var(--ink); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(.25rem);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s, color .2s ease;
}
.to-top svg { display: block; width: 2.6rem; height: .72rem; fill: none; stroke: currentColor; stroke-width: .095em; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.to-top svg path { vector-effect: non-scaling-stroke; }   /* the line is as thick as the letters of the nav links (the button's font-size is the nav's) */
.head:not(.at-top) .to-top { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover, .to-top:focus-visible { color: var(--muted); }
@media (min-width: 40.0625rem) {
  .to-top { position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, calc(-50% + .25rem)); }
  .head:not(.at-top) .to-top { transform: translate(-50%, -50%); }
}
@media (max-width: 40rem) { .mark { flex: none; } .to-top { font-size: .75rem; margin-left: .25rem; padding-inline: .4rem; } .to-top svg { width: 1.9rem; height: .55rem; } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
/* Theme toggle: half-filled circle */
.theme {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: .5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: background-color .2s ease;
}
.theme svg { width: 1.2rem; height: 1.2rem; transition: transform .3s ease; }
:root[data-theme="dark"] .theme svg { transform: scaleX(-1); }
.theme:hover,
.theme:focus-visible { background: var(--line); }
/* phones and touch screens: no hover; tap "Projects" to open the list (main.js adds .open), tap it again to go to the home page */
@media (hover: none) {
  .dd-menu { display: none !important; }
  .dd.open .dd-menu { display: block !important; }
  .dd.open > a { font-weight: 700; }
}
@media (max-width: 40rem) {
  .head-links { gap: .875rem; }
  .head-links > a,
  .dd > a { font-size: .75rem; }
  .theme { margin-left: 0; }
}
@media (max-width: 26rem) { .head { gap: .5rem; } .to-top { margin-left: 0; } }   /* normal phones: the header gap is a little smaller so the arrow fits beside the logo */
@media (max-width: 22.5rem) { .head { gap: .3rem; } .head-links { gap: .45rem; } .head-links > a, .dd > a { font-size: .6875rem; } .theme { width: 2rem; } .to-top { font-size: .6875rem; margin-left: 0; padding-inline: .25rem; } .to-top svg { width: 1.7rem; } }   /* the narrowest phones: a little tighter so everything fits */
.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1.5rem;
}
.social a {
  display: block;
  padding: .5rem 0;
  font-family: var(--display);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: -.05em;
  text-transform: uppercase;
}
.social a:hover { color: var(--muted); }
.social--icons { gap: .25rem .75rem; }
.foot-mark { display: block; width: max-content; margin: 0 auto 1rem; }
.foot-mark img { display: block; height: 2.5rem; width: auto; }
.social--icons a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; }
.social--icons svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.social--icons svg.stroke { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Placeholder frames: an <img> placed first inside .cover removes the X */

.cover { --r: calc(16 / 9); --tone: #e9e9e9; display: block; }
.cover img,
.cover:not(:has(img))::before {
  display: block;
  width: 100%;
  aspect-ratio: var(--r);
  object-fit: cover;
  background: var(--tone);
}
.cover:not(:has(img))::before {
  content: "";
  --x: rgba(0, 0, 0, .12);
  --stroke: transparent calc(50% - .5px), var(--x) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px);
  background:
    linear-gradient(to top right, var(--stroke)),
    linear-gradient(to bottom right, var(--stroke)),
    var(--tone);
}

/* Hero: the full 16:9 video (uncropped) under an even overlay (light in light mode, near-black in dark mode),
   a layer of film grain, and the welcome text in the opposite colour.
   Tune the look with --hero-overlay (strength of the tint) and --hero-grain (grain strength) in :root. */

.hero { position: relative; background: var(--ground); }
.hero-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: rgb(var(--hero-fade)); }
.hero-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; pointer-events: none; background: rgba(var(--hero-fade), var(--hero-overlay)); }
.hero-grain {
  position: absolute;
  inset: -100%;
  width: 300%;
  height: 300%;
  pointer-events: none;
  opacity: var(--hero-grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  animation: hero-grain 1s steps(1) infinite;
}
@keyframes hero-grain {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-5%, -8%); }
  20%  { transform: translate(-9%, 4%); }
  30%  { transform: translate(6%, -10%); }
  40%  { transform: translate(-4%, 9%); }
  50%  { transform: translate(-9%, 6%); }
  60%  { transform: translate(8%, 0); }
  70%  { transform: translate(0, 8%); }
  80%  { transform: translate(3%, 10%); }
  90%  { transform: translate(-7%, 5%); }
  100% { transform: translate(0, 0); }
}
/* left edge of the text = left edge of the logo: the page gutter, minus where the text starts inside its image (7.917% x the image scale) */
.hero-text { position: absolute; left: calc(var(--gutter) - 8.495%); top: 50%; width: 107.3%; height: auto; max-width: none; transform: translateY(-50%); pointer-events: none; user-select: none; }
.hero-text-dark { display: none; }
:root[data-theme="dark"] .hero-text-light { display: none; }
:root[data-theme="dark"] .hero-text-dark { display: block; }
/* phones and tablets: scale the text up so it stays readable */
@media (max-width: 48rem) { .hero-text { left: calc(var(--gutter) - 15.04%); width: 190%; } }
@media (prefers-reduced-motion: reduce) { .hero-grain { animation: none; } }

/* Tiles: cover image, title appears on a dark overlay */

.grid {
  --cols: 1;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--gap);
}
/* Home page: full-bleed single column, no gaps between tiles or at the edges */
.grid.grid--stack { --cols: 1; gap: 0; padding-inline: 0; }
.grid--stack .tile .cover { --r: calc(32 / 9); }
.tile { position: relative; display: block; overflow: hidden; isolation: isolate; contain: paint; }
.tile .cover { --tone: #dedede; }
.tile img { transition: transform .5s ease; will-change: transform; backface-visibility: hidden; }
.tile .cover img { height: auto; }
.tile .title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  text-align: center;
  line-height: 1.1;
  opacity: 0;
  transition: opacity .3s ease;
}
.tile:hover .title,
.tile:focus-visible .title { opacity: 1; }
.tile:hover img { transform: scale(1.04); }

/* Tiles (home + project pages): name sits lower right at all times (light); hover fades in a full dark overlay and goes bold */
.grid--stack .tile .title {
  place-items: end;
  align-content: end;
  justify-items: end;
  padding: clamp(1rem, 2vw, 1.75rem);
  background: none;
  font-weight: 300;
  text-align: right;
  opacity: 1;
  isolation: isolate;
  transition: font-weight .3s ease;
}
.grid--stack .tile .title::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, .65);
  opacity: 0;
  transition: opacity .3s ease;
}
.grid--stack .tile:hover .title,
.grid--stack .tile:focus-visible .title { font-weight: 700; }
.grid--stack .tile:hover .title::before,
.grid--stack .tile:focus-visible .title::before { opacity: 1; }
/* All tiles: name bottom-left, arrow bottom-right; the arrow's stroke gets heavier on hover like the text */
.grid--stack .tile .title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  text-align: left;
}
.arrow {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-width .3s ease;
}
.tile:hover .arrow,
.tile:focus-visible .arrow,
a:hover > .arrow,
a:focus-visible > .arrow { stroke-width: 2.7; }
/* Project pages: every sub-project sits in one row, stretched evenly across the full width (1-5 tiles).
   The row height stays the same whatever the count, so each tile's ratio scales as 3/N (--k). On phones they stack. */
.grid.grid--duo { --cols: 1; --tile-r: calc(5 / 4); }
.grid--stack.grid--duo .tile .cover { --r: calc(var(--tile-r) * var(--k, 1)); }
@media (min-width: 40rem) {
  .grid.grid--duo { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .grid--duo .tile + .tile { margin-left: -1px; }   /* tiles share fractional widths; a 1px overlap hides the hairline between them */
  .grid--duo .tile:only-child { --k: 3; }
  .grid--duo .tile:first-child:nth-last-child(2),
  .grid--duo .tile:first-child:nth-last-child(2) ~ .tile { --k: 1.5; }
  .grid--duo .tile:first-child:nth-last-child(4),
  .grid--duo .tile:first-child:nth-last-child(4) ~ .tile { --k: .75; }
  .grid--duo .tile:first-child:nth-last-child(5),
  .grid--duo .tile:first-child:nth-last-child(5) ~ .tile { --k: .6; }
  .grid--duo .tile:first-child:nth-last-child(n+6),
  .grid--duo .tile:first-child:nth-last-child(n+6) ~ .tile { --k: .5; }
}
/* Home page: 16:9 tiles, two columns from tablet width up. An odd last tile spans the row at the same height (32:9 crop). */
.grid--stack.grid--two .tile .cover { --r: calc(16 / 9); }
@media (min-width: 40rem) {
  .grid.grid--two { --cols: 2; }
  .grid--two .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .grid--two .tile:last-child:nth-child(odd) .cover { --r: calc(32 / 9); }
}
/* Home parallax: the hero stays pinned while the project tiles slide up over it */
.hero { position: sticky; top: 0; z-index: 0; }
.grid--stack.grid--two { position: relative; z-index: 1; background: var(--ground); }
/* Client page intro and breadcrumb */

.crumb {
  display: inline-block;
  margin: 1rem var(--gutter) 0;
  font-family: var(--display);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: -.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumb:hover { color: var(--ink); }

/* Project page: title, lead image, meta, story, stacked artwork, next */

.project { padding-inline: var(--gutter); }
.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}
.project-head h1 { font-size: clamp(2.5rem, 9vw, 6.5rem); line-height: .95; letter-spacing: -.05em; }
.scroll,
.tagline { padding-bottom: .6em; font-family: var(--display); font-size: .8125rem; font-weight: 600; letter-spacing: -.05em; text-transform: uppercase; color: var(--muted); }
.feature { --tone: #dedede; }
.meta.meta--3 { grid-template-columns: repeat(2, 1fr); }
.story.story--single { grid-template-columns: 1fr; padding-bottom: clamp(2rem, 4vw, 3rem); }
.project--intro .meta { border-bottom: 0; }
.meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem var(--gap);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-bottom: 1px solid var(--line);
}
.meta dt { font-family: var(--display); font-size: .8125rem; font-weight: 600; letter-spacing: -.05em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin-top: .25rem; font-weight: 600; }
.story { display: grid; gap: 2rem; padding: clamp(2rem, 4vw, 3rem) 0; max-width: 64rem; }
.story h2 { font-family: var(--display); font-size: .8125rem; font-weight: 600; letter-spacing: -.05em; text-transform: uppercase; color: var(--muted); }
.story p { margin-top: .4rem; max-width: 40rem; font-size: 1.25rem; line-height: 1.45; }
.stack { display: grid; gap: var(--gap); }
.stack .work { --tone: #e4e4e4; }
.stack .work:nth-child(odd) { --tone: #ececec; }
.next {
  display: grid;
  gap: .25rem;
  margin-top: clamp(3rem, 7vw, 6rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--line);
  text-align: center;
}
.next .display { font-size: clamp(2rem, 7vw, 4.5rem); line-height: 1; }
.next:hover .display { color: var(--muted); }
/* Previous / Next: Previous sits left, Next right; on phones Next comes first and they stack */
.pager {
  display: grid;
  gap: 2rem clamp(1rem, 4vw, 3rem);
  margin-top: clamp(3rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
}
.pager .prev,
.pager .next { display: grid; gap: .25rem; align-content: start; margin: 0; padding: clamp(1.5rem, 3vw, 3rem) 0; border: 0; }
.pager .prev { text-align: left; }
.pager .next { order: -1; text-align: left; }
.prev .display { font-size: clamp(2rem, 7vw, 4.5rem); line-height: 1; }
.prev:hover .display { color: var(--muted); }
@media (min-width: 40rem) {
  .pager { grid-template-columns: 1fr 1fr; }
  .pager .prev { order: 0; }
  .pager .next { order: 1; text-align: right; }
}
/* About + Contact: one page, two sections */

.page-about .foot { margin-top: 0; }
.about { padding-bottom: clamp(3rem, 7vw, 6rem); }
.about-split { display: grid; }
.about-photo { --r: 1; --tone: #dedede; max-width: 24rem; margin: clamp(1.5rem, 3vw, 2.5rem) var(--gutter) 0; }   /* the frame is the photo's own square shape, so nothing is cropped */
.about-photo img { height: auto; }
.about-copy {
  display: grid;
  align-content: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2rem, 4vw, 3rem) var(--gutter) 0;
}
.lead { max-width: 50rem; text-wrap: balance; font-size: clamp(1.6rem, 3.4vw, 2.75rem); line-height: 1.12; font-weight: 600; letter-spacing: -.05em; }
.bio p { max-width: 42rem; font-size: 1.25rem; line-height: 1.45; }
.bio p + p { margin-top: 1rem; }
.bio .aside { font-weight: 300; font-style: italic; color: var(--ink); }   /* the same colour as the text around it (white in dark mode), just a lighter weight */   /* the lighter, quieter aside at the end of the last paragraph */
.meta.meta--facts { grid-template-columns: repeat(2, 1fr); padding: clamp(1.5rem, 3vw, 2rem) 0 0; border-top: 1px solid var(--line); border-bottom: 0; }
.meta--facts ul { display: grid; gap: .1rem; }

.contact {
  display: flex;
  flex-direction: column;
  background: var(--contact-bg);
  color: var(--contact-fg);
}
.contact .project { display: flex; flex: 1; flex-direction: column; padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.contact :focus-visible { outline-color: var(--contact-fg); }
.contact .tagline { color: var(--contact-dim); }
.contact-lead { max-width: 36rem; margin-top: .25rem; font-size: 1.25rem; line-height: 1.45; color: var(--contact-dim); }
.contact-mail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(1rem, 2vw, 1.5rem);
  border-top: 1px solid var(--contact-line);
  font-size: clamp(1.75rem, 7.5vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
  transition: font-weight .3s ease;
}
.contact-mail:hover,
.contact-mail:focus-visible { font-weight: 700; }
.contact-mail .arrow { width: .8em; height: .8em; }
.contact-links { margin-top: clamp(3rem, 7vw, 6rem); }
.contact-links a {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1.25rem;
  padding-block: clamp(1rem, 2vw, 1.4rem);
  border-top: 1px solid var(--contact-line);
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 300;
  letter-spacing: -.05em;
  transition: font-weight .3s ease;
}
.contact-links li:last-child a { border-bottom: 1px solid var(--contact-line); }
.contact-links a:hover,
.contact-links a:focus-visible { font-weight: 700; }
.contact-links .cl-handle { color: var(--contact-dim); }
.contact-links .arrow { width: 1.1em; height: 1.1em; }
/* Intro row: the lead text */
.contact-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; margin-top: .25rem; }
.contact-intro .contact-lead { margin-top: 0; }
/* Footer */

.foot {
  margin-top: clamp(4rem, 9vw, 7rem);
  padding: 2rem var(--gutter) 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.foot small { display: block; margin-top: 1.5rem; font-size: .875rem; color: var(--muted); }

/* Scroll-progress line along the header's bottom edge; click it to jump back to the top */
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.progress::before,
.progress .bar {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transition: height .2s ease;
}
.progress::before { background: var(--line); }
.page-home .head.at-top .progress::before { opacity: 0; }
.progress .bar { background: var(--ink); transform-origin: left center; transform: scaleX(0); }
.progress:hover::before,
.progress:hover .bar,
.progress:focus-visible::before,
.progress:focus-visible .bar,
.head.can-top .progress::before,
.head.can-top .progress .bar { height: 4px; }

/* Phones: the portrait sits beside the opening line; the paragraph and the lists run full width underneath */
@media (max-width: 47.99rem) {
  .about-split { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); column-gap: clamp(.9rem, 4vw, 1.5rem); padding-inline: var(--gutter); align-items: start; }
  .about-copy { display: contents; }
  .about-photo { grid-column: 1; grid-row: 1; max-width: none; margin: clamp(1rem, 4vw, 1.5rem) 0 0; }
  .about-split .lead { grid-column: 2; grid-row: 1; align-self: center; margin-top: clamp(1rem, 4vw, 1.5rem); font-size: clamp(1.1rem, 5.2vw, 1.6rem); }
  .about-split .bio { grid-column: 1 / -1; grid-row: 2; margin-top: clamp(1.5rem, 6vw, 2.25rem); }
  .about-split .meta--facts { grid-column: 1 / -1; grid-row: 3; margin-top: clamp(1.5rem, 6vw, 2.25rem); }
}@media (min-width: 48rem) {
  .about-split { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  /* side by side: a smaller portrait on the left (its own square shape), the text beside it */
  .about-photo { width: min(30rem, 32vw); max-width: none; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
  .about-copy { padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 5vw, 5rem) clamp(1.5rem, 3vw, 2.5rem) var(--gutter); }   /* same space above as the photo, so the text and the photo start together */
}
@media (min-width: 40rem) {
  .grid { --cols: 2; padding-inline: var(--gutter); }
  .meta { grid-template-columns: repeat(4, 1fr); }
  .meta.meta--3 { grid-template-columns: repeat(3, 1fr); }
  .story { grid-template-columns: repeat(3, 1fr); max-width: none; }
}
@media (min-width: 64rem) {
  .head-links { display: flex; }
  .grid { --cols: 3; }
  .stack { grid-template-columns: repeat(2, 1fr); }
  .stack .work:first-child,
  .stack .work:nth-child(even):last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .tile img, .tile .title, .arrow, .contact-mail, .contact-links a { transition: none; } }

/* Dark mode: placeholder frames */
:root[data-theme="dark"] :is(.cover, .tile .cover, .feature, .stack .work, .stack .work:nth-child(odd), .about-photo) { --tone: #1f2123; }
:root[data-theme="dark"] .cover:not(:has(img))::before { --x: rgba(255, 255, 255, .1); }

/* Sub-project gallery: a justified grid. Every row spans the full width and its images share one height;
   each image's own aspect ratio (--ar) decides how much room it takes, so any mix of shapes stays tidy.
   --row-h is the target row height; the number of images per row follows the screen width. */
.gallery {
  --row-h: clamp(11rem, 25vw, 26rem);
  --gal-gap: clamp(.5rem, 1vw, 1rem);
  display: flex;
  flex-wrap: wrap;
  gap: var(--gal-gap);
  padding-block: var(--gal-gap);   /* images run edge to edge of the text column, lining up with the text and the rules */
}
.gallery::after { content: ""; flex-grow: 1000000; }   /* keeps the last row from stretching */
.gallery-item {
  --tone: #e4e4e4;
  flex: calc(var(--ar) * 100) 1 calc(var(--ar) * var(--row-h));
  aspect-ratio: var(--ar);
  min-width: 0;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--tone);
}
.gallery-item a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s ease; }   /* (no will-change: it would keep every one of up to 200 images in graphics memory) */
:root[data-theme="dark"] .gallery-item { --tone: #1f2123; }

/* Image viewer (opens when you click a gallery image) */
html:has(dialog.lightbox[open]) { overflow: hidden; }
dialog.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 8, 8, .95);
  color: #fff;
  overflow: hidden;
}
dialog.lightbox[open] { display: grid; place-items: center; animation: lb-in .25s ease; }
dialog.lightbox::backdrop { background: rgba(8, 8, 8, .95); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-fig {
  --py: clamp(3.5rem, 7vw, 5rem);
  --px: clamp(1rem, 7vw, 6rem);
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: var(--py) var(--px);
}
.lb-fig img {
  max-width: min(calc(100vw - 2 * var(--px)), var(--cap-w, 100vw));
  max-height: min(calc(100vh - 2 * var(--py)), var(--cap-h, 100vh));
  max-height: min(calc(100svh - 2 * var(--py)), var(--cap-h, 100svh));
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(.6rem, 1.6vw, 1rem);
  display: grid;
  justify-items: center;
  gap: .1rem;
  padding-inline: 4rem;
  text-align: center;
  pointer-events: none;
}
.lb-caption { font-size: .9375rem; font-weight: 500; letter-spacing: -.03em; color: #fff; }
.lb-caption:empty { display: none; }
.lb-count { font-size: .75rem; font-weight: 500; letter-spacing: -.02em; color: rgba(255, 255, 255, .6); }
.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease;
}
.lb-btn:hover,
.lb-btn:focus-visible { background: rgba(255, 255, 255, .16); }
.lb-btn svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: clamp(.5rem, 2vw, 1.25rem); right: clamp(.5rem, 2vw, 1.25rem); }
.lb-prev,
.lb-next { top: 50%; margin-top: -1.5rem; }
.lb-prev { left: clamp(.25rem, 1.5vw, 1.25rem); }
.lb-next { right: clamp(.25rem, 1.5vw, 1.25rem); }
.lb-prev svg { transform: scaleX(-1); }
dialog.lightbox :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 40rem) { .lb-prev, .lb-next { top: auto; bottom: .5rem; margin-top: 0; } .lb-fig { --px: .5rem; --py: 4rem; } }
@media (prefers-reduced-motion: reduce) { .gallery-item img { transition: none; } dialog.lightbox[open] { animation: none; } }

/* Sub-project info line: Client, then the Overview, on a single row */
.meta.meta--sub { grid-template-columns: 1fr; }
.meta--sub .meta-wide dd { max-width: 48rem; font-size: 1.25rem; font-weight: 500; line-height: 1.45; }
@media (min-width: 40rem) {
  .meta.meta--sub { grid-template-columns: minmax(10rem, 1fr) 3fr; }
}

/* Masonry gallery (Photography): equal-width columns, each image at its own shape, so the columns end at slightly different heights.
   masonry.js deals each image into the shortest column (reading order: across the top, then down). Without script it falls back to CSS columns. */
.gallery.gallery--masonry { display: block; column-count: 2; column-gap: var(--gal-gap); }
@media (min-width: 43.75rem) { .gallery.gallery--masonry { column-count: 3; } }
@media (min-width: 68.75rem) { .gallery.gallery--masonry { column-count: 4; } }
@media (min-width: 100rem) { .gallery.gallery--masonry { column-count: 5; } }
.gallery--masonry::after { display: none; }
.gallery--masonry .gallery-item { flex: none; width: 100%; margin: 0 0 var(--gal-gap); break-inside: avoid; }
.gallery.gallery--masonry.is-ready { display: flex; align-items: flex-start; gap: var(--gal-gap); column-count: auto; }
.gallery--masonry.is-ready .gallery-item { margin: 0; }
.gallery-col { display: flex; flex: 1 1 0; flex-direction: column; gap: var(--gal-gap); min-width: 0; }

/* Shuffled galleries are hidden for a moment while masonry.js puts them in a new random order, so you never see the reshuffle.
   If the script doesn't run (or is blocked), the gallery appears by itself after 2.5 seconds. */
.gallery--masonry[data-shuffle]:not(.is-ready) { opacity: 0; animation: gal-reveal 0s linear 2.5s forwards; }
@keyframes gal-reveal { to { opacity: 1; } }

/* Mosaic gallery (Photography): mixed sizes. mosaic.js places each image (wide ones two columns wide, a few upright ones enlarged) at an exact
   position, so once it has run the images are absolutely positioned. Without script it falls back to plain CSS columns. */
.gallery.gallery--mosaic { display: block; column-count: 2; column-gap: var(--gal-gap); }
@media (min-width: 43.75rem) { .gallery.gallery--mosaic { column-count: 3; } }
@media (min-width: 68.75rem) { .gallery.gallery--mosaic { column-count: 4; } }
.gallery--mosaic::after { display: none; }
.gallery--mosaic .gallery-item { flex: none; width: 100%; margin: 0 0 var(--gal-gap); break-inside: avoid; }
.gallery.gallery--mosaic.is-ready { position: relative; column-count: auto; }
.gallery--mosaic.is-ready .gallery-item { position: absolute; margin: 0; }
.gallery--mosaic.is-ready .gallery-item a,
.gallery--mosaic.is-ready .gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery--mosaic[data-shuffle]:not(.is-ready) { opacity: 0; animation: gal-reveal 0s linear 2.5s forwards; }
/* Photography galleries are plain justified rows; shuffle.js reorders them and then reveals the gallery (it appears by itself after 2.5 s if the script is blocked). */
.gallery[data-shuffle]:not(.is-ready) { opacity: 0; animation: gal-reveal 0s linear 2.5s forwards; }

/* Sub-project sections (e.g. Juvee > Can Designs): smaller subtitles over groups of images on one page */
.sub-section { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.sub-title { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 300; letter-spacing: -.03em; line-height: 1.1; }
.sub-section .gallery { margin-top: clamp(.75rem, 2vw, 1.25rem); }
/* A fixed 2 x 2 grid for same-shape images (one column on phones) */
.gallery.gallery--grid2 { display: grid; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .gallery.gallery--grid2 { grid-template-columns: 1fr 1fr; } }
.gallery--grid2::after { display: none; }
.gallery--grid2 .gallery-item { flex: none; }
/* In a fixed-order justified gallery (data-tidy) the script only tidies the last row; hidden for a moment, shown after 2.5 s if the script is blocked */
.gallery[data-tidy]:not(.is-ready) { opacity: 0; animation: gal-reveal 0s linear 2.5s forwards; }
/* Small groups (data-row): on tablets and up every image sits in one single row, filling the width; on phones they wrap like the other galleries */
@media (min-width: 40rem) { .gallery[data-row] { flex-wrap: nowrap; } }
.gallery[data-row]::after { display: none; }   /* a short last row in a small group grows to fill the width */
/* a wide image that spans both columns of a 2-column grid (e.g. the hats under the hoodies and shirts) */
.gallery--grid2 .gallery-item--wide { grid-column: 1 / -1; }

.gallery[data-even]::after { display: none; }   /* data-even: the last row stretches to the full width as well, so every row has the same height */

/* Small groups shown at a sensible fixed size, left-aligned (e.g. two tall stickers), instead of stretching across the whole row */
.gallery--natural { --natural-h: clamp(14rem, 30vw, 36rem); }
.gallery--natural::after { display: none; }
.gallery--natural .gallery-item { flex: 0 0 auto; width: calc(var(--ar) * var(--natural-h)); }

/* Panel tile: the image is shown whole (nothing cropped) on a flat background of its own colour, so a wide, short strip (e.g. packing tape) can sit in a taller tile beside tall images */
.gallery-item--panel { background: var(--panel, #141414); }
.gallery-item--panel img { object-fit: contain; }

/* Home tiles: a little space between the project tiles (the same size as the space between images on the sub-project pages) and round the edge */
.grid--stack.grid--two { gap: clamp(.5rem, 1vw, 1rem); padding: clamp(.5rem, 1vw, 1rem); }

/* a short row of tall images (e.g. two portrait photos) would be taller than the screen: cap the row height at 46rem and keep it left-aligned */
@media (min-width: 40rem) { .gallery--cap { max-width: calc(var(--cap-ar, 2) * 46rem); } }

/* the height cap is only for the normal rows; when every image has the same fixed height (gallery--natural) the cap is not needed */
.gallery--cap.gallery--natural { max-width: none; }

/* fixed-height rows (gallery--natural) may need a second row, so small groups must be allowed to wrap here (otherwise a few wide images run off the side of the page) */
@media (min-width: 40rem) { .gallery[data-row].gallery--natural { flex-wrap: wrap; } }

/* About/Contact: recent Instagram posts. One row of six on desktop, the same width as the text; the posts are scaled to fit (insta.js). Three across on tablets, two on phones. */
.insta { margin-top: clamp(3rem, 7vw, 6rem); }
.insta-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.5rem, 1vw, 1rem); }
.insta-item { min-width: 0; overflow: hidden; }
.insta-inner { width: 326px; transform-origin: 0 0; }
.insta-item blockquote.instagram-media { margin: 0 !important; }
@media (min-width: 40rem) { .insta-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 80rem) { .insta-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }   /* below 1280px six would be too small to read: three across instead */
/* the posts follow the site's light/dark switch: Instagram's embed switches to its dark look when its frame is told it is dark (color-scheme) */
:root[data-theme="dark"] .insta-item iframe { color-scheme: dark; }
:root[data-theme="light"] .insta-item iframe { color-scheme: light; }
.insta-item { border-radius: 10px; }

/* ===== PHONES ONLY (narrower than 40rem). Nothing in this block applies to tablets or desktops. ===== */
@media (max-width: 39.99rem) {
  /* a darker fade along the bottom of the cover images, so the white project names can be read */
  .grid--stack .tile .cover { position: relative; }
  .grid--stack .tile .cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .34) 45%, rgba(0, 0, 0, 0)); pointer-events: none; }
  /* stacked cover images share fractional heights; a 1px overlap closes the hairline gap between them */
  .grid--duo .tile + .tile { margin-top: -1px; }   /* (project pages only: the home page tiles keep their own spacing) */
  /* Previous and Next side by side */
  .pager { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .pager .prev { order: 0; text-align: left; }
  .pager .next { order: 1; text-align: right; }
  .pager .prev .display, .pager .next .display { font-size: clamp(1.15rem, 5.4vw, 1.6rem); overflow-wrap: anywhere; }
  /* no Instagram row on phones */
  .insta { display: none; }
}

/* ===== PHONES ONLY: the About / Contact page, smaller text and tighter spacing so there is far less scrolling ===== */
@media (max-width: 39.99rem) {
  .about .project-head, .contact .project-head { padding-block: 1.25rem .75rem; }
  .about .project-head h1, .contact .project-head h1 { font-size: 2.25rem; }
  .about-split .lead { font-size: clamp(1rem, 4.4vw, 1.2rem); line-height: 1.15; }
  .about-split .bio { margin-top: 1.1rem; }
  .bio p { font-size: 1rem; line-height: 1.5; }
  .bio p + p { margin-top: .75rem; }
  .about-split .meta--facts { margin-top: 1.1rem; padding-top: 1rem; gap: 1rem; }
  .meta--facts li { font-size: .9375rem; line-height: 1.35; }
  .meta--facts ul { gap: 0; }
  .about { padding-bottom: 1.5rem; }
  .contact .project { padding-bottom: 1.25rem; }
  .contact-lead { font-size: 1rem; line-height: 1.4; }
  .contact-intro { gap: 1rem; }
  .contact-links { margin-top: 1.75rem; }
  .contact-links a { font-size: 1rem; padding-block: .8rem; gap: .75rem; }
}
/* Jump links (sub-project pages with 3+ sections): phones only */
.jump { display: none; }
@media (max-width: 39.99rem) {
  .jump { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
  .jump a { display: inline-block; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; font-size: .8125rem; font-weight: 500; letter-spacing: -.03em; line-height: 1.2; color: var(--ink); }
  .sub-title { scroll-margin-top: 4.5rem; }
  /* bigger tap areas for the menu links and the light/dark button: the same look, a larger area that reacts to a finger (about 48px tall) */
  .head-links > a, .dd > a, .theme { position: relative; }
  .head-links > a::before, .dd > a::before, .theme::before { content: ""; position: absolute; inset: -.5rem -.4rem; }
}
/* 404 page */
.notfound { max-width: 36rem; margin: .25rem 0 0; font-size: 1.25rem; line-height: 1.45; color: var(--muted); }
.notfound-links { display: grid; gap: .25rem; margin: 1.5rem 0 3rem; padding: 0; list-style: none; }
.notfound-links a { display: inline-block; padding: .35rem 0; font-size: 1.125rem; font-weight: 500; letter-spacing: -.03em; }
.notfound-links a:hover { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 39.99rem) { .notfound { font-size: 1rem; } .notfound-links a { padding: .55rem 0; } }

/* visually hidden text for screen readers and search engines (home page heading) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
