/* =========================================================
   Bartosz Landing — design tokens
   Values are final per design handoff. Do not add a second accent.
   ========================================================= */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/DMMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/DMMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: oklch(0.978 0.005 85);
  --ink: oklch(0.17 0.008 70);
  --ink-80: oklch(0.36 0.01 70);
  --ink-60: oklch(0.48 0.01 70);
  --rule: oklch(0.90 0.006 85);
  --rule-strong: oklch(0.17 0.008 70);
  --accent: oklch(0.52 0.16 45);
  --accent-dark-bg: oklch(0.76 0.15 52);
  --dark: oklch(0.16 0.012 50);
  --dark-ink: oklch(0.97 0.004 85);
  --dark-ink-70: oklch(0.80 0.01 60);
  --dark-rule: oklch(0.30 0.014 50);
  --dark-meta: oklch(0.66 0.012 55);

  --pad-x: clamp(20px, 4vw, 56px);
  --section-gap: clamp(48px, 7vw, 88px);
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* =========================================================
   Base
   ========================================================= */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.bartosz-landing {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}

.bl-container {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--paper);
}

a {
  color: var(--ink);
  text-decoration: none;
}
a:hover { color: var(--accent); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.bl-dark a:focus-visible { outline-color: var(--dark-ink); }

h1, h2, h3, p, dl, dd { margin: 0; }

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

.bl-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bl-pretty { text-wrap: pretty; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 24px; }
body.bl-has-sticky-header [id] { scroll-margin-top: 84px; }

/* =========================================================
   Header
   ========================================================= */

.bl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px var(--pad-x);
  flex-wrap: wrap;
  background: var(--paper);
}

body.bl-has-sticky-header .bl-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
}
body.bl-has-sticky-header .bl-header.is-scrolled {
  border-bottom-color: var(--rule);
}

.bl-wordmark {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.bl-wordmark:hover { color: var(--ink); }

.bl-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  font-size: 13.5px;
  font-weight: 500;
  flex-wrap: wrap;
}

.bl-nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
}

.bl-btn-pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper) !important;
  font-weight: 600;
}
.bl-btn-pill:hover { background: var(--accent); color: var(--paper) !important; }

.bl-lang-switch {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-60);
}
.bl-lang-switch a { color: var(--ink-60); }
.bl-lang-switch .is-current { color: var(--ink); }
.bl-lang-switch a:hover { color: var(--accent); }
.bl-lang-untranslated { color: var(--rule); cursor: default; }
.bl-lang-switch button {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: var(--ink-60);
  cursor: pointer;
}
.bl-lang-switch button.is-current { color: var(--ink); }
.bl-lang-switch button:hover { color: var(--accent); }

@media (max-width: 640px) {
  .bl-nav-toggle { display: inline-block; }
  .bl-nav { width: 100%; display: none; gap: 16px; }
  .bl-nav.is-open { display: flex; }
}

/* =========================================================
   Hero
   ========================================================= */

.bl-hero {
  padding: clamp(24px, 5vw, 64px) var(--pad-x) 0;
}

.bl-hero-statement {
  font-family: var(--font-serif);
  font-size: clamp(40px, 7.5vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.032em;
  max-width: 900px;
}

.bl-hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: clamp(20px, 3vw, 32px);
}

.bl-hero-paragraph {
  font-size: clamp(15px, 1.4vw, 17.5px);
  line-height: 1.6;
  color: var(--ink-80);
  max-width: 520px;
}

.bl-hero-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 2;
  color: var(--ink-60);
}

/* =========================================================
   Lead photograph
   ========================================================= */

.bl-lead-photo-wrap {
  padding: clamp(28px, 4vw, 48px) var(--pad-x) 0;
}

.bl-lead-photo {
  position: relative;
  aspect-ratio: 21 / 9;
  background: linear-gradient(150deg, oklch(0.46 0.03 60) 0%, oklch(0.26 0.02 55) 58%, oklch(0.15 0.012 50) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.bl-lead-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bl-lead-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.bl-lead-slide.is-active { opacity: 1; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .bl-lead-slide { transition: none; }
}
.bl-lead-photo-placeholder {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(0.74 0.02 60);
}

.bl-lead-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-60);
  padding-top: 10px;
}

