/* ==========================================================================
   Photography portfolio — style.css
   Contract: docs/ARCHITECTURE.md (sections 1.2, 2, 9). Dark only.
   Order: tokens · base · chrome (intro, nav, menu, filters) · pages ·
          gallery views (sphere, grid, reel) · list pages · viewer ·
          view transitions · reduced motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #18181b;
  --fg: #f2f0ec;
  --fg-2: #c9c7c2;
  --muted: #8a8a8f;
  --dim: #5a5a60;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --accent: #d9c7a3;

  --glass: rgba(24, 24, 27, .6);
  --glass-strong: rgba(20, 20, 22, .78);
  --glass-blur: 18px;
  --hover-fill: rgba(255, 255, 255, .08);
  --ind-fill: rgba(255, 255, 255, .12);

  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 180ms;
  --t-med: 400ms;
  --t-slow: 700ms;

  --gutter: 16px;
  --gap: 8px;
  --r-card: 14px;
  --r-tile: 10px;
  --r-pill: 999px;

  --nav-h: 52px;
  --nav-top: calc(14px + env(safe-area-inset-top));
  --filters-h: 48px;
  --filters-bottom: calc(16px + env(safe-area-inset-bottom));

  --v-pad: 12px;
  --v-info-w: min(360px, 86vw);
  --v-sheet-h: min(46svh, 380px);
  --v-btn: 44px;

  --fs-hero: clamp(3rem, 9vw, 8.5rem);
  --fs-collection: clamp(2.4rem, 6vw, 5.5rem);
  --fs-row: clamp(2rem, 5vw, 4.25rem);

  --page-top: calc(var(--nav-top) + var(--nav-h) + 32px);
  --filters-clear: calc(var(--filters-bottom) + var(--filters-h) + 40px);
}

@media (min-width: 600px) {
  :root { --gutter: 24px; --gap: 14px; }
}
@media (min-width: 900px) {
  :root { --v-pad: 24px; --page-top: calc(var(--nav-top) + var(--nav-h) + 56px); }
}
@media (min-width: 1200px) {
  :root { --gutter: 40px; --gap: 18px; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(24, 24, 27, .94); --glass-strong: rgba(20, 20, 22, .96); }
}

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

[hidden] { display: none !important; }

html {
  background: var(--bg);
  scrollbar-gutter: stable;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
}
@media (min-width: 900px) { body { font-size: 16px; } }

body.is-sphere,
body.menu-open,
body.viewing { overflow: hidden; }

h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: not-allowed; }

img { display: block; max-width: 100%; }

svg { display: block; }

::selection { background: var(--accent); color: var(--bg); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Icons inside chrome */
.views svg,
.cin-btn svg,
.v-ui svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Shared type roles */
.kicker,
.m-num,
.j-num,
.reel-num,
.v-count,
dt {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 900px) {
  .kicker, .m-num, .j-num, .reel-num, .v-count, dt { font-size: 12px; }
}

.intro-name, .m-label, .p-title, .c-title, .j-title, .t-title, .a-title,
.c-next-title, .empty-title, .vi-title, .stat dd {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.012em;
  color: var(--fg);
}

/* Content images: fade in over their placeholder surface (section 2.2) */
.s-inner img,
.tile img,
.j-thumb img,
.t-card img,
.a-portrait img {
  opacity: 0;
  transition: opacity 500ms var(--ease);
}
.s-inner img.loaded,
.tile img.loaded,
.j-thumb img.loaded,
.t-card img.loaded,
.a-portrait img.loaded { opacity: 1; }

img.failed { visibility: hidden; }

/* Viewer FLIP source (JS may put it on the item or on the frame element) */
.is-source,
.s-card.is-source,
.tile.is-source,
.reel-item.is-source {
  visibility: hidden !important;
  transition: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--fg);
  white-space: nowrap;
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
.btn-ghost { border-color: transparent; color: var(--fg-2); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
  .btn-ghost:hover { background: var(--hover-fill); border-color: transparent; color: var(--fg); }
}

/* Reveal-able static blocks (section 5.6) */
.rv {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.rv.in { opacity: 1; transform: none; }

/* Route fallback fade (no View Transitions API). Opacity only — see 1.2.1 */
#app { transition: opacity 200ms var(--ease); }
#app.is-leaving { opacity: 0; }

/* --------------------------------------------------------------------------
   3. Intro
   -------------------------------------------------------------------------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  overflow: hidden;
  transition: opacity 600ms var(--ease-io);
}
.intro::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(18vh + env(safe-area-inset-bottom));
  width: min(180px, 40vw);
  height: 1px;
  margin-left: calc(min(180px, 40vw) / -2);
  background: var(--line-2);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1600ms var(--ease-io) 200ms;
}
.intro.play::after { transform: scaleX(1); }
.intro.out { opacity: 0; pointer-events: none; }
body.intro-done .intro { display: none; }

.intro-name {
  display: block;
  padding: 0 var(--gutter);
  font-style: italic;
  font-size: clamp(2.75rem, 11vw, 9.5rem);
  line-height: 1.05;
  white-space: nowrap;
  transition: transform 600ms var(--ease-io), opacity 600ms var(--ease-io);
}
.intro.out .intro-name { transform: translateY(-14px); }

.intro-name .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(.4em);
  filter: blur(8px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease), filter 700ms var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.intro-name .ch.sp { width: .26em; }
.intro.play .ch { opacity: 1; transform: none; filter: blur(0); }

/* --------------------------------------------------------------------------
   4. Nav pill
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: var(--nav-top);
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--nav-h);
  padding: 6px;
  max-width: calc(100vw - 2 * var(--gutter));
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .6);
  transform: translate(-50%, 0);
  view-transition-name: site-nav;
  transition: transform 500ms var(--ease), opacity 500ms var(--ease), visibility 0s linear 0s,
              background-color var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
body.scrolled .nav { background: var(--glass-strong); border-color: var(--line-2); }
body.menu-open .nav { background: rgba(255, 255, 255, .04); border-color: var(--line); box-shadow: none; }

/* Scrolled down: slide away but stay focusable (focusin brings it back) */
body.nav-hidden .nav {
  transform: translate(-50%, -140%);
  opacity: 0;
}
/* Viewer open: fully collapsed and out of the tab order */
body.viewing .nav {
  transform: translate(-50%, -140%);
  opacity: 0;
  visibility: hidden;
  transition: transform 500ms var(--ease), opacity 400ms var(--ease), visibility 0s linear 500ms,
              background-color var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  color: var(--fg);
  transition: background-color var(--t-med) var(--ease);
}
.brand-mark {
  width: 20px;
  height: 20px;
  flex: none;
}
/* The diya's flame sways gently while the name is hovered */
.bm-flame { transform-box: view-box; transform-origin: 12px 11.4px; }
@keyframes bm-flicker {
  0%, 100% { transform: rotate(0) scale(1, 1); }
  25% { transform: rotate(-4deg) scale(.96, 1.06); }
  50% { transform: rotate(2deg) scale(1.02, .96); }
  75% { transform: rotate(4deg) scale(.97, 1.04); }
}
.brand-name {
  display: none;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  letter-spacing: -.005em;
  white-space: nowrap;
  padding-right: 4px;
}
@media (min-width: 600px) { .brand { padding: 0 12px 0 10px; } .brand-name { display: block; } }

/* View switcher */
.views {
  position: relative;
  display: flex;
  flex: none;
  height: var(--vb, 36px);
  max-width: calc(7 * var(--vb, 36px));
  margin: 0 2px;
  overflow: hidden;
  border-radius: var(--r-pill);
  opacity: 1;
  transition: max-width 400ms var(--ease), opacity 400ms var(--ease), margin 400ms var(--ease),
              visibility 0s linear 0s;
}
body:not(.is-gallery) .views,
body.menu-open .views {
  max-width: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: max-width 400ms var(--ease), opacity 250ms var(--ease), margin 400ms var(--ease),
              visibility 0s linear 400ms;
}
.views-ind {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  background: var(--ind-fill);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 400ms var(--ease);
  pointer-events: none;
}
.views button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  color: var(--muted);
  transition: color var(--t-med) var(--ease);
}
.views button.on { color: var(--fg); }
.views button:focus-visible { outline-offset: -2px; }

/* Menu button */
.menu-btn {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--hover-fill);
  transition: background-color var(--t-med) var(--ease);
}
.menu-btn span {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 1.5px;
  margin-top: -.75px;
  border-radius: 2px;
  background: var(--fg);
  transition: transform 450ms var(--ease);
}
.menu-btn span:nth-child(1) { transform: translateY(-3.5px); }
.menu-btn span:nth-child(2) { transform: translateY(3.5px); }
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(0) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { transform: translateY(0) rotate(-45deg); }

@media (hover: hover) and (pointer: fine) {
  .brand:hover { background: var(--hover-fill); }
  .views button:hover { color: var(--fg); }
  .menu-btn:hover { background: rgba(255, 255, 255, .14); }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .brand:hover .bm-flame { animation: bm-flicker 1.6s ease-in-out infinite; }
}

/* --------------------------------------------------------------------------
   5. Menu overlay
   -------------------------------------------------------------------------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background:
    radial-gradient(1100px 620px at 85% 0%, rgba(217, 199, 163, .07), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(255, 255, 255, .03), transparent 60%),
    var(--bg);
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: opacity 500ms var(--ease-io), clip-path 500ms var(--ease-io), visibility 0s linear 500ms;
}
body.menu-open .menu {
  opacity: 1;
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition: opacity 500ms var(--ease-io), clip-path 500ms var(--ease-io), visibility 0s linear 0s;
}

.menu-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  height: 100%;
  max-width: calc(1600px + 2 * var(--gutter));
  margin: 0 auto;
  padding: calc(var(--nav-top) + var(--nav-h) + 40px) var(--gutter) calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1.2vh, 14px);
  margin: auto 0;
}
.menu-links li {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 300ms var(--ease), transform 400ms var(--ease);
}
body.menu-open .menu-links li {
  opacity: 1;
  transform: none;
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms + 120ms);
}
.menu-links a {
  display: inline-flex;
  align-items: baseline;
  gap: clamp(14px, 2.4vw, 32px);
  padding: .04em 0;
  color: var(--fg);
}
.menu-links a > * { transition: opacity var(--t-med) var(--ease), color var(--t-med) var(--ease); }
.m-num { min-width: 2.2em; }
.m-label {
  display: inline-block;
  font-size: var(--fs-hero);
  line-height: 1;
  padding-right: .06em;
  transition: transform 600ms var(--ease);
}
.m-count {
  align-self: flex-start;
  margin-left: calc(clamp(14px, 2.4vw, 32px) * -.6);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  vertical-align: baseline;
  position: relative;
  top: .7em;
}
.menu-links a[aria-current="page"] .m-label { font-style: italic; }
.menu-links a[aria-current="page"] .m-num { color: var(--accent); }

@media (hover: hover) and (pointer: fine) {
  .menu-links:hover a > * { opacity: .32; }
  .menu-links a:hover > * { opacity: 1; }
  .menu-links a:hover .m-label { font-style: italic; transform: translateX(.08em); }
}

.menu-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-2);
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
body.menu-open .menu-foot { opacity: 1; transition: opacity 700ms var(--ease) 420ms; }
.menu-foot a { transition: color var(--t-med) var(--ease); }
.m-copy { margin-left: auto; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .menu-foot a:hover { color: var(--fg); } }
@media (max-width: 599px) { .m-copy { margin-left: 0; width: 100%; } }

/* --------------------------------------------------------------------------
   6. Filters pill
   -------------------------------------------------------------------------- */
