/* ============================================
   Vincent Johnson · Portfolio
   Plain CSS — Kirby CMS · STRATO
   ============================================ */

@font-face {
  font-family: 'Moret';
  src: url('../fonts/Moret-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Moret';
  src: url('../fonts/Moret-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000;
  --fg: #fff;
  --fg-dim: rgba(255,255,255,0.5);
  --hover: #ff1f1f;
  --about-bg: #fff;
  --about-fg: #000;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Moret", "Times New Roman", Georgia, serif;
  --nav-h: 96px;
  --content-max: 965px;
  --grid-pad: 48px;
}

html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; }

/* White-bg pages: keep the whole document white (no black reveal on overscroll) */
html.is-about, html.page-about, html.template-about,
html.is-darkroom, html.page-darkroom, html.template-darkroom {
  background: #fff;
}

body {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  cursor: none;
}

@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor { display: none !important; }
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

/* ════════════════════════════════════════════
   HEADER — aligned with project list lines
   ════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  padding: 0;
  color: #fff;
  pointer-events: auto;
}

.site-header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--grid-pad);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: #fff;
  transition: color 0.2s;
}

/* Logo turns black on white pages */
body.is-about .site-header .logo,
body.page-about .site-header .logo,
body.template-about .site-header .logo {
  color: #000;
}

/* ── Darkroom cursor = 35mm color-negative lens ── */
body.is-darkroom .cursor,
body.page-darkroom .cursor,
body.template-darkroom .cursor {
  background: transparent;
  mix-blend-mode: normal;
  -webkit-backdrop-filter: invert(1) hue-rotate(180deg) saturate(1.4) sepia(0.35) contrast(1.05);
  backdrop-filter: invert(1) hue-rotate(180deg) saturate(1.4) sepia(0.35) contrast(1.05);
  border: 1px solid rgba(0,0,0,0.08);
}

.site-header nav ul {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}

.site-header nav a {
  font-family: var(--sans);
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 400;
  color: inherit;
  transition: color 0.2s;
}

.site-header nav a:hover,
.site-header nav a.is-active { color: var(--hover); }

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  color: #fff; /* default: dark pages → white bars */
}
.nav-toggle span {
  display: block;
  width: 30px;
  height: 2.5px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}

/* White-bg pages → black hamburger bars */
body.is-about .nav-toggle span,
body.page-about .nav-toggle span,
body.template-about .nav-toggle span,
body.lt-ready .nav-toggle span {
  background: #000;
}
/* but when the menu overlay (black) is open, bars are white */
.site-header.nav-open .nav-toggle span { background: #fff !important; }

/* White-bg pages: black header (about always; darkroom animates) */
body.is-about,
body.page-about,
body.template-about {
  background: var(--about-bg) !important;
  color: var(--about-fg);
}

body.is-about .site-header,
body.page-about .site-header,
body.template-about .site-header {
  color: #000 !important;
}

/* ── DARKROOM ENTRY ANIMATION (black→white, text inverts) ── */
body.is-darkroom,
body.page-darkroom,
body.template-darkroom {
  background: #000;
}

/* logo + nav start WHITE on black, animate to BLACK on white */
body.is-darkroom .site-header .logo,
body.is-darkroom .site-header nav a,
body.page-darkroom .site-header .logo,
body.page-darkroom .site-header nav a,
body.template-darkroom .site-header .logo,
body.template-darkroom .site-header nav a {
  color: #fff;
  transition: color 1.2s ease;
}

body.lt-ready .site-header .logo,
body.lt-ready .site-header nav a {
  color: #000 !important;
}

/* active/hover stays red even during/after animation */
body.is-darkroom .site-header nav a:hover,
body.is-darkroom .site-header nav a.is-active,
body.lt-ready .site-header nav a:hover,
body.lt-ready .site-header nav a.is-active { color: var(--hover) !important; }

/* ════════════════════════════════════════════
   CUSTOM CURSOR
   ════════════════════════════════════════════ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 150px; height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: width 0.6s cubic-bezier(0.16,1,0.3,1),
              height 0.6s cubic-bezier(0.16,1,0.3,1),
              margin 0.6s cubic-bezier(0.16,1,0.3,1),
              background 0.5s;
  will-change: transform;
}

.cursor.is-small {
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
}

.cursor.is-large {
  width: 200px; height: 200px;
  margin: -100px 0 0 -100px;
  mix-blend-mode: normal;
  background: #fff;
  overflow: hidden;
}

.cursor .cursor-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 50%;
}

.cursor.is-large .cursor-preview { opacity: 1; }

/* ════════════════════════════════════════════
   HOME · HERO VIDEO + SCROLL TRIANGLE
   ════════════════════════════════════════════ */
.hero {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.hero video,
.hero img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-scroll {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: 44px; height: 36px;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  animation: floatBob 2.2s ease-in-out infinite;
  transition: opacity 0.3s;
}

.hero-scroll svg { display: block; }

@keyframes floatBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-10px); }
}