/* =========================================================
   Section label row (shared: Work, Photographs)
   ========================================================= */

.bl-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.bl-section-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin: 0;
}

.bl-section-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

/* =========================================================
   Work (Latest work)
   ========================================================= */

.bl-work {
  padding: var(--section-gap) var(--pad-x) 0;
}

.bl-work .bl-section-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-strong);
}

.bl-work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.bl-work-row.is-lead { padding: 26px 0; }

.bl-work-row:hover .bl-work-headline { color: var(--accent); }

.bl-work-col-main {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.bl-work-row.is-lead .bl-work-col-main { gap: 8px; }

.bl-work-kicker {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.bl-work-headline {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 29px);
  line-height: 1.14;
  letter-spacing: -0.014em;
  color: var(--ink);
}
.bl-work-row.is-lead .bl-work-headline {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.bl-work-standfirst {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-60);
  max-width: 620px;
}
.bl-work-row.is-lead .bl-work-standfirst { font-size: 15px; }

.bl-work-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-60);
  line-height: 1.8;
  text-align: right;
  white-space: nowrap;
}

.bl-work-empty {
  padding: 26px 0;
  color: var(--ink-60);
  font-size: 14.5px;
}

/* =========================================================
   Photographs
   ========================================================= */

.bl-photographs {
  padding: var(--section-gap) var(--pad-x) 0;
}
.bl-photographs .bl-section-head { padding-bottom: 16px; }

.bl-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
}

.bl-photo-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bl-photo-frame {
  aspect-ratio: 4 / 5;
  background: linear-gradient(140deg, oklch(0.86 0.01 72), oklch(0.72 0.014 62));
  overflow: hidden;
  display: block;
}
.bl-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.bl-photo-frame:hover img {
  transform: scale(1.035);
}
@media (prefers-reduced-motion: reduce) {
  .bl-photo-frame img { transition: none; }
  .bl-photo-frame:hover img { transform: none; }
}

.bl-photo-caption {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-60);
  transition: color 0.2s ease;
}
.bl-photo-tile:hover .bl-photo-caption {
  color: var(--accent);
}

/* =========================================================
   About
   ========================================================= */

.bl-about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(28px, 5vw, 64px);
  padding: var(--section-gap) var(--pad-x) 0;
  align-items: start;
}

.bl-about-heading {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.018em;
  padding-top: 16px;
}

.bl-about-body {
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-80);
  padding-top: 16px;
  max-width: 560px;
}

.bl-publications {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 32px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-80);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  list-style: none;
  padding-left: 0;
}
.bl-publications li { margin: 0; }
.bl-publications .bl-cv-link { color: var(--accent); font-weight: 600; }

.bl-about-portrait-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  margin-left: auto;
}
.bl-about-portrait {
  aspect-ratio: 4 / 5;
  background: linear-gradient(140deg, oklch(0.86 0.01 72), oklch(0.72 0.014 62));
  overflow: hidden;
}
.bl-about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bl-about-portrait-caption {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-60);
}

/* =========================================================
   Contact footer
   ========================================================= */

.bl-contact.bl-dark {
  margin-top: var(--section-gap);
  padding: clamp(36px, 5vw, 56px) var(--pad-x) clamp(28px, 4vw, 40px);
  background: var(--dark);
  color: var(--dark-ink);
}
.bl-contact.bl-dark a { color: var(--dark-ink); }
.bl-contact.bl-dark a:hover { color: var(--accent-dark-bg); }

.bl-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.bl-contact-call {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  max-width: 620px;
}

.bl-contact-copy {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--dark-ink-70);
  padding-top: 14px;
  max-width: 520px;
}

.bl-contact-details {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2.1;
  color: var(--dark-ink-70);
}
.bl-contact-details .bl-email-link { color: var(--accent-dark-bg); }
.bl-contact-details .bl-pgp-link { color: var(--dark-ink); }
.bl-contact-social { padding-top: 10px; }