.filters {
  position: fixed;
  left: 50%;
  bottom: var(--filters-bottom);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: calc(100vw - 2 * var(--gutter));
  height: var(--filters-h);
  padding: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .7);
  transform: translate(-50%, 0);
  view-transition-name: site-filters;
  transition: transform 500ms var(--ease), opacity 500ms var(--ease), visibility 0s linear 0s;
}
.filters::-webkit-scrollbar { display: none; }
.filters > * { flex: none; white-space: nowrap; }

body:not(.is-gallery) .filters,
body.viewing .filters {
  transform: translate(-50%, 140%);
  opacity: 0;
  visibility: hidden;
  transition: transform 500ms var(--ease), opacity 400ms var(--ease), visibility 0s linear 500ms;
}

/* Tone segmented control */
.seg {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  border-radius: var(--r-pill);
}
.seg-ind {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--ind-w, 0px);
  border-radius: var(--r-pill);
  background: var(--ind-fill);
  transform: translateX(var(--ind-x, 0px));
  transition: transform 400ms var(--ease), width 400ms var(--ease);
  pointer-events: none;
}
.seg button {
  position: relative;
  z-index: 1;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.seg button.on { color: var(--fg); }
.seg button:disabled { opacity: .35; }
.seg button:focus-visible { outline-offset: -2px; }

/* Theme chips */
.chips {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 2px;
}
.chips::before {
  content: '';
  flex: none;
  width: 1px;
  height: 20px;
  margin: 0 4px 0 2px;
  background: var(--line-2);
}
.chips:empty { display: none; }
.chip {
  flex: none;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-2);
  white-space: nowrap;
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.chip.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chip:disabled { opacity: .3; }

.count {
  display: none;
  align-items: center;
  padding: 0 14px 0 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.count::before {
  content: '';
  width: 1px;
  height: 20px;
  margin-right: 14px;
  background: var(--line-2);
}
.count:empty { display: none !important; }
@media (min-width: 600px) { .count { display: inline-flex; } }

@media (hover: hover) and (pointer: fine) {
  .seg button:not(:disabled):not(.on):hover { color: var(--fg); }
  .chip:not(:disabled):not(.on):hover { border-color: rgba(255, 255, 255, .36); color: var(--fg); }
}

/* No load-time transitions on chrome before the first render settles */
body:not(.is-ready) .nav,
body:not(.is-ready) .filters,
body:not(.is-ready) .views,
body:not(.is-ready) .views-ind,
body:not(.is-ready) .seg-ind { transition: none !important; }

/* --------------------------------------------------------------------------
   7. Pages
   -------------------------------------------------------------------------- */
.page {
  position: relative;
  max-width: calc(1600px + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--page-top) var(--gutter) 0;
}
.page-gallery { padding-bottom: var(--filters-clear); }

.p-head { margin-bottom: clamp(40px, 7vw, 104px); }
.p-head .kicker { margin-bottom: 18px; }
.p-title { font-size: var(--fs-hero); line-height: .95; }
.p-lede {
  max-width: 44ch;
  margin-top: clamp(18px, 2.4vw, 32px);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--fg-2);
}

/* Collection header (gallery pages, normal flow) */
.c-head { margin-bottom: clamp(32px, 5vw, 64px); }
.c-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(20px, 3vw, 36px);
  padding: 6px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  transition: color var(--t-med) var(--ease);
}
.c-back span { display: inline-block; transition: transform var(--t-med) var(--ease); }
.c-head .kicker { margin-bottom: 16px; }
.c-title { font-size: var(--fs-collection); line-height: .98; max-width: 16ch; }
.c-head--work .c-title { font-style: italic; max-width: 18ch; }
.c-places {
  margin-top: 16px;
  font-size: 14px;
  color: var(--fg-2);
  letter-spacing: .01em;
}
.c-desc {
  max-width: 52ch;
  margin-top: 18px;
  color: var(--fg-2);
  line-height: 1.65;
}
@media (hover: hover) and (pointer: fine) {
  .c-back:hover { color: var(--fg); }
  .c-back:hover span { transform: translateX(-4px); }
}

/* Next collection link */
.c-next {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: clamp(72px, 10vw, 140px);
  padding: clamp(40px, 7vw, 88px) 0;
  border-top: 1px solid var(--line);
}
.c-next-title {
  display: inline-block;
  font-size: var(--fs-hero);
  line-height: .95;
  transition: color var(--t-med) var(--ease);
}
.c-next-title::after {
  content: '\2192';
  display: inline-block;
  margin-left: .25em;
  font-style: normal;
  color: var(--muted);
  transform: translateX(-.15em);
  opacity: .6;
  transition: transform 600ms var(--ease), opacity 600ms var(--ease), color 600ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .c-next:hover .c-next-title { font-style: italic; }
  .c-next:hover .c-next-title::after { transform: translateX(.1em); opacity: 1; color: var(--fg); }
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(72px, 10vw, 140px);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.c-next + .foot { margin-top: 0; }
.page-gallery .foot { padding-bottom: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { color: var(--fg-2); transition: color var(--t-med) var(--ease); }
@media (hover: hover) and (pointer: fine) { .foot-links a:hover { color: var(--fg); } }

/* Empty state */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46vh;
  min-height: 46svh;
  padding: 40px 0;
  text-align: center;
}
.empty-title { font-size: clamp(2.2rem, 5vw, 3.75rem); font-style: italic; }
.empty-sub { color: var(--muted); max-width: 36ch; }
.empty .btn { margin-top: 16px; }

/* --------------------------------------------------------------------------
   8. Gallery container + sphere mode page layout
   -------------------------------------------------------------------------- */
.gallery {
  position: relative;
  opacity: 1;
  transition: opacity 320ms var(--ease);
}
.gallery.is-swapping { opacity: 0; transition: opacity 160ms var(--ease); }

body.is-sphere .gallery {
  position: fixed;
  inset: 0;
  z-index: 1;
}
body.is-sphere .c-next,
body.is-sphere .foot { display: none; }
body.is-sphere[data-page="work"] .c-head { display: none; }

/* Journey / theme title over the sphere, bottom-left above the filter pill */
body.is-sphere .c-head {
  position: fixed;
  left: var(--gutter);
  bottom: calc(var(--filters-bottom) + var(--filters-h) + 22px);
  z-index: 5;
  width: min(560px, calc(100vw - 2 * var(--gutter)));
  margin: 0;
  pointer-events: none;
  text-shadow: 0 2px 28px rgba(0, 0, 0, .65);
  animation: head-rise 900ms var(--ease) 120ms both;
}
body.is-sphere .c-head .c-back { pointer-events: auto; margin-bottom: 14px; }
body.is-sphere .c-head .kicker { margin-bottom: 10px; color: var(--fg-2); }
body.is-sphere .c-head .c-title { font-size: clamp(2.2rem, 5vw, 4.5rem); }
body.is-sphere .c-head .c-places { margin-top: 10px; }
body.is-sphere .c-head .c-desc {
  margin-top: 10px;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 599px) {
  body.is-sphere .c-head .c-desc { display: none; }
}
@media (min-width: 1320px) {
  body.is-sphere .c-head { bottom: calc(var(--filters-bottom) + 28px); }
}

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

/* --------------------------------------------------------------------------
   9. Sphere view
   -------------------------------------------------------------------------- */
.sphere-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: var(--persp, 1200px);
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.sphere-stage.dragging { cursor: grabbing; }
.sphere-stage:focus-visible { outline: none; }
.sphere-stage:focus-visible ~ .sphere-vignette { box-shadow: inset 0 0 0 1px rgba(217, 199, 163, .28); }

.sphere {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.s-card {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cw);
  height: var(--ch);
  margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.s-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg-3);
  opacity: 0;
  transform: scale(.6);
  transition: opacity 900ms var(--ease), transform 1100ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.s-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: inherit;
  pointer-events: none;
}
.s-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}
.sphere-stage.in .s-inner { opacity: 1; transform: none; }
.sphere-stage.settled .s-inner {
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
  transition-delay: 0ms;
}
@media (hover: hover) and (pointer: fine) {
  .sphere-stage.settled:not(.dragging) .s-card:hover .s-inner { transform: scale(1.04); }
}

.sphere-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 68% at 50% 50%, transparent 42%, rgba(10, 10, 11, .5) 72%, var(--bg) 100%),
    linear-gradient(to bottom, rgba(10, 10, 11, .55) 0%, transparent 18%, transparent 76%, rgba(10, 10, 11, .7) 100%);
}

.sphere-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--filters-bottom) + var(--filters-h) + 22px);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 600ms var(--ease);
}
.sphere-hint::before,
.sphere-hint::after {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .5;
  animation: hint-line 2.4s var(--ease-io) infinite;
}
.sphere-hint::before { transform-origin: right center; }
.sphere-hint::after { transform-origin: left center; }
.sphere-stage.in ~ .sphere-hint { opacity: .85; transition-delay: 1200ms; }
.sphere-stage.in ~ .sphere-hint.gone,
.sphere-hint.gone { opacity: 0; transition-delay: 0ms; }
/* Journey/theme pages: the title owns the bottom-left, so the hint moves under the nav */
body:not([data-page="work"]) .sphere-hint {
  top: calc(var(--nav-top) + var(--nav-h) + 20px);
  bottom: auto;
}

@keyframes hint-line {
  0%, 100% { transform: scaleX(.35); }
  50% { transform: scaleX(1); }
}

/* --------------------------------------------------------------------------
   10. Grid view (masonry)
   -------------------------------------------------------------------------- */
.grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--gap);
}
.g-col {
  flex: 0 0 calc((100% - (var(--cols, 3) - 1) * var(--gap)) / var(--cols, 3));
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.tile {
  display: block;
  position: relative;
  aspect-ratio: var(--ar, 1.5);
  overflow: hidden;
  border-radius: var(--r-tile);
  background: var(--bg-3);
  isolation: isolate;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  transition-delay: var(--d, 0ms);
  -webkit-user-select: none;
  user-select: none;
}
.tile.in { opacity: 1; transform: none; }
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  transition: opacity 500ms var(--ease), transform 900ms var(--ease);
}

