/* Layout: a black gallery wall with editorial type. Thin oversized serif
   headlines with a slight red/teal misregistration lie across the paintings;
   small heavy grotesk labels; hard edges, uneven columns. Nothing textured or
   coloured sits behind the art. */
:root {
  color-scheme: dark;
  --ink: #000;           /* page: pure black */
  --ink-raised: #0e0e0e; /* panels, the viewer */
  --line: #2c2c2c;       /* hairlines */
  --bone: #eee6d8;       /* main text */
  --ash: #a39f99;        /* quiet text */
  --wound: #e8432e;      /* vermilion: one slab, active states */
  --ochre: #dcaa48;      /* small labels and marks */
  --teal: #2f9c9c;       /* type fringe only */

  --display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gap: clamp(14px, 2.4vw, 34px);
  --hang-x: clamp(18px, 5vw, 84px);   /* space between gallery columns */
  --hang-y: clamp(44px, 7vw, 120px);  /* space between pieces in a column */
  --fringe: -0.014em 0 rgb(from var(--wound) r g b / 0.75), 0.014em 0 rgb(from var(--teal) r g b / 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 17px;
  font-weight: 350;
  line-height: 1.6;
}

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: max(20px, 6vw, env(safe-area-inset-left, 0px));
  padding-right: max(20px, 6vw, env(safe-area-inset-right, 0px));
  padding-block: 0 40px;
  overflow-x: clip;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }

.label {
  font-size: 0.72rem;
  font-weight: 600;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
}
.big {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(4.2rem, 14.5vw, 13rem);
  line-height: 0.78;
  letter-spacing: -0.035em;
}
.big em { text-shadow: var(--fringe); padding-right: 0.06em; }
.big .caps {
  display: block;
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(0.85rem, 1.5vw, 1.2rem);
  line-height: 1.2;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--ochre);
  padding: 1.6em 0 0 22%;
}

/* ---------- top bar ---------- */
.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 24px;
  padding-block: 20px;
}
.top-name { font-family: var(--display); font-weight: 600; font-style: italic; font-size: 1.6rem; text-decoration: none; }
.top-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.top-nav a {
  font-size: 0.72rem;
  font-weight: 600;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ash);
  padding-block: 4px;
}
.top-nav a:hover { color: var(--bone); }
.top-nav a[aria-current] { color: var(--bone); border-bottom: 2px solid var(--wound); }
.top-nav a:last-child { color: var(--wound); }
.top-nav a:last-child:hover, .top-nav a:last-child[aria-current] { color: var(--bone); }

/* ---------- hero: the name lies across the painting ---------- */
.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 1fr auto auto;
  column-gap: var(--gap);
  padding-block: clamp(8px, 2vw, 24px) clamp(90px, 16vw, 240px);
}
.hero-side {
  grid-column: 1 / 2;
  grid-row: 1;
  writing-mode: vertical-rl;
  rotate: 180deg;
  justify-self: start;
  align-self: end;
  white-space: nowrap;
  padding-top: 24px;
}
.hero-art { grid-column: 6 / 13; grid-row: 1 / 4; min-width: 0; }
.hero-art .piece { margin: 0; }
/* the featured piece is never cropped: it shrinks to fit the screen height */
.hero-art .piece img { width: auto; max-width: 100%; max-height: 88vh; margin-left: auto; }
.hero h1 {
  grid-column: 1 / 13;
  grid-row: 2;
  z-index: 2;
  pointer-events: none;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(4.8rem, 15vw, 15rem);
  line-height: 0.74;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  text-shadow: var(--fringe), 0 2px 30px rgb(from var(--ink) r g b / 0.5);
  padding-block: 0.12em;
}
.hero-meta {
  grid-column: 1 / 6;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: clamp(24px, 4vw, 64px);
  min-width: 0;
}
.hero-tagline { font-size: clamp(1rem, 1.5vw, 1.25rem); max-width: 26em; }
/* The vermilion commission button: the one loud thing on the front page. */
.commission-btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.7em;
  background: var(--wound);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
  padding: 17px 24px;
  margin-top: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}
/* drawn arrow for links that leave the site (the ↗ character turns into a blue emoji on iPhones) */
.ext { display: inline-block; width: 0.8em; height: 0.8em; margin-left: 0.5em; vertical-align: -0.02em; flex: none; }
.commission-btn .ext { margin-left: 0; }  /* the button already spaces its parts */
.commission-btn .dot { background: var(--ink); flex: none; margin-right: 0; }
.commission-btn:hover { background: var(--bone); }
.commission-btn.closed { background: none; color: var(--bone); border: 1px solid var(--ash); }
.commission-btn.closed .dot { border-color: var(--bone); background: none; }
.commission-btn.closed:hover { border-color: var(--bone); background: none; }

