/* BB Stills v2 — gallery restyle
   Inspired by Claude ScouseStills layout; portfolio only (no shop).
   Original site stays in C:\Users\jkb\bbstills */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root,
[data-theme="dark"] {
  /* v1 monochrome palette + Inter */
  --bg: #000;
  --surface: #0c0c0c;
  --surface2: #111;
  --border: rgba(255, 255, 255, 0.12);
  --accent: #f2f2f2;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h: 3.5rem;
  --gap: 3px;
  --pad: 1.5rem;
  --header-bg: #000;
  --hero-scrim: rgba(0, 0, 0, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f4f4;
  --surface: #fff;
  --surface2: #ececec;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #111;
  --text: #111;
  --muted: #666;
  --header-bg: #f4f4f4;
  --hero-scrim: rgba(244, 244, 244, 1);
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
canvas {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* Canvas-only photos — no <img>, no background-image URL on the element */
.photo-canvas,
.stack-photo,
.hero__photo-hold {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  pointer-events: none;
}

.photo-canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  display: block;
  -webkit-touch-callout: none !important;
  pointer-events: none;
}

.photo-canvas--hero {
  filter: brightness(0.42);
}

[data-theme="light"] .photo-canvas--hero {
  filter: brightness(0.55);
}

.hero__photo-link {
  position: absolute;
  inset: 0;
  display: block;
}

.hero__photo-hold {
  position: absolute;
  inset: 0;
}

.stack-photo {
  position: absolute;
  inset: 0;
}

.project-stack__item {
  position: relative;
}

.lightbox__canvas {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  margin: 0 auto;
  -webkit-touch-callout: none !important;
  pointer-events: none !important;
  user-select: none !important;
}

/* Transparent shield over photos — harder to long-press save on iPhone */
.hero__media,
.hero__media a,
.project-card__media,
.series-card__media,
.project-stack__item,
.lightbox__figure,
.about-img-wrap {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
}

.hero__media a::after,
.project-card__media::after,
.series-card__media::after,
.project-stack__item::after,
.lightbox__figure::after,
.about-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
}

/* Hero link must still receive taps (pseudo sits on the <a>) */
.hero__media a {
  display: block;
  width: 100%;
  height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ── NAV ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.theme-toggle {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  opacity: 0.85;
  flex-shrink: 0;
}

.theme-toggle:hover {
  opacity: 1;
}

.theme-toggle__icon {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 2px -2px 0 0 var(--bg) inset;
}

[data-theme="light"] .theme-toggle__icon {
  box-shadow: none;
}

.wordmark {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav a {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.9;
  transition: color 0.2s, opacity 0.2s;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  opacity: 1;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.4em;
  text-decoration-thickness: 1px;
}

.nav-toggle {
  display: none;
  width: 2rem;
  height: 2rem;
  position: relative;
  z-index: 110;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: var(--text);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
}

.nav-toggle span::before {
  transform: translate(-50%, calc(-50% - 5px));
}

.nav-toggle span::after {
  transform: translate(-50%, calc(-50% + 5px));
}

@media (max-width: 720px) {
  .site-header {
    padding: 0 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .header-actions {
    z-index: 120;
    position: relative;
  }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 105;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
  }

  body.nav-open .nav {
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    font-size: 1rem;
    letter-spacing: 0.14em;
  }
}

/* Project header back link */
.site-header--project {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.back-link {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  justify-self: start;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text);
}

.project-title {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  justify-self: center;
}

.site-header--project .nav {
  justify-self: end;
  gap: 0;
}

/* ── INTRO ── */

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  color: #f2f2f2;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  /* Avoid theme vars — intro is always black */
  box-sizing: border-box;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.intro.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: min(100%, 18rem);
  padding: 2rem 1.5rem;
  box-sizing: border-box;
}

.intro__line {
  width: 0;
  height: 1px;
  margin: 0 0 1.5rem;
  background: #f2f2f2;
  flex-shrink: 0;
  animation: intro-line 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro__mark {
  margin: 0;
  width: 100%;
  font-family: var(--font);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.32em;
  /* Optical centre: cancel trailing letter-spacing on the last character */
  padding-left: 0.32em;
  box-sizing: border-box;
  text-align: center;
  color: #f2f2f2;
  opacity: 0;
  transform: translateY(8px);
  animation: intro-fade 0.65s ease 0.5s forwards;
}

.intro__tag {
  margin: 0.85rem 0 0;
  width: 100%;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  box-sizing: border-box;
  text-align: center;
  text-transform: uppercase;
  color: rgba(242, 242, 242, 0.55);
  opacity: 0;
  transform: translateY(6px);
  animation: intro-fade 0.55s ease 0.95s forwards;
}

@keyframes intro-line {
  to {
    width: 4.5rem;
  }
}

@keyframes intro-fade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── HERO ── */

.hero {
  position: relative;
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
  margin-top: var(--nav-h);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media a {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  inset: 0;
}

.hero__media a:hover {
  opacity: 1;
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__grad {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to top,
    var(--hero-scrim) 0%,
    color-mix(in srgb, var(--hero-scrim) 65%, transparent) 28%,
    color-mix(in srgb, var(--hero-scrim) 10%, transparent) 65%,
    transparent 100%
  );
}

/* Fallback if color-mix unsupported */
@supports not (background: color-mix(in srgb, #000 50%, transparent)) {
  .hero__grad {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.65) 28%,
      rgba(0, 0, 0, 0.1) 65%,
      transparent 100%
    );
  }

  [data-theme="light"] .hero__grad {
    background: linear-gradient(
      to top,
      rgba(244, 244, 244, 1) 0%,
      rgba(244, 244, 244, 0.7) 28%,
      rgba(244, 244, 244, 0.15) 65%,
      transparent 100%
    );
  }
}

[data-theme="light"] .photo-canvas--hero {
  filter: brightness(0.55);
}

[data-theme="light"] .hero__title {
  color: var(--text);
}

[data-theme="light"] .btn-outline {
  border-color: rgba(17, 17, 17, 0.35);
  color: var(--text);
}

[data-theme="light"] .btn-outline:hover {
  background: var(--text);
  color: #f4f4f4;
  border-color: var(--text);
}

.hero__content {
  position: relative;
  z-index: 3;
  padding: 0 var(--pad) 4.5rem;
  max-width: 40rem;
  pointer-events: none;
}

.hero__content a,
.hero__content .btn {
  pointer-events: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  pointer-events: auto;
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  /* optical centre for tracked uppercase */
  padding-left: 0.22em;
  box-sizing: border-box;
}

.hero__content .eyebrow {
  text-align: left;
  width: auto;
}

.hero__title {
  font-family: var(--font);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  text-transform: uppercase;
  padding-left: 0.04em;
  box-sizing: border-box;
}

.hero__title em {
  font-style: normal;
  font-weight: 300;
  color: var(--muted);
}

.hero__body {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.7;
  max-width: 26rem;
  margin-bottom: 1.75rem;
}

.btn-outline {
  display: inline-block;
  border: 1px solid rgba(242, 242, 242, 0.45);
  color: var(--text);
  background: transparent;
  padding: 0.7rem 1.75rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.btn-outline:hover {
  border-color: var(--text);
  background: var(--text);
  color: #000;
}

/* ── WORK SECTION ── */

.home-work {
  padding: 5.5rem var(--pad) 4.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin: 0 auto 2.75rem;
  gap: 0.5rem;
}

/* Inner wrapper: full width so titles share the same centre line */
.section-header > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.section-header .eyebrow {
  display: block;
  width: 100%;
  margin: 0 0 0.5rem;
  text-align: center;
}

.section-title {
  display: block;
  width: 100%;
  margin: 0;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.3;
  text-align: center;
  padding-left: 0.22em;
  box-sizing: border-box;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  width: 100%;
  justify-content: center;
}

/* One project — keep a nice card size and centre it */
.project-grid[data-count="1"] {
  grid-template-columns: minmax(0, 20rem);
  max-width: 20rem;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.project-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 18rem));
  max-width: 37rem;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

@media (max-width: 900px) {
  .project-grid:not([data-count="1"]):not([data-count="2"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .project-grid:not([data-count="1"]) {
    grid-template-columns: 1fr;
  }

  .project-grid[data-count="1"] {
    max-width: 18rem;
    grid-template-columns: minmax(0, 1fr);
  }

  .project-grid[data-count="2"] {
    grid-template-columns: 1fr;
    max-width: 18rem;
  }
}

/* Work page grid — same centring rules */
.page-work .project-grid[data-count="1"],
.page-work .project-grid[data-count="2"] {
  margin-left: auto;
  margin-right: auto;
}

.project-card {
  background: var(--surface);
  overflow: hidden;
  display: block;
}

.project-card__media {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  min-height: 14rem;
  background: var(--surface2);
  -webkit-touch-callout: none;
}

.project-card__media .photo-canvas {
  position: absolute !important;
  inset: 0 !important;
}

.project-card__media .photo-canvas {
  transition: transform 0.6s ease;
}

.project-card:hover .photo-canvas {
  transform: scale(1.05);
}

.project-card__info {
  padding: 1.1rem 1.15rem 1.35rem;
}

.project-card__title {
  display: block;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.project-card__meta {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 300;
}

/* ── SERIES GRID ── */

.series-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: calc(var(--nav-h) + 2.5rem) 1.25rem 3.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .series-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-left: var(--pad);
    padding-right: var(--pad);
  }
}

@media (max-width: 520px) {
  .series-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: calc(var(--nav-h) + 2rem) 1rem 3rem;
  }
}

.series-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  border: 0;
  color: inherit;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.series-card__media {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  min-height: 12rem;
  overflow: hidden;
  background: var(--surface2);
  -webkit-touch-callout: none;
}

/* Ensure 4th category tile (Culture) gets same size as the others */
.series-grid .series-card {
  min-width: 0;
}

.series-grid .series-card__media {
  width: 100%;
}

.series-card__media .photo-canvas {
  position: absolute !important;
  inset: 0 !important;
}

.stack-photo .photo-canvas {
  position: absolute !important;
  inset: 0 !important;
}

.series-card__media .photo-canvas {
  transition: transform 0.6s ease;
}

.series-card:hover .series-card__media .photo-canvas {
  transform: scale(1.05);
}

.series-card__title {
  display: block;
  padding: 0.9rem 1rem 1.1rem;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ── PHOTO GRID (category) ── */

.project-page {
  min-height: 100vh;
  background: var(--bg);
}

.project-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 1.5rem) 0.75rem 2.5rem;
}

@media (max-width: 1100px) {
  .project-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .project-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .project-stack {
    grid-template-columns: 1fr;
    max-width: none;
    width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    gap: 0.65rem;
  }
}

.project-stack__item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--surface);
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
}

