/* dmari-home-va — design-stage · dark default · Still First home · Portrait/Fashion river · portfolio wall */

:root,
[data-theme="dark"] {
  --bg: #0c0c0d;
  --ink: #eceae6;
  --mute: #8e8a84;
  --faint: #5c5954;
  --line: rgba(236, 234, 230, 0.12);
}

[data-theme="light"] {
  --bg: #f3f1ec; /* warm beige */
  --ink: #161615;
  --mute: #6a6762;
  --faint: #9a9690;
  --line: rgba(22, 22, 21, 0.12);
}

:root {
  --font-line: "Helvetica Neue", Helvetica, Inter, Arial, sans-serif;
  --font-ui: Inter, "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --pad: 1.25rem;
  --shell: 72rem;
  --nav-h: 3.25rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  touch-action: pan-y;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.45;
  touch-action: pan-y;
}

main {
  flex: 1 0 auto;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover { opacity: 0.65; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 1rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* —— Nav: Dino Mari | Portfolio | Fashion | Portrait | Text | Projekte | Kontakt · lang · theme —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding: 0.85rem var(--pad) 0.7rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 0; /* no chrome rule — Satzspiegel via shared shell only */
}


.brand {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.85rem 1.25rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-left: auto;
  margin-right: 0.75rem;
}

.nav a[aria-current="page"] {
  opacity: 1;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.05rem;
}

.header-utils {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--mute);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.lang-btn {
  padding: 0.1rem 0.15rem;
  color: var(--faint);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lang-btn[aria-pressed="true"] {
  color: var(--ink);
}

.lang-sep {
  opacity: 0.35;
  user-select: none;
}

/* Quiet theme toggle — far right, not FAB */
.theme-btn {
  padding: 0.15rem 0.2rem;
  color: var(--faint);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.theme-btn:hover { color: var(--mute); }

/* alias used by concurrent Raster B draft */
.theme-toggle {
  padding: 0.15rem 0.35rem;
  color: var(--faint);
  font-size: 0.85rem;
  line-height: 1;
  margin-left: 0.15rem;
}
.theme-toggle:hover { color: var(--mute); }

[data-theme="dark"] .theme-label-dark { display: none; }
[data-theme="dark"] .theme-label-light { display: inline; }
[data-theme="light"] .theme-label-light { display: none; }
[data-theme="light"] .theme-label-dark { display: inline; }


/* —— Home: Still First (one still, no river) —— */
.home-still {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  width: min(100%, var(--shell));
  margin-inline: auto;
  min-height: calc(100vh - var(--nav-h));
  padding: 1.5rem var(--pad) 2.5rem;
  background: var(--bg);
}

.home-claim {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start; /* "I" under "Dino" — shared shell left edge */
  gap: clamp(1.75rem, 4cqi, 2.75rem); /* clear air before Portrait/Fashion */
  max-width: none;
  width: 100%;
  min-width: 0; /* allow grid column to shrink without overlapping still */
  text-align: left;
  padding-right: clamp(1rem, 2.5cqi, 2rem); /* gutter before the still */
  box-sizing: border-box;
  container-type: inline-size;
  container-name: claim;
  overflow: visible; /* CTAs must stay visible */
  z-index: 0;
}

.home-still .line {
  margin: 0;
  font-family: var(--font-line);
  font-optical-sizing: auto;
  /* Fluid grotesque; fitClaim keeps nowrap lines clear of the still */
  font-size: clamp(1.65rem, 11.5cqi, 5.25rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
  max-width: 100%;
  overflow: hidden; /* clip glyphs into column — not the CTAs */
}

.home-still .line .l1,
.home-still .line .l2 {
  display: block;
  white-space: nowrap;
  max-width: 100%;
}

.home-still .line em {
  font-style: italic; /* Dino 2026-09-18: Du / you italic again */
  font-weight: inherit;
}

.home-figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: calc(100vh - var(--nav-h) - 3rem);
  z-index: 1;
  isolation: isolate;
}

.home-figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(82vh, calc(100vh - var(--nav-h) - 3.5rem));
  object-fit: contain; /* NEVER crop — Dino lock */
  object-position: center center;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Quiet home still swap on load — no slideshow chrome */
.home-figure img.is-rotating {
  opacity: 0;
}
.home-figure img.is-ready {
  opacity: 1;
  transition: opacity 0.45s ease;
}

.home-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.85rem 1.75rem; /* more air between doors — not twin pills */
  margin-top: 0.55rem;
}

/* Genre doors: quiet text links on dark shell — no outline-pill chrome */
.cta {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0;
  border: 0;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 22%, transparent);
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
  transition: color 140ms ease, text-decoration-color 140ms ease, opacity 140ms ease;
}

.cta:hover {
  opacity: 1;
  color: var(--ink);
  text-decoration-color: color-mix(in srgb, var(--ink) 55%, transparent);
}

/* River title frame lives in the track (first snap) — no static H1 above */
.hero-river {
  min-height: calc(100vh - var(--nav-h));
}

.hero-river .river {
  height: calc(100vh - var(--nav-h));
}

.hero-river .river-track {
  /* Title frame sits flush left; first photo peeks (train waiting) */
  padding-left: 0;
}

.hero-river .river-frame img {
  max-width: min(55vw, 58vh);
  max-height: min(88%, 80vh);
}

/* Title as first river frame — same footprint energy as one still */
.river-frame.is-title {
  width: min(42vw, 52vh);
  min-width: min(16rem, 72vw);
  max-width: min(46vw, 28rem);
  height: 100%;
  padding: 0 clamp(0.35rem, 1.2vw, 1rem) 0 clamp(1.1rem, 2.8vw, 2.75rem);
  align-items: flex-end; /* text hugs the peeked still on the right */
  justify-content: center;
  scroll-snap-align: start;
  box-sizing: border-box;
  pointer-events: none; /* title not a lightbox target */
}
.river-frame.is-title.is-active {
  opacity: 1;
}

.river-frame.is-title .river-title {
  margin: 0;
  font-family: var(--font-line);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.1vw, 1.65rem);
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-align: right;
  color: color-mix(in srgb, var(--ink) 82%, transparent);
  max-width: 11ch;
  pointer-events: none;
}

