/* =====================================================================
   style.css: how everything looks
   ---------------------------------------------------------------------
   The easy knobs are the variables in :root right below
   (colours, fonts, gaps, title size).
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. SETTINGS (CSS variables)
   --------------------------------------------------------------------- */
:root {
  /* Colours: strictly black and white so the photos bring the colour */
  --paper: #ffffff;   /* page background */
  --ink: #0b0b0b;     /* main text */
  --muted: #6b6b6b;   /* secondary text */
  --faint: #8a8a8a;   /* album names that aren't open */
  --line: #e3e3e3;    /* thin dividing lines */
  --soft: #f3f3f3;    /* subtle hover backgrounds */

  /* Fonts */
  --font-display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Size of the big title at the top. Only used if FIT_TITLE is
     false in script.js (otherwise the title stretches to full width). */
  --title-size: clamp(64px, 16.5vw, 300px);

  /* Spacing (phones first; bigger screens below) */
  --page-pad: 14px;   /* space at the left and right edges */
  --gap: 6px;         /* space between grid columns */
  --row-gap: 14px;    /* space under each photo's caption */
  --header-h: 50px;   /* height of the sticky header */

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 200ms;
  --slow: 650ms;
}

@media (min-width: 600px) {
  :root { --page-pad: 20px; --gap: 8px; --row-gap: 18px; }
}
@media (min-width: 1024px) {
  :root { --page-pad: 24px; --gap: 10px; --row-gap: 20px; --header-h: 56px; }
}


/* ---------------------------------------------------------------------
   2. BASICS
   --------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  scrollbar-gutter: stable;          /* stops the page jumping when the viewer opens */
  -webkit-text-size-adjust: 100%;
}
html.is-locked { overflow: hidden; } /* no page scrolling behind the photo viewer */

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 13px/1.45 var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
p, dl, dd, ol, ul, h1, h2 { margin: 0; }
ol, ul { padding: 0; list-style: none; }

::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 8px 12px;
}
.skip-link:focus { top: 8px; }

/* The bold, characterful label style (title, section labels, viewer title) */
.section-label,
.masthead__title,
.site-header__name,
.viewer__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.01em;
}


/* ---------------------------------------------------------------------
   3. HEADER
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 var(--page-pad);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Small version of your name: hidden until the big title scrolls away */
.site-header__name {
  margin-right: auto;
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--fast) var(--ease), transform 400ms var(--ease);
}
.is-scrolled .site-header__name {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.site-nav { display: flex; gap: 16px; }
.site-nav a {
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 300ms var(--ease);
}
.site-nav a:hover { background-size: 100% 1px; }

/* Explore / Index switch: a black "thumb" slides behind the active word */
.view-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 2px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}
.view-toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  border-radius: 999px;
  background: var(--ink);
  transition: transform 350ms var(--ease);
}
.view-toggle[data-active="index"]::before { transform: translateX(100%); }
.view-toggle__btn {
  position: relative;          /* sits above the thumb */
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  transition: color 250ms var(--ease);
}
.view-toggle__btn[aria-pressed="true"] { color: var(--paper); }

@media (max-width: 520px) {
  .site-header { gap: 12px; }
  .site-nav { gap: 12px; }
  .site-nav a[href="#work"] { display: none; }  /* the grid is right there on phones */
  .is-scrolled .site-nav { display: none; }     /* make room for your name */
  .view-toggle__btn { padding: 4px 10px; }
}


/* ---------------------------------------------------------------------
   4. MASTHEAD (big title + facts strip)
   --------------------------------------------------------------------- */
.masthead { padding: 0 var(--page-pad); }

.masthead__title {
  font-size: var(--title-size);
  line-height: 0.8;
  letter-spacing: -0.02em;
  margin-left: -0.03em;         /* lines the letters up optically with the edge */
  padding-top: 0.04em;
  overflow-wrap: anywhere;
}
.masthead__title.is-fitted span { white-space: nowrap; }
.masthead__title.is-stacked .word { display: block; }  /* phones: one word per line */

/* With JavaScript on, the title waits for its font, gets sized, then rises in */
.js .masthead__title { opacity: 0; }
.js .masthead__title.is-ready { opacity: 1; animation: rise 900ms var(--ease) both; }

