/* =====================================================================
   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.
     Dark mode is the default; light mode is right below. */
  --paper: #0a0a0a;   /* page background */
  --ink: #f0f0f0;     /* main text */
  --muted: #9b9b9b;   /* secondary text */
  --faint: #6e6e6e;   /* album names that aren't open */
  --line: #262626;    /* thin dividing lines */
  --soft: #171717;    /* subtle hover backgrounds, photos still loading */
  --dim: rgba(0, 0, 0, 0.6);         /* darkens the page behind the album menu */
  --grain-opacity: 0.12;             /* film grain strength (0 = none) */
  --glow: rgba(255, 255, 255, 0.08); /* the light that follows the mouse */
  color-scheme: dark;

  /* The film grain itself: tiny random noise, drawn in code (no image file) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* 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 photos */
  --header-h: 50px;   /* height of the sticky header */

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

/* Light mode (the ◐ button in the header switches) */
html[data-theme="light"] {
  --paper: #ffffff;
  --ink: #0b0b0b;
  --muted: #6b6b6b;
  --faint: #8a8a8a;
  --line: #e3e3e3;
  --soft: #f3f3f3;
  --dim: rgba(11, 11, 11, 0.28);
  --grain-opacity: 0.07;
  --glow: rgba(0, 0, 0, 0.05);
  color-scheme: light;
}

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


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

html {
  background: var(--paper);
  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%;
  transition: background-color 400ms var(--ease);
}
html.is-locked { overflow: hidden; } /* no page scrolling behind the photo viewer */

/* No background on body: the grain and the mouse light sit between the
   page colour and the content, so they show in the empty space but never
   on top of the photos. */
body {
  margin: 0;
  color: var(--ink);
  font: 400 13px/1.45 var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Film grain: a layer of noise behind everything, jittering like film */
body::before {
  content: "";
  position: fixed;
  inset: -120px;                  /* extra room so the jitter never shows an edge */
  z-index: -1;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 240px 240px;
  opacity: var(--grain-opacity);
  animation: grain 1s steps(8) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  12%  { transform: translate(-40px, 25px); }
  25%  { transform: translate(30px, -45px); }
  37%  { transform: translate(-60px, -15px); }
  50%  { transform: translate(20px, 55px); }
  62%  { transform: translate(55px, -30px); }
  75%  { transform: translate(-25px, 40px); }
  87%  { transform: translate(45px, 10px); }
  100% { transform: translate(0, 0); }
}

/* The same grain on the photo viewer and the album menu backgrounds */
.viewer__bg::after,
.album-menu__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 240px 240px;
  opacity: var(--grain-opacity);
}
.album-menu__panel::before { z-index: -1; }  /* behind the album names */

[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);
}

/* The header and the album bar are solid (photos scrolling under them are
   hidden, not blurred through), but they look exactly like the page: same
   colour, plus copies of the page's grain and mouse light, lined up pixel
   for pixel. So you never see a "bar". */
.site-header,
.album-bar {
  background: var(--paper);
  clip-path: inset(0);            /* keeps the copies below inside the bar */
  transition: background-color 400ms var(--ease);
}
.site-header::before,
.album-bar::before {              /* copy of the page grain (see "Film grain") */
  content: "";
  position: fixed;
  inset: -120px;
  z-index: -1;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 240px 240px;
  opacity: var(--grain-opacity);
  animation: grain 1s steps(8) infinite;
}
.site-header::after,
.album-bar::after { z-index: -2; } /* copy of the mouse light (see "The mouse") */

/* 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); }

/* Dark / light switch: a circle, half filled, that turns half-way round */
.theme-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.theme-toggle__icon {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
  transition: transform 500ms var(--ease);
}
html[data-theme="light"] .theme-toggle__icon { transform: rotate(180deg); }

@media (max-width: 520px) {
  .site-header { gap: 10px; }
  .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; }
  .theme-toggle { width: 28px; height: 28px; }
}

/* ---------------------------------------------------------------------
   The mouse: a soft light that follows it over the empty background,
   plus a small ring that grows over links and buttons and gets out of
   the way over photos. Only on devices with a mouse (not phones).
   --------------------------------------------------------------------- */
/* The light covers the whole window; script.js moves its bright spot by
   setting --light-x / --light-y. The header and album bar draw a copy of it
   (their ::after), so it glides over them without a hard edge. */
.cursor-light,
.site-header::after,
.album-bar::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 320px at var(--light-x, -999px) var(--light-y, -999px), var(--glow), transparent);
  opacity: 0;
  transition: opacity 500ms var(--ease);
}
.cursor-light { z-index: -2; }    /* behind the grain and all content */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid #fff;
  border-radius: 50%;
  mix-blend-mode: difference;     /* always visible: inverts whatever is under it */
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 250ms var(--ease),
    width 300ms var(--ease), height 300ms var(--ease), margin 300ms var(--ease),
    background-color 300ms var(--ease);
  will-change: transform;
}
.has-cursor .cursor-light,
.has-cursor .site-header::after,
.has-cursor .album-bar::after,
.has-cursor .cursor-ring { opacity: 1; }
.cursor-ring.is-link {            /* over a link or button: a bigger filled dot */
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  background: #fff;
}
.has-cursor.cursor-away .cursor-ring,      /* over a photo: step aside */
.has-cursor.cursor-away .cursor-light,
.has-cursor.cursor-away .site-header::after,
.has-cursor.cursor-away .album-bar::after { opacity: 0; }
@media (hover: none) {
  .cursor-light,
  .cursor-ring,
  .site-header::after,
  .album-bar::after { display: none; }
}