.hero-spacer {
  height: 100vh;
  height: 100svh;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

/* ════════════════════════════════════════════
   PROJECT LINE-LIST (reusable everywhere)
   ════════════════════════════════════════════ */
.project-list {
  position: relative;
  z-index: 2;
  background: transparent;
  max-width: 965px;
  margin: 0 auto;
  padding: 0 var(--grid-pad);
}

.project-list--bottom {
  padding-top: 80px;
  padding-bottom: 160px;
}

.project-list-inner {
  /* no border-top — first row has no line above */
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 35px;            /* 35px between divider lines (matches old site) */
  padding: 0;
  border-bottom: 1px solid #fff;
  color: #fff;
  font-family: var(--sans);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(18px, 1.8vw, 24px);
  letter-spacing: 0.01em;
  line-height: 1;
  transition: color 0.2s;
}

.project-row:hover,
.project-row:hover .p-category {
  color: var(--hover);
}

.project-row .p-title {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.project-row .p-lock {
  font-size: 0.85em;
  opacity: 0.9;
}

.project-row .p-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-row .p-category {
  font-size: inherit;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  color: inherit;
  transition: color 0.2s;
}

/* Project list on white pages: black instead of white
   (NOTE: project detail pages stay dark, so .is-project NOT included) */
body.is-about .project-list-inner,
body.is-darkroom .project-list-inner,
body.page-about .project-list-inner,
body.page-darkroom .project-list-inner,
body.template-about .project-list-inner,
body.template-darkroom .project-list-inner {
  border-top-color: #000;
}

body.is-about .project-row,
body.is-darkroom .project-row,
body.page-about .project-row,
body.page-darkroom .project-row,
body.template-about .project-row,
body.template-darkroom .project-row {
  color: #000;
  border-bottom-color: #000;
}

/* ════════════════════════════════════════════
   ABOUT PAGE — large text, classic blue links
   ════════════════════════════════════════════ */
.about {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 80px) var(--grid-pad) 0;
  color: #000;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-col {
  font-family: var(--sans);
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.3;
  color: #000;
  font-weight: 400;
}

.about-col p {
  margin-bottom: 1.1em;
}

.about-col a {
  color: #1010ff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.about-col a:hover {
  color: var(--hover);
}

.about-col h3 {
  font-family: var(--sans);
  font-size: inherit;
  font-weight: 700;
  margin: 1.5em 0 0.4em;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
}

.about-col h3.uppercase {
  text-transform: uppercase;
}

.about-col .field-list {
  list-style: none;
  font-size: inherit;
  line-height: 1.3;
  margin-bottom: 1em;
}

.about-col .field-list li {
  margin-bottom: 0;
}

.about-portrait {
  margin-top: 1.5em;
  max-width: 60%;
}
.about-portrait img {
  width: 100%;
  height: auto;
  display: block;
}

.about-seen { margin-top: 1.5em; }
.about-seen .seen-item { margin-bottom: 1em; }
.about-seen .seen-item strong {
  display: block;
  font-weight: 700;
}
.about-seen .seen-item a {
  display: block;
  word-break: break-all;
  font-size: 0.7em;
}

/* Impressum */
#impressum {
  max-width: var(--content-max);
  margin: 80px auto 0;
  padding: 60px var(--grid-pad) 100px;
  border-top: 1px solid #000;
}
#impressum h2 {
  font-family: var(--sans);
  font-size: 20px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}
#impressum h4,
#impressum h3 {
  font-family: var(--sans);
  font-size: 14px; font-weight: 700;
  margin: 22px 0 6px;
  letter-spacing: 0.02em;
}
#impressum .impressum-body { max-width: 720px; }
#impressum p {
  font-size: 14px; line-height: 1.6;
  color: #333; margin-bottom: 10px;
}
#impressum a { color: #1010ff; text-decoration: underline; }

/* ════════════════════════════════════════════
   DARKROOM PAGE — LIGHT TABLE
   ════════════════════════════════════════════ */
.lighttable-viewport {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  background-color: #000;
  cursor: none;
  transition: background-color 1.6s ease;
}