.masthead__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  padding: 18px 0 26px;
}
.masthead__meta > div { animation: rise 800ms var(--ease) both; }
.masthead__meta > div:nth-child(2) { animation-delay: 60ms; }
.masthead__meta > div:nth-child(3) { animation-delay: 120ms; }
.masthead__meta > div:nth-child(4) { animation-delay: 180ms; }
.masthead__meta dt { color: var(--muted); }
.masthead__meta a { border-bottom: 1px solid var(--line); transition: border-color var(--fast); }
.masthead__meta a:hover { border-color: var(--ink); }

@media (min-width: 900px) {
  .masthead__meta { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 22px; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}


/* ---------------------------------------------------------------------
   5. ALBUM + TAG BAR (sticks under the header while you scroll the work)
   Row 1: albums (big words). Row 2: #tags inside the open album.
   --------------------------------------------------------------------- */
.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  display: grid;
  gap: 4px;
  padding: 6px var(--page-pad) 10px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast);
}
.is-scrolled .filters { border-bottom-color: var(--line); }

.filters__top {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

/* Both rows scroll sideways on phones, fading out at the right edge */
.albums,
.filters__list {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
  mask-image: linear-gradient(to right, #000 88%, transparent);
  padding-right: 24px;
}
.albums::-webkit-scrollbar,
.filters__list::-webkit-scrollbar { display: none; }

.albums {
  flex: 1;
  gap: 20px;
  padding-top: 4px;
  padding-bottom: 9px;     /* room for the underline */
}
.filters__list { gap: 6px; }

/* An album button: big condensed word, grey until it's the open album */
.album-tab {
  position: relative;
  flex: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--faint);
  transition: color var(--fast);
}
.album-tab:hover { color: var(--ink); }
.album-tab[aria-pressed="true"] { color: var(--ink); }
.album-tab::after {               /* the underline, which slides in */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 350ms var(--ease);
}
.album-tab[aria-pressed="true"]::after { transform: scaleX(1); }
.album-tab__count {
  margin-left: 3px;
  font-family: var(--font-text);
  font-stretch: normal;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 599px) {
  .album-tab { font-size: 21px; }
  .albums { gap: 16px; }
}

/* The album's one-line description, under the bar */
.album-note {
  padding: 2px var(--page-pad) 14px;
  max-width: 46rem;
  font-size: 15px;
  color: var(--muted);
}

/* Small "18+" next to a sensitive album's name */
.album-tab__badge {
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-text);
  font-stretch: normal;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: top;
}

/* The warning screen before a sensitive album */
.work.is-gated .explore,
.work.is-gated .index { display: none; }

.album-gate {
  margin: 8px var(--page-pad) 72px;
  padding: clamp(28px, 6vw, 72px) clamp(20px, 5vw, 64px);
  border: 1px solid var(--ink);
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: rise 500ms var(--ease) both;
}
.album-gate__badge {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(64px, 12vw, 160px);
  line-height: 0.85;
  letter-spacing: -0.02em;
}
.album-gate__title {
  margin-top: 18px;
  max-width: 30ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.15;
}
.album-gate__text { margin-top: 10px; color: var(--muted); font-size: 15px; }
.album-gate__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.album-gate__btn {
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color var(--fast), color var(--fast);
}
.album-gate__btn:hover { background: var(--soft); }
.album-gate__btn--primary { background: var(--ink); color: var(--paper); }
.album-gate__btn--primary:hover { background: #333; }

.chip {
  flex: none;
  padding: 4px 11px 4px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--fast), color var(--fast);
}
.chip:hover { background: var(--soft); }
.chip__count {
  margin-left: 4px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color var(--fast);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] .chip__count { color: rgba(255, 255, 255, 0.6); }

.filters__status {
  flex: none;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .filters__status { display: none; }
}


/* ---------------------------------------------------------------------
   6. EXPLORE: the masonry grid
   script.js works out each tile's position and sets
   --col-w (column width) and the grid's height.
   --------------------------------------------------------------------- */
.explore { padding: 6px var(--page-pad) 72px; }

.grid {
  position: relative;
  min-height: 60vh;
}

.tile {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--col-w, 25%);
  /* tiles glide to their new spot when filtering or resizing */
  transition: transform var(--slow) var(--ease), visibility 0s;
}
.tile.no-move,
.grid.is-resizing .tile { transition: none; }

