/* ===== dark theme overrides for the experiments page ===== */
body.theme-dark {
  background: #0e0e0e;
  color: #f2f2f2;
}

/* sidebar is no longer a filled black block — just a thin white stroke edge
   that stops short of the top and bottom */
.theme-dark .sidebar { background: transparent; }
.theme-dark .sidebar::after {
  content: "";
  position: fixed;
  left: var(--sidebar-w);
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.55);
}

.theme-dark .nav a { color: #9c9c9c; }
.theme-dark .nav a:hover { color: #fff; }
.theme-dark .sidebar-bottom a { color: #8a8a8a; }
.theme-dark .sidebar-bottom a:hover { color: #fff; }

.exp-hero { min-height: 40vh; position: relative; }

/* repeating brand pattern behind the title, faded to black downward.
   Full-bleed: extends past the content padding so it runs from the sidebar
   edge on the left to the window edge on the right. */
/* .hero-pattern styles live in styles.css (shared by both pages).
   tile size lives in the <pattern width/height> in the HTML;
   tilt lives in patternTransform="rotate(15)". */
/* keep the title/back-link above the pattern */
.exp-hero > .back-link,
.exp-hero > h1,
.exp-hero > .hero-sub { position: relative; z-index: 1; }
/* back-link above the big title's box so hover/click isn't blocked by it */
.exp-hero > .back-link { z-index: 3; }


/* go-back link above the title on deeper pages */
.back-link {
  display: inline-block;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #9c9c9c;
  margin-bottom: 20px;
  transition: color .18s ease, transform .18s ease;
  -webkit-user-select: none;
  user-select: none;
}
.back-link:hover { color: #fff; transform: translateX(-3px); }

/* ===== poster gallery (masonry via CSS columns) ===== */
.gallery {
  columns: 3;               /* 3 posters across */
  column-gap: 20px;
  padding: 20px 0 80px;
}
@media (max-width: 1100px) { .gallery { columns: 2; } }
@media (max-width: 640px)  { .gallery { columns: 1; } }

.shot {
  break-inside: avoid;
  margin: 0 0 20px;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
  cursor: zoom-in;
  transition: transform .25s ease, outline-color .2s ease;
  outline: 1px solid transparent;
  scroll-margin-top: 30px;
}
.shot img { width: 100%; display: block; }
.shot:hover { transform: translateY(-4px); }

/* briefly highlight the poster you arrived at from the homepage link */
.shot:target { outline-color: rgba(255,255,255,0.9); }

/* ===== lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 200;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 4px;
}

/* dark-theme back-to-top */
.theme-dark .to-top { background: #fff; color: #000; }
.theme-dark .to-top:hover { background: #d8d8d8; }

@media (max-width: 820px) {
  .theme-dark .sidebar::after { display: none; }
  /* off-canvas panel needs a solid backing, not the transparent edge look */
  .theme-dark .sidebar { background: #0e0e0e; }

  /* bigger, centred title on mobile */
  .exp-hero { align-items: center; text-align: center; }
  .exp-hero h1 { font-size: clamp(60px, 17vw, 120px); }

  /* back link becomes a fixed bottom-left button */
  .back-link {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 95;
    margin: 0;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    background: #fff;
    border-radius: 26px;
  }
  .back-link:hover { color: #000; transform: none; }
}
