/* Joe Rudko — portfolio. Centred header (name, Work, Contact) above full-width content. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --ink: #1f1f1f;
  --text: #4a4a4a;
  --wall: #f3f3f3;        /* gallery-wall colour the art was photographed against */
  --tile: rgba(175, 175, 175, 0.1);
  --edge: 15px;           /* outer page margin */
  --nav-x: 30px;          /* side padding of the nav row: about the same air as above the words */
  --header-h: 78px;       /* height of the pinned header row */
  --logo-w: 178px;        /* logo width; the nav lettering scales from it */
  --gap: 34px;            /* vertical rhythm between blocks */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

body {
  margin: 0;
  padding: var(--edge);
  font: 400 16px/28px "Inter", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.15px;
  color: var(--text);
  background: var(--wall);
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--edge);

}

/* No browser focus ring (the orange box) anywhere; buttons also drop the tap flash. */
:focus, :focus-visible { outline: none; }
button { -webkit-tap-highlight-color: transparent; }

img { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
/* no grey flash when a link or button is tapped on a phone */
a, button, .site-title, .site-nav a { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
p { margin: 0; }

/* Hover: the whole piece (tile included) lifts a few pixels. */
.work__img, .tile a { transition: transform 0.45s var(--ease); }
@media (hover: hover) { .work__img:hover, .tile a:hover { transform: translateY(-6px); } }

/* Wall photos fade out at their edges so the art floats on the page background. */
img.blend {
  --f: 4%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--f), #000 calc(100% - var(--f)), transparent),
                      linear-gradient(to bottom, transparent, #000 var(--f), #000 calc(100% - var(--f)), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 var(--f), #000 calc(100% - var(--f)), transparent),
              linear-gradient(to bottom, transparent, #000 var(--f), #000 calc(100% - var(--f)), transparent);
  mask-composite: intersect;
}

/* Rapid clicking must never select (highlight) images or captions in the viewers. */
.lightbox, .slideshow, .work__img, .tile a, .lightbox *, .slideshow * {
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent;
}
.lightbox ::selection, .slideshow ::selection, .work__img ::selection, .tile ::selection,
.lightbox::selection, .slideshow::selection { background: transparent; }
img { -webkit-user-drag: none; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: var(--edge); top: var(--edge); background: var(--wall); padding: 4px 8px; z-index: 10; }

/* ---------- Header: one line along the top — Joe Rudko – Work – Exhibitions – About ---------- */

/* Stays pinned while the page scrolls (no background, so the page shows through). */
.site-header {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;   /* name and links spread edge to edge */
  margin: calc(-1 * var(--edge)) calc(-1 * var(--edge)) 26px;
  padding: calc(var(--edge) - 3px) var(--nav-x) 14px;
}
.site-title { display: flex; align-items: center; height: 52px; flex: none; }
.site-title img { width: var(--logo-w); height: auto; }

.site-nav { display: flex; align-items: center; gap: clamp(22px, 3.7vw, 64px); margin-left: auto; color: var(--ink); }   /* name on the left; the three links grouped on the right */
.site-nav a { display: flex; align-items: center; height: 52px; padding: 0 2px; }
.site-nav a { transition: opacity 0.3s var(--ease); }
/* the page you're on: a hand-drawn line under its word */
/* (drawn on the link, not the label: the label's lettering mask would hide it) */
.site-nav a { position: relative; }
.nav-contact--top { display: none; position: relative; }   /* phones only: About sits on the top row */
.site-nav a[aria-current="page"]::after, .nav-contact--top[aria-current="page"]::after {
  content: ""; position: absolute; pointer-events: none; left: 2px; right: 2px;
  /* same pen scale as the lettering: 1 image pixel = label width / lettering width */
  --k: calc(var(--label-w, var(--logo-w)) / var(--logo-px));
  top: calc(50% + (var(--lh) / 2 + 23.9) * var(--k));   /* clear air between the letters and the line (23.9 = the original 95 image px, in the smaller nav images) */
  height: calc(var(--uh) * var(--k));
  background: var(--ink);
  -webkit-mask: var(--ul) center / 100% 100% no-repeat; mask: var(--ul) center / 100% 100% no-repeat;
}

/* Hand-lettered labels: same pen scale as the name (--logo-px is the logo image's pixel width, set on <body>). */
.nav-label {
  display: block; aspect-ratio: var(--ar); background-color: var(--ink);
  -webkit-mask: var(--mask) center / 100% 100% no-repeat; mask: var(--mask) center / 100% 100% no-repeat;
  transition: background-color 0.28s var(--ease);
}
/* Navigation and the name are plain black everywhere: hovering just softens them. */
@media (hover: hover) { .site-nav a:hover .nav-label, .nav-contact--top:hover .nav-label, .site-title:hover { opacity: 0.55; } }   /* not on touch, where hover sticks after a tap */
.nav-label { transition: opacity 0.3s var(--ease); }
.site-title { transition: opacity 0.3s var(--ease); }
.site-title img { filter: brightness(0); }
/* each label's pixel width comes from its own --lw, so every label scales with the logo */
.nav-label { width: calc(var(--label-w, var(--logo-w)) * var(--lw) / var(--logo-px)); }

/* ---------- Page transitions ---------- */

.js .page { opacity: 0; transition: opacity 0.6s var(--ease); }
.js.is-ready .page { opacity: 1; }
.js.is-leaving .page { opacity: 0; transition-duration: 0.2s; }

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

.js img[data-fade] { opacity: 0; transition: opacity 0.7s var(--ease); }
.js img[data-fade].is-loaded { opacity: 1; }

/* ---------- Content blocks ---------- */

.page > * + * { margin-top: var(--gap); }
.page > :first-child { margin-top: 0; }

/* Body copy: tighter tracking, calmer leading, darker ink and a comfortable line length. */
.text { font-size: 16px; line-height: 1.6; letter-spacing: 0.1px; color: #2a2a2a; max-width: 36em; }
/* About page bio: 18px, with a slightly tighter line height (about 1.55) so the larger type still reads as a paragraph */
.page-contact .contact__body .text { font-size: 16px; line-height: 1.55; letter-spacing: 0.05px; max-width: 45em; }
@media (max-width: 560px) { .page-contact .contact__body .text { font-size: 17px; line-height: 1.55; } }   /* phones: 17px, so it still fits a narrow column */
.text.text--offset { padding-top: 56px; }
.text p.gap-1 { margin-top: 1.6em; }
.text p.gap-2 { margin-top: 3.2em; }
.text p.gap-3 { margin-top: 4.8em; }
.text--prose { margin-top: 28px; font-size: 17px; line-height: 1.65; max-width: none; padding-inline: max(24px, calc((100% - 780px) / 2)); }   /* a centred column about 780px wide, text left-aligned */
.text:has(+ .text--prose) { max-width: none; padding-inline: max(24px, calc((100% - 780px) / 2)); }   /* venue + dates line up with the text below */
.text--prose p.gap-1 { margin-top: 1.1em; }
@media (max-width: 560px) { .text--prose { font-size: 16px; margin-top: 20px; padding-inline: 0; } .text:has(+ .text--prose) { padding-inline: 0; } }
.text a { text-decoration: underline; text-underline-offset: 3px; }

/* Home: two columns of work with captions */
.home-grid {
  display: grid;
  grid-template-columns: repeat(var(--hc, 2), minmax(0, 1fr));   /* set in the admin: 1 to 4 columns on desktop */
  column-gap: var(--gap);
  align-items: start;
}
.work { margin: 0 0 12px; }
.work__img { display: block; cursor: pointer; }
.work__img img, .js .work__img img[data-fade] { width: 100%; height: 100%; transition: opacity 0.7s var(--ease); }


/* Hero image + slideshow */
.hero { background: var(--tile); }
.hero { max-height: 85vh; overflow: hidden; }
.hero img { width: 100%; height: 100%; max-height: 85vh; object-fit: cover; }

.slideshow { position: relative; aspect-ratio: 1.56; max-height: 82vh; width: 100%; background: var(--tile); overflow: hidden; }
.slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transition: opacity 0.7s var(--ease); pointer-events: none; }
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.slide-btn {
  position: absolute; top: 50%; width: 34px; height: 52px; margin-top: -26px; padding: 0;
  border: 0; cursor: pointer; background: rgba(0, 0, 0, 0.1); opacity: 0;
  transition: opacity 0.3s var(--ease), background 0.3s var(--ease);
}
.slide-btn--prev { left: 0; }
.slide-btn--next { right: 0; }
.slide-btn::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 12px;
  border: solid #fff; border-width: 1px 1px 0 0;
}
.slide-btn--prev::after { transform: translate(-30%, -50%) rotate(-135deg); }
.slide-btn--next::after { transform: translate(-70%, -50%) rotate(45deg); }

/* Left / right chevron cursor: click either half of a slideshow or the full-screen viewer to step.
   The arrow buttons stay in the DOM for keyboard users only. */
.slide-btn { opacity: 0; pointer-events: none; }
.slide-btn:focus-visible { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .slideshow.is-left { cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='44'%20viewBox='0%200%2024%2044'%20fill='none'%20stroke='%236f6f6f'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%203L3%2022L21%2041'/%3E%3C/svg%3E") 12 22, w-resize; }
  .slideshow.is-right { cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='44'%20viewBox='0%200%2024%2044'%20fill='none'%20stroke='%236f6f6f'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%203L21%2022L3%2041'/%3E%3C/svg%3E") 12 22, e-resize; }
  /* Full-screen viewer uses a smaller chevron. */
  .lightbox.is-left { cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='30'%20viewBox='0%200%2016%2030'%20fill='none'%20stroke='%236f6f6f'%20stroke-width='1.4'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%202L2%2015L14%2028'/%3E%3C/svg%3E") 8 15, w-resize; }
  .lightbox.is-right { cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='30'%20viewBox='0%200%2016%2030'%20fill='none'%20stroke='%236f6f6f'%20stroke-width='1.4'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%202L14%2015L2%2028'/%3E%3C/svg%3E") 8 15, e-resize; }
  .lightbox button { cursor: pointer; }
  .lightbox.on-art { cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%20viewBox='0%200%2028%2028'%20fill='none'%20stroke='%23000'%20stroke-width='2.5'%20stroke-linecap='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='8'/%3E%3Cpath%20d='M18%2018L25%2025'/%3E%3Cpath%20d='M12%208v8M8%2012h8'/%3E%3C/svg%3E") 9 9, zoom-in; }
  .lightbox.on-art.is-zoomed { cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%20viewBox='0%200%2028%2028'%20fill='none'%20stroke='%23000'%20stroke-width='2.5'%20stroke-linecap='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='8'/%3E%3Cpath%20d='M18%2018L25%2025'/%3E%3Cpath%20d='M8%2012h8'/%3E%3C/svg%3E") 9 9, zoom-out; }
  .lightbox.is-zoomed .lightbox__stage img { transform: scale(2.2); }
}

/* Pages that open with a big photo: it bleeds to the top and sides, and the nav sits on top of it. */
.has-hero .site-header { margin-bottom: calc(-1 * var(--header-h)); }
.has-hero .slideshow, .has-hero .hero { margin-inline: calc(-1 * var(--edge)); width: calc(100% + 2 * var(--edge)); max-height: 80vh; }   /* a little shorter than the window, so the first lines of copy peek in underneath */
.has-hero .hero img { max-height: 80vh; }

/* Thumbnail grid */
.grid {
  align-items: start;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 20px;
}
.tile a { display: grid; place-items: center; aspect-ratio: var(--ratio); }
.tile img, .js .tile img[data-fade] { width: auto; height: auto; max-width: 100%; max-height: 100%; transition: opacity 0.7s var(--ease); }


/* Unframed work: keep each photo's grey backdrop as a tile on the white page. */
.page-tiles .tile a { display: block; background: var(--tile); }
.page-blend .tile a { background: none; }   /* the photo's own backdrop is the page colour */
.page-tiles .tile img { width: 100%; height: 100%; object-fit: contain; }

/* Contact (desktop): the portrait fills the left half of the window, top to bottom, with the nav on top of it. */
@media (min-width: 901px) {
  :root { --ab: clamp(34px, 5.8vw, 120px); }   /* About: space left and right of the bio, in the right half */
  .page-contact .contact__body > .text, .page-contact .contact-links { max-width: none; margin-right: calc(var(--ab) - var(--edge)); }
  .page-contact .contact { grid-template-columns: calc(50vw - var(--edge)) minmax(0, 1fr); column-gap: 0; min-height: 100vh; }
  .page-contact .contact__photo { position: sticky; top: 0; align-self: start; height: 100vh; margin-left: calc(-1 * var(--edge)); aspect-ratio: auto !important; }
  .page-contact .contact__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%; }   /* when the window is too narrow for the whole picture, trim the left (the studio), never the person on the right */
  .page-contact .contact__body { padding: calc(var(--header-h) + 14px + 40px) 0 0 var(--ab); min-width: 0; }
  /* everything lives in the right column: one column of lists, tab bar pinned on a white strip over that column only */
  .page-contact .cv-tabs { margin-top: 4.5rem; padding-bottom: 48px; }
  body.page-contact { padding-bottom: 0; }   /* the photo runs right to the bottom of the page */
  .page-contact .cv-columns { column-count: 1; }
  .page-contact .cv-bar { margin-left: calc(-1 * var(--ab)); margin-right: calc(-1 * var(--edge)); padding: 10px var(--edge) 0 var(--ab); }
  /* once the tabs pin they sit directly under the header row (Work · name · Exhibitions stay put); a white strip covers the right half behind both */
  /* the white strip only ever exists over the right half (always, not only while pinned), so it can't flash across the photo as it fades in or out */
  .page-contact .site-header::before { left: 50%; }
}

.contact-email { margin-top: 1.6em; font-size: 16px; line-height: 1.6; letter-spacing: 0.1px; ; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px}
.copy-email { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; letter-spacing: inherit; color: inherit; position: relative; }
.copy-email__text { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color 0.25s var(--ease); }
.copy-email:hover .copy-email__text { text-decoration-color: currentColor; }
.copy-email svg { flex: none; color: #8a8a8a; transition: color 0.25s var(--ease), opacity 0.25s var(--ease); }
.copy-email:hover svg { color: var(--ink); }
.copy-email__icons { display: grid; }
.copy-email__icons svg { grid-area: 1 / 1; }
.copy-email__check { opacity: 0; }
.copy-email.is-copied .copy-email__icon { opacity: 0; }
.copy-email.is-copied .copy-email__check { opacity: 1; color: var(--ink); }
.copy-email__note { font-size: 13px; color: #8a8a8a; margin-left: 2px; min-width: 4.5em; opacity: 0; transition: opacity 0.25s var(--ease); }
.copy-email.is-copied .copy-email__note { opacity: 1; }

/* Curriculum vitae */
.cv { font-size: 16px; line-height: 1.55; letter-spacing: 0.1px; color: #2a2a2a; }
.cv a { text-decoration: underline; text-underline-offset: 3px; }
/* The lists run in two columns across the full width, below the photo (which scrolls away with the page). */
.cv-tabs { margin: 6rem 0 0; padding-bottom: 80px; }
.cv-columns { column-count: 2; column-gap: 68px; }
/* The tab bar pins just under the logo row once it reaches the top, on a white band that also
   covers the logo row (body.cv-stuck is toggled by main.js). */
.cv-bar {
  position: sticky; top: var(--header-h); z-index: 9;
  display: flex; align-items: center; justify-content: flex-start; gap: 24px;
  margin: 0 calc(-1 * var(--edge)) 26px; padding: 10px var(--edge) 0;
  background: transparent; transition: background-color 0.3s var(--ease);
}
.cv-tablist {
  position: relative; display: flex; gap: 30px; min-width: 0; flex: 1;
  /* Tabs never wrap or squeeze: on a narrow screen the tab list scrolls sideways instead. */
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cv-download { flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 0; font: inherit; letter-spacing: inherit; color: inherit; }
.cv-download__text { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color 0.25s var(--ease); }
.cv-download:hover .cv-download__text { text-decoration-color: currentColor; }
.cv-download svg { flex: none; color: #8a8a8a; transition: color 0.25s var(--ease); }
.cv-download:hover svg { color: var(--ink); }
.cv-tablist::-webkit-scrollbar { display: none; }
.cv-stuck .cv-bar { background: #fff; }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #fff;
  opacity: 0; transition: opacity 0.3s var(--ease); pointer-events: none;
}
.cv-stuck .site-header::before { opacity: 1; }
.cv-tab {
  flex: none; white-space: nowrap; padding: 6px 0 12px; border: 0; border-radius: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 16px; letter-spacing: 0.1px; color: #8a8a8a;
  transition: color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.cv-tab:hover { color: var(--ink); }
.cv-tab[aria-selected="true"] { color: var(--ink); }
.cv-ink { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--ink); pointer-events: none; transition: transform 0.4s var(--ease), width 0.4s var(--ease); }
.cv-ink.no-anim { transition: none; }
.js .cv-panel[hidden] { display: none; }
.js .cv-panel { animation: cv-in 0.5s var(--ease); }
@keyframes cv-in { from { opacity: 0; transform: translateY(8px); } }
.cv-section { margin: 0 0 1rem; break-inside: avoid; }
.cv-section--long { break-inside: auto; }
.cv-section h3 { break-after: avoid; }

/* Layout D: ruled rows. Year on the left (once per group), title above, quiet detail line below. */
.cv-list { margin: 0; padding: 0; list-style: none; }
.cv-item { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 0 12px; padding: 4px 0 8px; break-inside: avoid; }
.cv-item--noyear { grid-template-columns: minmax(0, 1fr); }
.cv-item--start { padding-top: 12px; border-top: 0; }
.cv-item--start:first-child { border-top: 0; padding-top: 14px; }

.page-exhibitions .cv-exhibitions { padding-bottom: 40px; }

/* A long list that runs across both columns (the bibliography): the heading spans the full width and both
   columns then start on the same line, each opening with its own rule. */
.cv-section.cv-section--long h3 { column-span: all; border-bottom: 0; margin-bottom: 0; }
.cv-section--long .cv-item--start:first-child { border-top: 0; padding-top: 12px; }
@media (max-width: 900px) {
  .cv-section.cv-section--long h3 { border-bottom: 0; margin-bottom: 6px; }
  /* single column: the heading's line is the only one above the first entry */
  .cv-section.cv-section--long .cv-item--start:first-child { border-top: 0; padding-top: 14px; }
}
.cv-year { color: #9a9a9a; font-variant-numeric: tabular-nums; }
.cv-title { display: block; }
.cv-title em { font-style: italic; }
.cv-sub { display: block; margin-top: 1px; font-size: 14px; line-height: 1.45; color: #9a9a9a; }
.cv-sub em { font-style: italic; }
/* Exhibitions tab: the venue follows the title on the same line */
.cv-panel--inline .cv-title, .cv-panel--inline .cv-sub { display: inline; }
.cv-panel--inline em { font-style: normal; }   /* exhibition titles are set upright */
.cv-panel--same .cv-sub { font-size: inherit; line-height: inherit; }   /* bibliography: detail line is the same size as the title */
.cv-panel--inline .cv-sub { margin-left: 0.5em; font-size: inherit; line-height: inherit; }   /* same size as the title */
@media (max-width: 900px) { .cv-tabs { margin-top: 3.5rem; } .cv-columns { column-count: 1; } }
.cv-section h3 { margin: 0 0 6px; padding-top: 44px; padding-bottom: 12px; border-bottom: 0; font-family: inherit; font-size: 16px; font-weight: 500; line-height: 1.2; letter-spacing: 0.1px; text-transform: none; color: #000; }
.cv li a { text-decoration-thickness: 1px; text-decoration-color: rgba(0, 0, 0, 0.28); transition: text-decoration-color 0.25s var(--ease), opacity 0.25s var(--ease); }
.cv li a { transition: color 0.25s var(--ease), text-decoration-color 0.25s var(--ease), opacity 0.25s var(--ease); }
.cv li a:hover, .cv li a:focus-visible { color: #a8a8a8; text-decoration-color: currentColor; }   /* links in the CV soften to light grey */

/* Contact form (a tab on the About page) */
.contact-form { max-width: 34em; padding: 44px 0 20px; font-size: 16px; }
.contact-form__intro { margin: 0 0 30px; color: #6d6d6d; }
.field { position: relative; margin-bottom: 26px; }
.field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; letter-spacing: 0.1px; color: #6d6d6d; }
.field input, .field select, .field textarea {
  display: block; width: 100%; padding: 13px 14px; border: 1px solid rgba(0, 0, 0, 0.28); border-radius: 0;
  background: #fff; color: var(--ink); font: inherit; letter-spacing: 0.1px; transition: border-color 0.25s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field select { cursor: pointer; padding-right: 38px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none' stroke='%23666' stroke-width='1.2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; }
.field textarea { resize: vertical; min-height: 9em; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #000; }
.field.has-error input, .field.has-error textarea { border-color: #a8423f; }
.field__error { display: block; min-height: 0; margin-top: 6px; font-size: 13px; color: #a8423f; }
.field__error:empty { display: none; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 34px; }
.contact-form__submit {
  padding: 12px 26px; border: 0.5px solid #000; border-radius: 0; background: #000; color: #fff; cursor: pointer;
  font: inherit; letter-spacing: 0.4px; transition: background-color 0.25s var(--ease), color 0.25s var(--ease), opacity 0.25s var(--ease);
}
.contact-form__submit:hover { background: transparent; color: #000; }
.contact-form__submit[disabled] { opacity: 0.45; cursor: default; }
.contact-form__status { font-size: 14px; color: #6d6d6d; }
.contact-form__status a { text-decoration: underline; text-underline-offset: 3px; }
.contact-form.is-sent .field, .contact-form.is-sent .contact-form__actions, .contact-form.is-sent .contact-form__intro { display: none; }
.contact-form__thanks { margin: 0; font-size: 16px; line-height: 1.6; }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }

/* Work page: the four thumbnails float in the middle of the window, equal room above and below. */
.page-work { padding-bottom: 0; }
.page-work .page {
  box-sizing: border-box; min-height: 100vh; min-height: 100dvh;
  margin-top: calc(-1 * (var(--header-h) + 26px)); padding: calc(var(--header-h) + 26px) 0;
  display: flex; flex-direction: column; justify-content: center;
}
@media (max-width: 900px) {
  .page-work .page { margin-top: calc(-1 * (var(--header-h) + 18px)); padding: calc(var(--header-h) + 18px) 0; }
}

/* ---------- Card grids: a picture with its title underneath ---------- */

.cards { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 54px var(--gap); align-items: start; }
.card a { display: block; transition: transform 0.45s var(--ease); }
@media (hover: hover) { .card a:hover { transform: translateY(-6px); } }
.card__img { position: relative; display: block; aspect-ratio: var(--ratio); background: var(--tile); overflow: hidden; }
.card__img img, .js .card__img img[data-fade] { width: 100%; height: 100%; transition: opacity 0.7s var(--ease); }
.cards--cover .card__img img { object-fit: cover; }
.cards--contain .card__img img { object-fit: contain; }
.card__title { display: block; margin-top: 14px; font-size: 15px; line-height: 1.35; color: var(--ink); }
.page-work .card__title { text-align: center; }   /* Works page: the labels sit centred under their thumbnails */
@media (max-width: 900px) { .cards { grid-template-columns: repeat(var(--cols-t), minmax(0, 1fr)); gap: 34px 12px; } }

/* ---------- Lightbox ---------- */

.lightbox {
  touch-action: none;   /* pinch / pan are handled in main.js */
  position: fixed; inset: 0; z-index: 20; display: grid; grid-template-rows: 1fr auto auto;
  padding: 24px 64px 20px; background: var(--wall);
  opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0s 0.35s, background-color 0.4s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.lightbox__stage { overflow: hidden; min-height: 0; display: flex; align-items: center; justify-content: center; }
.lightbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: opacity 0.3s var(--ease), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.lightbox__stage img.is-gesturing { transition: opacity 0.3s var(--ease); }
.lightbox__stage img.is-changing { opacity: 0; }
/* Overall / Detail switch (only for pieces that have detail photos) */
.lightbox__views { display: flex; justify-content: center; gap: 22px; padding-top: 12px; }
.lightbox__views[hidden] { display: none; }
.lightbox__views button {
  position: static; width: auto; height: auto; padding: 4px 0; border: 0; background: none; cursor: pointer; opacity: 1;
  font: inherit; font-size: 14px; letter-spacing: 0.1px; color: #8a8a8a; transition: color 0.25s var(--ease);
}
.lightbox__views button:hover, .lightbox__views button[aria-pressed="true"] { color: var(--ink); }
.lightbox__views button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.lightbox__caption { min-height: 56px; padding-top: 14px; text-align: center; font-size: 13px; line-height: 20px; }
.lightbox button {
  position: absolute; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--ink); opacity: 0.55; transition: opacity 0.25s var(--ease);
}
.lightbox button:hover, .lightbox button:focus-visible { opacity: 1; outline: none; }
.lightbox__close { top: 14px; right: 14px; }
.lightbox button::before, .lightbox button::after { content: ""; position: absolute; top: 50%; left: 50%; }
.lightbox__close::before, .lightbox__close::after { width: 22px; height: 1px; background: currentColor; margin: 0 0 0 -11px; transform: rotate(45deg); }
.lightbox__close::after { transform: rotate(-45deg); }
body.lightbox-open { overflow: hidden; }

/* ---------- Tablet & mobile ---------- */

@media (max-width: 900px) {
  :root { --gap: 24px; }
  .site-header { margin-bottom: 18px; }
  .text.text--offset { padding-top: 0; }

  .home-grid { grid-template-columns: repeat(var(--hcm, 1), minmax(0, 1fr)); column-gap: 12px; }   /* tablet and phone: 1 or 2 columns */
  .grid { grid-template-columns: repeat(var(--cols-t), minmax(0, 1fr)); gap: 12px; }
  .contact { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }   /* minmax: the scrolling tab row can't widen the column */
  .contact__body { min-width: 0; }
  .cv-tablist { margin-right: calc(-1 * var(--edge)); padding-right: var(--edge); }   /* only the tab row runs off the edge */
  .page-contact .contact__photo { margin-inline: calc(-1 * var(--edge)); }

  .lightbox { padding: 16px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  /* iPhone Safari: its floating toolbar sits over the bottom of the screen, so lift the caption clear of it */
  .ios-float .lightbox { padding-bottom: 92px; }
  }

@media (max-width: 560px) {
  :root { --edge: 16px; }
  body { font-size: 15px; line-height: 26px; }
  .text { font-size: 16px; }
  .grid { grid-template-columns: repeat(var(--cols-p), minmax(0, 1fr)); gap: 10px; }
}

/* ---------- Narrow screens: the one line shrinks to fit the width ----------
   The lettering is about 3.2 logo-widths long in total (name + three words), plus room between them. */
@media (max-width: 1000px) {
  :root { --logo-w: min(162px, calc((100vw - 2 * var(--edge) - 3 * 24px) / 3.21)); }
  .site-nav { gap: 24px; }
}
/* narrow desktop windows: the three words stack, one above the other, on the right, so they never run together */
@media (min-width: 561px) and (max-width: 820px) {
  :root { --logo-w: 162px; --header-h: calc(var(--edge) - 3px + 3 * 34px + 14px); }
  .site-header { align-items: flex-start; }
  .site-title { height: 34px; }
  .site-nav { flex-direction: column; align-items: flex-end; gap: 0; }
  .site-nav a { height: 34px; }
}
/* phones: the name sits on the left and the three words stack on the right (Works, Exhibitions, About), pinned along the top with no background */
@media (max-width: 560px) {
  :root { --nav-x: 24px; --logo-w: 150px; --label-w: 150px; --header-h: calc(var(--edge) - 3px + 3 * 34px + 14px); }
  .site-header { align-items: flex-start; flex-wrap: nowrap; justify-content: space-between; }
  .page-contact.has-hero .site-header, .page-contact .site-header { margin-bottom: 0; }   /* About: the photo starts right under the nav */
  .site-title { height: 34px; width: auto; justify-content: flex-start; }
  .nav-contact--top { display: none; }
  .site-nav { flex-direction: column; align-items: flex-end; gap: 0; margin: 0 0 0 auto; }
  .site-nav a { height: 34px; padding: 0 2px; }
}

/* phones: the photos at the top of a show keep their own proportions (no crop), start below the header, and the row
   is a carousel: the next photo peeks in from the right, there is an arrow and a "1 / 9" counter, and the row nudges
   sideways once when the page opens. */
@media (max-width: 560px) {
  .has-hero .site-header { margin-bottom: 0; }
  .page-contact.has-hero .site-header { margin-bottom: 0; }
  .has-hero .slideshow, .has-hero .hero { max-height: none; }
  .hero img, .has-hero .hero img { height: auto; max-height: none; object-fit: contain; }
  .slideshow { aspect-ratio: auto; max-height: none; }
  .slides { position: relative; inset: auto; display: flex; align-items: center; gap: 6px;
            transform: translateX(calc(var(--i, 0) * (-88% - 6px) + var(--drag, 0px))); transition: transform 0.55s var(--ease); touch-action: pan-y; }
  .slideshow { touch-action: pan-y; }
  .slides.is-dragging { transition: none; }
  .slide { position: relative; inset: auto; flex: 0 0 88%; opacity: 1; pointer-events: auto; }
  .slide img { height: auto; max-height: none; object-fit: contain; }
  .slideshow.is-single .slide { flex-basis: 100%; }
  .slideshow.is-single .slide-count { display: none; }
  .slide-btn { display: none; }   /* no arrows on phones: the peeking photo, the counter and swiping say it all */
  .slide-count { position: absolute; left: 10px; bottom: 14px; z-index: 2; padding: 1px 7px; border-radius: 10px;
                 background: rgba(255, 255, 255, 0.85); font-size: 10px; line-height: 15px; letter-spacing: 0.3px; color: #111; pointer-events: none; }
  .slideshow.is-nudging .slides { animation: slide-nudge 1.4s var(--ease) 1; }
}
@keyframes slide-nudge { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(-13%); } 70% { transform: translateX(-13%); } }
.slide-count { display: none; }
@media (max-width: 560px) { .slide-count { display: block; } .slideshow.is-single .slide-count { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .js .reveal { transform: none; }
}

/* text selection: emerald from the paintings */
::selection { background: #000; color: #fff; }

/* bottom of a show page: the other shows */
.more-shows { margin-top: 120px; padding-bottom: 90px; }
.more-shows h2 { margin: 0 0 28px; font-family: inherit; font-size: 16px; font-weight: 500; line-height: 1.2; letter-spacing: 0.1px; color: var(--ink); }
@media (max-width: 900px) { .more-shows { margin-top: 80px; padding-bottom: 70px; } }

/* "More exhibitions" / "More work": one row that scrolls sideways (the next card peeks in at the edge) instead of a grid */
.more-shows .cards {
  display: flex; grid-template-columns: none; gap: var(--gap); align-items: flex-start;
  margin-inline: calc(-1 * var(--edge)); padding-inline: var(--edge); scroll-padding-inline: var(--edge);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; overscroll-behavior-y: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.more-shows .cards::-webkit-scrollbar { display: none; }
.more-shows .card { flex: 0 0 clamp(220px, 22vw, 340px); scroll-snap-align: start; }
.more-shows .cards.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.more-shows .cards.is-dragging a { pointer-events: none; }
@media (max-width: 900px) { .more-shows .card { flex-basis: 42vw; } .more-shows .cards { gap: 12px; } }
@media (max-width: 560px) { .more-shows .card { flex-basis: 62vw; } }

/* show grids: the year sits at the right edge of the title line, in a lighter grey (desktop) */
.card__title:has(.card__year) { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card__year { flex: none; color: #b3b3b3; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .card__year { display: none; } }

/* the viewer's close button is a hand-drawn ✗ in black (Joe's pencil X, tools/x-options); hovering softens it like the nav */
@media all {
  .lightbox .lightbox__close { opacity: 1; right: 18px; top: 18px; }
  .lightbox .lightbox__close::after { content: none; }
  .lightbox .lightbox__close::before {
    top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; transform: none; background: var(--ink);
    -webkit-mask: url(/assets/img/close-x.png?v=13) center / contain no-repeat; mask: url(/assets/img/close-x.png?v=13) center / contain no-repeat;
    transition: opacity 0.3s var(--ease);
  }
  .lightbox .lightbox__close:hover::before, .lightbox .lightbox__close:focus-visible::before { opacity: 0.55; }
}

/* ---------- About page: one size (18px) and one weight (regular) for all copy ---------- */
.page-contact .contact-email, .page-contact .cv, .page-contact .cv-tab, .page-contact .cv-section h3,
.page-contact .cv-sub, .page-contact .cv-year, .page-contact .cv-title { font-size: 16px; font-weight: 400; line-height: 1.55; letter-spacing: 0.05px; }
.page-contact .cv-section h3 { padding-top: 40px; padding-bottom: 10px; line-height: 1.4; }
.page-contact .cv-item { padding: 3px 0 6px; }
.page-contact .cv-item--start { padding-top: 10px; }
.page-contact .cv-item--start:first-child { padding-top: 10px; }
.page-contact .cv-panel--same .cv-sub, .page-contact .cv-panel--inline .cv-sub { font-size: 16px; line-height: inherit; }

/* email and "See full CV" sit together, side by side */
.page-contact .contact-email { gap: 8px 26px; justify-content: flex-start; }
.copy-email__note { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 8px; min-width: 0; white-space: nowrap; }

/* the little icons (copy, download) only appear on hover or keyboard focus */
.copy-email svg, .cv-download svg { opacity: 0; transition: opacity 0.2s var(--ease), color 0.25s var(--ease); }
.copy-email:hover svg, .copy-email:focus-visible svg, .cv-download:hover svg, .cv-download:focus-visible svg,
.copy-email.is-copied .copy-email__check { opacity: 1; }
.copy-email.is-copied .copy-email__icon { opacity: 0; }

/* ---------- About page: email and "See full CV" as white pills over the photo ---------- */
.contact__photo { position: relative; }
.contact-pills { position: absolute; left: 20px; bottom: 20px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border: 0; border-radius: 999px; cursor: pointer;
        background: rgba(255, 255, 255, 0.93); color: #111; font: inherit; font-size: 15px; font-weight: 400; line-height: 1.25; letter-spacing: 0.05px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
        transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.pill:hover, .pill:focus-visible { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14); }
.pill .copy-email__text, .pill .cv-download__text { text-decoration: none; }
.pill .copy-email__note { display: none; }
/* the icon opens up inside the pill on hover (the pill grows a little), instead of sitting there empty */
.pill .copy-email__icons, .pill > svg { width: 0; margin-left: -7px; overflow: hidden; opacity: 0; transition: width 0.25s var(--ease), margin 0.25s var(--ease), opacity 0.2s var(--ease); }
.pill:hover .copy-email__icons, .pill:focus-visible .copy-email__icons, .pill.is-copied .copy-email__icons,
.pill:hover > svg, .pill:focus-visible > svg { width: 15px; margin-left: 0; opacity: 1; }
/* the copy icon and its check mark share one spot: the icon shows normally, the check only right after copying */
.pill .copy-email__icon { opacity: 1; }
.pill .copy-email__check { opacity: 0; }
.pill.is-copied .copy-email__icon { opacity: 0; }
.pill.is-copied .copy-email__check { opacity: 1; }
.page-contact .contact-email { display: none; }
@media (max-width: 900px) {
  .contact-pills { left: 50%; transform: translateX(-50%); bottom: 14px; flex-direction: row; align-items: center; gap: 6px; width: max-content; max-width: calc(100% - 24px); }
  .pill { font-size: 13px; padding: 6px 12px; }
}

/* ---------- About page: once the tab bar pins, the site nav slides away; the tabs take the top. Back up = nav returns ---------- */
.page-contact .site-header { transition: transform 0.35s var(--ease), opacity 0.25s var(--ease); }
body.cv-stuck.page-contact .site-header { transform: translateY(-120%); opacity: 0; pointer-events: none; }
.page-contact .cv-bar { transition: top 0.35s var(--ease), background-color 0.3s var(--ease); }
body.cv-stuck.page-contact .cv-bar { top: 0; }

/* About tabs: left-aligned, with a comfortable fixed gap between them (they never touch, whatever the width) */
@media (min-width: 561px) {
  .cv-tablist { display: flex; gap: clamp(26px, 3.2vw, 46px); }   /* 46px on a full-size window, a little less on a narrow one so they still fit */
}

/* About tabs: one row that runs off the right edge of the page (swipe or drag to see the rest) instead of stacking */
@media (min-width: 561px) { .cv-tablist { flex-wrap: nowrap; gap: 38px; } }
.cv-tablist { overflow-x: auto; scrollbar-width: none; cursor: grab; }
.cv-tablist::-webkit-scrollbar { display: none; }
.cv-tablist.is-dragging { cursor: grabbing; }
.cv-tablist.is-dragging .cv-tab { pointer-events: none; }
.cv-tab { flex: none; }
.cv-ink { bottom: auto; top: 0; }
.cv-tab { padding-bottom: 10px; }

/* copy pill: the icon and the check never show together, hovered or not (these outrank the generic hover rules above) */
.copy-email.pill .copy-email__icons .copy-email__icon { opacity: 1; }
.copy-email.pill .copy-email__icons .copy-email__check { opacity: 0; }
.copy-email.pill.is-copied .copy-email__icons .copy-email__icon { opacity: 0; }
.copy-email.pill.is-copied .copy-email__icons .copy-email__check { opacity: 1; }
/* the tab row runs right to the edge of the window, so extra tabs are cut off by the page itself */
.page-contact .cv-bar { padding-right: 0; }

/* every About tab is at least a screenful tall, so a short list (Collections) can't shorten the page: the pinned tab bar
   stays pinned and the site nav doesn't pop back in */
.page-contact .cv-panel { min-height: 100vh; min-height: 100dvh; }

/* extra room after the last tab so it can slide fully into view, and tabs settle with a whole tab at the left edge */
.cv-tablist::after { content: ""; flex: none; width: max(90px, calc(100% - 50px)); }   /* room for even the last tab to slide all the way to the left */
.cv-tablist { scroll-snap-type: x proximity; }
.cv-tab { scroll-snap-align: start; }

/* the bar's left padding moves inside the scrolling row, so tabs slide away under the bar's own edge instead of being
   cropped by an invisible line inset from it */
.cv-bar { padding-left: 0 !important; }
.cv-tablist { padding-left: var(--edge); scroll-padding-left: var(--edge); }
@media (min-width: 901px) { .page-contact .cv-tablist { padding-left: var(--ab); scroll-padding-left: var(--ab); } }

/* a light line runs under the whole row of tabs; the dark underline of the selected tab sits on top of it */
.cv-bar { box-shadow: inset 0 -1px 0 #d9d9d6; }
.page-contact .cv-bar { box-shadow: inset 0 -1px 0 #d9d9d6; }

/* About: email and "See full CV" are plain text links under the bio, above the tabs */
.page-contact .contact-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 28px 0 64px; font-size: 16px; line-height: 1.55; letter-spacing: 0.05px; }
.page-contact .contact-links .copy-email, .page-contact .contact-links .cv-download { display: inline-flex; align-items: center; gap: 8px; padding: 0; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; }
.page-contact .contact-links .cv-download__text { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color 0.25s var(--ease); }
.page-contact .contact-links .cv-download:hover .cv-download__text { text-decoration-color: currentColor; }
.page-contact .contact-links .copy-email__icon { opacity: 1; }
.page-contact .contact-links .copy-email__check { opacity: 0; }
.page-contact .contact-links .copy-email.is-copied .copy-email__icon { opacity: 0; }
.page-contact .contact-links .copy-email.is-copied .copy-email__check { opacity: 1; }
@media (max-width: 900px) { .page-contact .contact-links { margin-bottom: 48px; } }
.page-contact .contact-links .copy-email__icons { opacity: 0; transition: opacity 0.2s var(--ease); }
.page-contact .contact-links .copy-email:hover .copy-email__icons, .page-contact .contact-links .copy-email:focus-visible .copy-email__icons, .page-contact .contact-links .copy-email.is-copied .copy-email__icons { opacity: 1; }
.page-contact .contact-links .copy-email, .page-contact .contact-links .cv-download { color: #9a9a97; transition: color 0.25s var(--ease); }
.page-contact .contact-links .copy-email:hover, .page-contact .contact-links .cv-download:hover, .page-contact .contact-links .copy-email:focus-visible, .page-contact .contact-links .cv-download:focus-visible { color: var(--ink); }
/* "Copied" appears just under the email, so it never covers See full CV */
.page-contact .contact-links .copy-email__note { left: 0; top: 100%; transform: none; margin: 2px 0 0; font-size: 14px; line-height: 1.3; color: #9a9a97; }
/* the light tab line starts where the first tab starts (nothing sticking out to its left); once pinned it spans the bar */
.cv-bar, .page-contact .cv-bar { box-shadow: none; }
.page-contact .cv-bar::after { content: ""; position: absolute; left: var(--ab, 0); right: 0; bottom: 0; height: 1px; background: #d9d9d6; pointer-events: none; transition: left 0.3s var(--ease); }
body.cv-stuck.page-contact .cv-bar::after { left: 0; }
@media (max-width: 900px) { .page-contact .cv-bar::after { left: 0; } }

/* phones: the three words fade out as you scroll down and fade back in as you scroll up (the name stays) */
@media (max-width: 560px) {
  .site-nav { transition: opacity 0.4s var(--ease); }
  body.nav-away .site-nav { opacity: 0; pointer-events: none; }
}

/* phones: no counter and no opening nudge on the photo row */
.slide-count { display: none !important; }
.slideshow.is-nudging .slides { animation: none !important; }
/* the sideways rows only scroll sideways; a little room at the foot so the captions are never clipped */
.more-shows .cards { padding-bottom: 16px; touch-action: pan-y; }

/* phones: the name fades with the three words on scroll */
@media (max-width: 560px) {
  .site-title { transition: opacity 0.4s var(--ease); }
  body.nav-away .site-title { opacity: 0; pointer-events: none; }
}

/* Moving between pages: the name and nav stay put (they are the same on every page), so only the content changes.
   Browsers that can't do this simply draw the header at once (its images are small and preloaded, so nothing pops in). */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
/* the page itself cross-fades (this also softens the change of background colour between sections); the header is its own layer and stays still */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1); }
.vt .page { opacity: 1; transition: none; }
.vt.is-leaving .page { opacity: 1; }
.vt img[data-fade] { transition-duration: 0.3s; }
::view-transition-group(site-header) { animation-duration: 0.25s; }

/* About: no tabs. Every list is stacked in one long scroll, each under a heading of the same size. */
.page-contact .cv-stack { margin: 0; padding-bottom: 96px; }
.cv-block { margin-top: 64px; }
.cv-block:first-child { margin-top: 0; }
.page-contact .cv-heading { margin: 0 0 14px; font-size: 16px; font-weight: 400; line-height: 1.55; letter-spacing: 0.05px; color: var(--ink); }
.page-contact .cv-panel { min-height: 0; animation: none; }
.js .page-contact .cv-panel { animation: none; }
@media (min-width: 901px) { .page-contact .cv-stack { padding-bottom: 120px; } }

@media (min-width: 901px) {
  .page-contact.about-scrolled .site-header::before { opacity: 1; background: var(--wall); }
}

/* Phones, picture viewer: the artwork sits in the vertical middle of the screen, and its caption is pinned to the bottom,
   clear of the browser's own bar (iPhone Safari floats its toolbar over the page, so it needs more room there). */
@media (max-width: 560px) {
  .lightbox { --cap-b: calc(env(safe-area-inset-bottom, 0px) + 14px); --pad: 112px; display: block; padding: 0; }
  .ios-float .lightbox { --cap-b: 92px; --pad: 160px; padding-bottom: 0; }
  .lightbox__stage { position: absolute; inset: 0; box-sizing: border-box; padding: var(--pad) 12px; }
  .lightbox__caption { position: absolute; left: 12px; right: 12px; bottom: var(--cap-b); min-height: 0; padding-top: 0; }
  .lightbox__views { position: absolute; left: 0; right: 0; bottom: calc(var(--cap-b) + 62px); padding-top: 0; }
}

/* iPhone Safari: the page area already ends just above Safari's bottom bar, so no extra lift is needed (the earlier 92px lift
   left the description floating about 100px too high). It sits 16px above the bottom of that area. */
@media (max-width: 560px) {
  .ios-float .lightbox { --cap-b: 16px; --pad: 112px; }
}