.project-stack__item .photo-canvas {
  transition: transform 0.6s ease;
}

.project-stack__item:hover .photo-canvas {
  transform: scale(1.04);
}

/* ::after shield already defined globally for stack items */

/* ── ABOUT ── */

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  margin-top: var(--nav-h);
}

.about-img-wrap {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  height: 100%;
  background: var(--surface2);
}

/* Simple full-bleed photo — no canvas (was drawing a tiny top-left tile) */
.about-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.62);
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.about-img-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  -webkit-touch-callout: none;
}

.about-fade {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(to right, transparent 40%, var(--bg) 100%);
  pointer-events: none;
}

[data-theme="light"] .about-fade {
  background: linear-gradient(to right, transparent 40%, var(--bg) 100%);
}

[data-theme="light"] .lightbox {
  background: rgba(244, 244, 244, 0.96);
  color: var(--text);
}

.about-content {
  padding: 5rem var(--pad) 5rem 3rem;
  display: flex;
  align-items: center;
}

.about-inner {
  max-width: 32rem;
}

.about-title {
  font-family: var(--font);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.about-title em {
  font-style: normal;
  font-weight: 300;
  color: var(--muted);
}

.about-body {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 1.15rem;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.about-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.75rem;
  flex-wrap: wrap;
}

.stat-num {
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  display: block;
  letter-spacing: 0.04em;
}

.stat-lbl {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.35rem;
  display: block;
}

@media (max-width: 900px) {
  .about-split {
    grid-template-columns: 1fr;
  }

  .about-img-wrap {
    height: 55vw;
    min-height: 18rem;
    max-height: 28rem;
  }

  .about-img {
    width: 100%;
    height: 100%;
  }

  .about-fade {
    background: linear-gradient(to top, var(--bg) 0%, transparent 55%);
  }

  .about-content {
    padding: 3rem 1.5rem 4rem;
  }
}

/* ── CONTACT ── */

.contact-wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 4.5rem) 2rem 5.5rem;
}

