/* ===================================================================
   Lukas Frei — private gallery
   Concept: monochrome / bold grotesk — dark anthracite & white, type as
   the hero, no photography-cliché imagery. Weight and scale carry
   the design instead of colour. A soft anthracite glow sits behind the
   hero instead of a flat black field.
   =================================================================== */

:root {
  --bg: #1c1e21;
  --bg-glow: rgba(94, 101, 112, 0.28);
  --surface: #24272b;
  --border: #34383d;
  --beam: #0b3d2a;      /* dark British racing green — top nav + filter bar */
  --beam-edge: #15563c;
  --beam-pill: #2a7254; /* filter-pill borders on the green beam (lighter green) */
  --line: #454951;
  --text: #f5f5f5;
  --text-dim: #a7abaf;
  --text-faint: #7a7e83;
  --invert-bg: #f5f5f5;
  --invert-text: #1c1e21;

  --font-display: "Archivo", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --header-h: 4.5rem;
  --filter-h: 4.25rem;
  --radius: 14px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 1700px 950px at 50% -10%, var(--bg-glow), transparent 64%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- ambient background orbs ---------------- */

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  will-change: transform;
}

.bg-orb-1 {
  width: 92rem;
  height: 92rem;
  top: -24rem;
  left: 26%;
  background: radial-gradient(circle, rgba(126, 134, 148, 0.5), transparent 70%);
}

.bg-orb-2 {
  width: 80rem;
  height: 80rem;
  bottom: -26rem;
  left: 8%;
  background: radial-gradient(circle, rgba(96, 102, 114, 0.45), transparent 70%);
}

.bg-orb-3 {
  width: 72rem;
  height: 72rem;
  top: 18%;
  left: 44%;
  background: radial-gradient(circle, rgba(112, 119, 133, 0.28), transparent 70%);
}

/* Orb motion is JS-driven (assets/js/bg.js) — slow billiard drift with a
   reduced-motion guard in the script; CSS positions above are the static fallback. */

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }

.container-fluid {
  max-width: 1520px;
  padding-left: clamp(1.25rem, 4vw, 4rem);
  padding-right: clamp(1.25rem, 4vw, 4rem);
  margin-left: auto;
  margin-right: auto;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* ---------------- header (sticky, tier 1) ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 420;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--beam);
  border-bottom: 1px solid var(--beam-edge);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.6rem 1.3rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-login:hover { background: var(--invert-bg); color: var(--invert-text); }
.btn-login i { font-size: 0.9rem; }

.btn-login-solid {
  background: var(--invert-bg);
  color: var(--invert-text);
  justify-content: center;
  padding: 0.85rem 1.1rem;
  font-size: 1rem;
}
.btn-login-solid:hover { background: var(--text); opacity: 0.85; }

.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.hamburger-btn:hover { border-color: var(--text); background: var(--invert-bg); color: var(--invert-text); }

/* ---------------- mobile sidebar (offcanvas) ---------------- */

.mobile-sidebar {
  width: min(22rem, 88vw);
  background: var(--bg);
  color: var(--text);
  border-left: 1px solid var(--border);
}