/* white glowing light table (no background image for now) */
body.lt-ready .lighttable-viewport {
  background-color: #fff;
  background-image: radial-gradient(circle at 50% 42%, #ffffff 0%, #ffffff 48%, #f1f1ef 100%);
}

.lighttable-surface {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  will-change: transform;
  opacity: 0;
  transition: opacity 1.6s ease;
}
body.lt-ready .lighttable-surface { opacity: 1; }

/* ── LENS DISTORTION + CHROMATIC ABERRATION (edges) ── */
.lens-fx {
  position: absolute;
  inset: 0;
  z-index: 52;
  pointer-events: none;
  /* heavy edge softening = lens distortion blur toward the rim */
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  /* only the edges are affected; center stays sharp */
  -webkit-mask: radial-gradient(ellipse 64% 64% at 50% 50%, transparent 48%, #000 94%);
  mask: radial-gradient(ellipse 64% 64% at 50% 50%, transparent 48%, #000 94%);
  opacity: 0;
  transition: opacity 1.6s ease;
}
body.lt-ready .lens-fx { opacity: 1; }

/* chromatic aberration: red + cyan fringing at the very edge */
.lens-fx::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 73% 73% at 50% 50%, transparent 62%, rgba(255,30,30,0.20) 90%, rgba(255,0,40,0.34) 100%),
    radial-gradient(ellipse 79% 79% at 50% 50%, transparent 66%, rgba(0,170,255,0.18) 92%, rgba(0,90,255,0.32) 100%);
  mix-blend-mode: screen;
}

/* lens vignette: light falloff at the edges */
.lens-fx::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 55%, rgba(0,0,0,0.30) 90%, rgba(0,0,0,0.55) 100%);
}

.lt-photo {
  position: absolute;
  display: block;
  cursor: none;
  /* overlapping photos blend like stacked negatives on a light box */
  mix-blend-mode: multiply;
  transition: box-shadow 0.3s;
}

.lt-photo img {
  display: block;
  width: 280px;
  height: auto;
  /* start as orange film negative, animate to positive */
  filter: invert(1) hue-rotate(180deg) saturate(1.5) sepia(0.45) contrast(1.05);
  transition: filter 1.6s ease;
}

body.lt-ready .lt-photo img {
  filter: none;
}

.lt-photo:hover {
  z-index: 999 !important;
}

/* Zoom slider UI */
.lt-zoom {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 1s ease 0.6s;
}
body.lt-ready .lt-zoom { opacity: 1; }

.lt-zoom-label {
  font-size: 16px;
  color: #000;
  user-select: none;
}

#lt-zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 4px;
  height: 160px;
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}
#lt-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
}
#lt-zoom-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border: 0;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
}

/* Mode toggle button (light table on/off) */
.lt-mode-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 62;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 100px;
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #000;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 1s ease 0.6s, background 0.2s;
}
body.lt-ready .lt-mode-toggle { opacity: 1; }
.lt-mode-toggle:hover { background: #fff; }

/* ── GRID MODE (light table "off") — simple scrollable grid ── */
body.lt-grid .lighttable-viewport {
  position: static;
  height: auto;
  min-height: 100vh;
  overflow: visible;
  padding: calc(var(--nav-h) + 16px) 12px 90px;
  cursor: auto;
}
body.lt-grid.lt-ready .lighttable-viewport {
  background-image: none;
  background-color: #fff;
}
body.lt-grid .lighttable-surface {
  position: static !important;
  width: auto !important;
  height: auto !important;
  transform: none !important;
  opacity: 1 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  max-width: 1500px;
  margin: 0 auto;
}
body.lt-grid .lt-photo {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  height: auto !important;
  mix-blend-mode: normal;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  cursor: pointer;
}
body.lt-grid .lt-photo img { width: 100% !important; height: auto !important; cursor: pointer; }
body.lt-grid .lt-zoom,
body.lt-grid .lens-fx { display: none !important; }
body.lt-grid .cursor { display: none !important; }
body.lt-grid .lt-hint { display: none !important; }

/* Gesture hint */
.lt-hint {
  position: fixed;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 61;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;                    /* white + difference = always opposite of bg */
  mix-blend-mode: difference;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
  animation: lt-hint-pulse 2.4s ease-in-out infinite;
}
body.lt-ready .lt-hint { opacity: 1; }
.lt-hint--hide { opacity: 0 !important; animation: none; }

@keyframes lt-hint-pulse {
  0%, 100% { transform: translateX(-50%) translateX(-6px); }
  50%      { transform: translateX(-50%) translateX(6px); }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.96);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; }
