/* ================================
   Fonts
================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Mono&display=swap');
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@1,400&display=swap');

/* ================================
   Theme tokens
================================ */
:root{
  --bg: #000;
  --ink: #fff;
  --muted: #cfcfcf;
  --rule: #fff;

  --pad: clamp(16px, 4vw, 36px);
  --g: clamp(14px, 3vw, 32px);
  --left: clamp(220px, 24vw, 360px);   /* sidebar width for BitRot page */
  --BitRotLogo-w: clamp(160px, 28vw, 320px);  /* same as your left-rail logo */

}

/* ================================
   Reset & Base
================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Fira Mono','IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}
a { color: var(--ink); text-decoration: none; }
a:hover { opacity: .85; }

/* GoFundMe: dark-mode invert */
.gfm-embed iframe { filter: invert(1); }

/* ================================
   Marquee Banner
================================ */
.banner{
  background:#000;
  color:#fff;
  font-size:0.9rem;
  text-transform:uppercase;
  padding:0.5rem 0;
  border-bottom:1px solid #444;
  margin: 0 0 var(--g) 0; /* allow spacing when used inside content */
}

/* ================================
   Left sidebar layout (BitRot)
   Matches your index-page vibe
================================ */
.layout{ margin:0; padding:0; display:block; }

.left{
  position: fixed;
  top: 0;
  left: 0;
  width: var(--left);
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--pad);
  background: var(--bg);
  border-right: 1px solid var(--rule);
  z-index: 10;
}
/* — Keywords — */
.keywords {
  max-width: 700px;
  margin: 0 auto 4rem auto;
  text-align: left;
}
.keywords h3 {
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: #bbb;
  margin-bottom: 0.5rem;
}
.keywords ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.keywords li {
  font-size: 0.9rem;
  color: #ddd;
  background: rgba(255,255,255,0.05);
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
}

/* Main-site logo (left sidebar on index page uses this selector) */
.logo img { width: 250px; height: auto; display:block; }

/* Shared inline logo asset if you also use a generic .logoImg element */
.logoImg{
  display:block;
  width: clamp(160px, 28vw, 320px);
  max-width: 100%;
  height: auto;
  margin: 0 0 var(--g) 0;
  object-fit: contain;
}

/* BitRot page title mark — sized independently from .logo img */
.BitRotLogo img{
  display:block;
  width: clamp(120px, 18vw, 220px);  /* smaller by default */
  height:auto;
  margin:0 0 var(--g) 0;
  object-fit:contain;
}

.keywords{ list-style:none; padding:0; margin:.25rem 0 0 0; display:flex; gap:.8rem; flex-wrap:wrap; }
.keywords li{
  border:1px solid var(--rule);
  padding:.4rem .6rem; white-space:nowrap;
}

/* Sidebar index list */
.index{ margin: 8px 0 var(--g); }
.index ul{
  list-style:none;
  margin:0; padding:0;
  display:flex; flex-direction:column; gap:.4rem;
}
.index a{
  display:inline-flex; align-items:center; gap:.5ch;
  color:var(--muted);
  font-weight:600; font-size:16px; letter-spacing:.01em; line-height:1.35;
  transition: color .15s ease, transform .15s ease;
}
.index a::before{ content:"↗"; font-size:.9em; opacity:.7; transform: translateY(-1px); }
.index a:hover{ color:var(--ink); }
.index a:hover::before{ transform: translate(2px,-1px); }
.index a[aria-current="page"]{ color:var(--ink); }

/* Sidebar copy */
.kicker{ margin: 6px 0 10px 0; font-weight:700; font-size:16px; }
.intro{ margin:0; color:var(--muted); max-width:44ch; font-size:14px; }

/* Right content column */
.right{
  margin-left: calc(var(--left) + var(--g));
  padding: var(--pad);
  min-width: 0;
}