/* River stills: zoom cursor (lightbox) */
.river-frame:not(.is-title) {
  cursor: zoom-in;
}
.river-frame:not(.is-title) img {
  pointer-events: none; /* click handled on frame; drag still on viewport */
}


@media (max-width: 800px) {
  .home-still {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 1.5rem;
    padding: 1.25rem 1.1rem 2.5rem;
  }

  .home-claim {
    align-items: flex-start;
    text-align: left;
    padding-right: 0;
    gap: 1.5rem;
    overflow: visible;
  }

  .home-still .line {
    font-size: clamp(1.75rem, 9.5vw, 2.85rem);
    font-weight: 300;
    letter-spacing: -0.035em;
    overflow: visible;
  }

  .home-still .line .l1,
  .home-still .line .l2 {
    white-space: normal; /* mobile: wrap rather than collide with CTAs */
  }

  .home-ctas {
    margin-top: 0.25rem;
  }

  .home-still .line .l1,
  .home-still .line .l2 {
    white-space: normal;
  }

  .home-figure {
    max-height: none;
    width: 100%;
  }

  .home-figure img {
    width: 100%;
    max-height: none;
  }

  .hero-river {
    min-height: 0;
  }

  .hero-river .river {
    height: auto;
  }

  .river-frame.is-title {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    padding: 1.15rem 0 0.35rem;
    scroll-snap-align: none;
    align-items: flex-start;
  }

  .river-frame.is-title .river-title {
    font-size: clamp(1.25rem, 5.5vw, 1.55rem);
    max-width: none;
    text-align: left; /* stacked: readable lead-in above stills */
  }

  .river-frame:not(.is-title) {
    cursor: zoom-in;
  }
}

/* —— Hero: left poster claim + Ishimoto river · ≤800px stack —— */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - var(--nav-h));
  background: var(--bg);
  outline: none;
}

/* Claim lives in the track on desktop (moves away on drag). */
.river-claim,
.hero-claim {
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
}

.line {
  margin: 0;
  font-family: var(--font-line);
  /* Sized to fit longest poster line in left half without soft-wrap */
  font-size: clamp(2.35rem, 3.55vw, 4.85rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: none;
}

.line .l1,
.line .l2 {
  display: block;
  white-space: nowrap;
}

.line em {
  font-style: italic;
  font-family: var(--font-line);
}

/* Full-bleed river — claim left · one full image · greyed neighbor peek */
.river {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: calc(100vh - var(--nav-h));
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox — chrome not primary */
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
  background: var(--bg);
}
.river::-webkit-scrollbar { display: none; }

.hero.is-dragging-x .river,
.river.is-dragging-x {
  touch-action: none;
  cursor: grabbing;
}

.river:active { cursor: grabbing; }

.river-track {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(0.85rem, 1.6vw, 1.75rem);
  height: 100%;
  width: max-content;
  /* Start flush left (claim). End pad so last image can center. */
  padding: 0 max(14vw, calc(50vw - 20vh)) 0 0;
}

.river.is-dragging-x {
  scroll-behavior: auto;
  cursor: grabbing;
}

/* Desktop claim panel = left half poster */
.river-claim {
  width: 46vw;
  max-width: 46vw;
  height: 100%;
  padding: 0 clamp(1.1rem, 2.8vw, 2.75rem);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.river-frame {
  margin: 0;
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  /* Neighbor peek: somewhat greyed until active */
  opacity: 0.42;
  transition: opacity 180ms ease;
}

.river-frame.is-active {
  opacity: 1;
}

/* Title lead-in: first photo not greyed (Dino 2026-09-19) */
.river-frame.is-title.is-active + .river-frame {
  opacity: 1;
}

.river-frame.is-peek {
  opacity: 0.42;
}

.river-frame img {
  height: auto;
  width: auto;
  max-width: min(42vw, 52vh);
  max-height: min(86%, 78vh);
  object-fit: contain; /* NEVER crop — Dino lock */
  object-position: center center;
  pointer-events: none;
  -webkit-user-drag: none;
}

.river-frame figcaption {
  display: none; /* captions only on mobile stack when present */
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--mute);
  text-align: left;
  width: 100%;
}

/* Chrome / dots — focus & a11y only, not primary UI */
.river-chrome,
.carousel-chrome {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.35rem 0.5rem 0.55rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.river-chrome:focus-within,
.carousel-chrome:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.river-chrome button:focus-visible,
.carousel-chrome button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.carousel-btn {
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  color: var(--mute);
}

.carousel-dots {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.carousel-dots button {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid var(--mute);
  padding: 0;
  background: transparent;
}

.carousel-dots button[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
}

/* Soft under-fold peek — not a gallery */
.scroll-peek {
  height: 0.75rem;
  margin: 0;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 70%, var(--ink) 4%));
  opacity: 0.35;
  pointer-events: none;
}

/* —— Portfolio masonry wall —— */
.page-main {
  padding: 1.75rem var(--pad) 4rem;
  background: var(--bg);
}

.page-head {
  max-width: 72rem;
  margin: 0 auto 1.35rem;
}

.page-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

.page-title {
  margin: 0;
  font-family: var(--font-line);
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-lede {
  margin: 0.65rem 0 0;
  max-width: 38rem;
  color: var(--mute);
  font-size: 0.92rem;
}

.masonry {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 72rem;
  column-count: 3;
  column-gap: 0.65rem;
}

.masonry-item {
  break-inside: avoid;
  margin: 0 0 0.65rem;
  background: var(--bg);
}

.masonry-item img {
  width: 100%;
  height: auto;
  object-fit: contain; /* NEVER crop — natural aspect */
}

/* —— Text archive —— */
.text-page {
  max-width: 42rem;
  padding: 2.5rem var(--pad) 4rem;
}

.text-page .page-title {
  margin-bottom: 0.25rem;
}

.text-epi {
  margin: 0 0 1.25rem;
  font-family: var(--font-line);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--mute);
}

.text-intro {
  margin: 0 0 0.85rem;
  color: var(--mute);
  font-size: 0.95rem;
  line-height: 1.55;
}

.cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin: 1.75rem 0 0.75rem;
}