.lightbox-close {
  position: fixed; top: 24px; right: 28px;
  font-size: 12px; letter-spacing: 0.15em;
  text-transform: uppercase; color: #fff;
}

/* ════════════════════════════════════════════
   PROJECT DETAIL PAGE — centered Moret title
   ════════════════════════════════════════════ */
.project-detail {
  padding: calc(var(--nav-h) + 100px) var(--grid-pad) 60px;
  max-width: var(--content-max);
  margin: 0 auto;
  text-align: center;
}

.project-detail .meta {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 24px;
}

.project-detail h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 400;
  text-align: center;
  letter-spacing: 0;
  line-height: 1.05;
  margin-bottom: 60px;
  text-transform: none;
}

.project-detail .video-heading {
  font-family: var(--sans);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #fff;
  text-align: center;
  margin: 48px 0 18px;
}

.project-detail .video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  margin: 0 auto 32px;
}

.project-detail .video-wrap iframe,
.project-detail .video-wrap > div,
.project-detail .video-wrap > div iframe {
  position: absolute; inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.project-detail .cover { margin-bottom: 32px; }
.project-detail .cover img { width: 100%; height: auto; }

.project-detail .description {
  max-width: 900px;
  margin: 0 auto 48px;
  font-family: var(--sans);
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.4;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-align: center;
}
.project-detail .description p { margin-bottom: 0.8em; }

.project-detail .info-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  margin-bottom: 60px;
  font-size: 13px;
  text-align: left;
}

.project-detail .info-row .label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-dim);
  margin-bottom: 6px;
}

.project-detail .gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 60px;
}
.project-detail .gallery img { width: 100%; height: auto; }

.back-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* ════════════════════════════════════════════
   CONTENT BLOCKS (free-form per project)
   ════════════════════════════════════════════ */
.blocks {
  max-width: var(--content-max);
  margin: 40px auto 0;
  text-align: left;
}

.block-heading {
  font-family: var(--sans);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #fff;
  text-align: center;
  margin: 48px 0 18px;
}

.block-text {
  max-width: 700px;
  margin: 0 auto 32px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-dim);
}
.block-text p { margin-bottom: 1em; }

/* alignment options */
.block-text.align-left   { text-align: left; }
.block-text.align-center { text-align: center; }
.block-text.align-right  { text-align: right; }