/* Fade + slide in. --delay is set per tile to make the stagger. */
.tile__inner {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 500ms var(--ease) var(--delay, 0ms),
    transform 700ms var(--ease) var(--delay, 0ms);
}
.tile.is-in .tile__inner { opacity: 1; transform: none; }

/* Filtered out: fade away, then become invisible */
.tile.is-hidden {
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--slow) var(--ease), visibility 0s 300ms;
}
.tile.is-hidden .tile__inner {
  opacity: 0;
  transform: scale(0.96);
  transition-duration: 250ms;
  transition-delay: 0ms;
}

/* The photo area. Its shape (aspect-ratio) is set by script.js. */
.tile__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--paper);
  cursor: zoom-in;
}
.tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;              /* exact fit: the box already has the photo's shape */
  opacity: 0;
  transform: scale(1);
  transition: opacity 400ms var(--ease), transform 1200ms var(--ease);
}
.tile__img--extra { object-fit: contain; }  /* other series photos are never cropped */
.tile__img.is-active { opacity: 1; }
@media (hover: hover) {
  .tile__media:hover .tile__img { transform: scale(1.025); }
}
.tile__media:focus-visible { outline-offset: 3px; }

/* Shown when a file in photos.js can't be found */
.tile__missing {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px dashed var(--muted);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  overflow-wrap: anywhere;
}
.tile__missing code { color: var(--ink); font-size: 11px; }

/* Caption under each photo */
.tile__caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  padding-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}
.tile__title { font-weight: 500; }
.tile__place { color: var(--muted); font-weight: 400; }
@media (hover: hover) {
  .tile:hover .tile__title { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
}

/* The little "1 / 4" pill for series */
.tile__count {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  padding: 0 6px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 10px;
  line-height: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tile__tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0 7px;
}

/* A clickable #tag (used under photos, in the index and in the viewer) */
.tag {
  color: var(--muted);
  transition: color var(--fast);
}
.tag:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.tag.is-active { color: var(--ink); }

@media (max-width: 599px) {
  .tile__caption { font-size: 11px; padding-top: 5px; }
}

.empty-note { padding: 40px 0; color: var(--muted); }


/* ---------------------------------------------------------------------
   7. INDEX: the text list
   --------------------------------------------------------------------- */
.index { padding: 6px var(--page-pad) 72px; }

/* Columns: No. | Title | Album | Place | Date | Tags
   (phones show No. | Title | Date, tablets leave out Tags) */
.index__head,
.index__row {
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
}
@media (min-width: 760px) {
  .index__head,
  .index__row { grid-template-columns: 3.2em minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.3fr) 7.5em; gap: 20px; }
}
@media (min-width: 1100px) {
  .index__head,
  .index__row { grid-template-columns: 3.2em minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr) 7.5em minmax(0, 1.6fr); }
}

.index__head {
  padding: 8px 0;
  border-bottom: 1px solid var(--ink);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.index__row {
  position: relative;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 150ms, color 150ms, padding 300ms var(--ease);
  animation: rise 600ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 25ms);
}
.index__row[hidden] { display: none; }

/* Hover: the row flips to black and a preview of the photo follows the mouse */
@media (hover: hover) {
  .index__row:hover {
    background: var(--ink);
    color: var(--paper);
    padding-left: 10px;
    padding-right: 10px;
  }
  .index__row:hover .tag,
  .index__row:hover .index__no,
  .index__row:hover .index__count { color: rgba(255, 255, 255, 0.65); }
  .index__row:hover .tag:hover { color: var(--paper); }
}

.index__no { color: var(--muted); font-variant-numeric: tabular-nums; }
.index__open { text-align: left; font-weight: 500; }
.index__count { margin-left: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.index__date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.index__tags { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 12px; }
.index__sub { display: block; color: var(--muted); font-size: 12px; }

/* Phones: hide Album, Place and Tags (album + place show under the title) */
@media (max-width: 759px) {
  .index__head .index__album,
  .index__head .index__place,
  .index__head .index__tags,
  .index__row > .index__album,
  .index__row > .index__place,
  .index__row > .index__tags { display: none; }
  .index__date { font-size: 12px; }
}
@media (min-width: 760px) {
  .index__sub { display: none; }
}
/* Tablets: no room for the Tags column */
@media (min-width: 760px) and (max-width: 1099px) {
  .index__head .index__tags,
  .index__row > .index__tags { display: none; }
}

/* The floating preview image */
.index-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms var(--ease);
  will-change: transform;
}
.index-preview.is-visible { opacity: 1; }
.index-preview img { width: 100%; height: 100%; object-fit: cover; }