.filter {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  color: var(--mute);
  border-radius: 999px;
}

.filter.is-active,
.filter[aria-pressed="true"] {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 35%, transparent);
}

.text-count {
  margin: 0 0 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.text-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.text-list li {
  border-top: 1px solid var(--line);
}

.text-item {
  display: block;
  padding: 0.95rem 0;
}

.text-item:hover { opacity: 1; }

.text-cat {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.25rem;
}

.text-title {
  font-family: var(--font-line);
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.text-note-missing {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--faint);
}

.text-more {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--mute);
}

/* —— Stub pages —— */
.stub {
  max-width: 36rem;
  padding: 3rem var(--pad);
}

.stub h1 {
  font-family: var(--font-line);
  font-weight: 400;
  font-size: 2rem;
  margin: 0 0 0.75rem;
}

.stub p {
  color: var(--mute);
  margin: 0;
}

/* —— Mobile / tablet —— */

/* Ishimoto original: ≤800px claim on top · images stack vertically */
@media (max-width: 800px) {
  .hero {
    min-height: 0;
    height: auto;
  }

  .river-claim,
  .hero-claim {
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 1.35rem 1.1rem 0.85rem;
    scroll-snap-align: none;
  }

  .line {
    font-size: clamp(2.35rem, 9.5vw, 3.4rem);
    max-width: none;
  }

  .line .l1,
  .line .l2 {
    white-space: normal; /* allow soft wrap only if viewport tiny */
  }

  .river {
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
    cursor: default;
    touch-action: pan-y;
    user-select: auto;
  }

  .river:active { cursor: default; }

  .river-frame {
    scroll-snap-align: none;
  }

  .river-track {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: auto;
    gap: 1.35rem;
    padding: 0 1.1rem 1.75rem;
  }

  .river-frame {
    width: 100%;
    height: auto;
    opacity: 1 !important;
  }

  .river-frame img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
  }

  .river-frame figcaption {
    display: block;
  }

  .river-chrome,
  .carousel-chrome {
    display: none; /* stack is native scroll; chrome not needed */
  }
}

@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.55rem 0.75rem;
    padding: 0.75rem 1rem 0.65rem;
  }

  .nav {
    order: 3;
    width: 100%;
    margin: 0;
    gap: 0.75rem 1rem;
    font-size: 0.74rem;
  }

  .header-utils {
    margin-left: auto;
  }

  .masonry {
    column-count: 2;
    column-gap: 0.45rem;
  }

  .masonry-item { margin-bottom: 0.45rem; }

  .page-main { padding: 1.35rem 1rem 3rem; }
  .text-page { padding: 1.75rem 1rem 3rem; }
}

@media (max-width: 420px) {
  .masonry { column-count: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .river { scroll-behavior: auto; }
  html { scroll-behavior: auto; }
}

.nav-group { display: inline-flex; align-items: baseline; gap: 0.45rem; }
.nav-sub { font-size: 0.78em; opacity: 0.65; }
.nav-sub:hover { opacity: 1; }

/* —— Site footer (quiet legal bar) —— */
.site-footer {
  border-top: 0; /* Dino: no bottom rule */
  margin-top: auto;
}
.footer-inner {
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding: 1.75rem var(--pad) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
.footer-nav a:hover { color: var(--ink); opacity: 1; }
.footer-copy {
  margin: 0;
  font-size: 0.72rem;
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* —— Legal pages (Impressum / Datenschutz) —— */
.legal-page {
  width: min(100%, 40rem);
  margin-inline: auto;
  padding: 2.75rem var(--pad) 3.5rem;
}
.legal-page h1 {
  font-family: var(--font-line);
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 1.5rem;
}
.legal-page h2 {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 2rem 0 0.75rem;
}
.legal-page p,
.legal-page address {
  margin: 0 0 0.85rem;
  color: var(--mute);
  font-style: normal;
  line-height: 1.55;
  max-width: 36rem;
}
.legal-page a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.legal-page a:hover { opacity: 0.7; }
.legal-note {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* —— Portfolio lightbox —— */
html.lightbox-open,
body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #000 88%, transparent);
  cursor: zoom-out;
}

.lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(96vw, 1600px);
  max-height: 94vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  display: block;
  max-width: 96vw;
  max-height: 94vh;
  width: auto;
  height: auto;
  object-fit: contain; /* NEVER crop */
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-ui, Inter, "Helvetica Neue", Helvetica, Arial, sans-serif);
  font-weight: 300;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: 0;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  color: #fff;
  outline: none;
}

.lightbox-close {
  top: max(0.65rem, env(safe-area-inset-top));
  right: max(0.65rem, env(safe-area-inset-right));
  font-size: 1.85rem;
}

.lightbox-prev {
  left: max(0.35rem, env(safe-area-inset-left));
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.25rem;
}

.lightbox-next {
  right: max(0.35rem, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.25rem;
}

@media (max-width: 700px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 1.85rem;
    padding: 0.4rem 0.5rem;
  }
  .lightbox-close {
    font-size: 1.65rem;
  }
}

/* Portfolio: no page title — nav says it; modest air under header */
.page-main--portfolio {
  padding-top: clamp(1.25rem, 3vw, 2rem);
}
.page-main--portfolio .masonry {
  margin-top: 0;
}


/* —— Text MVP (Raster lock) · index + article · grotesque only —— */
/* Body ~65–70ch centered in --shell; index slightly wider; Inter / Helvetica Neue */

.text-index {
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding: 2.25rem var(--pad) 4.5rem;
}

.text-index-head {
  max-width: min(100%, 42rem); /* ~scan width; optically with list */
  margin-inline: auto;
  margin-bottom: 2rem;
}

.text-index-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.375rem, 2.2vw, 1.625rem); /* 22–26px */
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--ink) 92%, transparent);
}