.contact-title {
  font-family: var(--font);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.contact-title em {
  font-style: normal;
  font-weight: 300;
  color: var(--muted);
}

.contact-body {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 2.25rem;
}

.contact-email {
  display: inline-block;
  font-family: var(--font);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 400;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.2rem;
  margin-bottom: 2.5rem;
  word-break: break-all;
}

.contact-email:hover {
  border-bottom-color: var(--text);
}

.contact-rows {
  list-style: none;
  border-top: 1px solid var(--border);
}

.contact-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.contact-row__label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-row__value {
  font-size: 0.95rem;
  color: var(--text);
}

.contact-row__value:hover {
  opacity: 0.7;
}

@media (max-width: 480px) {
  .contact-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* Work page */

.page-work {
  padding: calc(var(--nav-h) + 3.5rem) var(--pad) 4rem;
  max-width: 72rem;
  margin: 0 auto;
}

/* ── LIGHTBOX ── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  background: rgba(0, 0, 0, 0.94);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  margin: 0;
  position: relative;
  display: grid;
  place-items: center;
}

.lightbox__img {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__mark {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  color: var(--text);
  opacity: 0.35;
  pointer-events: none;
}

.lightbox__close,
.lightbox__nav {
  color: var(--text);
  opacity: 0.7;
  font-size: 1.75rem;
  padding: 0.5rem;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 2;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  opacity: 1;
}

@media (max-width: 720px) {
  .lightbox {
    grid-template-columns: 1fr;
    padding: 3.5rem 0.75rem 4.5rem;
  }

  .lightbox__nav {
    position: absolute;
    bottom: 1rem;
    font-size: 2rem;
    padding: 0.75rem 1rem;
    opacity: 0.9;
  }

  .lightbox__prev {
    left: 0.25rem;
  }

  .lightbox__next {
    right: 0.25rem;
  }

  .lightbox__close {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.75rem;
  }
}

/* ═══════════════════════════════════════════
   MOBILE OVERHAUL (phones & small tablets)
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
  :root {
    --pad: 1.15rem;
    --nav-h: 3.25rem;
  }

  .site-header {
    padding: 0 1rem;
    height: var(--nav-h);
  }

  .wordmark {
    font-size: 0.65rem;
    letter-spacing: 0.24em;
    text-indent: 0.24em;
  }

  /* Project page header: don't crush title */
  .site-header--project {
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    padding: 0 0.75rem;
  }

  .site-header--project .back-link {
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .site-header--project .project-title {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  /* Hero */
  .hero {
    height: calc(100svh - var(--nav-h));
    min-height: 28rem;
  }

  .hero__content {
    padding: 0 1.15rem 2.25rem;
    max-width: 100%;
  }

  .hero__title {
    font-size: 1.65rem;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
    line-height: 1.2;
  }

  .hero__body {
    font-size: 0.88rem;
    margin-bottom: 1.35rem;
    max-width: 100%;
  }

  .btn-outline {
    padding: 0.75rem 1.35rem;
    font-size: 0.65rem;
  }

  .hero-actions {
    gap: 0.65rem;
  }

  /* Home work section */
  .home-work {
    padding: 3rem 1.15rem 3.5rem;
  }

  .section-header {
    margin-bottom: 1.75rem;
  }

  .section-title {
    font-size: 0.72rem;
  }

  /* Single project card: full-width, not a tiny floating brick */
  .project-grid[data-count="1"] {
    max-width: 100%;
    width: 100%;
    grid-template-columns: 1fr;
    margin: 0;
  }

  .project-grid[data-count="2"] {
    max-width: 100%;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-card__media {
    min-height: 0;
    aspect-ratio: 3 / 4;
  }

  .project-card__info {
    padding: 0.9rem 0.15rem 0.25rem;
  }

  .project-card {
    background: transparent;
  }

  /* Categories: always 2-up on phone landscape-ish, stacked on narrow */
  .series-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: calc(var(--nav-h) + 1.5rem) 0.85rem 2.5rem;
    max-width: none;
  }

  .series-card__media {
    min-height: 0;
    aspect-ratio: 3 / 4;
  }

  .series-card__title {
    padding: 0.7rem 0.15rem 0.35rem;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    background: transparent;
  }

  .series-card {
    background: transparent;
  }

  /* Category photos: 2 across, full width of phone */
  .project-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    max-width: none;
    width: 100%;
    padding: calc(var(--nav-h) + 1.25rem) 0.5rem 2rem;
  }

  .project-stack__item {
    aspect-ratio: 2 / 3;
    width: 100%;
  }

  /* About */
  .about-split {
    min-height: 0;
  }

  .about-img-wrap {
    height: 42vh;
    min-height: 14rem;
    max-height: 22rem;
  }

  /* Prefer top of frame so Liver Building crown isn’t cropped off */
  .about-img {
    object-position: center 8%;
  }

  .about-content {
    padding: 2.25rem 1.15rem 3rem;
  }

  .about-title {
    font-size: 1.45rem;
    margin-bottom: 1.1rem;
  }

  .about-body {
    font-size: 0.9rem;
  }

  .about-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .about-actions .btn-outline {
    text-align: center;
  }

  .about-stats {
    gap: 1.75rem;
    margin-top: 2rem;
  }

  /* Contact */
  .contact-wrap {
    padding: calc(var(--nav-h) + 2.5rem) 1.15rem 3.5rem;
  }

  .contact-title {
    font-size: 1.45rem;
  }

  .page-work {
    padding: calc(var(--nav-h) + 2.25rem) 1.15rem 3rem;
  }

  .nav a {
    font-size: 0.95rem;
    letter-spacing: 0.14em;
  }

  .theme-toggle {
    width: 1.75rem;
    height: 1.75rem;
  }
}

/* Very narrow phones — keep 2-col photo grids, slightly tighter type */
@media (max-width: 380px) {
  .hero__title {
    font-size: 1.4rem;
  }

  .series-card__title {
    font-size: 0.6rem;
  }
}

.empty {
  grid-column: 1 / -1;
  padding: 4rem 1rem;
  text-align: center;
  color: var(--muted);
}

.empty a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1a1a1a, #0d0d0d 50%, #1c1c1c);
}

/* -- PRINT SHOP — same card system as Liverpool categories (series-grid) -- */

.shop-page {
  padding: calc(var(--nav-h) + 2.5rem) 1.25rem 3.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.shop-header {
  text-align: left;
  margin-bottom: 1.75rem;
  max-width: none;
}

.shop-header .section-title {
  margin-bottom: 0.85rem;
}

.shop-intro {
  color: var(--muted);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 32rem;
}

.shop-note {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.6;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

/* 2-up like Liverpool categories; 3-up on wide screens */
.print-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .shop-page {
    padding-left: var(--pad);
    padding-right: var(--pad);
  }

  .print-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
  }
}

.print-card {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--surface);
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  z-index: 1;
}