.mobile-sidebar .offcanvas-header {
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.mobile-sidebar .offcanvas-title {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.mobile-sidebar .offcanvas-body {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.mobile-filter-dock .filter-inner {
  max-width: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.5rem;
  overflow: visible;
}

.mobile-filter-dock .filter-group {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  white-space: normal;
}

.mobile-filter-dock .filter-search { flex: none; }

.mobile-filter-dock .select-wrap,
.mobile-filter-dock .search-wrap {
  width: 100%;
  max-width: none;
}

.mobile-filter-dock .filter-select,
.mobile-filter-dock .filter-search-input {
  width: 100%;
}

/* ---------------- hero ---------------- */

.hero {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 1.25rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  font-weight: 900;
  font-size: clamp(3.5rem, 12vw, 10.5rem);
  line-height: 0.86;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.hero-title-single {
  font-size: clamp(2.75rem, 11vw, 9rem);
}
.hero-title-single span {
  white-space: nowrap;
}

/* hero headline: big title + round portrait beside it */
.hero-headline {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3rem);
  flex-wrap: wrap;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.hero-headline .hero-title { margin-bottom: 0; }
.hero-portrait {
  position: relative;
  flex: 0 0 auto;
  width: clamp(5rem, 11vw, 8.5rem);
  height: clamp(5rem, 11vw, 8.5rem);
  border-radius: 50%;
  border: 4px solid var(--beam);
  overflow: hidden;
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 3px 16px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.hero-lead {
  max-width: 75%;
  color: var(--text-dim);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 1.5px solid var(--text);
  padding-bottom: 0.2rem;
  transition: gap 0.2s ease, opacity 0.2s ease;
}
.hero-cta:hover { gap: 0.9rem; opacity: 0.7; }

.locked-header .hero-cta {
  border: 1.5px solid var(--text);
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  gap: 0.55rem;
}
.locked-header .hero-cta:hover {
  background: var(--invert-bg);
  color: var(--invert-text);
  gap: 0.55rem;
  opacity: 1;
}
.locked-header .hero-cta i { font-size: 0.9rem; }

/* ---------------- filter bar (sticky, tier 2) ---------------- */

.filter-bar {
  top: var(--header-h);
  z-index: 400;
  height: var(--filter-h);
  display: flex;
  align-items: center;
  background: var(--beam);
  border-bottom: 1px solid var(--beam-edge);
}

.filter-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  overflow-x: auto;
  width: 100%;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  white-space: nowrap;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* labels stay in the mobile sidebar for orientation, but the desktop
   row reads fine from the control values alone */
.filter-bar .filter-label { display: none; }

.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-wrap i {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--text-dim);
  pointer-events: none;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  color-scheme: dark;
  border: 1.5px solid var(--beam-pill);
  border-radius: 999px;
  padding: 0.5rem 2rem 0.5rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.filter-select:hover { border-color: var(--text); }
.filter-select:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.filter-select option { background-color: var(--surface); color: var(--text); }
.filter-select optgroup { background-color: var(--surface); color: var(--text-dim); }

.filter-search {
  flex: 1 1 auto;
  min-width: 12rem;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 22rem;
}

.search-wrap i {
  position: absolute;
  left: 1rem;
  font-size: 0.95rem;
  color: var(--text-faint);
  pointer-events: none;
}

.filter-search-input {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--beam-pill);
  border-radius: 999px;
  padding: 0.5rem 1.1rem 0.5rem 2.5rem;
  transition: border-color 0.15s ease;
}
.filter-search-input::placeholder { color: var(--text-faint); }
.filter-search-input:hover { border-color: var(--text); }
.filter-search-input:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.filter-search-input::-webkit-search-cancel-button { filter: invert(1) grayscale(1) opacity(0.6); cursor: pointer; }

/* ---------------- gallery grid ---------------- */

.gallery { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.album-card {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer;
  contain: paint;
}

.album-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--surface);
  contain: paint;
  transform: translate3d(0, 0, 0);
}

.album-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.03);
  transform: translate3d(0, 0, 0) scale(1.1);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  backface-visibility: hidden;
}

.album-card:hover .album-media img { transform: translate3d(0, 0, 0) scale(1); }

/* admin-only hover edit shortcut on the overview cards */
.album-edit {
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  z-index: 2;
  width: 2.1rem; height: 2.1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(16, 17, 19, 0.75);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}
.album-card:hover .album-edit, .album-card:focus-within .album-edit { opacity: 1; }
.album-edit:hover { background: #5a7fb0; }

.album-info {
  position: absolute;
  left: -2px; right: -2px; bottom: -2px;
  padding: 1.5rem calc(1.6rem + 2px) calc(1.5rem + 2px);
  background: linear-gradient(to top,
    rgba(18, 19, 22, 0.98) 0%,
    rgba(18, 19, 22, 0.94) 40%,
    rgba(18, 19, 22, 0.7) 70%,
    rgba(18, 19, 22, 0) 100%);
}

.album-info h3 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.album-meta {
  margin: 0.65rem 0 0;
  display: flex;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------------- gallery grid: list view ---------------- */

.album-grid.view-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.view-list .album-card {
  aspect-ratio: unset;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0.25rem;
}

.view-list .album-card:hover { background: var(--surface); }

.view-list .album-media {
  position: static;
  width: 128px;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  border-radius: calc(var(--radius) - 6px);
}

.view-list .album-info {
  position: static;
  flex: 1;
  min-width: 0;
  padding: 0;
  background: none;
}

.view-list .album-meta { margin-top: 0.5rem; }

@media (max-width: 575px) {
  .view-list .album-media { width: 84px; }
  .view-list .album-info h3 { font-size: 1.1rem; }
}

.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 3rem 0;
  font-size: 1.05rem;
}

/* ---------------- locked section ---------------- */

.locked-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 7vw, 6rem);
  border-top: 1px solid var(--border);
}