.text-index-dek {
  margin: 0 0 0.85rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 1.125rem; /* 18px */
  line-height: 1.5;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  max-width: 42ch;
}

.text-index-count {
  margin: 0;
  font-size: 0.8125rem; /* 13px */
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}

.text-index-list {
  list-style: none;
  margin: 0 auto; /* center in shell — not lonely left strip */
  padding: 0;
  max-width: min(100%, 46rem); /* slightly wider than essay body for scannability */
}

.text-row {
  border-top: 1px solid var(--line); /* hairline, not card */
}

.text-row:last-child {
  border-bottom: 1px solid var(--line);
}

.text-row-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 0;
}

.text-row-link:hover {
  opacity: 1;
}

.text-row-link:hover .text-row-title {
  opacity: 0.7;
}

.text-row-title {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1rem, 1.4vw, 1.0625rem); /* 16–17px */
  line-height: 1.35;
  color: color-mix(in srgb, var(--ink) 92%, transparent);
  flex: 1 1 auto;
  min-width: 0;
}

.text-row-date {
  flex: 0 0 auto;
  font-size: 0.8125rem; /* 13px */
  color: var(--mute);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.text-index-note {
  margin: 2rem auto 0;
  max-width: min(100%, 42rem);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--faint);
}

.text-index-note code {
  font-size: 0.9em;
  color: var(--mute);
}

/* Article */
.article-page {
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding: 2rem var(--pad) 4.5rem;
}

.article {
  max-width: min(100%, 40rem); /* ~68ch @ 18–19px — fills shell middle, not skinny left */
  margin-inline: auto; /* optical center within --shell */
  margin-block: 0;
}

.article-header {
  margin-bottom: 1.75rem;
}

.article-meta {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem; /* 13px muted */
  color: var(--mute);
  letter-spacing: 0.02em;
}

.article-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.2vw, 2.125rem); /* 28–34px */
  line-height: 1.2;
  letter-spacing: -0.015em;
  max-width: 28ch;
  text-transform: none; /* no all-caps */
  color: color-mix(in srgb, var(--ink) 92%, transparent);
}

.article-dek {
  /* Einlesetext: klar vom Fließtext getrennt */
  margin: 0 0 1.85rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.85vw, 1.3125rem); /* ~19–21px, a notch above body */
  line-height: 1.42;
  letter-spacing: -0.005em;
  color: var(--mute);
  max-width: 42ch; /* enger als Body → Lead-Charakter */
}

.article-body {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.125rem, 1.6vw, 1.1875rem); /* 18–19px */
  line-height: 1.55; /* readable measure; was 1.68 */
  color: color-mix(in srgb, var(--ink) 92%, transparent); /* near-white ~92%, not #fff */
  max-width: 70ch; /* soft ch-cap inside rem column */
}

.article-body p {
  margin: 0 0 1.15em;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body blockquote {
  margin: 1.25em 0;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
  color: var(--mute);
}

.article-figure {
  margin: 1.75rem 0;
  max-width: 100%;
}

.article-figure img {
  width: 100%;
  height: auto;
  object-fit: contain; /* never crop */
  background: color-mix(in srgb, var(--bg) 100%, transparent);
}

.article-figure figcaption {
  margin-top: 0.55rem;
  font-size: 0.8125rem; /* 13–14px */
  line-height: 1.4;
  color: var(--mute);
}

.article-related {
  margin-top: 2.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line); /* quiet rule; no cards */
}

.related-label {
  margin: 0 0 0.75rem;
  font-size: 0.75rem; /* 12px */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-list li {
  margin: 0 0 0.55rem;
}

.related-list a {
  font-size: clamp(1rem, 1.4vw, 1.0625rem); /* 16–17px */
  line-height: 1.35;
  color: color-mix(in srgb, var(--ink) 92%, transparent);
}

.related-list a:hover {
  opacity: 0.65;
}

.article-back {
  margin: 2.25rem 0 0;
  font-size: 0.875rem;
  color: var(--mute);
}

/* 404 dinosaur gag */
.error-page {
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding: 4.5rem var(--pad) 5rem;
  max-width: 36rem;
}

.error-code {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

.error-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.125rem);
  line-height: 1.15;
  color: color-mix(in srgb, var(--ink) 92%, transparent);
}