.tile-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 48px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, .28) 55%, transparent);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms var(--ease), transform 600ms var(--ease);
  pointer-events: none;
}
.tile-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.6vw, 1.6rem);
  line-height: 1.1;
  color: var(--fg);
}
.tile-loc { font-size: 12px; color: var(--fg-2); letter-spacing: .02em; }
.tile-title, .tile-loc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (hover: hover) and (pointer: fine) {
  .tile:hover img { transform: scale(1.03); }
  .tile:hover .tile-cap,
  .tile:focus-visible .tile-cap { opacity: 1; transform: none; }
}
@media (hover: none), (pointer: coarse) {
  .tile-cap { display: none; }
}

/* --------------------------------------------------------------------------
   11. Reel view (horizontal filmstrip)
   -------------------------------------------------------------------------- */
.reel {
  --reel-h: clamp(280px, 68svh, 820px);
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
@supports not (height: 1svh) {
  .reel { --reel-h: clamp(280px, 68vh, 820px); }
}

.reel-track {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding: 6px max(var(--gutter), 8vw);
  -webkit-user-select: none;
  user-select: none;
}
.reel-track::-webkit-scrollbar { display: none; }
.reel-track:focus-visible { outline-offset: -4px; }

.reel-item {
  flex: none;
  display: flex;
  flex-direction: column;
  width: min(calc(var(--reel-h) * var(--ar, 1.5)), 86vw);
  color: var(--fg);
  -webkit-user-drag: none;
}
.reel-item > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--ar, 1.5);
  object-fit: cover;
  border-radius: var(--r-tile);
  background: var(--bg-3);
  -webkit-user-drag: none;
  transition: opacity 500ms var(--ease);
}
/* The img is the frame element and its own placeholder, so it "develops" instead of fading */
.reel-item > img.loaded { animation: develop 900ms var(--ease) both; }
@keyframes develop {
  from { filter: brightness(.25) saturate(.4); }
  to { filter: none; }
}

.reel-cap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  padding-top: 14px;
}
.reel-num { flex: none; }
.reel-title {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reel-loc {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reel.dragging .reel-track { cursor: grabbing; }

.reel-progress {
  position: relative;
  height: 1px;
  margin: clamp(24px, 4vh, 40px) var(--gutter) 0;
  background: var(--line);
  overflow: hidden;
}
@media (min-width: 900px) {
  .reel-progress { margin-left: max(var(--gutter), 8vw); margin-right: max(var(--gutter), 8vw); }
}
.reel-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--fg);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}

.reel.no-overflow .reel-track { justify-content: center; }
.reel.no-overflow .reel-progress { visibility: hidden; }

@media (hover: hover) and (pointer: fine) {
  .reel-track { cursor: grab; }
  .reel:not(.dragging) .reel-track:hover .reel-item:not(:hover) > img.loaded { opacity: .5; }
}
@media (hover: none) and (pointer: coarse) {
  .reel-track { scroll-snap-type: x proximity; }
  .reel-item { scroll-snap-align: center; }
}

/* --------------------------------------------------------------------------
   12. Journeys index
   -------------------------------------------------------------------------- */
.j-list { border-top: 1px solid var(--line); }
.j-row { border-bottom: 1px solid var(--line); }

.j-link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "num meta"
    "main main"
    "thumb thumb";
  align-items: baseline;
  column-gap: 16px;
  padding: 26px 0 30px;
  transition: opacity 500ms var(--ease);
}
.j-num { grid-area: num; }
.j-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  margin-top: 14px;
}
.j-title {
  display: inline-block;
  font-size: var(--fs-row);
  line-height: 1;
  transition: transform 700ms var(--ease);
}
.j-places { font-size: 14px; color: var(--fg-2); }
.j-meta {
  grid-area: meta;
  justify-self: end;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.j-year { font-size: 14px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.j-count {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.j-thumb {
  grid-area: thumb;
  display: none;
  margin-top: 20px;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-tile);
  overflow: hidden;
  background: var(--bg-3);
}
.j-thumb img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 600px) {
  .j-thumb { max-width: 560px; }
}
@media (min-width: 900px) {
  .j-link {
    grid-template-columns: 88px 1fr auto;
    grid-template-areas:
      "num main meta"
      ".   thumb thumb";
    align-items: center;
    padding: clamp(32px, 3.4vw, 48px) 0;
  }
  .j-num { align-self: start; padding-top: .9em; }
  .j-main { margin-top: 0; }
  .j-meta { flex-direction: column; align-items: flex-end; gap: 6px; }
  .j-count { font-size: 12px; }
}
@media (hover: none), (max-width: 899px) {
  .j-thumb { display: block; }
}
@media (hover: hover) and (pointer: fine) {
  .j-list:hover .j-link { opacity: .32; }
  .j-list:hover .j-link:hover { opacity: 1; }
  .j-link:hover .j-title { font-style: italic; transform: translateX(18px); }
}

/* Cursor-following preview */
.hover-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  width: clamp(200px, 22vw, 340px);
  aspect-ratio: var(--ar, .8);
  margin-left: 36px;
  margin-top: calc(clamp(200px, 22vw, 340px) / var(--ar, .8) / -2);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg-3);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
  pointer-events: none;
  opacity: 0;
  clip-path: inset(14% 14% 14% 14% round var(--r-card));
  will-change: transform, opacity;
  transition: opacity 300ms var(--ease), clip-path 600ms var(--ease);
}
.hover-preview.on { opacity: 1; clip-path: inset(0 0 0 0 round var(--r-card)); }
.hover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
  transition: transform 900ms var(--ease);
}
.hover-preview.on img { transform: scale(1); }
.hover-preview img:not([src]),
.hover-preview img[src=""] { visibility: hidden; }

/* --------------------------------------------------------------------------
   13. Themes index
   -------------------------------------------------------------------------- */
.t-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 1.6vw, 24px);
}
@media (min-width: 600px) {
  .t-grid { grid-template-columns: repeat(2, 1fr); }
  .t-grid .t-card:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
}
@media (min-width: 900px) {
  .t-grid { grid-template-columns: repeat(3, 1fr); }
  .t-grid .t-card:last-child:nth-child(odd) { grid-column: auto; aspect-ratio: 3 / 4.2; }
}

.t-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.2;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg-3);
  isolation: isolate;
}
.t-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 500ms var(--ease), transform 1100ms var(--ease);
}
.t-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .3) 38%, transparent 62%);
  pointer-events: none;
}
.t-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 2.4vw, 32px);
}
.t-count {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.t-title { font-size: var(--fs-row); }
.t-desc { max-width: 32ch; font-size: 14px; line-height: 1.5; color: var(--fg-2); }

@media (hover: hover) and (pointer: fine) {
  .t-card:hover img { transform: scale(1.06); }
  .t-card:hover .t-title { font-style: italic; }
}

/* --------------------------------------------------------------------------
   14. About
   -------------------------------------------------------------------------- */
.a-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 6vw, 120px);
  align-items: start;
}
.a-grid.no-portrait { max-width: 820px; }
@media (min-width: 900px) {
  .a-grid { grid-template-columns: 5fr 7fr; }
  .a-grid.no-portrait { grid-template-columns: 1fr; }
}

.a-portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg-3);
  max-width: 560px;
}
.a-portrait img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .a-portrait { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 24px); max-width: none; }
}

.a-body > * + * { margin-top: clamp(28px, 3.4vw, 48px); }
.a-body > .a-title { margin-top: 16px; }
.a-body > .a-tagline { margin-top: 18px; }
.a-title { font-size: var(--fs-collection); }
.a-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
  color: var(--fg-2);
  max-width: 28ch;
}
.a-bio { max-width: 62ch; }
.a-bio p { font-size: clamp(15px, 1.2vw, 17px); line-height: 1.75; color: var(--fg-2); }
.a-bio p + p { margin-top: 1.1em; }

.a-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 8px;
  padding: 24px 0;
}
.stat + .stat { padding-left: clamp(14px, 2.4vw, 32px); border-left: 1px solid var(--line); }
.stat dd { font-size: clamp(2.6rem, 5vw, 4.25rem); font-variant-numeric: tabular-nums; }

.a-h {
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (min-width: 900px) { .a-h { font-size: 12px; } }

.a-gear ul { border-top: 1px solid var(--line); }
.a-gear li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
  break-inside: avoid;
}
@media (min-width: 600px) {
  .a-gear ul { columns: 2; column-gap: 32px; border-top: 0; }
  .a-gear li:first-child, .a-gear li { border-top: 0; }
}

.a-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.a-contact .a-h { width: 100%; }
.a-contact .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* About: lead line, pull quote, "Why I shoot", gear + contact */
.a-body > .a-lead { margin-top: 22px; }
.a-lead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.7rem, 3.2vw, 2.9rem);
  line-height: 1.12;
  color: var(--fg);
  max-width: 20ch;
}
.a-quote {
  margin: 1.6em 0;
  padding-left: clamp(16px, 2vw, 26px);
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2.3rem);
  line-height: 1.15;
  color: var(--fg);
  max-width: 22ch;
}
.a-why {
  margin-top: clamp(80px, 12vw, 180px);
  padding-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
}
.a-why-head { margin-bottom: clamp(28px, 4vw, 56px); }
.a-why-title { scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 64px); }
.a-why-head .kicker { margin-bottom: 14px; }
.a-why-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-collection); line-height: .98; }
.a-why-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.a-why-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 clamp(12px, 3vw, 48px);
  align-items: baseline;
  padding: clamp(22px, 3.2vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .a-why-item { grid-template-columns: 120px 1fr; } }
.a-why-num { font-size: 12px; letter-spacing: .14em; color: var(--muted); font-variant-numeric: tabular-nums; }
.a-why-body { display: flex; flex-direction: column; gap: 10px; max-width: 46ch; }
@media (min-width: 1100px) {
  .a-why-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 48px; max-width: none; align-items: baseline; }
}
.a-why-h { font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.08; color: var(--fg); }
.a-why-t { font-size: clamp(15px, 1.2vw, 17px); line-height: 1.65; color: var(--fg-2); }
.a-why-item.is-last { border-bottom: 0; }
.a-why-item.is-last .a-why-h { font-style: italic; color: var(--accent); }
.a-extra {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  margin-top: clamp(64px, 9vw, 140px);
}
@media (min-width: 900px) { .a-extra { grid-template-columns: 7fr 5fr; } }

/* --------------------------------------------------------------------------
   15. Viewer
   -------------------------------------------------------------------------- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.viewer.open { visibility: visible; pointer-events: auto; }
.viewer.closing { visibility: visible; pointer-events: none; }
.viewer:focus { outline: none; }
.viewer::backdrop { background: #000; }

.v-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #050506;
  opacity: 0;
  transition: opacity 400ms var(--ease), background-color 400ms var(--ease);
}
.viewer.open .v-backdrop { opacity: .985; }
.viewer.closing .v-backdrop { opacity: 0; transition: opacity 280ms var(--ease-io); }
.viewer.is-fs .v-backdrop { background: #000; }
.viewer.is-fs.open .v-backdrop { opacity: 1; }
.viewer.dragging .v-backdrop {
  opacity: calc(1 - var(--v-drag, 0) * .6);
  transition: none;
}

/* Stage geometry changes instantly (JS measures it in the same frame) */
.v-stage {
  position: absolute;
  z-index: 1;
  top: max(var(--v-pad), env(safe-area-inset-top));
  right: max(var(--v-pad), env(safe-area-inset-right));
  bottom: max(var(--v-pad), env(safe-area-inset-bottom));
  left: max(var(--v-pad), env(safe-area-inset-left));
  display: grid;
  place-items: center;
  touch-action: none;
}
.v-img {
  display: block;
  max-width: none;
  object-fit: cover;
  transform-origin: 50% 50%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  cursor: zoom-in;
}
.viewer.zoomed .v-img { cursor: zoom-out; }
.viewer.idle,
.viewer.idle .v-stage,
.viewer.idle .v-img { cursor: none; }

