:root {
  --edge: clamp(26px, 3.73vw, 60px);
  --sidebar-width: 240px;
  --column: max(var(--sidebar-width), 26vw);
  --ink: #121212;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; font: 400 calc(14px - 1pt)/1.5 Arial, Helvetica, sans-serif; font-kerning: normal; -webkit-text-stroke: 0.06px #fff; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid; outline-offset: 4px; }
.skip { position: fixed; top: 8px; left: 8px; padding: 8px; background: white; z-index: 2; transform: translateY(-150%); }
.skip:focus { transform: none; }
header { position: fixed; top: 0; bottom: 0; left: 0; width: var(--column); padding: 55px 12px 55px var(--edge); overflow: auto; }
.artist { display: inline-block; letter-spacing: 0.045em; white-space: nowrap; }
nav { margin-top: 40px; color: var(--ink); }
nav > a { display: block; line-height: 1.55; }
nav > a:not([aria-current="page"]) { color: #707070; }
nav > a + a[href="/info"] { margin-top: 18px; }
main { margin-left: var(--column); padding: clamp(80px, 10vw, 150px) var(--edge) 65px 0; }
main:focus { outline: none; }
figure { margin: 0 0 48px; }
figure img, figure video { display: block; width: 100%; height: auto; }
figcaption { margin-top: 10px; color: var(--ink); }
.placeholder { display: grid; place-items: center; aspect-ratio: 1.305; background: #eae8e4; color: #55514b; }
.placeholder:nth-of-type(even) { background: #e3e5e5; }
.project-text { max-width: 56ch; }
h1 { font-size: inherit; font-weight: 400; margin: 0 0 12px; }
.project-text p { margin: 0 0 10px; }
.project-text a { text-decoration: underline; text-underline-offset: 3px; }
@media (width < 768px) or ((height <= 500px) and (pointer: coarse)) {
  header { position: static; width: auto; padding: 20px 22px 0; overflow: visible; text-align: center; }
  nav { margin-top: 42px; }
  nav > a { width: fit-content; margin-inline: auto; }
  nav > a + a[href="/info"] { margin-top: 38px; }
  main { margin-left: 0; padding: 70px 22px 48px; }
  figure { margin-bottom: 24px; }
}

.vertical-gallery {
  display: grid;
  gap: clamp(32px, 5.5vw, 80px);
}
@media not ((width < 768px) or ((height <= 500px) and (pointer: coarse))) {
  body:has(.vertical-gallery) {
    --column: var(--sidebar-width);
  }
  main:has(.vertical-gallery) {
    padding: 144px 48px 65px 120px;
  }
  .vertical-gallery {
    width: 100%;
    max-width: 1117px;
  }
}
.vertical-gallery figure { margin: 0; }
.gallery-introduction { position: relative; top: 20px; max-width: 65ch; margin: 0 auto 30px; text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .vertical-gallery img { transition: opacity 420ms ease-out; }
  .vertical-gallery .awaiting-entry img { opacity: 0.78; }
}

@media not ((width < 768px) or ((height <= 500px) and (pointer: coarse))) {
  .vertical-gallery.slideshow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1225px;
    gap: 22px;
  }
}
.slideshow-trigger, .slideshow-controls button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.slideshow-trigger {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
}
.gallery-slideshow {
  border: 0;
  padding: 12px;
  background: #fff;
  color: var(--ink);
}
.gallery-slideshow::backdrop { background: rgb(255 255 255 / 96%); }
.gallery-slideshow img {
  display: block;
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: min(88vw, 1300px);
  max-height: 75dvh;
}
.slideshow-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.slideshow-controls button { min-width: 44px; min-height: 44px; padding: 0; }

.slideshow-grid { -webkit-tap-highlight-color: transparent; }
/* Keep slideshow focus cues free of rectangular outlines. */
.gallery-slideshow:focus,
.gallery-slideshow img:focus,
.slideshow-trigger:focus,
.slideshow-controls button:focus { outline: none; }
.slideshow-grid:not(.slideshow-pointer) .slideshow-trigger:focus-visible img { opacity: 0.72; }
.slideshow-grid:not(.slideshow-pointer) .slideshow-controls button:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.vertical-gallery figcaption { text-align: right; }
.vertical-gallery[aria-label="Line Studies"] figcaption,
.vertical-gallery[aria-label="We keep everything"] figcaption { text-transform: lowercase; }

@media not ((width < 768px) or ((height <= 500px) and (pointer: coarse))) {
  .vertical-gallery:has(> .paired-photo) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
  }
  .vertical-gallery:has(> .paired-photo) > :not(.paired-photo) { grid-column: 1 / -1; }
}

.gallery-closing-text { grid-column: 1 / -1; max-width: 65ch; margin: 12px auto 0; text-align: center; }

@media not ((width < 768px) or ((height <= 500px) and (pointer: coarse))) {
  main:has(.gallery-introduction) { padding-top: 84px; }
  .gallery-introduction { top: 40px; margin-bottom: 0; }
}

.fullscreen-image-trigger { width: 46.9%; margin-inline: auto; }
.fullscreen-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 12px;
  border: 0;
  background: #fff;
  color: var(--ink);
}
.fullscreen-image[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  justify-items: center;
}
.fullscreen-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.fullscreen-image button {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 8px);
  right: calc(env(safe-area-inset-right) + 8px);
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fullscreen-image button { font-size: calc(25px - 1pt); }
.fullscreen-image button:focus-visible { outline: none; text-decoration: underline; }

.vertical-gallery .field-record {
  display: grid;
  font-size: calc(14px - 1pt);
  gap: 22px;
  margin-top: 6px;
  text-align: left;
}
.field-record p { margin: 0; }
.field-record-details { width: 100%; }
.field-record-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: calc(6px + 1lh);
}
.field-record-commentary { width: 100%; }
.field-record-commentary p { font-style: italic; }
@media (width < 700px) {
  .field-record-details { width: 100%; }
}