/* Thin scrollbar nicety (desktop) */
@media (hover:hover){
  .left::-webkit-scrollbar{ width:10px; }
  .left::-webkit-scrollbar-track{ background:#0a0a0a; }
  .left::-webkit-scrollbar-thumb{ background:#222; }
  .left::-webkit-scrollbar-thumb:hover{ background:#2d2d2d; }
}

/* Collapse sidebar on small screens */
@media (max-width:640px){
  .left{
    position: static;
    width:auto; height:auto;
    border-right:none; border-bottom:1px solid var(--rule);
    padding: var(--pad);
  }
  .right{ margin-left:0; padding: var(--pad); }
  .index ul{ flex-direction: row; flex-wrap: wrap; gap:.5rem 1rem; }
}

/* ================================
   BitRot header: nav | logo | nav
================================ */
.hero{
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left nav | logo | right nav */
  align-items: center;
  gap: 2.5rem;
  padding: 2rem 0 1rem;
}

/* keep BitRot mark centered */
.BitRotLogo{ justify-self: center; }

/* nav columns + bullets removed */
.nav{ width:100%; }
.nav--left{  justify-self: start; text-align: left;  }
.nav--right{ justify-self: end;   text-align: right; }

.hero .nav ul,
nav ul{
  list-style: none;
  margin: 0;
  padding: 0;
}
.hero .nav ul{
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.hero .nav li::marker{ content:""; } /* extra safety */
.nav a{
  color: #fff;
  text-decoration: none;
  text-transform: lowercase;
  font-size: 1.3rem;
  line-height: 1.4;
}

/* Responsive header */
@media (max-width: 800px){
  .hero{ grid-template-columns: 1fr; gap: 1rem; text-align: center; }
  .nav--left, .nav--right{ justify-self: center; text-align: center; }
  .hero .nav ul{ flex-direction: row; flex-wrap: wrap; justify-content: center; gap: .75rem 1rem; }
  .BitRotLogo img{ width: clamp(120px, 32vw, 220px); }
}

/* ================================
   Section typography
================================ */
section{ margin: 4rem 0; }
section h2{
  font-family: 'VT323', monospace;
  font-size: 2rem;
  text-transform: uppercase;
  margin: 0 0 1rem 0;
  padding: 0.2em 0;
}
section p{
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 1rem;
}

/* Quote block */
.intro-quote{
  font-family: 'Merriweather', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: #ddd;
  margin: 2rem auto;
  max-width: 700px;
  padding-left: 1rem;
  border-left: 4px solid #fff;
}
.intro-quote footer{ margin-top:.5rem; font-style:normal; font-size:.9rem; color:#bbb; }
.intro-quote cite{ font-style:normal; font-weight:bold; }

/* Links inside paragraphs */
section p a { color:#fff; text-decoration: underline; }
section p a:hover { opacity:.7; }

/* ================================
   Artists grid & cards
================================ */
.artists-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin: 2rem;
}
@media (min-width:700px){
  .artists-grid{ grid-template-columns: repeat(3, 1fr); }
}

.artist-card{
  border: 2px solid #fff;
  border-radius: 4px;
  padding: 1.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.artist-card h3{
  font-size:1.6rem;
  margin-bottom:1rem;
  text-transform:lowercase;
}
.artist-card p{ font-size: 1rem; line-height: 1.5; }
.artist-link{ margin-top:auto; padding-top:1rem; }
.artist-link a{ color:#fff; text-decoration:underline; }

/* ================================
   Schedule (scoped)
================================ */
#schedule b,
#schedule strong,
#schedule .title { font-weight: 700; }

#schedule time,
#schedule i,
#schedule em { font-style: italic; }

section#schedule ul.pc-schedule-list{
  list-style: none;
  margin: 1em 0 0;
  padding: 0;
}
section#schedule ul.pc-schedule-list > li{
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
  border-top: 1px solid var(--rule);
  padding: 0.5em 0;
  margin: 0;
}
section#schedule ul.pc-schedule-list > li:first-child{ border-top:none; }
section#schedule ul.pc-schedule-list em{ color: var(--muted); }

/* ================================
   Events grid & cards
================================ */
.events-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* always 2 across by default */
  gap: 2rem;
  margin: 2rem;
}
@media (max-width:600px){
  .events-grid{ grid-template-columns: 1fr; }
}

.event-card{
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1.25rem;
  border: 1px solid #fff;
  border-radius: 4px;
}
.event-label{
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  border: 1px solid #fff;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}
.event-card h3{
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
  text-transform: lowercase;
}
.event-time{
  font-style: italic;
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}
.event-media{ margin: 0.5rem 0 1rem; width: 100%; }
.event-media img{
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  object-fit: cover;
  aspect-ratio: 4 / 5;
}
.event-desc{ line-height: 1.5; color: #eee; margin: 0.25rem 0 0.5rem; }
.event-card .artist-link{ margin-top:auto; padding-top:1rem; }

/* ================================
   Photo grid (pc-gallery) + lightbox
================================ */
.pc-gallery{ --gap:6px; --maxw:1400px; margin:0 auto; max-width:var(--maxw); }

.pc-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
@media (max-width:1100px){ .pc-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width:800px){  .pc-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width:520px){  .pc-grid{ grid-template-columns: 1fr; } }

.pc-item{ margin:0; position:relative; cursor:zoom-in; }
.pc-item img{ width:100%; height:100%; aspect-ratio:1/1; object-fit:cover; display:block; }
.pc-item figcaption{ display:none; }

/* (lightbox placeholders retained) */
.pc-lightbox{ position:fixed; inset:0; display:none; background:rgba(0,0,0,.95); z-index:9999; align-items:center; justify-content:center; }
.pc-lightbox[aria-hidden="false"]{ display:flex; }
.pc-lightbox__inner{ max-width:95vw; max-height:92vh; width:auto; height:auto; position:relative; }
.pc-lightbox__img{ max-width:95vw; max-height:80vh; width:auto; height:auto; display:block; margin:0 auto; }
.pc-lightbox__caption{ margin-top:10px; font-size:14px; color:#cfcfcf; text-align:center; line-height:1.4; }
/* Flush-to-edges nav buttons for the lightbox */
/* === Lightbox buttons: slightly bigger square, smaller glyph === */
:root{
  --lb-btn-size: 56px;          /* square size of the button */
  --lb-font-size: 20px;         /* size of the ‹ › glyph */
  --lb-gap: 16px;               /* distance from screen edge */
  --lb-border: 1.5px;           /* border thickness */
  --lb-radius: 10px;            /* rounded corners */
}

.pc-lightbox__btn{
  position: fixed;              /* pin to viewport edges */
  top: 50%;
  transform: translateY(-50%);
  z-index: 10010;
  width: var(--lb-btn-size);
  height: var(--lb-btn-size);
  display: grid;
  place-items: center;
  border: var(--lb-border) solid rgba(255,255,255,.85);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: var(--lb-font-size);
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

/* stick to far edges */
.pc-lightbox__prev{ left: var(--lb-gap);  right: auto; }
.pc-lightbox__next{ right: var(--lb-gap); left:  auto; }

.pc-lightbox__btn:hover{ background: rgba(255,255,255,.08); }

/* ensure arrows render even if the button has no inner HTML */
/* .pc-lightbox__prev::before{ content: '‹'; }
.pc-lightbox__next::before{ content: '›'; } */
.pc-lightbox__btn > *{ pointer-events: none; } /* keep whole box clickable */

/* mobile: slightly smaller square and tighter edges */
@media (max-width: 640px){
  :root{
    --lb-btn-size: 48px;
    --lb-font-size: 18px;
    --lb-gap: 8px;
    --lb-border: 1px;
    --lb-radius: 8px;
  }
}
/* Close button — fixed top-right, square, shows × */
:root{
  --lb-close-size: 48px;   /* square size */
  --lb-close-font: 22px;   /* × size */
  --lb-close-gap: 12px;    /* distance from edges */
}

/* button box */
.pc-lightbox__close{
  position: fixed; 
  top: calc(var(--lb-close-gap) + env(safe-area-inset-top));
  right: calc(var(--lb-close-gap) + env(safe-area-inset-right));
  z-index: 10020;

  width: var(--lb-close-size);
  height: var(--lb-close-size);
  display: grid;
  place-items: center;

  border: var(--lb-border, 1.5px) solid rgba(255,255,255,.85);
  background: rgba(0,0,0,.35);
  color: #fff;

  cursor: pointer;
  user-select: none;
}

:root{
  --lb-close-size: 48px;   /* square size */
  --lb-close-font: 22px;   /* × size */
  --lb-close-gap: 12px;    /* distance from edges */
}

.pc-lightbox__close{
  position: fixed;
  top: calc(var(--lb-close-gap) + env(safe-area-inset-top));
  right: calc(var(--lb-close-gap) + env(safe-area-inset-right));
  z-index: 10020;

  width: var(--lb-close-size);
  height: var(--lb-close-size);
  display: grid;
  place-items: center;

  border: 1.5px solid rgba(255,255,255,.85);
  background: rgba(0,0,0,.35);
  color: #fff;

  cursor: pointer;
  user-select: none;

  /* hide any real text like "Close" */
  font-size: 0;
}

/* draw the × glyph */
.pc-lightbox__close::before{
  content: '×';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--lb-close-font);
  line-height: 1;
}

.pc-lightbox__close:hover{ background: rgba(255,255,255,.08); }

@media (max-width: 640px){
  :root{
    --lb-close-size: 42px;
    --lb-close-font: 20px;
    --lb-close-gap: 8px;
  }
}



/* ================================
   Media blocks, map & buttons
================================ */
.landscape-photo{ text-align:center; margin:1rem 0; }
.landscape-photo img{
  display:block;
  max-width:100%;
  height:auto;
  margin:0 auto;
  border-radius:4px;
  box-shadow:0 2px 8px rgba(0,0,0,.5);
}

.map-wrapper{ text-align:center; margin:2rem 0; }
.map-wrapper iframe{
  width:80%;
  height:400px;
  border:none;
  border-radius:4px;
  box-shadow:0 2px 8px rgba(0,0,0,0.5);
}

.btn{
  display: block;
  padding: 0.8rem 4rem;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  text-transform: uppercase;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 1rem;
  transition: background 0.3s, color 0.3s;
}
.btn--calendar:hover{ background:#fff; color:#000; }
.btn-wrapper{ text-align:center; margin-top:1rem; }

/* ================================
   Curatorial blurb
================================ */
.curatorial{
  margin: 2.5rem auto 3rem;
  max-width: 780px;
  padding: 0 var(--pad, 16px);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: left;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1rem;
}
.curatorial h3{
  margin: 0 0 .6rem 0;
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.curatorial h1{
  margin: .15rem 0;
  font-size: clamp(16px, 1.7vw, 18px);
  font-weight: 400;
  line-height: 1.5;
}

/* ================================
   Footer (aligns to right column)
================================ */
.site-footer{
  border-top: 1px solid var(--rule);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-left: calc(var(--left) + var(--g));
  padding: 20px var(--pad) 36px;
}
@media (max-width:640px){
  .site-footer{ margin-left:0; }
}

/* ================================
   Narrow-screen tweaks
================================ */
@media screen and (max-width: 480px){
  html, body{ overflow-x:hidden; }
  section{ margin: 1rem 1rem; }
  section h2{ font-size: 1.5rem; }
  section p{ font-size: 0.9rem; }
}
:root{
  --left-collapsed: 69px; /* width when collapsed */
  --logo-w: clamp(160px, 28vw, 320px);  /* same as your left-rail logo */

}

/* smooth anims (optional) */
.left{ transition: width .25s ease, padding .25s ease; }
.right{ transition: margin-left .25s ease; }

/* collapsed layout */
.sidebar-collapsed .left{
  width: var(--left-collapsed);
  padding: 14px 10px;
}
.sidebar-collapsed .right{
  margin-left: calc(var(--left-collapsed) + var(--g));
}

/* shrink logo, hide long text when collapsed */
.sidebar-collapsed .logoImg{ width: 42px; margin: 0 auto 8px; }
.sidebar-collapsed .index,
.sidebar-collapsed .kicker,
.sidebar-collapsed .intro{ display: none; }

/* hamburger “X” animation */

.hamburger span{ transition: transform .2s ease, opacity .2s ease, width .2s ease; }
.sidebar-collapsed .hamburger span:nth-child(1){ transform: translateY(7px) rotate(45deg) ; }
.sidebar-collapsed .hamburger span:nth-child(2){ opacity: 0; width: 0; }
.sidebar-collapsed .hamburger span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
/* Fixed brand that appears when sidebar is collapsed */
.brand-fixed{
  position: fixed;
  top: 16px;
  left: calc(14px + 40px + 10px);  /* hamburger left + button width + gap */
  z-index: 100001;
  display: none;                    /* hidden by default (expanded) */
}
.brand-fixed img{
  height: 28px;                     /* tweak to taste */
  width: auto;
  display: block;
}

/* When collapsed: show fixed brand, hide the small rail logo entirely */
.sidebar-collapsed .brand-fixed{ display: block; }
.sidebar-collapsed .logoImg{ display: none; }  /* instead of shrinking */

/* Optional: don’t show on small screens where the rail stacks anyway */
@media (max-width: 640px){
  .brand-fixed{ display: none !important; }
}

.hamburger{
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100000;        /* above the fixed sidebar */
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule, #fff);
  background: rgba(0,0,0,.25);
  display: grid;          /* ensures it renders */
  place-items: center;
  cursor: pointer;
}
.hamburger span{
  display:block;
  width: 18px;
  height: 2px;
  background: var(--ink, #fff);
  margin: 2px 0;
}


/* inline logo that appears when the sidebar is collapsed */
.right-header{
  display: none;         /* hidden by default */
  position: static;      /* NOT sticky/fixed */
  z-index: auto;
  margin: 0 0 var(--g) 0;
}
.brand-inline{ display:inline-block; }
.brand-inline img{
  width: var(--logo-w);  /* same size as the left-rail logo */
  height: auto;
  display: block;
}

/* collapse behavior */
.sidebar-collapsed .right-header{ display:block; }
.sidebar-collapsed .logoImg{ display:none; }  /* hide rail logo when collapsed */

.sidebar-collapsed .right-header{
  position: static !important;
  top: auto !important;
}


/* Don’t shrink—just hide the big logo inside the collapsed rail */
.sidebar-collapsed .logoImg{ display: none; }

/* On small screens the rail stacks, so we don't need this header */
@media (max-width: 640px){
  .right-header{ display: none !important; }
}

/* Hide the hamburger on mobile */
@media (max-width: 640px){
  #sidebarToggle.hamburger{
    display: none !important;
  }

  /* Guard rails so layout doesn’t jump if the collapsed class is present */
  :root.sidebar-collapsed .left{ width: auto !important; padding: var(--pad) !important; }
  :root.sidebar-collapsed .right{ margin-left: 0 !important; }
}