/* Hi-res loading shimmer */
.viewer::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(242, 240, 236, .55), transparent);
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
  transition: opacity 300ms var(--ease);
}
.viewer.open.loading::after {
  opacity: 1;
  animation: v-shimmer 1.3s var(--ease-io) infinite;
}
@keyframes v-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(260%); }
}

/* UI layer */
.v-ui {
  --v-ui-x: max(var(--v-pad), env(safe-area-inset-left));
  --v-ui-xr: max(var(--v-pad), env(safe-area-inset-right));
  --v-ui-t: max(var(--v-pad), env(safe-area-inset-top));
  --v-ui-b: max(var(--v-pad), env(safe-area-inset-bottom));
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms var(--ease), right 500ms var(--ease), bottom 500ms var(--ease);
}
.v-ui::before,
.v-ui::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 140px;
  pointer-events: none;
}
.v-ui::before { top: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .38), transparent); }
.v-ui::after { bottom: 0; background: linear-gradient(to top, rgba(0, 0, 0, .42), transparent); }

.viewer.open .v-ui { opacity: 1; }
.viewer.closing .v-ui { opacity: 0; transition: opacity 200ms var(--ease); }
.viewer.open.idle .v-ui,
.viewer.open.zoomed .v-ui { opacity: 0; }
.viewer.open.idle .v-ui:has(:focus-visible) { opacity: 1; }

.v-ui button,
.v-ui a { pointer-events: auto; }
.viewer:not(.open) .v-ui button,
.viewer.idle .v-ui:not(:has(:focus-visible)) button,
.viewer.zoomed .v-ui button { pointer-events: none; }

.v-top {
  position: absolute;
  top: var(--v-ui-t);
  left: var(--v-ui-x);
  right: var(--v-ui-xr);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateY(-10px);
  transition: transform 500ms var(--ease);
}
.viewer.open .v-top { transform: none; }

.v-count {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  color: var(--fg-2);
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.v-count:empty { visibility: hidden; }

.v-actions { display: flex; align-items: center; gap: 8px; }

.v-actions button,
.v-nav {
  display: grid;
  place-items: center;
  width: var(--v-btn);
  height: var(--v-btn);
  border-radius: 50%;
  color: var(--fg);
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border: 1px solid var(--line);
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
#vInfoBtn.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.viewer.no-fs #vFsBtn { display: none; }

.v-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 48px;
  height: 48px;
  margin-top: -24px;
}
.v-prev { left: var(--v-ui-x); }
.v-next { right: var(--v-ui-xr); }
.viewer.single .v-nav { display: none; }
@media (hover: none) and (pointer: coarse) {
  .v-nav { display: none; }
}

@media (hover: hover) and (pointer: fine) {
  .v-actions button:hover,
  .v-nav:hover { background: rgba(48, 48, 52, .78); border-color: var(--line-2); }
  #vInfoBtn.on:hover { background: var(--fg); color: var(--bg); }
  .v-prev:hover { transform: translateX(-2px); }
  .v-next:hover { transform: translateX(2px); }
}

.v-caption {
  position: absolute;
  left: var(--v-ui-x);
  bottom: var(--v-ui-b);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: min(560px, calc(100% - var(--v-ui-x) - var(--v-ui-xr)));
  padding: 4px 4px 2px;
  text-shadow: 0 1px 16px rgba(0, 0, 0, .7);
  pointer-events: none;
  transform: translateY(10px);
  transition: transform 500ms var(--ease), opacity 300ms var(--ease);
}
.viewer.open .v-caption { transform: none; }
.vc-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  line-height: 1.05;
  color: var(--fg);
}
.vc-meta { font-size: 13px; color: var(--fg-2); letter-spacing: .01em; }

/* Details panel: side panel >= 720px, bottom sheet below */
.v-info {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--v-info-w);
  padding: calc(var(--v-pad) + env(safe-area-inset-top) + 12px) 28px calc(28px + env(safe-area-inset-bottom));
  padding-right: calc(28px + env(safe-area-inset-right));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(17, 17, 19, .94);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  visibility: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--dim) transparent;
  transition: transform 500ms var(--ease), visibility 0s linear 500ms;
}
.viewer.info-open .v-info {
  transform: none;
  visibility: visible;
  transition: transform 500ms var(--ease), visibility 0s linear 0s;
}
.viewer.closing .v-info {
  opacity: 0;
  transition: opacity 200ms var(--ease), transform 0s linear 200ms, visibility 0s linear 200ms;
}

@media (min-width: 720px) {
  .viewer.info-open .v-stage { right: calc(var(--v-info-w) + var(--v-pad)); }
  .viewer.info-open .v-ui { right: var(--v-info-w); }
}
@media (max-width: 719px) {
  .v-info {
    top: auto;
    left: 0;
    width: auto;
    height: var(--v-sheet-h);
    padding: 30px calc(20px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .v-info::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 10px;
    width: 36px;
    height: 4px;
    margin-left: -18px;
    border-radius: 4px;
    background: var(--line-2);
  }
  .viewer.info-open .v-stage { bottom: calc(var(--v-sheet-h) + var(--v-pad)); }
  .viewer.info-open .v-ui { bottom: var(--v-sheet-h); }
  .viewer.info-open .v-caption { opacity: 0; }
  .viewer.info-open .v-ui::after { opacity: 0; }
}

.vi-head {
  padding-bottom: 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.vi-title { font-size: clamp(1.9rem, 3vw, 2.4rem); line-height: 1.02; }
.vi-loc { margin-top: 8px; font-size: 14px; color: var(--fg-2); }
.vi-meta { display: block; }
.vi-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.vi-row:last-child { border-bottom: 0; }
.vi-row dd { font-size: 14px; line-height: 1.5; color: var(--fg); min-width: 0; overflow-wrap: anywhere; }
.vi-row dd a:not(.vi-tag) {
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--t-med) var(--ease);
}
.vi-tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  margin: 0 6px 6px 0;
  padding: 0 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .vi-row dd a:not(.vi-tag):hover { text-decoration-color: var(--fg); }
  .vi-tag:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
}

/* --------------------------------------------------------------------------
   16. View transitions (route changes)
   -------------------------------------------------------------------------- */
::view-transition-old(root) {
  animation: vt-out 200ms var(--ease) both;
}
::view-transition-new(root) {
  animation: vt-in 400ms var(--ease) both;
}
::view-transition-group(site-nav),
::view-transition-group(site-filters) {
  animation-duration: 400ms;
  animation-timing-function: var(--ease);
}
@keyframes vt-out {
  to { opacity: 0; }
}
@keyframes vt-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   17. Small screens fine-tuning
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .nav { gap: 2px; }
  .seg button { padding: 0 11px; }
  .chip { padding: 0 11px; }
  .stat dd { font-size: 2.3rem; }
  .vi-row { grid-template-columns: 76px 1fr; }
  .v-actions { gap: 6px; }
}

/* --------------------------------------------------------------------------
   18. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .rv, .tile { transform: none; }
  .s-inner { transform: none; }
  .sphere-hint::before, .sphere-hint::after { animation: none; transform: none; }
  .viewer.open.loading::after { animation: none; opacity: 0; }
}

/* --------------------------------------------------------------------------
   12. Map of India (#/map) — JS owns the SVG viewBox and pin left/top
   -------------------------------------------------------------------------- */
.c-places a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.c-places a:hover { color: var(--fg); }

.page-map {
  position: fixed;
  inset: 0;
  max-width: none;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 45% 40% at 20% 15%, rgba(255, 153, 51, .07), transparent 70%),
    radial-gradient(ellipse 50% 45% at 70% 85%, rgba(19, 136, 8, .06), transparent 70%),
    radial-gradient(ellipse 80% 75% at 40% 50%, #0f1f26, #0a1216 60%, #08090b);
}
.map-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate; /* pins stack inside the map, below the panel */
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.map-stage.is-dragging { cursor: grabbing; }
.map-world { position: absolute; inset: 0; }