.locked-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.locked-header h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.98;
}

.locked-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.locked-card {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: default;
  contain: paint;
}

.locked-card .album-media img {
  filter: saturate(1.1) blur(18px) brightness(0.7);
  transform: translate3d(0, 0, 0) scale(1.2);
}

.locked-card:hover .album-media img { transform: translate3d(0, 0, 0) scale(1.12); }

.lock-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text);
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ---------------- footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.93rem;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-faint);
  font-size: 0.93rem;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--text); }

/* ---------------- modal ---------------- */

.modal-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
}

.modal-header { border-bottom: 1px solid var(--border); padding: 1.5rem 1.75rem; }

.modal-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em; }

.btn-close { filter: invert(1) grayscale(1) brightness(1.6); }

.modal-body { padding: 1.75rem; }

.modal-lead { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 1.5rem; }

.form-field { margin-bottom: 1.1rem; }

.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.45rem;
}

.form-field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.7rem 0.85rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.form-field input:focus {
  outline: none;
  border-color: var(--text);
}

/* ---------------- album detail: navigation ---------------- */

.nav-arrow-group {
  display: flex;
  gap: 0.6rem;
}

.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.nav-arrow:hover { border-color: var(--text); background: var(--invert-bg); color: var(--invert-text); }

.album-select-wrap { min-width: 14rem; }
.album-select { width: 100%; padding-right: 2.2rem; }

/* ---------------- album detail: header ---------------- */

.album-head {
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(1.5rem, 3vw, 2rem);
}

.album-head-title {
  font-weight: 900;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0;
}

.album-head-desc {
  max-width: 65ch;
  margin: 1rem 0 0;
  color: var(--text-dim);
  font-size: 1.2rem;
  line-height: 1.5;
}

/* ---------------- links page ---------------- */

.links-section { padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(3rem, 7vw, 5rem); }
.link-list { display: flex; flex-direction: column; gap: 1rem; max-width: 680px; }
.link-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.link-card:hover { border-color: var(--text); transform: translateY(-2px); }
.link-card-body h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 0.2rem; }
.link-card-body p { margin: 0; color: var(--text-dim); }
.link-card-url { white-space: nowrap; color: var(--text-faint); font-family: var(--font-mono); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.5rem; }
@media (max-width: 575px) {
  .link-card { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}

/* spam-honeypot link: present in markup, invisible to humans */
.sp-trap { display: inline-block; width: 0; height: 0; overflow: hidden; }

/* ---------------- album detail: photo grid ---------------- */

.photo-section { padding-bottom: clamp(3rem, 6vw, 5rem); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.photo-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--border);
  background: var(--surface);
  border: none;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  contain: paint;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.03);
  transform: translate3d(0, 0, 0) scale(1.12);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  backface-visibility: hidden;
}
.photo-tile:hover img { transform: translate3d(0, 0, 0) scale(1); }

/* ---------------- lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 17, 19, 0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.lightbox.open { opacity: 1; visibility: visible; }

.lightbox-stage {
  max-width: min(94vw, 1900px);
  max-height: 88vh;
  display: flex;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-icon-btn,
.lightbox-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: rgba(36, 39, 43, 0.6);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.lightbox-arrow { position: absolute; }
.lightbox-icon-btn:hover,
.lightbox-arrow:hover { border-color: var(--text); background: var(--invert-bg); color: var(--invert-text); }

.lightbox-arrow:disabled { opacity: 0; pointer-events: none; }

.lightbox-icon-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.lightbox-icon-btn:disabled:hover {
  border-color: var(--line);
  background: rgba(36, 39, 43, 0.6);
  color: var(--text);
}

.lightbox-icon-btn.active {
  background: var(--invert-bg);
  border-color: var(--invert-bg);
  color: var(--invert-text);
}

.lightbox-controls {
  position: absolute;
  top: 1.75rem;
  right: 1.75rem;
  z-index: 2;
  display: flex;
  gap: 0.6rem;
}

.lightbox-prev { left: 1.75rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.75rem; top: 50%; transform: translateY(-50%); }

.lightbox-bottom {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(70vw, 44rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.lightbox-caption {
  display: none;
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--invert-text);
  background: var(--invert-bg);
  text-align: center;
  margin: 0;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.lightbox-caption.visible { display: block; }

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.93rem;
  color: var(--text-dim);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox, .photo-tile img, .album-media img { transition: none; }
}

/* ---------------- responsive ---------------- */

