/* things-i-draw.css — gallery + fullscreen viewer.
   Rides on cyber-goth.css for the page chrome (cursor, canvas,
   grid, vignette, status bar, ticker, corners, eyebrow, title,
   .filter-bar / .filter-btn). This file only adds the bits that
   are specific to the drawing gallery. */

/* ─── personal-page accents over the shared title ─── */
.draw-aside {
  font-family: 'Handwriting', cursive;
  font-size: 19px; letter-spacing: 0.02em;
  color: rgba(222,151,231,0.82); text-align: center;
  margin-bottom: 8px;
  animation: rise 1s cubic-bezier(0.16,1,0.3,1) 0.34s both;
}
.draw-aside .star { color: var(--cyan); }

/* ─── filter bar host ─── */
.draw-filter {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 14px;
  width: 100%; max-width: 1100px; margin: 0 auto 26px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  animation: rise .9s cubic-bezier(0.16,1,0.3,1) 0.42s both;
}
/* per-bucket active colour comes from --bk set on each button */
.draw-filter .filter-btn.is-active {
  color: #fff;
  border-color: var(--bk, var(--violet));
  background: color-mix(in srgb, var(--bk, var(--violet)) 20%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--bk, var(--violet)) 28%, transparent);
}

/* ─── masonry gallery (flex columns built in JS) ─── */
.draw-grid {
  width: 100%; max-width: 1100px;
  margin: 0 auto 40px;
  display: flex; align-items: flex-start; gap: 18px;
  animation: fade-in 1.4s ease both;
}
.draw-col {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; gap: 18px;
}
@media (max-width: 1100px) { .draw-grid { max-width: 880px; } }
@media (max-width: 760px)  { .draw-grid, .draw-col { gap: 14px; } }
@media (max-width: 460px)  { .draw-grid { max-width: 360px; } }

.draw-empty {
  font-family: 'Handwriting', cursive;
  font-size: 19px; color: rgba(216,207,255,0.45);
  text-align: center; padding: 70px 0;
}

/* ─── tile ─── */
.draw-tile {
  display: block; width: 100%;
  margin: 0;
  padding: 0;
  background: #0a0716;
  border: 1px solid rgba(138,111,232,0.22);   /* uniform hairline — no half-painted edges */
  color: inherit;
  cursor: none;
  position: relative;
  overflow: hidden;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: transform .28s cubic-bezier(0.16,1,0.3,1),
              border-color .2s ease, box-shadow .28s ease;
  animation: rise .7s cubic-bezier(0.16,1,0.3,1) both;
}

.draw-tile:hover,
.draw-tile:focus-visible {
  transform: translateY(-5px);
  border-color: var(--bk, var(--violet));
  box-shadow: 0 10px 30px rgba(0,0,8,0.6),
              0 0 22px color-mix(in srgb, var(--bk, var(--violet)) 26%, transparent);
  outline: none;
}

.draw-tile-img {
  display: block; position: relative; line-height: 0;
}
.draw-tile-img img {
  display: block; width: 100%; height: auto;
  transition: transform .35s cubic-bezier(0.16,1,0.3,1);
}
.draw-tile:hover .draw-tile-img img { transform: scale(1.035); }