/* States, coast and rivers (map units; strokes stay hairline at any zoom) */
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-halo path { fill: none; stroke: #3d97a6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.map-halo .h1 { stroke-width: 3px; stroke-opacity: .3; }
.map-halo .h2 { stroke-width: 11px; stroke-opacity: .1; }
.map-halo .h3 { stroke-width: 26px; stroke-opacity: .05; }
.map-svg .st {
  fill: var(--fill, #2a2a2e);
  stroke: rgba(255, 240, 220, .17);
  stroke-width: .7px;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  opacity: .92;
  transition: opacity var(--t-med) var(--ease);
  animation: state-in 1000ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 14ms);
}
.map-svg .st:hover { opacity: 1; }
.map-stage.has-sel .map-svg .st { opacity: .62; }
.map-stage.has-sel .map-svg .st.is-sel { opacity: 1; }
@keyframes state-in { from { opacity: 0; } }
.map-svg .river {
  fill: none;
  stroke: #72b9de;
  stroke-opacity: .62;
  stroke-width: var(--w, 1.2px);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  animation: river-in 1400ms var(--ease) 500ms both;
}
@keyframes river-in { from { stroke-opacity: 0; } }

/* Illustrated layer (screen space; JS sets each item's transform) */
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.map-art .art { transition: opacity var(--t-med) var(--ease); }
.map-stage.has-sel .map-art .art { opacity: .4; }
.map-stage.has-sel .map-art .st-label { opacity: 0; }
.g-rock { fill: #2b3545; stroke: rgba(226, 236, 246, .55); stroke-width: 1; stroke-linejoin: round; }
.g-snow { fill: rgba(242, 247, 251, .88); }
.g-hill { fill: rgba(30, 72, 46, .9); stroke: rgba(165, 214, 175, .45); stroke-width: 1; }
.g-dune { fill: none; stroke: rgba(244, 204, 146, .62); stroke-width: 1.3; stroke-linecap: round; }
.g-tree { fill: rgba(126, 196, 136, .55); }
.map-art text {
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(8, 10, 12, .55);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.map-art .sea { font: italic 400 17px var(--font-display); letter-spacing: .22em; fill: rgba(125, 196, 210, .5); stroke: none; }
.map-art .tn { font: italic 400 14px var(--font-display); letter-spacing: .05em; fill: rgba(248, 226, 188, .55); }
.map-art .st-label {
  font: 500 8.5px var(--font-ui);
  letter-spacing: .2em;
  text-transform: uppercase;
  fill: rgba(255, 246, 232, .62);
  opacity: 0;
}
.map-art .st-label.is-caption { dominant-baseline: hanging; }
.map-stage[data-z="1"] .st-label:not(.is-small),
.map-stage[data-z="2"] .st-label { opacity: 1; }
.map-stage[data-z="2"] .tn { opacity: .5; }
.map-stage.is-tiny .tn, .map-stage.is-tiny .sea { opacity: 0; }
.map-stage.is-tiny .tg { opacity: .7; }
.lm { pointer-events: auto; opacity: .7; }
.lm path { fill: none; stroke: #f7e5c3; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.lm-hit { fill: transparent; pointer-events: all; cursor: help; }
.lm.hot { opacity: 1; }
.lm.hot path { stroke: #fff; }
.map-stage.is-dropping .tg,
.map-stage.is-dropping .lm { animation: art-in 800ms var(--ease) both; animation-delay: calc(350ms + var(--i, 0) * 45ms); }
@keyframes art-in { from { opacity: 0; } }
.map-tip {
  position: absolute;
  z-index: 5;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  font: 500 12px/1.2 var(--font-ui);
  color: var(--fg);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% + 4px));
  transition: opacity var(--t-fast) var(--ease), transform var(--t-med) var(--ease);
}
.map-tip.on { opacity: 1; transform: translate(-50%, -100%); }

/* Pins: JS sets left/top in screen pixels; the transform anchors the tail on the point */
.pin {
  position: absolute;
  width: var(--size);
  height: calc(var(--size) + 10px);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}
.pin.is-merged { visibility: hidden; pointer-events: none; }
.pin:hover, .pin.hot, .pin:focus-visible { z-index: 3; }
.pin.on { z-index: 4; }
.pin-body {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-3);
  box-shadow: 0 0 0 2px var(--fg), 0 10px 24px rgba(0, 0, 0, .55);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
  transform-origin: 50% 120%;
}
/* little tail pointing at the spot */
.pin::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 9px;
  height: 9px;
  background: var(--fg);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 0 0 2px 0;
  transition: background-color var(--t-med) var(--ease);
}
.pin-body img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pin-halo {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 16px;
  height: 8px;
  margin-left: -8px;
  border-radius: 50%;
  background: rgba(217, 199, 163, .55);
  pointer-events: none;
  animation: pin-pulse 2.6s var(--ease) infinite;
  animation-delay: var(--d, 0ms);
}
@keyframes pin-pulse {
  0% { transform: scale(.6); opacity: .85; }
  70%, 100% { transform: scale(3.6); opacity: 0; }
}
.pin-count {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #141210;
  font: 600 11px/20px var(--font-ui);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.pin-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  color: var(--fg);
  font: 500 12px/1.2 var(--font-ui);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-med) var(--ease);
  pointer-events: none;
}
.pin:hover .pin-label, .pin.hot .pin-label, .pin.on .pin-label, .pin:focus-visible .pin-label {
  opacity: 1;
  transform: translate(-50%, 0);
}
.pin:hover .pin-body, .pin.hot .pin-body, .pin:focus-visible .pin-body { transform: scale(1.12); }
.pin.on .pin-body { transform: scale(1.22); box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px rgba(217, 199, 163, .25), 0 12px 30px rgba(0, 0, 0, .6); }
.pin.on::after { background: var(--accent); }
.map-stage.has-sel .pin:not(.on):not(:hover):not(.hot) .pin-body { opacity: .55; }
.pin:focus-visible { outline: none; }

/* Clusters: a stack of cards */
.pin--cluster .pin-body {
  box-shadow: 0 0 0 2px var(--fg), 5px -4px 0 -1px var(--bg-3), 5px -4px 0 1px rgba(255, 255, 255, .5),
              10px -8px 0 -2px var(--bg-3), 10px -8px 0 0 rgba(255, 255, 255, .3), 0 10px 24px rgba(0, 0, 0, .55);
}
.pin--cluster .pin-count { background: var(--fg); }
.pin--cluster { animation: pin-pop 420ms var(--ease) both; }
@keyframes pin-pop {
  from { opacity: 0; transform: translate(-50%, -100%) scale(.6); }
}

/* First visit: pins drop in north to south */
.map-stage.is-dropping .pin:not(.pin--cluster) { animation: pin-drop 900ms cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(500ms + var(--d, 0ms)); }
@keyframes pin-drop {
  0% { opacity: 0; transform: translate(-50%, calc(-100% - 60px)); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, -100%); }
}

/* Title, zoom buttons, credit */
.map-head {
  position: absolute;
  left: var(--gutter);
  top: var(--page-top);
  pointer-events: none;
  animation: head-rise 900ms var(--ease) both;
}
.map-head .kicker { margin-bottom: 8px; }
.map-title { font-size: clamp(2.6rem, 6vw, 5.5rem); line-height: .95; font-style: italic; }
.map-ctrl {
  position: absolute;
  left: var(--gutter);
  bottom: calc(var(--filters-bottom) + 18px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  overflow: hidden;
}
.map-ctrl button {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--fg-2);
  font: 400 20px/1 var(--font-ui);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.map-ctrl button + button { border-top: 1px solid var(--line); }
.map-ctrl button:hover { background: var(--hover-fill); color: var(--fg); }
.map-ctrl svg { width: 16px; height: 16px; margin: auto; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; }
.map-credit {
  position: absolute;
  left: calc(var(--gutter) + 52px);
  bottom: calc(var(--filters-bottom) + 18px);
  font-size: 10px;
  letter-spacing: .02em;
  color: var(--dim);
}
.map-credit a { color: inherit; text-decoration: underline; }

/* Side panel (desktop) / bottom sheet (phones) */
.map-panel {
  position: absolute;
  right: 16px;
  top: calc(var(--nav-top) + var(--nav-h) + 16px);
  bottom: 16px;
  width: min(380px, 34vw);
  border-radius: 22px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  animation: panel-in 800ms var(--ease) 200ms both;
}
@keyframes panel-in { from { opacity: 0; transform: translateX(24px); } }
.mp-inner { padding: 26px 24px 28px; }
.mp-inner.in .mp-view > * { animation: mp-rise 600ms var(--ease) both; }
.mp-inner.in .mp-view > :nth-child(2) { animation-delay: 40ms; }
.mp-inner.in .mp-view > :nth-child(3) { animation-delay: 80ms; }
.mp-inner.in .mp-view > :nth-child(4) { animation-delay: 120ms; }
.mp-inner.in .mp-view > :nth-child(n+5) { animation-delay: 160ms; }
@keyframes mp-rise { from { opacity: 0; transform: translateY(14px); } }
.mp-view .kicker { margin-bottom: 10px; }
.mp-title { font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1; }
.mp-lede, .mp-meta { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--fg-2); }
.mp-meta a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.mp-meta a:hover { color: var(--fg); }
.mp-back {
  display: inline-flex;
  gap: 8px;
  margin: -6px 0 18px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--fg-2);
  font: 500 13px var(--font-ui);
  cursor: pointer;
}
.mp-back:hover { color: var(--fg); }
.mp-open { margin-top: 20px; }

.pl-list { list-style: none; margin: 22px -10px 0; padding: 0; }
.pl-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}
.pl-row:hover, .pl-row:focus-visible { background: var(--hover-fill); outline: none; }
.pl-img { flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--bg-3); }
.pl-img img { width: 100%; height: 100%; object-fit: cover; }
.pl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-name { font: 400 21px/1.1 var(--font-display); }
.pl-region { font-size: 12px; color: var(--muted); }
.pl-count { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.mp-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 22px;
}
.mp-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-3);
  animation: mp-rise 600ms var(--ease) both;
  animation-delay: calc(180ms + var(--i, 0) * 25ms);
}
.mp-thumb:first-child { grid-column: span 2; grid-row: span 2; }
.mp-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease), opacity var(--t-med) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .mp-thumb:hover img { transform: scale(1.06); }
  .mp-thumbs:hover .mp-thumb:not(:hover) img { opacity: .6; }
}

@media (max-width: 899px) {
  .map-panel {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 8px;
    width: auto;
    height: 42svh;
    border-radius: 22px;
    animation-name: sheet-in;
  }
  body.map-has-sel .map-panel { height: 52svh; }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(30px); } }
  .mp-inner { padding: 20px 18px 24px; }
  .map-head { top: calc(var(--nav-top) + var(--nav-h) + 14px); }
  .map-title { font-size: 2.4rem; }
  .map-ctrl { left: auto; right: 16px; top: calc(var(--nav-top) + var(--nav-h) + 14px); bottom: auto; }
  .map-ctrl button { width: 36px; height: 36px; }
  .map-credit { left: auto; right: 18px; bottom: calc(42svh + 14px); }
  body.map-has-sel .map-credit { bottom: calc(52svh + 14px); }
}

@media (prefers-reduced-motion: reduce) {
  .pin-halo, .map-svg .st, .map-svg .river, .map-stage.is-dropping .tg, .map-stage.is-dropping .lm, .map-stage.is-dropping .pin, .pin--cluster,
  .map-panel, .mp-inner.in .mp-view > *, .mp-thumb, .map-head { animation: none !important; }
}

/* --------------------------------------------------------------------------
   13. Behind the lens (#/behind) and its teaser on the About page
   -------------------------------------------------------------------------- */
.page-behind { --fh: 112px; }
@media (min-width: 600px) { .page-behind { --fh: 132px; } }
@media (min-width: 1100px) { .page-behind { --fh: 150px; } }

.b-head { max-width: 1100px; }
.b-head .kicker { margin-bottom: 18px; }
.b-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-hero); line-height: .92; letter-spacing: -.01em; }
.b-lead {
  margin-top: 22px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.12;
  color: var(--accent);
  max-width: 24ch;
}
.b-intro { margin-top: 22px; max-width: 62ch; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.7; color: var(--fg-2); }