.print-card:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

.print-card__media {
  display: block;
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 133.333%; /* 3:4 — reliable on all mobile browsers */
  overflow: hidden;
  background: var(--surface2);
  -webkit-touch-callout: none;
  pointer-events: none; /* taps go to the card button */
}

.print-card__img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none !important;
  -webkit-user-drag: none;
  transition: transform 0.6s ease;
}

.print-card:hover .print-card__img,
.print-card:active .print-card__img {
  transform: scale(1.03);
}

.print-card__info {
  display: block;
  padding: 0.9rem 1rem 1.1rem;
  pointer-events: none;
}

.print-card__title {
  display: block;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.print-card__meta {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 300;
  margin-bottom: 0.4rem;
}

.print-card__price {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text);
}

@media (max-width: 720px) {
  .shop-page {
    padding: calc(var(--nav-h) + 1.5rem) 0.85rem 2.5rem;
  }

  .shop-header {
    margin-bottom: 1.25rem;
    padding: 0 0.15rem;
  }

  .print-grid {
    gap: 0.65rem;
  }

  .print-card {
    background: transparent;
  }

  .print-card__info {
    padding: 0.75rem 0.1rem 0.35rem;
  }

  .print-card__title {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }
}

/* Cart button */
.cart-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--text);
  opacity: 0.9;
}