.dot {
  display: inline-block;
  width: 0.6em; height: 0.6em;
  border-radius: 50%;
  background: var(--ochre);
  margin-right: 0.55em;
}
.dot.closed { background: transparent; border: 1px solid currentColor; }

/* ---------- work ---------- */
.work-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 22px;
  align-items: end;
  padding-bottom: clamp(40px, 7vw, 110px);
}
.work-head .big { grid-column: 1 / 8; }
.filters {
  grid-column: 8 / 13;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding-bottom: 0.6em;
}
.filters button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 4px 0;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
  cursor: pointer;
}
.filters button:hover { color: var(--bone); }
.filters button[aria-pressed="true"] { color: var(--bone); border-bottom-color: var(--wound); }

[hidden] { display: none !important; }

/* The gallery is cut off after about a screen and a half until "Show all". */
.gallery-clip { position: relative; overflow: hidden; }
.show-all, .show-all ~ * { overflow-anchor: none; }
.gallery-clip.is-cut::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 260px;
  background: linear-gradient(transparent, var(--ink));
  pointer-events: none;
}
.show-all {
  display: block;
  margin: clamp(28px, 5vw, 70px) 0 0 8%;
  padding: 0 0 0.08em;
  background: none;
  border: 0;
  border-bottom: 2px solid var(--wound);
  color: var(--bone);
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: var(--fringe);
  cursor: pointer;
}
.show-all:hover { border-bottom-color: var(--bone); }

/* what to do after looking at the gallery */
.next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 36px;
  padding-top: clamp(40px, 6vw, 80px);
  margin-top: clamp(50px, 8vw, 110px);
  margin-bottom: clamp(60px, 10vw, 150px);
  border-top: 1px solid var(--line);
}
.next .commission-btn { margin-top: 0; }
.next-link {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ash);
}
.next-link:hover { color: var(--bone); }

/* Columns of unequal width that start at unequal heights. */
.gallery { display: flex; align-items: flex-start; gap: var(--hang-x); }
.col { display: flex; flex-direction: column; gap: var(--hang-y); min-width: 0; }
.col:nth-child(1) { flex: 1.25; }
.col:nth-child(2) { flex: 0.85; padding-top: clamp(60px, 13vw, 220px); }
.col:nth-child(3) { flex: 1.05; padding-top: clamp(24px, 5vw, 90px); }

/* When a filter has only one row of pieces, no stagger: centre them on one line. */
.gallery.one-row { align-items: center; }
.gallery.one-row .col { padding-top: 0; }

.piece {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}
.piece img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--ink-raised);
  transition: filter 0.3s ease;
}
.piece:hover img, .piece:focus-visible img { filter: brightness(1.14) saturate(1.1); }
.piece-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 14px;
  padding-top: 8px;
}
.piece-title { font-family: var(--display); font-weight: 500; font-style: italic; font-size: 1.4rem; line-height: 1.2; }
.piece-cat { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); }
.piece-missing {
  padding: 28px 16px;
  border: 1px dashed var(--wound);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.empty { color: var(--ash); padding-block: 24px; }

/* ---------- what I do ---------- */
.does {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 18px;
  padding-block: clamp(70px, 12vw, 180px) clamp(70px, 12vw, 180px);
}
.does .label { grid-column: 1 / 4; padding-top: 0.9em; }
.does-list { grid-column: 4 / 13; min-width: 0; }
.does-list li {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  padding-block: 0.14em;
  border-bottom: 1px solid var(--line);
}
.does-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 24px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.does-list a:hover { color: var(--wound); }
.does-list li:nth-child(even) { font-style: italic; }
.does-list .amp { font-style: italic; }
.does-list li:nth-child(3n + 2) { padding-left: 8%; }
.does-list li:nth-child(3n) { padding-left: 20%; }

/* ---------- about ---------- */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 24px;
  align-items: start;
  padding-block: clamp(50px, 9vw, 130px) 0;
}
.about .big { grid-column: 1 / 7; }
.prose {
  grid-column: 7 / 12;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 34em;
  min-width: 0;
  font-size: 1.08rem;
  padding-top: clamp(0px, 5vw, 70px);
}