.error-dek {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  max-width: 36ch;
}

.error-gag {
  margin: 0 0 2rem;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.error-links a {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.1rem;
}

@media (max-width: 600px) {
  .text-row-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.95rem 0;
  }
  .article-title {
    max-width: none;
  }
}


/* —— Projects wall (fotoprojekte) —— */
.masonry--projects {
  column-count: 4;
  column-gap: 0.85rem;
}
.page-main--projects .masonry--projects {
  margin-top: 0;
}
.project-tile {
  position: relative;
}
.project-tile-link,
.project-tile-inner {
  display: block;
  position: relative;
  color: inherit;
  text-decoration: none;
}
.project-tile img {
  width: 100%;
  height: auto;
  object-fit: contain; /* NEVER crop — Dino lock */
  vertical-align: middle;
}
.project-tile-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.55rem 0.65rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.project-tile-link:hover .project-tile-title,
.project-tile-link:focus-visible .project-tile-title,
.project-tile-inner:hover .project-tile-title {
  opacity: 1;
}
.project-tile--deco {
  cursor: default;
}
.project-stub .page-kicker a {
  color: var(--mute);
  text-decoration: none;
}
.project-stub .page-kicker a:hover {
  color: var(--ink);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 900px) {
  .masonry--projects { column-count: 3; column-gap: 0.65rem; }
}
@media (max-width: 600px) {
  .masonry--projects { column-count: 2; column-gap: 0.45rem; }
}
@media (max-width: 420px) {
  .masonry--projects { column-count: 1; }
}
@media (hover: none) {
  .project-tile-title { opacity: 0; } /* keep quiet on touch; titles still in DOM for a11y via alt */
}

/* —— Project detail (Phase 2 → shell + duo) —— */
/* Page uses .article-page shell (--shell). Article itself is full shell width;
   prose keeps ~60–65ch inside its column — not a lonely centered 62ch pipe. */
.project-detail .article {
  max-width: none;
}
.project-detail .article-header {
  max-width: 48rem;
  margin-bottom: 1.75rem;
}
.project-detail .article-title {
  max-width: 28ch;
}
.project-detail .page-kicker {
  margin: 0 0 0.85rem;
}
.project-detail .page-kicker a,
.project-detail .article-back a {
  color: var(--mute);
  text-decoration: none;
}
.project-detail .page-kicker a:hover,
.project-detail .article-back a:hover {
  color: var(--ink);
}

/* Lead still: full content-shell width */
.project-lead {
  margin: 0 0 2.25rem;
  width: 100%;
}
.project-lead img {
  width: 100%;
  height: auto;
  object-fit: contain; /* never crop */
  background: transparent;
}

/* Project detail: prose (Quiet Book measure) then full-width stills rhythm.
   No side-by-side duo — avoids uneven Squarespace leftover grids. */
.project-duo {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}
.project-prose {
  max-width: var(--essay-measure, 36.5rem);
  width: 100%;
}
.project-body h2 {
  margin: 1.75em 0 0.85em;
  font-family: var(--font-essay, var(--font-ui));
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--essay-ink, var(--ink));
  max-width: 40ch;
}
.project-body h2:first-child {
  margin-top: 0;
}
.project-aside {
  margin: 1.5em 0 1.15em;
  font-size: 1.05em;
  line-height: 1.45;
  color: var(--essay-mute, var(--mute));
  max-width: 36ch;
}
.project-colophon {
  margin-top: 2rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--essay-mute, var(--mute));
}

/* Stills: vertical rhythm — full-bleed singles + 2-up pairs, consistent gap */
.project-stills {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-top: 0.5rem;
}
.project-stills .project-figure,
.project-stills .article-figure {
  margin: 0;
}
.project-stills-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
.project-stills-pair .project-figure,
.project-stills-pair .article-figure {
  margin: 0;
  min-width: 0;
}
.project-stills-triple {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
.project-figure {
  margin: 0;
}
.project-figure img,
.project-stills img {
  width: 100%;
  height: auto;
  object-fit: contain; /* never crop — Phase 2 lock */
  background: transparent;
  display: block;
}

@media (max-width: 800px) {
  .project-duo {
    gap: 1.75rem;
  }
  .project-stills-pair,
  .project-stills-triple {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
  .project-lead {
    margin-bottom: 1.5rem;
  }
}
@media (min-width: 801px) and (max-width: 960px) {
  .project-stills-triple {
    grid-template-columns: 1fr 1fr;
  }
}

/* —— Kontakt (image + quiet contact pair) —— */
.contact-page {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  width: min(100%, var(--shell));
  margin-inline: auto;
  min-height: calc(100vh - var(--nav-h));
  padding: 1.75rem var(--pad) 2.75rem;
  background: var(--bg);
}

.contact-figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  max-height: calc(100vh - var(--nav-h) - 3.5rem);
}

.contact-figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(78vh, calc(100vh - var(--nav-h) - 4rem));
  object-fit: contain; /* NEVER crop — Dino lock */
  object-position: center center;
  pointer-events: none;
  -webkit-user-drag: none;
}

.contact-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  min-width: 0;
  max-width: 28rem;
}

.contact-heading {
  margin: 0 0 1.35rem;
  font-family: var(--font-line);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: color-mix(in srgb, var(--ink) 92%, transparent);
}