/* ---------------------------------------------------------------------
   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 BAR + ALBUM MENU
   The bar sticks under the header and shows which album is open.
   Its ☰ button opens the album menu, which slides in from the left.
   --------------------------------------------------------------------- */
.work { padding: 0 var(--page-pad); }

.album-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 calc(var(--page-pad) * -1);
  padding: 8px var(--page-pad) 10px;     /* no background: see "3. HEADER" */
}

/* The ☰ button with the open album's name */
.album-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 4px 0;
}
.album-toggle__icon {               /* three lines, drawn with borders */
  position: relative;
  flex: none;
  width: 22px;
  height: 16px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transition: width 250ms var(--ease);
}
.album-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 70%;
  height: 2px;
  margin-top: -1px;
  background: var(--ink);
  transition: width 250ms var(--ease);
}
.album-toggle:hover .album-toggle__icon::after { width: 100%; }
.album-toggle__name {
  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;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-bar__status {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* The open album's one-line description, under the bar */
.album-note {
  margin: 2px 0 10px;
  max-width: 46rem;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

/* The album menu: a panel that slides in from the left over the page */
html.menu-open { overflow: hidden; }

.album-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
}
.album-menu__backdrop {
  position: absolute;
  inset: 0;
  background: var(--dim);
  opacity: 0;
  transition: opacity 350ms var(--ease);
}
.album-menu__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(380px, 88vw);
  overflow-y: auto;
  padding: 0 28px 40px var(--page-pad);
  background: var(--paper);
  transform: translateX(-100%);
  transition: transform 450ms var(--ease);
}
.album-menu.is-open .album-menu__backdrop { opacity: 1; }
.album-menu.is-open .album-menu__panel { transform: none; }

.album-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  margin-bottom: 20px;
}
.album-menu__label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.album-menu__close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 14px;
  transition: background-color var(--fast), color var(--fast);
}
.album-menu__close:hover { background: var(--ink); color: var(--paper); }

/* The list of albums inside the menu */
.albums {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* An album button: big condensed word, grey until it's the open album */
.album-tab {
  position: relative;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  font-size: 36px;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-align: left;
  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 under the open album */
  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); }
/* Each album slides in one after another when the menu opens */
.album-menu.is-open .album-tab {
  animation: menu-in 500ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms + 120ms);
}
@keyframes menu-in {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: none; }
}
.album-tab__count {
  margin-left: 3px;
  font-family: var(--font-text);
  font-stretch: normal;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}

/* 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;
}

@media (max-width: 599px) {
  .album-toggle__name { font-size: 22px; }
  .album-tab { font-size: 32px; }
}

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

.album-gate {
  margin: 8px 0 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: var(--ink); opacity: 0.85; }


/* ---------------------------------------------------------------------
   6. EXPLORE: the photo grid
   script.js splits the photos into rows that exactly fill the width,
   and sets each tile's size and position, plus the grid's height.
   --------------------------------------------------------------------- */
.explore { padding: 6px 0 72px; }

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

.tile {
  position: absolute;
  top: 0;
  left: 0;
  /* tiles glide (and resize) to their new spot when you switch albums */
  transition:
    transform var(--slow) var(--ease),
    width var(--slow) var(--ease),
    height var(--slow) var(--ease),
    visibility 0s;
}
.tile__inner,
.tile__media { height: 100%; }   /* the photo fills its tile exactly */
.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), width 0s, height 0s, visibility 0s 300ms;
}
.tile.is-hidden .tile__inner {
  opacity: 0;
  transform: scale(0.96);
  transition-duration: 250ms;
  transition-delay: 0ms;
}
/* After fading out, a filtered-out tile leaves the page entirely */
.tile.is-gone { display: none; }

/* The photo area. Its size is set by script.js (always the photo's shape).
   The light grey shows while the photo is still downloading. */
.tile__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--soft);
  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; background: var(--paper); }  /* series photos are never cropped */
.tile__img.is-active.is-loaded { opacity: 1; }   /* fades in once downloaded */
@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; }

/* The little "1 / 4" pill on series, in the photo's top-right corner */
.tile__count {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);   /* sits on the photo, so same in both modes */
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  line-height: 17px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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


/* ---------------------------------------------------------------------
   7. INDEX: the text list
   --------------------------------------------------------------------- */
.index { padding: 6px 0 72px; }

/* Columns: No. | Title | Album | Place | Date
   (phones show No. | Title | Date) */
.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; }
}

.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 .index__no,
  .index__row:hover .index__count { color: inherit; opacity: 0.65; }
}

.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__sub { display: block; color: var(--muted); font-size: 12px; }

/* Phones: hide Album and Place (they show under the title instead) */
@media (max-width: 759px) {
  .index__head .index__album,
  .index__head .index__place,
  .index__row > .index__album,
  .index__row > .index__place { display: none; }
  .index__date { font-size: 12px; }
}
@media (min-width: 760px) {
  .index__sub { 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__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;
  }
  body::before { animation: none !important; }  /* still grain instead of moving */
}