/* ---------- work with me: two overlapping slabs ---------- */
.hire { padding-block: clamp(50px, 9vw, 130px) clamp(70px, 12vw, 180px); }
.hire .big { text-align: right; position: relative; z-index: 2; pointer-events: none; }
.paths {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-top: clamp(-70px, -4.5vw, -18px);
}
.path {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: clamp(24px, 4vw, 56px);
}
.path h3 {
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.path p { max-width: 30em; }
.path-vgen {
  grid-column: 1 / 8;
  grid-row: 1;
  background: var(--wound);
  color: var(--ink);
  padding-top: clamp(56px, 8vw, 120px);
  padding-right: clamp(24px, 10vw, 150px);
  font-weight: 450;
}
.path-vgen .label { color: var(--ink); }
.path-status { font-size: 0.9rem; font-weight: 600; }
.path-vgen .dot { background: var(--ink); }
.cta {
  display: inline-block;
  margin-top: 8px;
  background: var(--ink);
  color: var(--bone);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 16px 22px;
  transition: background 0.2s ease, color 0.2s ease;
}
.cta:hover { background: var(--bone); color: var(--ink); }
.path-project {
  grid-column: 7 / 13;
  grid-row: 1;
  align-self: end;
  z-index: 1;
  margin-top: clamp(120px, 20vw, 300px);
  margin-bottom: clamp(-70px, -5vw, -24px);
  background: var(--ink-raised);
  border: 1px solid var(--line);
}
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 8px; }
.email {
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  font-weight: 600;
  overflow-wrap: anywhere;
  min-width: 0;
  user-select: all;
  border-bottom: 2px solid var(--wound);
}
.copy {
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: none;
  color: var(--ash);
  border: 1px solid var(--line);
  padding: 7px 14px;
  cursor: pointer;
}
.copy:hover { color: var(--bone); border-color: var(--ash); }
.hiring {
  margin-top: clamp(96px, 10vw, 140px);
  font-size: 1.05rem;
  max-width: 34em;
}
.hiring a { color: var(--ochre); text-underline-offset: 4px; }

/* ---------- footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.links a {
  font-size: 0.72rem;
  font-weight: 600;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}
.links a:hover { color: var(--ochre); }
.fine { font-size: 0.8rem; color: var(--ash); }

/* ---------- viewer ---------- */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: calc(56px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--ink);
  color: var(--bone);
  overflow: auto;
}
.lightbox::backdrop { background: var(--ink); }
.lb-figure {
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.lb-figure img { max-width: min(100%, 1500px); max-height: 78vh; width: auto; height: auto; display: block; }
.lb-figure figcaption { text-align: center; max-width: 40em; display: flex; flex-direction: column; gap: 6px; }
.lb-figure h3 { font-family: var(--display); font-weight: 500; font-style: italic; font-size: 2.2rem; line-height: 1; }
.lb-meta { color: var(--ash); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.lb-note { font-size: 1rem; }
.lb-btn {
  position: fixed;
  z-index: 2;
  background: var(--ink-raised);
  color: var(--bone);
  border: 1px solid var(--line);
  font-family: var(--body);
  font-size: 1.1rem;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  cursor: pointer;
}
.lb-btn:hover { border-color: var(--ochre); }
.lb-close {
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.lb-prev { left: max(12px, env(safe-area-inset-left, 0px)); top: 50%; translate: 0 -50%; }
.lb-next { right: max(12px, env(safe-area-inset-right, 0px)); top: 50%; translate: 0 -50%; }

/* ---------- phone ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { grid-template-rows: auto auto auto; }
  .hero-side { grid-column: 1 / 3; margin-bottom: 3.6rem; }
  .hero-art { grid-column: 3 / 13; grid-row: 1; }
  .hero h1 { margin-top: -0.5em; }
  .hero-meta { grid-column: 1 / 13; }
  .work-head .big, .filters { grid-column: 1 / 13; }
  .filters { padding-bottom: 0; }
  .col:nth-child(1) { flex: 1.15; }
  .col:nth-child(2) { flex: 0.85; padding-top: 64px; }
  .gallery.one-row .col { padding-top: 0; }
  .piece-cat { display: none; }
  .piece-title { font-size: 1.1rem; }
  .does .label, .does-list { grid-column: 1 / 13; }
  .does-list li:nth-child(3n + 2) { padding-left: 5%; }
  .does-list li:nth-child(3n) { padding-left: 12%; }
  .about .big, .prose { grid-column: 1 / 13; }
  .hire .big { text-align: left; }
  .paths { margin-top: -10px; }
  .path-vgen { grid-column: 1 / 12; padding-right: clamp(24px, 4vw, 56px); padding-bottom: 72px; }
  .path-project { grid-column: 2 / 13; grid-row: 2; margin-top: -40px; margin-bottom: 0; }
  .hiring { margin-top: 48px; }
  .lb-prev, .lb-next { top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); translate: none; }
  .lightbox { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .lb-figure img { max-height: 62vh; }
  .lb-figure h3 { font-size: 1.8rem; }
  .cta { white-space: nowrap; font-size: 0.72rem; letter-spacing: 0.1em; padding: 15px 16px; }
  .commission-btn { font-size: 0.72rem; letter-spacing: 0.1em; padding: 15px 16px; }
}