.bl-contact-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 16px;
  border-top: 1px solid var(--dark-rule);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dark-meta);
}

/* =========================================================
   Contact icons
   ========================================================= */

.bl-icon {
  vertical-align: -2px;
  margin-right: 2px;
  opacity: 0.85;
}

/* =========================================================
   Contact footer photo backdrop
   ========================================================= */

.bl-contact.bl-dark { position: relative; overflow: hidden; }

.bl-contact-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 0;
}
.bl-contact-backdrop img {
  flex: 1 1 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.38) contrast(0.92);
}
.bl-contact-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--dark);
  opacity: 0.86;
}

.bl-contact-grid,
.bl-contact-bottom {
  position: relative;
  z-index: 1;
}

/* =========================================================
   Contact form (inside the modal)
   ========================================================= */

.bl-contact-form {
  margin-top: clamp(20px, 3vw, 28px);
  padding-top: clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--dark-rule);
}

.bl-contact-form-lead {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dark-meta);
  margin-bottom: 12px;
}

.bl-form-row { margin-bottom: 12px; }
.bl-form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dark-ink-70);
  margin-bottom: 4px;
}
.bl-form-row input,
.bl-form-row textarea {
  width: 100%;
  background: oklch(0.22 0.014 50);
  border: 1px solid var(--dark-rule);
  color: var(--dark-ink);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 9px 11px;
  resize: vertical;
}
.bl-form-row input:focus,
.bl-form-row textarea:focus {
  outline: 2px solid var(--accent-dark-bg);
  outline-offset: 1px;
}

.bl-form-honeypot {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.bl-contact-form-submit {
  margin-top: 4px;
  border: 0;
  font-family: var(--font-sans);
  cursor: pointer;
}
.bl-contact-form-submit:disabled { opacity: 0.6; cursor: default; }

.bl-contact-form-status {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 10px;
  min-height: 1em;
}
.bl-contact-form-status.is-success { color: var(--accent-dark-bg); }
.bl-contact-form-status.is-error { color: oklch(0.72 0.15 25); }

/* =========================================================
   Scroll-to-top
   ========================================================= */

.bl-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.bl-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.bl-to-top:hover { background: var(--accent); }
.bl-to-top:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* =========================================================
   Gallery archive — masonry, count, Load more
   ========================================================= */

.bl-gallery-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-60);
}

.bl-gallery-intro {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.5;
  color: var(--ink-80);
  max-width: 620px;
  padding: clamp(16px, 2.5vw, 24px) 0 clamp(20px, 3vw, 32px);
}

/* .bl-gallery-grid's base layout is a plain CSS-columns fallback —
   what a no-JS visitor gets. It has a known, unfixable-in-CSS quirk
   with a small, unevenly-sized item count: the browser can decide
   fewer columns than requested are enough to balance the content,
   and leaves the rest of the width empty rather than widening the
   columns it did use (this is exactly what left a blank 4th column
   on a 7-photo gallery). assets/js/site.js's initMasonry() replaces
   this with an actually-computed masonry — measuring real column
   heights and always placing the next photo in the shortest one —
   the moment JS runs, by restructuring the flat tile list into
   .bl-masonry-col wrapper columns and adding the .js-masonry class
   below. Leave this fallback as columns, not grid: it still reads
   top-to-bottom-per-column sensibly without JS, which a plain
   multi-column grid of very differently-sized photos would not. */
.bl-gallery-grid {
  columns: 4 220px;
  column-gap: clamp(10px, 1.4vw, 18px);
}
.bl-gallery-grid .bl-photo-tile {
  break-inside: avoid;
  margin-bottom: clamp(10px, 1.4vw, 18px);
}
.bl-gallery-grid .bl-photo-frame {
  aspect-ratio: auto;
}
@media (max-width: 900px) { .bl-gallery-grid { columns: 3 180px; } }
@media (max-width: 560px) { .bl-gallery-grid { columns: 2 140px; } }