/* Year ribbon: one bar per year, height by frame count */
.b-ribbon {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 64px;
  margin: clamp(40px, 6vw, 72px) 0 34px;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line-2);
}
.b-tick { position: relative; flex: 1 1 0; height: 100%; }
.b-tick button { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.b-bar {
  position: absolute;
  left: 15%; right: 15%; bottom: 0;
  height: calc(var(--h) * 100%);
  border-radius: 2px 2px 0 0;
  background: var(--line-2);
  transition: background var(--t-fast) var(--ease), transform var(--t-med) var(--ease);
  transform-origin: bottom;
}
.b-tick.has .b-bar { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.b-ribbon:not(.in) .b-bar { transform: scaleY(0); }
.b-tick:nth-child(n) .b-bar { transition-delay: calc(var(--d, 0) * 1ms); }
@media (hover: hover) and (pointer: fine) {
  .b-tick.has button:hover .b-bar { background: var(--accent); }
}
.b-tick button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.b-tick-y {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 599px) { .b-tick:not(.is-start):not(:last-child) .b-tick-y { display: none; } }

/* Chapters */
.b-chapters { margin-top: clamp(48px, 8vw, 110px); }
.b-ch {
  display: grid;
  gap: 26px;
  padding: clamp(36px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 12px);
}
@media (min-width: 1000px) {
  .b-ch { grid-template-columns: minmax(260px, 340px) 1fr; gap: 64px; align-items: start; }
  .b-ch-head { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 28px); }
}
.b-ch-head { display: flex; flex-direction: column; gap: 10px; }
.b-ch-num { font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.b-ch-years {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 4.75rem);
  line-height: .95;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}
.b-ch-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.1; color: var(--fg); }
.b-ch-text { max-width: 40ch; font-size: 15px; line-height: 1.65; color: var(--fg-2); }
.b-ch-count { margin-top: 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* Contact sheet: small frames on film, each in its true shape */
.b-sheet { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 22px 14px; margin: 0; padding: 0; list-style: none; }
.b-cell { width: calc(var(--fh) * var(--r) + 12px); max-width: 100%; }
.b-frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}
.b-film {
  position: relative;
  display: block;
  padding: 13px 6px;
  border-radius: 3px;
  background:
    radial-gradient(ellipse 2.6px 2.2px at 50% 50%, rgba(240, 232, 214, .2) 96%, transparent) 0 3px / 13px 8px repeat-x,
    radial-gradient(ellipse 2.6px 2.2px at 50% 50%, rgba(240, 232, 214, .2) 96%, transparent) 0 calc(100% - 3px) / 13px 8px repeat-x,
    #050506;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.b-film img {
  display: block;
  width: 100%;
  height: var(--fh);
  object-fit: cover;
  border-radius: 1px;
  background: var(--bg-3);
  filter: saturate(.82) brightness(.9);
  opacity: 0;
  transition: opacity 600ms var(--ease), filter var(--t-med) var(--ease);
}
.b-film img.loaded { opacity: 1; }
.b-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding: 0 2px; }
.b-date { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-variant-numeric: tabular-nums; }
.b-cap {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg-2);
}
@media (hover: hover) and (pointer: fine) {
  .b-frame:hover .b-film { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(217, 199, 163, .35), 0 18px 40px -18px rgba(0, 0, 0, .9); }
  .b-frame:hover .b-film img { filter: none; }
  .b-frame:hover .b-cap { color: var(--fg); }
}
.b-frame:focus-visible { outline: none; }
.b-frame:focus-visible .b-film { box-shadow: 0 0 0 2px var(--accent); }

/* Close: link back to Why I shoot / About / the work */
.b-end { margin-top: clamp(56px, 8vw, 120px); padding-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.b-outro {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  line-height: 1.1;
  max-width: 24ch;
}
.b-links { display: grid; gap: 0 32px; margin-top: clamp(32px, 5vw, 64px); }
@media (min-width: 760px) { .b-links { grid-template-columns: repeat(3, 1fr); } }
.b-link { display: flex; flex-direction: column; gap: 8px; padding: 22px 0; border-top: 1px solid var(--line); }
.b-link-t { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.05; transition: color var(--t-fast) var(--ease); }
.b-link-t span { display: inline-block; transition: transform var(--t-med) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .b-link:hover .b-link-t { color: var(--accent); }
  .b-link:hover .b-link-t span { transform: translateX(6px); }
}

/* Lightbox: a mid-size copy, never the full file */
.b-box {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 64px 16px 24px;
  opacity: 0;
  transition: opacity 260ms var(--ease);
}
.b-box[hidden] { display: none; }
.b-box.is-open { opacity: 1; }
.b-box-bg {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 6, 7, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: zoom-out;
}
.b-box-fig { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0; max-width: min(1100px, 92vw); pointer-events: none; }
.b-box-img {
  display: block;
  max-width: 100%;
  max-height: calc(100svh - 190px);
  width: auto;
  height: auto;
  border-radius: 4px;
  background: var(--bg-3);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
  transform: scale(.97);
  transition: transform 420ms var(--ease), opacity 300ms var(--ease);
  opacity: 0;
}
.b-box.is-open .b-box-img { transform: none; }
.b-box-img.loaded { opacity: 1; }
.b-box-cap { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; text-align: center; max-width: 70ch; }
.b-box-date { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.b-box-t { font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.6rem); color: var(--fg); }
.b-box-s { font-size: 13px; color: var(--muted); }
.b-box-n { font-size: 11px; letter-spacing: .12em; color: var(--dim); font-variant-numeric: tabular-nums; }
.b-box-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--v-btn);
  height: var(--v-btn);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  color: var(--fg);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.b-box-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.b-box-x { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.b-box-prev, .b-box-next { top: 50%; margin-top: -22px; }
.b-box-prev { left: 14px; }
.b-box-next { right: 14px; }
@media (max-width: 599px) { .b-box-prev, .b-box-next { top: auto; bottom: 18px; margin-top: 0; } }
@media (hover: hover) and (pointer: fine) { .b-box-btn:hover { background: var(--hover-fill); } }
body.b-box-open { overflow: hidden; }
body.b-box-open .nav { opacity: 0; pointer-events: none; }

/* Teaser on the About page */
.b-teaser {
  display: grid;
  gap: 28px;
  margin-top: clamp(64px, 9vw, 140px);
  padding: clamp(32px, 4vw, 52px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .b-teaser { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; } }
.bt-text { display: flex; flex-direction: column; gap: 12px; }
.bt-title { font-family: var(--font-display); font-size: var(--fs-row); line-height: 1; color: var(--fg); }
.bt-title span { display: inline-block; transition: transform var(--t-med) var(--ease); }
.bt-lead { font-family: var(--font-display); font-style: italic; font-size: clamp(1.15rem, 1.6vw, 1.45rem); color: var(--fg-2); }
.bt-strip { display: flex; gap: 8px; }
.bt-f {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-3);
  transition: transform var(--t-med) var(--ease);
  transition-delay: calc(var(--i) * 35ms);
}
.bt-f img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.5) brightness(.85); transition: filter var(--t-med) var(--ease); }
.bt-y {
  position: absolute;
  left: 7px;
  bottom: 6px;
  font-size: 10px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}
@media (max-width: 599px) { .bt-f:nth-child(n + 6) { display: none; } }
@media (hover: hover) and (pointer: fine) {
  .b-teaser:hover .bt-title { color: var(--accent); }
  .b-teaser:hover .bt-title span { transform: translateX(8px); }
  .b-teaser:hover .bt-f { transform: translateY(-6px); }
  .b-teaser:hover .bt-f img { filter: none; }
}

/* Friends: "With Arun" — the people I travel and shoot with */
.b-trip { color: var(--muted); letter-spacing: .08em; }
.b-jumps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.b-jump {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--fg);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.b-jump-k { font-family: var(--font-ui); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.b-jump > span[aria-hidden] { color: var(--accent); font-family: var(--font-ui); font-size: 14px; }
@media (hover: hover) and (pointer: fine) { .b-jump:hover { background: var(--hover-fill); border-color: var(--accent); } }

.b-friend {
  margin-top: clamp(40px, 6vw, 80px);
  padding-top: clamp(48px, 7vw, 100px);
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 12px);
}
.b-friend-head { max-width: 900px; margin-bottom: clamp(32px, 5vw, 64px); }
.b-friend-head .kicker { margin-bottom: 16px; }
.b-friend-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-collection); line-height: .95; }
.b-friend-lead {
  margin-top: 18px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  line-height: 1.15;
  color: var(--accent);
  max-width: 26ch;
}
.b-friend-about {
  margin-bottom: clamp(48px, 6vw, 80px);
  padding: clamp(24px, 3.5vw, 40px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.b-friend-about .kicker { margin-bottom: 14px; }
.b-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(20px, 2.5vw, 28px); padding: 0; }
.b-facts li {
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-2);
}
.b-friend-about-text.a-bio { max-width: none; }
@media (min-width: 900px) {
  .b-friend-about-text { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
  .b-friend-about-text p + p { margin-top: 0; }
}
.b-friend-grid { display: grid; gap: clamp(40px, 5vw, 64px); }
@media (min-width: 1100px) {
  .b-friend-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .b-friend-text { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 28px); }
}
.b-friend-text p:last-child { color: var(--fg); }
.b-friend-text .a-quote { color: var(--accent); }
.b-sheet--friend { align-content: flex-start; }

@media (prefers-reduced-motion: reduce) {
  .b-bar, .b-film, .b-box, .b-box-img, .bt-f { transition: none !important; }
  .b-ribbon:not(.in) .b-bar { transform: none; }
}

/* ==========================================================================
   14. The book — Varanasi: A Passage to Immortality (#/book, js/book.js)
   ========================================================================== */
.bk-hero { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (min-width: 900px) { .bk-hero:not(.no-fig) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.bk-hero-fig { margin: 0; max-width: 520px; }
.bk-hero-img { display: block; overflow: hidden; border-radius: var(--r-tile); background: var(--bg-3); }
.bk-hero-img img { display: block; width: 100%; height: auto; transition: transform var(--t-slow) var(--ease); }
.bk-hero-fig figcaption { margin-top: 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bk-cover {
  display: block;
  border-radius: 3px 8px 8px 3px;
  overflow: hidden;
  box-shadow: inset 6px 0 10px -6px rgba(0, 0, 0, .6), 0 30px 60px -20px rgba(0, 0, 0, .7);
}
.bk-cover img { display: block; width: 100%; height: auto; }
.bk-hero-text .kicker { margin-bottom: 18px; }
.bk-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-hero); line-height: .9; letter-spacing: -.01em; }
.bk-sub {
  display: block;
  margin-top: .25em;
  font-style: italic;
  font-size: clamp(1.7rem, 3.6vw, 3.2rem);
  line-height: 1.05;
  color: var(--accent);
}
.bk-by { margin-top: 22px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.bk-lead { margin-top: 18px; font-family: var(--font-display); font-style: italic; font-size: clamp(1.25rem, 1.9vw, 1.65rem); line-height: 1.25; color: var(--fg-2); max-width: 32ch; }
.bk-hero-text .b-facts { margin-top: 26px; }
.bk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.bk-buy { background: var(--fg); color: var(--bg); border-color: var(--fg); }
@media (hover: hover) and (pointer: fine) {
  .bk-hero-img:hover img { transform: scale(1.03); }
  .bk-buy:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
}

.bk-about {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  margin-top: clamp(64px, 9vw, 140px);
  padding-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
}
@media (min-width: 1000px) { .bk-about { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } }
.bk-quote { margin: 0; max-width: 20ch; }
.bk-quote cite { display: block; margin-top: 16px; font-family: var(--font-ui); font-style: normal; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bk-quote cite::before { content: '— '; }

.bk-h { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-row); line-height: 1; }
.bk-inside { margin-top: clamp(64px, 9vw, 140px); }
.bk-list { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; gap: 0 clamp(24px, 3vw, 48px); }
@media (min-width: 700px) { .bk-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .bk-list { grid-template-columns: repeat(3, 1fr); } }
.bk-list li { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.bk-n { grid-row: span 2; font-size: 12px; letter-spacing: .1em; color: var(--muted); padding-top: .45em; }
.bk-li-h { font-family: var(--font-display); font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.1; }
.bk-li-t { font-size: 14px; line-height: 1.6; color: var(--fg-2); }

.bk-photos { margin-top: clamp(64px, 9vw, 140px); }
.bk-photos-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; }
.bk-note { max-width: 46ch; font-size: 14px; line-height: 1.6; color: var(--muted); }
.bk-strip { list-style: none; margin: clamp(24px, 3vw, 40px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .bk-strip { grid-template-columns: repeat(5, 1fr); } }
.bk-strip li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 700px) { .bk-strip li:last-child:nth-child(odd) { grid-column: auto; } }
.bk-strip a { display: block; }
.bk-strip-img { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 8px; background: var(--bg-3); }
.bk-strip-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease), filter var(--t-med) var(--ease); }
.bk-strip-t { display: block; margin-top: 10px; font-size: 13px; color: var(--fg-2); }
@media (hover: hover) and (pointer: fine) {
  .bk-strip a:hover img { transform: scale(1.04); }
  .bk-strip a:hover .bk-strip-t { color: var(--fg); }
}