/* zoom affordance */
.draw-tile-img::after {
  content: '⤢';
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-family: monospace; font-size: 14px;
  color: #fff; background: rgba(10,7,22,0.7);
  border: 1px solid var(--bk, var(--violet));
  opacity: 0; transform: scale(0.7);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.draw-tile:hover .draw-tile-img::after,
.draw-tile:focus-visible .draw-tile-img::after { opacity: 1; transform: scale(1); }

.draw-tile-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid rgba(138,111,232,0.16);
  background: rgba(8,4,20,0.5);
}
.draw-tag {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: #0a0716; background: var(--bk, var(--violet));
  padding: 3px 8px; white-space: nowrap; border-radius: 1px;
  font-weight: 600;
}
.draw-tile-title {
  font-family: 'Handwriting', cursive;
  font-size: 16px; letter-spacing: 0.01em;
  color: rgba(216,207,255,0.85);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── footer note ─── */
.draw-foot {
  font-family: 'Handwriting', cursive;
  font-size: 15px; letter-spacing: 0.01em;
  color: rgba(140,225,255,0.5); text-align: center;
  max-width: 520px; line-height: 1.6;
  animation: fade-in 3s ease both;
}

/* ═══ fullscreen lightbox ═══ */
body.lb-locked { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  display: none;
  align-items: center; justify-content: center;
  padding: 64px 72px;
  background: rgba(2,1,8,0.94);
  backdrop-filter: blur(6px);
  cursor: none;
}
.lightbox.is-open { display: flex; animation: lb-fade .22s ease both; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

/* faint blueprint wash so it matches the site */
.lightbox::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
}

.lb-stage {
  position: relative; z-index: 1;
  max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; align-items: center;
}
.lb-img {
  max-width: min(1100px, 86vw);
  max-height: 78vh;
  width: auto; height: auto;
  display: block;
  border: 1px solid color-mix(in srgb, var(--bk, var(--violet)) 60%, transparent);
  box-shadow: 0 24px 80px rgba(0,0,8,0.8),
              0 0 40px color-mix(in srgb, var(--bk, var(--violet)) 30%, transparent);
  background: #FBF6EC;
  opacity: 0; transform: scale(0.985);
  transition: opacity .28s ease, transform .28s cubic-bezier(0.16,1,0.3,1);
}
.lb-img.is-in { opacity: 1; transform: scale(1); }

/* caption */
.lb-caption {
  display: flex; align-items: center; gap: 14px;
  margin-top: 16px; flex-wrap: wrap; justify-content: center;
}
.lb-tag {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase;
  color: #0a0716; background: var(--bk, var(--violet));
  padding: 4px 10px; font-weight: 600; border-radius: 1px;
}
.lb-title {
  font-family: 'Handwriting', cursive;
  font-size: 22px; color: #ece5ff; letter-spacing: 0.01em;
}
.lb-note {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: lowercase;
  color: rgba(216,207,255,0.55);
}

/* controls */
.lb-btn {
  position: absolute; z-index: 2;
  background: rgba(10,7,22,0.66);
  border: 1px solid rgba(138,111,232,0.34);
  color: #ece5ff;
  font-family: monospace; line-height: 1;
  cursor: none;
  display: flex; align-items: center; justify-content: center;
  transition: background .16s ease, border-color .16s ease,
              color .16s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn:hover, .lb-btn:focus-visible {
  background: color-mix(in srgb, var(--bk, var(--violet)) 26%, rgba(10,7,22,0.7));
  border-color: var(--bk, var(--violet));
  color: #fff; outline: none;
}
.lb-btn:active { transform: scale(0.92); }

.lb-prev, .lb-next {
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; font-size: 26px;
}
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-prev:active { transform: translateY(-50%) scale(0.92); }
.lb-next:active { transform: translateY(-50%) scale(0.92); }

.lb-close {
  top: 18px; right: 18px;
  width: 42px; height: 42px; font-size: 20px;
}
.lb-counter {
  position: absolute; top: 24px; left: 24px; z-index: 2;
  font-family: monospace; font-size: 11px; letter-spacing: 0.34em;
  color: rgba(216,207,255,0.6);
}
.lb-hint {
  position: absolute; bottom: 20px; left: 0; right: 0; z-index: 2;
  text-align: center;
  font-family: monospace; font-size: 8.5px; letter-spacing: 0.3em;
  text-transform: uppercase; color: rgba(138,111,232,0.4);
  pointer-events: none;
}

@media (max-width: 720px) {
  .lightbox { padding: 56px 12px; }
  .lb-img { max-width: 94vw; max-height: 72vh; }
  .lb-prev, .lb-next { width: 44px; height: 44px; font-size: 21px; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
  .lb-title { font-size: 18px; }
}

/* ─── date note (shown near the pic when the filename carries a date) ─── */
.draw-date {
  position: absolute; left: 8px; bottom: 8px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 9px; letter-spacing: 0.14em; text-transform: lowercase;
  color: #ece5ff; background: rgba(10,7,22,0.72);
  border: 1px solid color-mix(in srgb, var(--bk, var(--violet)) 55%, transparent);
  padding: 2px 7px; border-radius: 1px;
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.lb-date {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.16em; text-transform: lowercase;
  color: #ece5ff;
  border: 1px solid color-mix(in srgb, var(--bk, var(--violet)) 55%, transparent);
  padding: 3px 9px; border-radius: 1px;
}

/* ─── per-drawer note under the filter bar ─── */
.draw-bucket-note {
  max-width: 560px; margin: -8px auto 26px;
  font-family: 'Handwriting', cursive;
  font-size: 16px; line-height: 1.5; letter-spacing: 0.01em;
  color: rgba(185,173,249,0.78); text-align: center;
  opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity .25s ease;
}
.draw-bucket-note.is-on { opacity: 1; max-height: 120px; }

/* ─── "download full-res" link in the viewer caption ─── */
.lb-download {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #ece5ff; text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--bk, var(--violet)) 55%, transparent);
  padding: 4px 10px; border-radius: 1px;
  cursor: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.lb-download:hover {
  background: color-mix(in srgb, var(--bk, var(--violet)) 26%, transparent);
  border-color: var(--bk, var(--violet));
  color: #fff;
}

/* ─── gallery intro (from description.md) ─── */
.draw-about {
  max-width: 580px; margin: 4px auto 20px;
  font-family: 'Handwriting', cursive;
  font-size: 19px; line-height: 1.55; letter-spacing: 0.01em;
  color: rgba(216,207,255,0.85); text-align: center;
  animation: fade-in 2s ease both;
}

.draw-tools {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin: 0 auto 24px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(180,170,220,0.7);
  animation: fade-in 2s ease both;
}
.draw-tools-label {
  color: rgba(150,140,190,0.5);
}
.draw-tools-sep {
  color: rgba(150,140,190,0.35);
}
.draw-tool {
  display: inline-flex; align-items: center; gap: 7px;
  color: rgba(200,190,240,0.85);
}
.draw-tool-icon {
  width: 22px; height: 22px; border-radius: 5px;
  vertical-align: middle;
}

/* ─── version switcher (1·2·3 pills) ─── */
.ver-pills {
  position: absolute; left: 0; right: 0; bottom: 8px;
  display: flex; gap: 6px; justify-content: center;
  z-index: 4;
}
.ver-pill {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Handwriting', cursive; font-size: 14px; line-height: 1;
  color: #fff;
  background: rgba(10,7,22,0.62);
  border: 1.5px solid var(--vc, var(--violet));
  cursor: none; padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,8,0.5);
  transition: transform .14s ease, background .16s ease, box-shadow .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.ver-pill:hover { transform: translateY(-1px) scale(1.08); }
.ver-pill.is-active {
  background: var(--vc, var(--violet));
  color: #0a0716;
  box-shadow: 0 0 10px var(--vc, var(--violet)), 0 1px 4px rgba(0,0,8,0.6);
}

/* in the fullscreen viewer the pills sit inline in the caption */
.lb-ver-pills { position: static; bottom: auto; gap: 8px; }
.lb-ver-pills .ver-pill { width: 26px; height: 26px; font-size: 16px; }

/* ─── filter buttons (base) — cyber-goth's live under .filter-bar, but our
   host is .draw-filter, so restate them here (fixes default-button look
   + cramped spacing) ─── */
.draw-filter .filter-group { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.draw-filter .filter-sep {
  color: rgba(138,111,232,0.32); font-size: 11px; padding: 0 2px; user-select: none;
}
.draw-filter .filter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(216,207,255,0.5);
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  padding: 5px 12px; cursor: none;
  border-radius: 1px;
  transition: color .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.draw-filter .filter-btn:hover {
  color: #ece5ff; border-color: rgba(138,111,232,0.32);
}