.cart-btn:hover {
  opacity: 1;
}

.cart-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.cart-count {
  position: absolute;
  top: -0.15rem;
  right: -0.2rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.58rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  line-height: 1;
}

/* Product modal */
.print-modal {
  position: fixed;
  inset: 0;
  z-index: 280;
  background: rgba(0, 0, 0, 0.86);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.print-modal[hidden] {
  display: none !important;
}

.print-modal__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(920px, 100%);
  max-height: min(92vh, 720px);
  background: var(--surface);
  overflow: hidden;
}

.print-modal__img-wrap {
  position: relative;
  background: var(--surface2);
  min-height: 0;
  height: 100%;
  max-height: min(92vh, 720px);
  overflow: hidden;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.print-modal__img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.print-modal__body {
  position: relative;
  z-index: 3;
  padding: 1.75rem 1.5rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.print-modal__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.print-modal__title {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

.print-modal__loc,
.print-modal__edition {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
}

.print-modal__desc {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  margin: 1rem 0 1.5rem;
}

.print-modal__close {
  font-size: 1.4rem;
  line-height: 1;
  opacity: 0.7;
  padding: 0.25rem;
}

.print-modal__close:hover {
  opacity: 1;
}

.size-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.size-opt {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.45rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.size-opt:hover,
.size-opt.is-active {
  border-color: var(--text);
  color: var(--text);
}

.size-opt.is-active {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .size-opt.is-active {
  background: rgba(0, 0, 0, 0.04);
}

.size-opt__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.size-opt__sub {
  display: block;
  font-size: 0.68rem;
  opacity: 0.75;
  margin-top: 0.2rem;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
}

.size-opt__price {
  font-size: 0.9rem;
  font-weight: 500;
  flex-shrink: 0;
}

.modal-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  margin-bottom: 1rem;
}

.modal-total-row span:first-child {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal-total-row strong {
  font-size: 1.25rem;
  font-weight: 500;
}

.btn-solid {
  display: block;
  width: 100%;
  padding: 0.9rem 1.25rem;
  background: var(--text);
  color: var(--bg);
  border: 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  text-align: center;
}

.btn-solid:hover {
  opacity: 0.88;
}

/* Cart drawer */
.cart-root {
  position: fixed;
  inset: 0;
  z-index: 300;
}

.cart-root[hidden] {
  display: none !important;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.cart-drawer__hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cart-drawer__hdr h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.15rem 1.25rem;
}

.cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
  font-weight: 300;
  font-size: 0.9rem;
}

.cart-item {
  display: flex;
  gap: 0.9rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.cart-item__img {
  position: relative;
  display: block;
  width: 4.5rem;
  height: 5.5rem;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface2);
  -webkit-touch-callout: none;
}

.cart-item__thumb {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.cart-item__img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
}

.cart-item__title {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
}

.cart-item__size {
  color: var(--muted);
  font-size: 0.72rem;
  margin: 0 0 0.65rem;
  font-weight: 300;
}

.cart-item__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.qty {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
}

.qty button {
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  line-height: 1;
}

.cart-item__price {
  font-size: 0.85rem;
  font-weight: 500;
}

.cart-item__remove {
  margin-top: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.cart-drawer__ftr {
  padding: 1.15rem 1.25rem 1.35rem;
  border-top: 1px solid var(--border);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cart-subtotal span:first-child {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cart-subtotal strong {
  font-size: 1.1rem;
  font-weight: 500;
}

.cart-hint {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 300;
  line-height: 1.5;
  margin: 0 0 1rem;
}

@media (max-width: 720px) {
  .print-modal {
    padding: 0.5rem;
    align-items: end;
  }

  .print-modal__panel {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
    width: 100%;
    max-width: 28rem;
  }

  .print-modal__img-wrap {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* shorter on phone so controls fit */
    min-height: 0;
    max-height: none;
  }

  .print-modal__body {
    padding: 1.25rem 1.15rem 1.5rem;
  }

  .btn-solid {
    min-height: 3rem;
    touch-action: manipulation;
  }
}