.bk-arun {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(64px, 9vw, 140px);
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  align-items: center;
}
@media (min-width: 900px) { .bk-arun { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.bk-arun-strip { display: flex; gap: 8px; }
.bk-arun-f { flex: 1 1 0; min-width: 0; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 6px; background: var(--bg-3); }
.bk-arun-f img { width: 100%; height: 100%; object-fit: cover; }
.bk-arun-text .kicker { margin-bottom: 12px; }
.bk-arun-p { margin-top: 16px; max-width: 56ch; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.75; color: var(--fg-2); }
.bk-more, .b-about-book { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 20px; font-family: var(--font-display); font-size: clamp(1.3rem, 2vw, 1.7rem); color: var(--fg); }
.bk-more span, .b-about-book-t span { display: inline-block; transition: transform var(--t-med) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .bk-more:hover, .b-about-book:hover { color: var(--accent); }
  .bk-more:hover span, .b-about-book:hover .b-about-book-t span { transform: translateX(6px); }
}
.b-about-book { flex-direction: column; gap: 6px; margin-top: clamp(20px, 2.5vw, 28px); }

/* Journey page link to the book, About page teaser */
.c-book { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 16px; font-family: var(--font-display); font-size: clamp(1.15rem, 1.6vw, 1.4rem); color: var(--fg); }
.c-book .kicker { font-family: var(--font-ui); }
@media (hover: hover) and (pointer: fine) { .c-book:hover { color: var(--accent); } }
body.is-sphere .c-head .c-book { display: none; }

.bk-teaser {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  margin-top: clamp(32px, 4vw, 56px);
  padding-bottom: clamp(32px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
}
.bk-teaser-img { width: clamp(96px, 14vw, 170px); aspect-ratio: 3 / 4; overflow: hidden; border-radius: 6px; background: var(--bg-3); }
.bk-teaser-img.is-cover { border-radius: 2px 6px 6px 2px; }
.bk-teaser-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.bk-teaser-text { display: flex; flex-direction: column; gap: 8px; }
.bk-teaser-title { font-family: var(--font-display); font-size: var(--fs-row); line-height: 1; color: var(--fg); }
.bk-arrow { display: inline-block; transition: transform var(--t-med) var(--ease); }
.bk-teaser-sub { font-family: var(--font-display); font-style: italic; font-size: clamp(1.2rem, 2vw, 1.7rem); color: var(--accent); }
.bk-teaser-lead { font-size: 14px; color: var(--fg-2); }
@media (hover: hover) and (pointer: fine) {
  .bk-teaser:hover .bk-teaser-title { color: var(--accent); }
  .bk-teaser:hover .bk-arrow { transform: translateX(8px); }
  .bk-teaser:hover .bk-teaser-img img { transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .bk-hero-img img, .bk-strip-img img, .bk-teaser-img img { transition: none !important; }
}

/* The book: the real cover as a book turned slightly, and the jacket laid flat */
.bk-hero-fig.is-cover { max-width: 640px; }
.bk-book { perspective: 1800px; padding: 2% 2% 6% 6%; }
.bk-book-3d {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(20deg) rotateX(3deg);
  transition: transform 900ms var(--ease);
}
.bk-book-front {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1px 4px 4px 1px;
  box-shadow: inset 4px 0 8px -4px rgba(0, 0, 0, .5), 30px 40px 60px -30px rgba(0, 0, 0, .9);
}
.bk-book-spine {
  position: absolute;
  top: 0;
  left: -4.6%;
  width: 4.6%;
  height: 100%;
  background-size: 100% 100%;
  transform-origin: right center;
  transform: rotateY(-90deg);
  filter: brightness(.8);
}
@media (hover: hover) and (pointer: fine) { .bk-book:hover .bk-book-3d { transform: rotateY(8deg) rotateX(1deg); } }
@media (max-width: 599px) { .bk-book-3d { transform: rotateY(14deg) rotateX(2deg); } }

.bk-jacket { margin-top: clamp(64px, 9vw, 140px); }
.bk-wrap { margin: clamp(24px, 3vw, 40px) 0 0; }
.bk-wrap img { display: block; width: 100%; height: auto; border-radius: 4px; background: var(--bg-3); }
.bk-wrap-labels { display: flex; margin-top: 12px; }
.bk-wrap-labels span {
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
  text-align: center;
  white-space: nowrap;
  overflow: visible;
}
.bk-wrap-labels span + span { border-left: 8px solid transparent; }
.bk-wrap-labels b { font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bk-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 32px; margin: clamp(28px, 4vw, 48px) 0 0; }
@media (min-width: 900px) { .bk-details { grid-template-columns: repeat(4, 1fr); } }
.bk-details div { padding-top: 14px; border-top: 1px solid var(--line); }
.bk-details dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bk-details dd { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(1.25rem, 1.8vw, 1.6rem); line-height: 1.15; }

.bk-teaser-img.is-cover { width: clamp(150px, 22vw, 280px); aspect-ratio: auto; box-shadow: 14px 18px 30px -16px rgba(0, 0, 0, .8); }
.bk-teaser-img.is-cover img { height: auto; }
@media (prefers-reduced-motion: reduce) { .bk-book-3d { transition: none !important; } }

/* The book: a glimpse inside — small copies in a mosaic, folded until asked */
.bk-glimpse { margin-top: clamp(64px, 9vw, 140px); }
.bk-glimpse-wrap { position: relative; margin-top: clamp(24px, 3vw, 40px); }
.bk-glimpse-wrap.is-folded { max-height: clamp(560px, 62vw, 820px); overflow: hidden; }
.bk-glimpse-wrap.is-folded::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to bottom, transparent, var(--bg) 92%);
  pointer-events: none;
}
.bk-mosaic { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 10px; }
@media (min-width: 700px) { .bk-mosaic { columns: 3; } }
@media (min-width: 1100px) { .bk-mosaic { columns: 4; column-gap: 12px; } }
.bk-mosaic li { position: relative; break-inside: avoid; margin-bottom: 10px; overflow: hidden; border-radius: 6px; background: var(--bg-3); }
@media (min-width: 1100px) { .bk-mosaic li { margin-bottom: 12px; } }
.bk-mosaic img { display: block; width: 100%; height: auto; transition: transform var(--t-slow) var(--ease), filter var(--t-med) var(--ease); }
.bk-mosaic-c {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 12px 10px;
  font-size: 12px;
  line-height: 1.35;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .bk-mosaic li:hover img { transform: scale(1.04); }
  .bk-mosaic li:hover .bk-mosaic-c { opacity: 1; transform: none; }
}
@media (hover: none) { .bk-mosaic-c { opacity: 1; transform: none; font-size: 11px; padding-top: 20px; } }
.bk-glimpse-more { display: flex; justify-content: center; margin-top: 8px; position: relative; }
.bk-glimpse-wrap:not(.is-folded) + .bk-glimpse-more { margin-top: 24px; }
@media (prefers-reduced-motion: reduce) { .bk-mosaic img, .bk-mosaic-c { transition: none !important; } }

/* The book: overview quotes and a 3-column details grid */
.bk-quotes { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 56px); }
@media (min-width: 1000px) { .bk-quotes { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 28px); } }
.bk-quote.is-small { font-size: clamp(1.2rem, 1.8vw, 1.6rem); color: var(--fg-2); border-left-color: var(--line-2); }
@media (min-width: 900px) { .bk-details { grid-template-columns: repeat(3, 1fr); } }
.bk-quote cite a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .bk-quote cite a:hover { color: var(--fg); } }

/* The book: reader reviews */
.bk-stars { color: var(--accent); letter-spacing: .12em; font-size: 13px; }
.bk-hero-rating { margin-top: 16px; font-size: 13px; color: var(--fg-2); }
.bk-hero-rating a { display: inline-flex; gap: 8px; align-items: center; }
@media (hover: hover) and (pointer: fine) { .bk-hero-rating a:hover { color: var(--fg); } }
.bk-reviews { margin-top: clamp(64px, 9vw, 140px); }
#bkReviews { scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 24px); }
.bk-rating { font-size: 14px; color: var(--fg-2); }
.bk-rating b { color: var(--fg); font-weight: 500; }
.bk-review-list { list-style: none; margin: clamp(24px, 3vw, 40px) 0 0; padding: 0; display: grid; gap: clamp(12px, 1.6vw, 20px); }
@media (min-width: 700px) { .bk-review-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .bk-review-list { grid-template-columns: repeat(3, 1fr); } }
.bk-review {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg-2);
}
.bk-review-t { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.3rem, 1.8vw, 1.6rem); line-height: 1.15; }
.bk-review-q { margin: 0; font-size: 15px; line-height: 1.65; color: var(--fg-2); flex: 1; }
.bk-review-by { font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.bk-review-by b { font-weight: 500; color: var(--fg-2); }
.bk-review-more { display: flex; justify-content: center; margin-top: 20px; }

/* ==========================================================================
   15. The iPhone page (#/iphone, js/iphone.js)
   ========================================================================== */
.ip-head { max-width: 1000px; }
.ip-head .kicker { margin-bottom: 18px; }
.ip-title { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-hero); line-height: .92; letter-spacing: -.01em; }
.ip-lead { margin-top: 20px; font-family: var(--font-display); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.15; color: var(--accent); max-width: 28ch; }
.ip-intro { margin-top: 22px; max-width: 62ch; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.7; color: var(--fg-2); }
.ip-head .b-facts { margin-top: 26px; }