/* ---------------------------------------------------------------------
   8. ABOUT + CONTACT
   --------------------------------------------------------------------- */
.info {
  display: grid;
  gap: 14px;
  padding: 28px var(--page-pad) 44px;
  border-top: 1px solid var(--ink);
}
@media (min-width: 900px) {
  .info { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 24px; padding-top: 22px; }
}
.info .section-label { font-size: clamp(32px, 4.4vw, 64px); }

.info__body { max-width: 62rem; }

.about__text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.7vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.015em;
}

.loves {
  margin-top: 26px;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.4;
}
.loves__label { color: var(--muted); margin-right: 8px; }
.loves__list { font-weight: 500; }
.loves__list .dot { color: var(--muted); font-weight: 400; margin: 0 0.5em; }

.contact__intro { color: var(--muted); margin-bottom: 8px; font-size: 15px; }
.contact__big {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 75%;
  font-size: clamp(30px, 5.4vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat;
  transition: background-size 450ms var(--ease);
}
.contact__big:hover { background-size: 100% 3px; }
.contact__small {
  display: table;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  transition: border-color var(--fast);
}
.contact__small:hover { border-color: var(--ink); }


/* ---------------------------------------------------------------------
   9. FOOTER
   --------------------------------------------------------------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--page-pad) 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.site-footer a:hover { color: var(--ink); }


/* ---------------------------------------------------------------------
   10. PHOTO VIEWER (full screen)
   --------------------------------------------------------------------- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overscroll-behavior: contain;
}
.viewer[hidden] { display: none; }

/* Background and controls fade; the photo itself animates separately */
.viewer__bg {
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: 0;
  transition: opacity 400ms var(--ease);
}
.viewer__ui {
  position: relative;
  opacity: 0;
  transition: opacity 250ms var(--ease);
}
.viewer.is-open .viewer__bg { opacity: 1; }
.viewer.is-open .viewer__ui { opacity: 1; transition-delay: 150ms; }

.viewer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--page-pad);
}
.viewer__count { font-variant-numeric: tabular-nums; color: var(--muted); }
.viewer__close {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  transition: background-color var(--fast), color var(--fast);
}
.viewer__close:hover { background: var(--ink); color: var(--paper); }

.viewer__middle {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  min-height: 0;
}
.viewer__stage {
  position: relative;
  height: 100%;
  min-height: 0;
  touch-action: pinch-zoom;     /* lets script.js handle swipes */
}

/* The large photo. script.js sets its size and position. */
.viewer__img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
  background: var(--soft);
}

.viewer__arrow {
  justify-self: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 18px;
  transition: border-color var(--fast), background-color var(--fast), color var(--fast);
}
.viewer__arrow:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.viewer__caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 24px;
  align-items: end;
  padding: 14px var(--page-pad) 20px;
}
.viewer__title { font-size: clamp(24px, 3vw, 40px); }
.viewer__meta { margin-top: 6px; font-size: 13px; }
.viewer__note { margin-top: 2px; font-size: 13px; color: var(--muted); }
.viewer__note:empty { display: none; }
.viewer__tags { margin-left: 10px; color: var(--muted); }

.viewer__side { display: flex; align-items: center; gap: 10px; }

/* Numbered buttons for jumping within a series */
.viewer__series { display: flex; gap: 4px; }
.viewer__series button {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition: border-color var(--fast), background-color var(--fast), color var(--fast);
}
.viewer__series button:hover { border-color: var(--ink); }
.viewer__series button[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.viewer__mobile-nav { display: none; gap: 4px; }
.viewer__mobile-nav button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 16px;
}

/* Phones: photo uses the full width, arrows move under the caption */
@media (max-width: 767px) {
  .viewer__middle { grid-template-columns: minmax(0, 1fr); padding: 0 var(--page-pad); }
  .viewer__arrow { display: none; }
  .viewer__mobile-nav { display: flex; }
  .viewer__caption { grid-template-columns: minmax(0, 1fr); }
  .viewer__side { justify-content: space-between; }
}


/* ---------------------------------------------------------------------
   11. REDUCED MOTION: if the visitor asked their device for less
   motion, switch the animations off.
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
}