.introduced-record { display: grid; grid-template-columns: minmax(0, 1fr) 46.9%; gap: 6%; align-items: center; }
.introduced-record .record-introduction { margin: 0; text-align: left; font-size: calc(14px - 1pt); line-height: 1.5; }
.introduced-record .fullscreen-image-trigger { width: 100%; margin: 0; }
@media (width < 768px) or ((height <= 500px) and (pointer: coarse)) {
  .introduced-record { grid-template-columns: 1fr; gap: 28px; }
  .introduced-record .fullscreen-image-trigger { width: 46.9%; margin-inline: auto; }
}

.vertical-gallery[aria-label="Hi Stranger"] .field-record p { font-size: calc(14px - 1pt); }

.project-text p { white-space: pre-line; }

.menu-toggle { display: none; }
@media (width < 768px) or ((height <= 500px) and (pointer: coarse)) {
  header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; text-align: left; }
  .menu-toggle { display: block; margin: -10px -10px -10px 0; padding: 10px; border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  header > .artist, header > .menu-toggle { position: relative; z-index: 11; }
  header nav {
    position: fixed;
    inset: 0;
    z-index: 10;
    margin: 0;
    padding: 83px 22px max(24px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
  }
  header.menu-open nav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
  }
  html:has(header.menu-open) { overflow: hidden; }
  @media (prefers-reduced-motion: reduce) {
    header nav { transition: none; }
  }
  nav > a { margin-inline: 0; }
}

@media (width < 768px) or ((height <= 500px) and (pointer: coarse)) {
  header nav > a { display: flex; align-items: center; justify-content: flex-end; text-align: right; width: 100%; min-height: 24px; padding-block: 0; }
  header nav > a + a:not([href="/info"]) { margin-top: 0; }
}


.vertical-gallery[aria-label="Hi Stranger"] > figure:has(.field-record):not(:last-child) { margin-bottom: 24px; }

.password-form input { display:block; margin:10px 0; padding:8px; border:1px solid #aaa; font:inherit; }
.password-form button { background:white; border:1px solid #aaa; padding:6px 14px; font:inherit; color:inherit; }

img, .slideshow-trigger { -webkit-user-drag: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

@media (width < 768px) or ((height <= 500px) and (pointer: coarse)) {
  .password-form input { font-size: calc(16px - 1pt); max-width: 100%; }
}

/* Keep desktop navigation outside the scrolling image pane, including on iPad. */
@media not ((width < 768px) or ((height <= 500px) and (pointer: coarse))) {
  html, body { height: 100%; overflow: hidden; }
  header { position: fixed; inset: 0 auto auto 0; width: var(--sidebar-width); padding-left: 54px; height: 100vh; height: 100svh; overscroll-behavior: contain; transform: translateZ(0); }
  main { height: 100vh; height: 100svh; overflow-y: auto; overscroll-behavior-y: contain; }
}

.gallery-slideshow img { touch-action: pan-y pinch-zoom; }

@media not ((width < 768px) or ((height <= 500px) and (pointer: coarse))) {
  main { scrollbar-width: none; -ms-overflow-style: none; }
  main::-webkit-scrollbar { display: none; width: 0; height: 0; }
}

/* Increase mobile text by one point; desktop sizes stay unchanged. */
@media (width < 768px) or ((height <= 500px) and (pointer: coarse)) {
  body { font-size: 14px; }
  .vertical-gallery .field-record,
  .introduced-record .record-introduction,
  .vertical-gallery[aria-label="Hi Stranger"] .field-record p { font-size: 14px; }
  .password-form input { font-size: 16px; }
  .fullscreen-image button { font-size: 25px; }
}

/* Desktop typography; preserve the existing mobile sizes. */
@media not ((width < 768px) or ((height <= 500px) and (pointer: coarse))) {
  body { font-size: 14px; }
  .vertical-gallery .field-record,
  .introduced-record .record-introduction,
  .vertical-gallery[aria-label="Hi Stranger"] .field-record p { font-size: 14px; }
}

/* Keep the password field consistent with the surrounding site text. */
.password-form input {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.password-form input:focus,
.password-form input:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: #aaa;
}
.password-form input::placeholder { font: inherit; color: #505050; opacity: 1; }

/* Prevent iPhone Safari from zooming when the password field receives focus. */
@media (width < 768px) or ((height <= 500px) and (pointer: coarse)) {
  .password-form input { font-size: 16px; }
}

/* Keep gallery captions at their authored size when a phone rotates. */
@media (orientation: landscape) and (width < 1200px) and (height <= 500px) and (pointer: coarse) {
  .vertical-gallery[aria-label="Line Studies"] figcaption,
  .vertical-gallery[aria-label="Hi Stranger"] .field-record,
  .vertical-gallery[aria-label="Hi Stranger"] .record-introduction {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}