.ip-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; font-size: 12px; line-height: 1.35; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent); opacity: 0; transform: translateY(6px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
.ip-cap small { display: block; margin-top: 2px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.ip-hero-shot, .ip-shot, .ip-tile { position: relative; display: block; overflow: hidden; border-radius: 10px; background: var(--bg-3); }
.ip-hero-shot img, .ip-shot img, .ip-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .ip-hero-shot:hover img, .ip-shot:hover img, .ip-tile:hover img { transform: scale(1.04); }
  .ip-hero-shot:hover .ip-cap, .ip-shot:hover .ip-cap, .ip-tile:hover .ip-cap { opacity: 1; transform: none; }
}
@media (hover: none) { .ip-shot .ip-cap { opacity: 1; transform: none; } }

/* hero: a row of phone-shaped frames */
.ip-hero { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(8px, 1vw, 14px); margin-top: clamp(40px, 6vw, 80px); align-items: center; }
.ip-hero-shot { aspect-ratio: 9 / 16; border-radius: clamp(12px, 1.6vw, 22px); box-shadow: 0 0 0 1px var(--line-2); }
.ip-hero-shot:nth-child(odd) { transform: translateY(clamp(10px, 2vw, 28px)); }
@media (max-width: 699px) { .ip-hero { grid-template-columns: repeat(3, 1fr); } .ip-hero-shot:nth-child(n + 4) { display: none; } }

/* three sections: text beside a stack of three frames */
.ip-secs { margin-top: clamp(72px, 10vw, 150px); display: flex; flex-direction: column; gap: clamp(72px, 10vw, 150px); }
.ip-sec { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; }
@media (min-width: 900px) {
  .ip-sec { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .ip-sec.is-flip .ip-sec-text { order: 2; }
}
.ip-num { display: block; font-size: 12px; letter-spacing: .14em; color: var(--muted); margin-bottom: 14px; }
.ip-h { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-row); line-height: 1; margin-bottom: 22px; }
.ip-sec-text p { max-width: 54ch; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.75; color: var(--fg-2); }
.ip-sec-text p + p { margin-top: 1.1em; }
.ip-stack { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: clamp(8px, 1vw, 14px); aspect-ratio: 5 / 4; }
.ip-shot--0 { grid-row: 1 / 3; }

.ip-quote { margin: clamp(72px, 10vw, 150px) auto 0; max-width: 22ch; text-align: center; font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 1.1; color: var(--fg); }

.ip-roll { margin-top: clamp(72px, 10vw, 150px); }
.ip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: clamp(24px, 3vw, 40px); }
@media (min-width: 700px) { .ip-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .ip-grid { grid-template-columns: repeat(6, 1fr); gap: 10px; } }
.ip-tile { aspect-ratio: 1; border-radius: 6px; }
.ip-tile .ip-cap { font-size: 11px; padding: 22px 8px 8px; }
@media (prefers-reduced-motion: reduce) {
  .ip-hero-shot img, .ip-shot img, .ip-tile img, .ip-cap { transition: none !important; }
  .ip-hero-shot:nth-child(odd) { transform: none; }
}

/* Photo stories: under the title in the viewer, in full in the details panel */
.vc-story {
  margin-top: 4px;
  max-width: 54ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.35;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 599px) { .vc-story { display: none; } }
.vi-story {
  margin: 18px 0 4px;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--fg);
}

/* The book page ends with two links (Behind the lens, About me) */
@media (min-width: 760px) { .page-book .b-links { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   16. More views: cinema, timeline, colour spectrum, light table
   ========================================================================== */
/* Shared reveal for the new views */
.vx-item { -webkit-user-select: none; user-select: none; }
.tl-item, .cs-item, .lt-print { opacity: 0; transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0ms); }
.tl-item.in, .cs-item.in, .lt-print.in { opacity: 1; }

/* Cinema */
body.is-cinema .gallery { position: fixed; inset: 0; z-index: 1; background: #000; }
body.is-cinema .c-head, body.is-cinema .c-next, body.is-cinema .foot { display: none; }
.cin { position: absolute; inset: 0; overflow: hidden; }
.cin-stage { position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--nav-top) + var(--nav-h) + 14px); bottom: calc(var(--filters-clear) + 92px); }
.cin-slide { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity 1400ms var(--ease); overflow: hidden; }
.cin-slide.on { opacity: 1; }
.cin-slide img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 50%; }
.cin-slide.on img { animation: kb0 8s ease-out forwards; }
.cin-slide.on.kb-1 img { animation-name: kb1; }
.cin-slide.on.kb-2 img { animation-name: kb2; }
.cin-slide.on.kb-3 img { animation-name: kb3; }
@keyframes kb0 { from { transform: scale(1); } to { transform: scale(1.07) translate(-1%, -1%); } }
@keyframes kb1 { from { transform: scale(1.07) translate(1%, 0); } to { transform: scale(1); } }
@keyframes kb2 { from { transform: scale(1); } to { transform: scale(1.06) translate(1.2%, .6%); } }
@keyframes kb3 { from { transform: scale(1.06) translate(0, 1%); } to { transform: scale(1.01) translate(0, -.5%); } }
.cin-cap {
  position: absolute; left: var(--gutter); right: 190px; bottom: calc(var(--filters-clear) - 10px);
  display: flex; flex-direction: column; gap: 3px; max-width: 64ch;
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}
.cin-cap.swap { opacity: 0; transform: translateY(6px); }
.cin-num { font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.cin-title { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.05; color: var(--fg); }
.cin-meta { font-size: 13px; color: var(--fg-2); }
.cin-story { margin-top: 4px; font-family: var(--font-display); font-style: italic; font-size: clamp(1rem, 1.3vw, 1.12rem); line-height: 1.35; color: var(--fg-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cin-ctrl { position: absolute; right: var(--gutter); bottom: calc(var(--filters-clear) - 4px); display: flex; gap: 8px; }
.cin-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--fg);
  background: var(--glass); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
@media (hover: hover) and (pointer: fine) { .cin-btn:hover { background: var(--hover-fill); } }
.cin .i-play { display: none; }
.cin:not(.is-playing) .i-play { display: inline; fill: currentColor; stroke: none; }
.cin:not(.is-playing) .i-pause { display: none; }
.cin-bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--filters-clear) - 26px); height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.cin-bar span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left center; }
.cin.is-timing .cin-bar span { animation: cinbar linear forwards; }
@keyframes cinbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 599px) {
  .cin-stage { bottom: calc(var(--filters-clear) + 120px); }
  .cin-cap { right: var(--gutter); bottom: calc(var(--filters-clear) + 40px); }
  .cin-story { -webkit-line-clamp: 3; }
}

/* Timeline */
.tl { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 84px); padding-top: 8px; --tlh: 150px; }
.tl-year { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); }
.tl-y { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 24px); align-self: start; display: flex; flex-direction: column; gap: 4px; }
.tl-ynum { font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 4rem); line-height: .9; color: var(--fg); }
.tl-ycount { font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.tl-trips { border-left: 1px solid var(--line-2); padding-left: clamp(16px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 30px; }
.tl-trip { position: relative; }
.tl-trip::before { content: ''; position: absolute; left: calc(-1 * clamp(16px, 2.4vw, 28px) - 5px); top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.tl-trip-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.tl-trip-h a, .tl-trip-h > span:first-child { font-family: var(--font-display); font-size: clamp(1.3rem, 2vw, 1.7rem); color: var(--fg); }
.tl-when, .tl-n { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.tl-n::before { content: '· '; }
.tl-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tl-item { position: relative; display: block; height: var(--tlh); aspect-ratio: var(--ar, 1.5); max-width: 100%; border-radius: 6px; overflow: hidden; background: var(--bg-3); transform: translateY(10px); }
.tl-item.in { transform: none; }
.tl-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
@media (hover: hover) and (pointer: fine) { .tl-item:hover img { transform: scale(1.05); } .tl-trip-h a:hover { color: var(--accent); } }
@media (max-width: 699px) {
  .tl { --tlh: 92px; }
  .tl-year { grid-template-columns: 1fr; }
  .tl-y { position: static; flex-direction: row; align-items: baseline; gap: 12px; }
}

/* Colour spectrum */
.cs-bar { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 12px); z-index: 5; margin-bottom: 14px; padding: 10px 14px 9px;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line); border-radius: 14px; }
.cs-strip { height: 8px; border-radius: 99px;
  background: linear-gradient(90deg, hsl(0 72% 50%), hsl(28 85% 55%), hsl(52 85% 55%), hsl(110 45% 45%), hsl(190 60% 45%), hsl(228 60% 52%), hsl(272 45% 52%), hsl(325 60% 56%) 86%, #e8e8e8 90%, #111 100%); }
.cs-labels { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 7px; }
.cs-labels button { font-size: 12px; color: var(--muted); padding: 2px 0; }
@media (hover: hover) and (pointer: fine) { .cs-labels button:hover { color: var(--fg); } }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 3px; }
.cs-item { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--c); scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 120px); }
.cs-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.cs-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 7px; font-size: 11px; line-height: 1.3; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent); opacity: 0; transition: opacity var(--t-med) var(--ease); }
@media (hover: hover) and (pointer: fine) { .cs-item:hover img { transform: scale(1.06); } .cs-item:hover .cs-cap { opacity: 1; } }
@media (max-width: 599px) { .cs-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 2px; } }

/* Light table */
.lt { position: relative; margin-top: 6px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 20%, #1d1c1a, #0c0c0d 75%); box-shadow: inset 0 0 120px rgba(0,0,0,.6); }
.lt-print { position: absolute; display: block; padding: 7px 7px 0; background: #f2eee5; border-radius: 2px;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.85), 0 2px 6px rgba(0,0,0,.35);
  transform: rotate(var(--r)) translateY(14px); cursor: grab; touch-action: auto; }
.lt-print.in { transform: rotate(var(--r)); }
.lt-print img { display: block; width: 100%; aspect-ratio: var(--ar, 1.5); object-fit: cover; pointer-events: none; }
.lt-cap { display: block; padding: 6px 2px 8px; font-family: var(--font-display); font-size: 13px; color: #2b2723; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) and (pointer: fine) { .lt-print:hover { transform: rotate(0deg) scale(1.04); box-shadow: 0 24px 50px -14px rgba(0,0,0,.9); } }
.lt-print.is-dragging { cursor: grabbing; transform: rotate(0deg) scale(1.07); box-shadow: 0 34px 60px -16px rgba(0,0,0,.95); transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.lt-hint { margin-top: 14px; text-align: center; font-size: 12px; color: var(--muted); }
@media (hover: none) { .lt-hint { display: none; } }
@media (max-width: 599px) { .lt-print { padding: 5px 5px 0; } .lt-cap { font-size: 11px; padding: 4px 1px 6px; } }

@media (prefers-reduced-motion: reduce) {
  .cin-slide img { animation: none !important; }
  .cin-slide { transition: none; }
  .tl-item, .cs-item, .lt-print { transition: none; transform: rotate(var(--r, 0deg)); }
}

/* Seven view buttons in the top bar: a little smaller on phones so the bar still fits */
.views-ind { width: var(--vb, 36px); height: var(--vb, 36px); }
.views button { width: var(--vb, 36px); height: var(--vb, 36px); }
@media (max-width: 599px) { .nav { --vb: 32px; } .views svg { width: 18px; height: 18px; } }
@media (max-width: 359px) { .nav { --vb: 29px; } }