.contact-name {
  margin: 0 0 0.65rem;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.contact-lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1.35rem;
}

.contact-phone,
.contact-mail {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  width: fit-content;
}

.contact-phone:hover,
.contact-mail:hover {
  opacity: 0.7;
}

.contact-note {
  margin: 0 0 0.45rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--mute);
  max-width: 34ch;
}
.contact-disclaimer {
  margin: 0 0 1.75rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--mute) 78%, transparent);
  max-width: 36ch;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}

@media (max-width: 800px) {
  .contact-page {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
    gap: 1.75rem;
    padding: 1.35rem var(--pad) 2.5rem;
  }

  .contact-figure {
    max-height: none;
    order: 0;
  }

  .contact-figure img {
    max-height: min(52vh, 28rem);
    width: 100%;
  }

  .contact-panel {
    max-width: none;
    order: 1;
  }

  .contact-note {
    max-width: 42ch;
  }
}

/* —— Projekte year list (quiet completeness under wall) —— */
.projects-year-list {
  width: min(100%, var(--shell, 72rem));
  margin: 3.5rem auto 2.5rem;
  padding: 0 var(--pad, 1.25rem);
}
.projects-year-list__heading {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 1.25rem;
}
.projects-year-list__inner {
  display: grid;
  gap: 1.35rem;
  max-width: 42rem;
}
.projects-year-group__year {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--mute);
  letter-spacing: 0.04em;
}
.projects-year-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}
.projects-year-group li {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}
.projects-year-group a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 28%, transparent);
  text-underline-offset: 0.15em;
}
.projects-year-group a:hover {
  text-decoration-color: var(--ink);
}

/* Related cards + article still gallery (Bergamo pass 2026-09-18) */
.related-list--cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.85rem 1rem;
}
.related-list--cards li { margin: 0; }
.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
}
.related-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.related-card-title {
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  line-height: 1.3;
}
.related-card:hover .related-card-title { opacity: 0.65; }

.article-still-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1.75rem 0 0.5rem;
}
@media (max-width: 640px) {
  .article-still-gallery { grid-template-columns: 1fr; }
}
.article-figure--still {
  margin: 0;
}
.article-figure--still img {
  width: 100%;
  height: auto;
  display: block;
}
.article-still-link {
  display: block;
  line-height: 0;
}
.article-figure--still figcaption {
  font-size: 0.75rem;
  color: var(--mute);
  margin-top: 0.35rem;
}

.related-card-dek {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--mute);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-list--cards {
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
}

/* Article footnotes — smaller, set apart */
.article-footnotes {
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  max-width: 38rem;
}
.article-footnotes .article-footnote,
.article-body .article-footnote {
  font-size: 0.72rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  margin: 0 0 0.55rem;
  letter-spacing: 0.005em;
}
.article-footnotes .article-footnote:last-child {
  margin-bottom: 0;
}


/* Home still click → river funnel */
.home-still-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.home-still-link:focus-visible {
  outline: 1px solid var(--line);
  outline-offset: 4px;
}

/* —— V2 Quiet book essay typography (2026-09-18)
   Literata + book measure for essays only.
   Scoped to .article-page:not(.project-detail) so photography
   project pages keep site chrome. Light = cream paper; dark = night book.
   Theme toggle drives [data-theme] on <html>. */

.article-page:not(.project-detail) {
  --essay-measure: 36.5rem;
  --essay-pad: 1.35rem;
  --font-essay: "Literata", "Iowan Old Style", Palatino, Georgia, serif;

  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding: 2rem var(--essay-pad) 5rem;
  background: var(--essay-bg);
  color: var(--essay-ink);
}

/* Light Quiet book — cream paper (Dino: hell ist schön) */
[data-theme="light"] .article-page:not(.project-detail) {
  --essay-bg: #f7f3eb;
  --essay-paper: #fbf8f2;
  --essay-ink: #221f1b;
  --essay-mute: #6b655c;
  --essay-faint: #9a9388;
  --essay-rule: rgba(34, 31, 27, 0.12);
  --essay-img-bg: #e8e2d6;
  --essay-rail: #ebe4d6;
  --essay-link-underline: rgba(34, 31, 27, 0.28);
}

/* Dark Quiet book — warm night paper (site default) */
[data-theme="dark"] .article-page:not(.project-detail) {
  --essay-bg: #12100e;
  --essay-paper: #1a1815;
  --essay-ink: #e8e4dc;
  --essay-mute: #9a948a;
  --essay-faint: #6e6960;
  --essay-rule: rgba(232, 228, 220, 0.14);
  --essay-img-bg: #2a2620;
  --essay-rail: #0e0c0b;
  --essay-link-underline: rgba(232, 228, 220, 0.32);
}

.article-page:not(.project-detail) .article {
  max-width: min(100%, calc(var(--essay-measure) + 2 * var(--essay-pad)));
  margin-inline: auto;
  margin-block: 0;
  color: var(--essay-ink);
}

.article-page:not(.project-detail) .article-header {
  margin-bottom: 0;
}

.article-page:not(.project-detail) .article-meta {
  margin: 0 0 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--essay-faint);
  letter-spacing: 0.03em;
}

.article-page:not(.project-detail) .article-title {
  margin: 0 0 1.35rem;
  font-family: var(--font-essay);
  font-weight: 500;
  font-size: clamp(1.85rem, 5.5vw, 2.55rem);
  line-height: 1.18;
  letter-spacing: -0.018em;
  max-width: 18ch;
  text-transform: none;
  color: var(--essay-ink);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 36;
}