/* JS-computed masonry (see assets/js/site.js: initMasonry()). Once
   applied, .bl-gallery-grid becomes a row of .bl-masonry-col flex
   columns instead of relying on CSS columns at all. */
.bl-gallery-grid.js-masonry {
  columns: unset;
  display: flex;
  align-items: flex-start;
  gap: clamp(10px, 1.4vw, 18px);
}
.bl-gallery-grid.js-masonry .bl-photo-tile {
  margin-bottom: 0; /* spacing comes from the column's own flex gap instead */
}
.bl-masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.4vw, 18px);
}

.bl-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: clamp(28px, 4vw, 44px) 0;
}
.bl-load-more {
  padding: 11px 28px;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.bl-load-more:hover { background: var(--ink); color: var(--paper); }
.bl-load-more[aria-busy="true"] { opacity: 0.6; pointer-events: none; }

.bl-work-archive .bl-pagination { border-top: 1px solid var(--rule); margin-top: 8px; }

/* =========================================================
   Modal shell (shared: contact modal, photo lightbox)
   ========================================================= */

body.bl-modal-open { overflow: hidden; }

.bl-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 56px);
  background: oklch(0.16 0.012 50 / 0.92);
}
.bl-modal.is-open { display: flex; }

.bl-modal-panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--dark);
  color: var(--dark-ink);
  padding: clamp(32px, 5vw, 48px);
}
.bl-modal-panel a { color: var(--dark-ink); }
.bl-modal-panel a:hover { color: var(--accent-dark-bg); }

.bl-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: 0;
  color: var(--dark-ink-70);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 8px;
}
.bl-modal-close:hover { color: var(--accent-dark-bg); }

/* Reuse the footer's contact typography inside the modal panel. */
.bl-modal-panel .bl-contact-call { max-width: none; padding-right: 40px; }
.bl-modal-panel .bl-contact-details { padding-top: clamp(20px, 3vw, 28px); }

/* =========================================================
   Photo lightbox
   ========================================================= */

.bl-lightbox {
  position: fixed;
  inset: 0;
  background: var(--dark);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  z-index: 300;
  padding: clamp(20px, 5vw, 56px);
}
.bl-lightbox.is-open { display: flex; }

.bl-lightbox-image {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
}

.bl-lightbox-meta {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  min-height: 1em;
}
.bl-lightbox-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dark-ink-70);
}
.bl-lightbox-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dark-meta);
}

.bl-lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  background: none;
  border: 0;
  color: var(--dark-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
}
.bl-lightbox-close:hover { color: var(--accent-dark-bg); }

.bl-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--dark-ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 12px;
}
.bl-lightbox-arrow:hover { color: var(--accent-dark-bg); }
.bl-lightbox-prev { left: clamp(8px, 3vw, 32px); }
.bl-lightbox-next { right: clamp(8px, 3vw, 32px); }

/* =========================================================
   Gallery archive (archive-frame.php)
   ========================================================= */

.bl-gallery {
  padding: var(--section-gap) var(--pad-x) 0;
}
.bl-gallery .bl-section-head { padding-bottom: 16px; }

/* .bl-gallery-grid itself (the masonry columns) is defined once,
   earlier in this file, alongside .bl-load-more-wrap — this second
   block used to redefine it as a plain CSS grid and, being later in
   the cascade, silently won and cancelled the masonry out. Removed;
   don't reintroduce a second .bl-gallery-grid rule here. */

.bl-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: clamp(28px, 4vw, 40px) 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-60);
}
.bl-pagination a { color: var(--ink); }
.bl-pagination .bl-pagination-disabled { color: var(--rule); pointer-events: none; }

.bl-archive-closing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: clamp(16px, 3vw, 28px);
  padding: clamp(20px, 3vw, 28px) 0;
  border-top: 1px solid var(--rule-strong);
}
.bl-archive-closing-back {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-60);
}
.bl-archive-closing-back:hover { color: var(--accent); }