/* color options */
.block-text.color-blue  { color: #1010ff; }
.block-text.color-red   { color: #ff1f1f; }
.block-text.color-grey  { color: #888; }
.block-text.color-white { color: #fff; }
.block-text.color-black { color: #000; }

/* links are ALWAYS blue (content areas) */
.block-text a,
.block-heading a,
.project-detail a,
.darkroom-blocks .block-text a,
.kirbytext a {
  color: #1010ff !important;
  border-bottom: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.block-text a:hover,
.block-heading a:hover,
.project-detail a:hover,
.kirbytext a:hover { color: var(--hover) !important; }

.block-image {
  margin: 0 auto 32px;
}
.block-image img { width: 100%; height: auto; display: block; }
.block-image figcaption {
  font-size: 12px; color: var(--fg-dim);
  text-align: center; margin-top: 8px;
}

.block-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #111;
  margin: 0 auto 12px;
}
.block-video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.block-video-caption {
  font-size: 12px; color: var(--fg-dim);
  text-align: center; margin-bottom: 40px;
}

.block-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  margin: 0 auto 32px;
}
.block-embed iframe {
  position: absolute; inset: 0;
  width: 100% !important; height: 100% !important; border: 0;
}

.block-line {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin: 48px 0;
}

/* ── Blocks on the white Darkroom page ── */
.darkroom-blocks {
  max-width: 1600px;
  margin: 0 auto 40px;
}
.darkroom-blocks .block-heading {
  color: #000;
  text-align: left;
  margin: 56px 0 20px;
}
.darkroom-blocks .block-text {
  color: #333;
  margin-left: 0;
}
.darkroom-blocks .block-text a { color: #000; border-bottom-color: rgba(0,0,0,0.4); }
.darkroom-blocks .block-line { border-top-color: rgba(0,0,0,0.15); }

/* Gallery block as masonry grid */
.block-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 32px;
}
.block-gallery img { width: 100%; height: auto; display: block; }
.block-gallery-item { display: block; overflow: hidden; cursor: none; }
.block-gallery-item img {
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), opacity 0.3s;
  opacity: 0.92;
}
.block-gallery-item:hover img { transform: scale(1.02); opacity: 1; }

@media (max-width: 900px) {
  .block-gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .block-gallery { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 28px 0;
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
}

.site-footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--grid-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.is-about .site-footer,
body.page-about .site-footer,
body.template-about .site-footer {
  border-top-color: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.5);
}

/* Darkroom: hide footer (it would slip behind the fixed light table) */
body.is-darkroom .site-footer,
body.page-darkroom .site-footer,
body.template-darkroom .site-footer {
  display: none !important;
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */

/* ── TABLET ── */
@media (max-width: 1024px) {
  :root { --nav-h: 84px; --grid-pad: 32px; }
  .site-header nav ul { gap: 24px; }
}

@media (max-width: 900px) {
  :root { --nav-h: 80px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-portrait { max-width: 70%; }
  .project-detail .info-row { grid-template-columns: 1fr 1fr; }
  .project-detail .gallery { grid-template-columns: 1fr; }

  /* ── HAMBURGER MENU ── */
  .nav-toggle { display: flex; z-index: 120; }

  .site-header nav {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.4s, visibility 0.4s;
    z-index: 110;
  }
  .site-header.nav-open nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .site-header nav ul {
    flex-direction: column;
    gap: 28px;
    align-items: center;
  }
  .site-header nav a {
    font-size: clamp(34px, 9vw, 52px);
    font-weight: 400;
    color: #fff !important;
  }
  .site-header nav a.is-active { color: var(--hover) !important; }

  /* open menu = black overlay + white text on ALL pages (beats lt-ready/about color rules) */
  .site-header.nav-open nav { background: #000 !important; }
  .site-header.nav-open nav a,
  body.is-about .site-header.nav-open nav a,
  body.page-about .site-header.nav-open nav a,
  body.template-about .site-header.nav-open nav a,
  body.lt-ready .site-header.nav-open nav a {
    color: #fff !important;
  }
  .site-header.nav-open nav a.is-active,
  body.lt-ready .site-header.nav-open nav a.is-active {
    color: var(--hover) !important;
  }

  /* hamburger turns into an X when open */
  .site-header.nav-open .nav-toggle { color: #fff; }
  .site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

  /* logo + toggle always visible above the overlay */
  .site-header .logo { z-index: 120; position: relative; }
  .site-header.nav-open .logo { color: #fff; }
}

/* ── DARKROOM on touch: interactive table works; tap photos to enlarge ── */
@media (hover: none), (pointer: coarse) {
  .lighttable-viewport { cursor: auto; }
  .lt-photo, .lt-photo img { cursor: pointer; }
  /* bigger zoom slider touch target */
  #lt-zoom-slider { width: 6px; height: 140px; }
  #lt-zoom-slider::-webkit-slider-thumb { width: 22px; height: 22px; }
  #lt-zoom-slider::-moz-range-thumb { width: 22px; height: 22px; }
}

/* grid mode on small screens → 2 columns */
@media (max-width: 768px) {
  body.lt-grid .lighttable-surface { grid-template-columns: 1fr 1fr; }
}

/* ── PHONE ── */
@media (max-width: 600px) {
  :root { --grid-pad: 18px; --nav-h: 68px; }

  /* Header */
  .site-header .logo { font-size: 26px; }

  /* Project line-list — large, wrapping titles, tight to the lines (like the old site) */
  .project-row {
    align-items: flex-start;
    height: auto;              /* override desktop fixed 35px so titles can wrap */
    padding: 11px 0 9px;
    font-size: clamp(28px, 7.6vw, 38px);
    line-height: 1.04;
    letter-spacing: 0;
  }
  .project-row .p-title { gap: 10px; }
  .project-row .p-name {
    white-space: normal;       /* allow wrapping instead of cutting off */
    overflow: visible;
    text-overflow: clip;
  }
  .project-row .p-category { display: none; } /* hide category for clean title lines */

  /* Project detail */
  .project-detail h1 { font-size: clamp(34px, 10vw, 52px); }
  .project-detail .info-row { grid-template-columns: 1fr; gap: 18px; }
  .project-detail .description { font-size: clamp(20px, 5.5vw, 26px); }

  /* About: bigger text, full-width portrait */
  .about-col { font-size: clamp(22px, 6vw, 30px); }
  .about-portrait { max-width: 100%; }

  /* Light table padding */
  .lighttable-viewport { padding-left: 10px; padding-right: 10px; }
}

/* Hide custom cursor entirely on touch devices */
@media (hover: none), (pointer: coarse) {
  .cursor { display: none !important; }
}