.article-page:not(.project-detail) .article-dek {
  margin: 0 0 0;
  font-family: var(--font-essay);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--essay-mute);
  max-width: 36ch;
  font-optical-sizing: auto;
}

.article-page:not(.project-detail) .article-dek::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  background: var(--essay-ink);
  opacity: 0.35;
  margin: 2.25rem 0 2.25rem;
}

.article-page:not(.project-detail) .article-body {
  font-family: var(--font-essay);
  font-weight: 400;
  font-size: 1.1875rem;
  line-height: 1.68;
  color: var(--essay-ink);
  max-width: var(--essay-measure);
  font-optical-sizing: auto;
}

.article-page:not(.project-detail) .article-body p {
  margin: 0 0 1.35em;
  max-width: var(--essay-measure);
  hyphens: auto;
  -webkit-hyphens: auto;
}

.article-page:not(.project-detail) .article-body p:last-child {
  margin-bottom: 0;
}

.article-page:not(.project-detail) .article-body blockquote {
  margin: 1.35em 0;
  padding-left: 1rem;
  border-left: 1px solid var(--essay-rule);
  color: var(--essay-mute);
  font-style: italic;
}

.article-page:not(.project-detail) .article-figure {
  margin: 2.25rem 0 2.5rem;
  max-width: var(--essay-measure);
}

.article-page:not(.project-detail) .article-figure img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--essay-img-bg);
}

.article-page:not(.project-detail) .article-figure figcaption {
  margin-top: 0.65rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--essay-mute);
  max-width: 40ch;
}

.article-page:not(.project-detail) .article-still-gallery {
  margin: 2.25rem 0 1.5rem;
  max-width: var(--essay-measure);
}

.article-page:not(.project-detail) .article-figure--still figcaption {
  color: var(--essay-mute);
}

.article-page:not(.project-detail) .article-footnotes {
  margin-top: 3.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--essay-rule);
  max-width: 32rem;
}

.article-page:not(.project-detail) .article-footnotes .article-footnote,
.article-page:not(.project-detail) .article-body .article-footnote {
  font-family: var(--font-essay);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--essay-mute);
  margin: 0 0 0.85rem;
  letter-spacing: 0;
}

.article-page:not(.project-detail) .article-footnotes .article-footnote:last-child {
  margin-bottom: 0;
}

.article-page:not(.project-detail) .article-related {
  margin-top: 3.5rem;
  padding-top: 0;
  border-top: 0;
  max-width: var(--essay-measure);
}

.article-page:not(.project-detail) .related-label {
  margin: 0 0 1rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--essay-faint);
}

.article-page:not(.project-detail) .related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-page:not(.project-detail) .related-list li {
  margin: 0 0 1.1rem;
}

.article-page:not(.project-detail) .related-list a {
  font-family: var(--font-essay);
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--essay-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--essay-link-underline);
  opacity: 1;
}

.article-page:not(.project-detail) .related-list a:hover {
  text-decoration-color: var(--essay-ink);
  opacity: 1;
}

.article-page:not(.project-detail) .related-list--cards {
  display: block;
  grid-template-columns: none;
  gap: 0;
}

.article-page:not(.project-detail) .related-list--cards li {
  margin: 0 0 1.1rem;
}

.article-page:not(.project-detail) .related-card {
  display: block;
  gap: 0;
  text-decoration: none;
  color: var(--essay-ink);
}

.article-page:not(.project-detail) .related-thumb {
  display: none;
}

.article-page:not(.project-detail) .related-card-title {
  font-family: var(--font-essay);
  font-size: 1.05rem;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--essay-link-underline);
}

.article-page:not(.project-detail) .related-card:hover .related-card-title {
  opacity: 1;
  text-decoration-color: var(--essay-ink);
}

.article-page:not(.project-detail) .related-card-dek {
  display: block;
  font-family: var(--font-essay);
  font-size: 0.9rem;
  color: var(--essay-mute);
  margin-top: 0.2rem;
  font-style: italic;
  line-height: 1.4;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  overflow: visible;
}

.article-page:not(.project-detail) .article-back {
  margin: 2.5rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--essay-faint);
}

.article-page:not(.project-detail) .article-back a {
  color: inherit;
  text-decoration: none;
  opacity: 1;
}

.article-page:not(.project-detail) .article-back a:hover {
  color: var(--essay-ink);
  opacity: 1;
}

@media (min-width: 720px) {
  .article-page:not(.project-detail) {
    --essay-pad: 2rem;
    padding-top: 3.5rem;
    padding-bottom: 6rem;
  }
  .article-page:not(.project-detail) .article-body {
    font-size: 1.25rem;
    line-height: 1.7;
  }
  .article-page:not(.project-detail) .article-title {
    max-width: 20ch;
  }
}

@media (min-width: 960px) {
  .article-page:not(.project-detail) {
    background:
      linear-gradient(90deg, var(--essay-rail) 0, var(--essay-rail) 12%, transparent 12%, transparent 88%, var(--essay-rail) 88%),
      var(--essay-bg);
  }
  .article-page:not(.project-detail) .article {
    background: var(--essay-paper);
    box-shadow: 0 0 0 1px var(--essay-rule);
    max-width: min(100%, calc(var(--essay-measure) + 6.5rem));
    padding: 4rem 3.25rem 5.5rem;
  }
}

@media (max-width: 600px) {
  .article-page:not(.project-detail) .article-title {
    max-width: none;
  }
}


/* —— Quiet Book mirrored onto project-detail TEXT only (2026-09-19)
   Same Literata / measure / paper+ink as essays. Gallery (.project-stills,
   .project-lead, pairs) stays full-shell and is NOT constrained by essay measure. */