@media (max-width: 991px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); }
  .locked-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 575px) {
  :root { --header-h: 3.75rem; --filter-h: 3.75rem; }
  .album-grid { grid-template-columns: 1fr; }
  .locked-grid { grid-template-columns: 1fr; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-lead { max-width: none; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .album-select-wrap { min-width: 0; flex: 1; }
  .lightbox-prev { left: 0.75rem; }
  .lightbox-next { right: 0.75rem; }
  .lightbox-controls { top: 0.75rem; right: 0.75rem; gap: 0.4rem; }
  .lightbox-icon-btn { width: 2.5rem; height: 2.5rem; }
  .lightbox-arrow { width: 2.5rem; height: 2.5rem; }
  .lightbox-bottom { max-width: 88vw; }
}

@media (max-width: 900px) {
  .btn-login-desktop { display: none; }
  .hamburger-btn { display: inline-flex; }
  .filter-bar { display: none; }
  .main-nav { display: none; }
}

/* ---------------- main navigation (2026) ---------------- */

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.main-nav-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.87rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.main-nav-link:hover { color: var(--text); }
.main-nav-link.active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.main-nav-link.disabled {
  color: var(--text-faint);
  cursor: default;
  opacity: 0.6;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-nav-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.6rem 0;
}
.mobile-nav-link:hover { color: var(--text); }
.mobile-nav-link.active { color: var(--text); font-weight: 600; }
.mobile-nav-link.disabled { color: var(--text-faint); opacity: 0.6; cursor: default; }

/* auth state */
.user-greeting {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.93rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.mobile-greeting {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}
.login-error {
  color: #f08a8a;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* ---------------- admin ---------------- */
.admin-wrap { padding: 2rem 0 5rem; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.admin-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.75rem; }
.admin-back { color: var(--text-dim); text-decoration: none; }
.admin-back:hover { color: var(--text); }
.admin-h2 { font-size: 1.05rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.admin-dim { color: var(--text-faint); font-weight: 400; }
.admin-hint { font-size: 1rem; margin-bottom: 1rem; }
.admin-saved { color: #7ec98f; font-size: 1rem; margin-bottom: 1rem; }

.admin-search-wrap { position: relative; display: flex; align-items: center; max-width: 22rem; margin-bottom: 1rem; }
.admin-search-wrap i { position: absolute; left: 0.85rem; font-size: 0.95rem; color: var(--text-faint); pointer-events: none; }
.admin-search-input { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 0.55rem 0.75rem 0.55rem 2.2rem; font-family: var(--font-display); font-size: 1.05rem; border-radius: 8px; }
.admin-search-input:focus { outline: none; border-color: var(--text); }
.admin-search-input::placeholder { color: var(--text-faint); }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-family: "IBM Plex Mono", monospace; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 1.05rem; vertical-align: middle; }
.admin-td-title { font-weight: 600; }
.admin-groups { font-family: "IBM Plex Mono", monospace; font-size: 0.9rem; color: var(--text-dim); }
.admin-actions { display: flex; gap: 0.5rem; justify-content: flex-end; align-items: center; }
.admin-inline-form { display: inline; margin: 0; }

.admin-btn { display: inline-flex; align-items: center; gap: 0.4rem; background: transparent; border: 1.5px solid var(--border); border-radius: 999px; color: var(--text); font-size: 0.93rem; font-weight: 600; letter-spacing: 0.02em; padding: 0.5rem 0.9rem; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
.admin-btn:hover { border-color: var(--text); background: var(--invert-bg); color: var(--invert-text); }
.admin-btn-danger:hover { border-color: #e06a6a; background: #e06a6a; color: #fff; }

.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.admin-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }

.admin-checks { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field .admin-check { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-size: 1.05rem; text-transform: none; letter-spacing: normal; color: var(--text-dim); cursor: pointer; margin-bottom: 0; }
.form-field .admin-check + .admin-check { margin-top: 0.45rem; }
.form-field .admin-check input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: 0; padding: 0; accent-color: var(--text); }

.admin-drop { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 2rem 1rem; text-align: center; color: var(--text-dim); transition: border-color .15s, background .15s; }
.admin-drop.over { border-color: var(--text); background: rgba(255, 255, 255, 0.03); }
.admin-drop i { font-size: 1.6rem; display: block; margin-bottom: 0.6rem; color: var(--text-faint); }
.admin-link { background: none; border: none; color: var(--text); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.admin-upload-status { margin-top: 0.75rem; font-size: 1rem; color: var(--text-dim); min-height: 1.2em; text-align: center; }

.admin-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.admin-photo { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.admin-photo-media { aspect-ratio: 4 / 3; overflow: hidden; cursor: grab; }
.admin-photo-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-photo-ghost { opacity: 0.4; }
.admin-photo-actions { position: absolute; top: 0.4rem; right: 0.4rem; display: flex; gap: 0.35rem; }
.admin-photo-btn { width: 1.9rem; height: 1.9rem; border-radius: 999px; border: none; background: rgba(16, 17, 19, 0.7); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; opacity: 0; pointer-events: none; transition: opacity .15s, background .15s; }
/* reveal the action buttons only while hovering/focusing that photo */
.admin-photo:hover .admin-photo-btn, .admin-photo:focus-within .admin-photo-btn { opacity: 1; pointer-events: auto; }
.admin-photo-edit:hover { background: #5a7fb0; }
.admin-photo-del:hover { background: #e06a6a; }
.admin-photo-cover:hover { background: #d9a441; }
/* the active cover pin stays visible even when not hovering */
.admin-photo-cover.is-active { background: #d9a441; color: #1a1a1a; opacity: 1; pointer-events: auto; }
.admin-photo:has(.admin-photo-cover.is-active) { border-color: #d9a441; }
.admin-photo-caption-text { margin: 0; border-top: 1px solid var(--border); color: var(--text); font-size: 0.93rem; line-height: 1.35; padding: 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.35rem; }
.admin-photo-caption-text.is-empty { color: var(--text-faint); font-style: italic; }
.caption-modal-media { aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; margin-bottom: 1rem; background: var(--bg); }
.caption-modal-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 760px) { .admin-cols { grid-template-columns: 1fr; } }

.admin-subnav { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.admin-subnav-link { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.6rem 0.9rem; color: var(--text-dim); text-decoration: none; font-size: 1rem; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-subnav-link:hover { color: var(--text); }
.admin-subnav-link.active { color: var(--text); border-bottom-color: var(--text); }
.admin-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.admin-panel-narrow { max-width: 540px; }
@media (max-width: 575px) { .admin-two { grid-template-columns: 1fr; } }

.admin-gallery-switch { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.admin-gallery-pill { display: inline-flex; align-items: center; padding: 0.45rem 1rem; border-radius: 999px; border: 1.5px solid var(--border); color: var(--text-dim); font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
.admin-gallery-pill:hover { border-color: var(--text); color: var(--text); }
.admin-gallery-pill.active { background: var(--invert-bg); color: var(--invert-text); border-color: var(--invert-bg); }
.admin-intro { margin-bottom: 1.75rem; }
.admin-intro-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.4rem; }
.admin-intro-label { font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
.admin-intro-row { display: flex; gap: 0.75rem; align-items: stretch; }
.admin-intro-text { flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 0.55rem 0.75rem; font-family: var(--font-display); font-size: 1.05rem; resize: vertical; }
.admin-intro-text:focus { outline: none; border-color: var(--text); }
.admin-intro-save { flex: 0 0 auto; white-space: nowrap; }

.admin-tools { margin: -0.5rem 0 1.5rem; font-size: 0.97rem; }
.admin-tools a { color: var(--text-dim); display: inline-flex; align-items: center; gap: 0.4rem; }
.admin-tools a:hover { color: var(--text); }

.rescale-bar { height: 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin: 1rem 0 0.4rem; }
.rescale-bar-fill { height: 100%; background: var(--text); border-radius: 999px; transition: width 0.4s ease; }
.rescale-pct { font-variant-numeric: tabular-nums; }

/* admin access-log viewer */
.log-view { font-family: var(--font-mono); font-size: 13px; line-height: 1.6; max-height: 72vh; overflow: auto; }
.log-line { display: block; white-space: pre-wrap; word-break: break-all; }
.log-time, .log-ip { color: var(--text-faint); }
.log-status { font-variant-numeric: tabular-nums; }
.log-page { color: var(--text); }
.log-img { color: #6f8fbf; }
.log-admin { color: #d98a8a; }
.log-other { color: var(--text-dim); }

.form-field textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 0.7rem 0.85rem; font-family: var(--font-display); font-size: 1.05rem; resize: vertical; }
.form-field textarea:focus { outline: none; border-color: var(--text); }