.article-page.project-detail {
  --essay-measure: 36.5rem;
  --essay-pad: 1.35rem;
  --font-essay: "Literata", "Iowan Old Style", Palatino, Georgia, serif;

  /* Keep shared site shell / Satzspiegel — Quiet Book is typography only.
     Earlier width:100% + margin 0 pulled projects outside the frame vs nav. */
  width: min(100%, var(--shell));
  max-width: var(--shell);
  margin-inline: auto;
  padding: 2rem var(--pad) 5rem;
  background: var(--essay-bg);
  color: var(--essay-ink);
  overflow-x: clip;
  box-sizing: border-box;
}

[data-theme="light"] .article-page.project-detail {
  --essay-bg: #f7f3eb;
  --essay-paper: #fbf8f2;
  --essay-ink: #221f1b;
  --essay-mute: #6b655c;
  --essay-faint: #9a9388;
  --essay-rule: rgba(34, 31, 27, 0.12);
  --essay-img-bg: #e8e2d6;
  --essay-rail: #ebe4d6;
  --essay-link-underline: rgba(34, 31, 27, 0.28);
}

[data-theme="dark"] .article-page.project-detail {
  --essay-bg: #12100e;
  --essay-paper: #1a1815;
  --essay-ink: #e8e4dc;
  --essay-mute: #9a948a;
  --essay-faint: #6e6960;
  --essay-rule: rgba(232, 228, 220, 0.14);
  --essay-img-bg: #2a2620;
  --essay-rail: #0e0c0b;
  --essay-link-underline: rgba(232, 228, 220, 0.32);
}

/* Article shell stays full width so galleries can breathe */
.article-page.project-detail .article {
  max-width: none;
  margin-inline: auto;
  color: var(--essay-ink);
}

.article-page.project-detail .article-header {
  max-width: var(--essay-measure);
  margin-inline: 0;
  margin-bottom: 0;
}

.article-page.project-detail .page-kicker,
.article-page.project-detail .article-meta {
  margin: 0 0 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--essay-faint);
  letter-spacing: 0.03em;
}

.article-page.project-detail .page-kicker a,
.article-page.project-detail .article-back a {
  color: var(--essay-mute);
  text-decoration: none;
}
.article-page.project-detail .page-kicker a:hover,
.article-page.project-detail .article-back a:hover {
  color: var(--essay-ink);
}

.article-page.project-detail .article-title {
  margin: 0 0 1.35rem;
  font-family: var(--font-essay);
  font-weight: 500;
  font-size: clamp(1.85rem, 5.5vw, 2.55rem);
  line-height: 1.18;
  letter-spacing: -0.018em;
  max-width: 18ch;
  text-transform: none;
  color: var(--essay-ink);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 36;
}

.article-page.project-detail .article-dek {
  margin: 0;
  font-family: var(--font-essay);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--essay-mute);
  max-width: 36ch;
  font-optical-sizing: auto;
}

.article-page.project-detail .article-dek::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  background: var(--essay-ink);
  opacity: 0.35;
  margin: 2.25rem 0 2.25rem;
}

.article-page.project-detail .article-body,
.article-page.project-detail .project-prose {
  font-family: var(--font-essay);
  font-weight: 400;
  font-size: 1.1875rem;
  line-height: 1.68;
  color: var(--essay-ink);
  max-width: var(--essay-measure);
  font-optical-sizing: auto;
}

.article-page.project-detail .article-body p,
.article-page.project-detail .project-prose p {
  margin: 0 0 1.35em;
  max-width: var(--essay-measure);
  hyphens: auto;
  -webkit-hyphens: auto;
}

.article-page.project-detail .article-body p:last-child,
.article-page.project-detail .project-prose p:last-child {
  margin-bottom: 0;
}

.article-page.project-detail .article-body .project-colophon,
.article-page.project-detail .project-prose .project-colophon {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--essay-mute);
  font-style: normal;
  margin-top: 2rem;
}

.article-page.project-detail .article-footnotes {
  margin-top: 3.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--essay-rule);
  max-width: 32rem;
}

.article-page.project-detail .article-footnotes .article-footnote,
.article-page.project-detail .article-body .article-footnote {
  font-family: var(--font-essay);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--essay-mute);
  margin: 0 0 0.85rem;
}

.article-page.project-detail .article-back {
  margin: 2.5rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--essay-faint);
  max-width: var(--essay-measure);
}


/* Project frame lock (2026-09-19): never break site Satzspiegel */
.article-page.project-detail .article,
.article-page.project-detail .project-duo,
.article-page.project-detail .project-stills,
.article-page.project-detail .project-lead {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.article-page.project-detail .project-stills img,
.article-page.project-detail .project-lead img,
.article-page.project-detail .project-figure img {
  max-width: 100%;
  width: 100%;
  height: auto;
}

/* Lead + stills: full width of content shell, ignore essay measure */
.article-page.project-detail .project-lead,
.article-page.project-detail .project-stills {
  max-width: none;
  width: 100%;
}

@media (min-width: 720px) {
  .article-page.project-detail {
    --essay-pad: 2rem;
    padding: 3.5rem var(--pad) 6rem;
  }
  .article-page.project-detail .article-body,
  .article-page.project-detail .project-prose {
    font-size: 1.25rem;
    line-height: 1.7;
  }
  .article-page.project-detail .article-title {
    max-width: 20ch;
  }
}

/* Privacy: reset consent control */
button.text-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}
button.text-btn:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
