/*
 * BZ theme: the look of blazexyz.com, shared by every project linked from it.
 * The same file is copied into each project. Each project maps its own tokens onto these
 * and applies --bz-glass-* to its panels, so this file only holds what is common.
 *
 * Fonts (load in <head>): DM Mono 300/400/500, Montserrat 300, Allura.
 */
:root {
  color-scheme: dark;

  /* Palette, from the black hole on the main site. */
  --bz-bg:       #0a070d;
  --bz-ink:      #f3ecf8;
  --bz-accent:   #db94ed;
  --bz-violet:   #ee15ee;
  --bz-cyan:     #7fd8ff;   /* the glass's dispersion edge; a second colour where a page needs one */
  --bz-glow-rgb: 219, 148, 237;

  /* One text scale. */
  --bz-text-hi:  rgba(255,255,255,0.90);
  --bz-text-mid: rgba(255,255,255,0.64);
  --bz-text-lo:  rgba(255,255,255,0.38);
  --bz-line:     rgba(255,255,255,0.12);
  --bz-line-2:   rgba(255,255,255,0.20);

  /* Solid surfaces, for places glass can't go (inputs, canvas fills, text on a coloured chip). */
  --bz-surface:   #120c18;
  --bz-surface-2: #1a1222;

  --bz-radius:    18px;
  --bz-radius-sm: 10px;
  --bz-ease:      cubic-bezier(0.22, 1, 0.36, 1);

  --bz-mono:   "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --bz-sans:   "Montserrat", system-ui, sans-serif;
  --bz-script: "Allura", cursive;

  /*
   * Glass, after the main site's .glass islands: specular streaks on top, a violet facet tint,
   * then a dark base. Background layers instead of pseudo-elements, so any panel can take it.
   */
  --bz-glass-bg:
    linear-gradient(115deg,
      transparent 30%, rgba(255,255,255,0.035) 39%, rgba(255,255,255,0.06) 42%, rgba(255,255,255,0.035) 45%,
      transparent 54%, transparent 70%, rgba(var(--bz-glow-rgb), 0.045) 76%, transparent 82%),
    linear-gradient(155deg,
      rgba(var(--bz-glow-rgb), 0.11) 0%, rgba(255,255,255,0.03) 38%,
      rgba(110, 60, 190, 0.05) 70%, rgba(255,255,255,0.02) 100%),
    rgba(18, 11, 28, 0.62);
  --bz-glass-border: rgba(255,255,255,0.14);
  --bz-glass-shadow:
    0 1px 0 rgba(255,255,255,0.22) inset,
    1px 0 0 rgba(255, 90, 210, 0.14) inset,
    -1px 0 0 rgba(90, 210, 255, 0.14) inset,
    0 0 26px rgba(var(--bz-glow-rgb), 0.06) inset,
    0 18px 50px rgba(0,0,0,0.42),
    0 2px 10px rgba(0,0,0,0.22);
  --bz-glass-blur: blur(14px) saturate(1.5) brightness(1.04);

  /* Selected / primary controls: the main site's active tab. */
  --bz-active-bg: rgba(var(--bz-glow-rgb), 0.16);
  --bz-active-shadow:
    0 1px 0 rgba(255,255,255,0.24) inset,
    0 0 0 1px rgba(var(--bz-glow-rgb), 0.38) inset,
    0 2px 6px rgba(0,0,0,0.30);
}

/*
 * The page background: the main site's dark violet with a faint dot field and two nebula glows.
 * Set on <html> with a fixed attachment, so it stays put while the page scrolls. Project bodies are transparent.
 */
html {
  background:
    radial-gradient(1100px 700px at 88% -12%, rgba(var(--bz-glow-rgb), 0.13), transparent 60%),
    radial-gradient(900px 600px at -8% 112%, rgba(120, 50, 200, 0.14), transparent 60%),
    radial-gradient(circle, rgba(255,255,255,0.065) 1px, transparent 1.5px) 0 0 / 22px 22px,
    var(--bz-bg);
  background-attachment: fixed;
  min-height: 100%;
}

::selection { background: rgba(var(--bz-glow-rgb), 0.35); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 3px; }

/* ─── HUD corners: the main site's camera frame. Decoration only. ─── */
.bz-hud { position: fixed; inset: 0; z-index: 5000; pointer-events: none; }
.bz-hud i {
  position: absolute; width: 16px; height: 16px;
  border: 0 solid rgba(var(--bz-glow-rgb), 0.5);
}
.bz-hud i:nth-child(1) { top: 6px;    left: 6px;  border-width: 2px 0 0 2px; }
.bz-hud i:nth-child(2) { top: 6px;    right: 6px; border-width: 2px 2px 0 0; }
.bz-hud i:nth-child(3) { bottom: 6px; left: 6px;  border-width: 0 0 2px 2px; }
.bz-hud i:nth-child(4) { bottom: 6px; right: 6px; border-width: 0 2px 2px 0; }

/* ─── Link back to the main site ─── */
.bz-home {
  display: inline-flex; align-items: center; gap: 6px;
  font: 400 0.62rem/1 var(--bz-mono);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bz-text-lo); text-decoration: none; white-space: nowrap;
  padding: 6px 0;
  transition: color 0.2s;
}
.bz-home::before { content: "←"; letter-spacing: 0; transition: transform 0.25s var(--bz-ease); }
.bz-home:hover, .bz-home:focus-visible { color: rgb(var(--bz-glow-rgb)); }
.bz-home:hover::before { transform: translateX(-3px); }

/* ─── Small uppercase label with a fading rule, like the bio islands' sub-headings ─── */
.bz-label {
  display: flex; align-items: center; gap: 8px;
  font: 400 0.62rem/1.3 var(--bz-mono);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(var(--bz-glow-rgb), 0.9);
}
.bz-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(var(--bz-glow-rgb), 0.35), transparent); }

/* ─── Script keyword: a light sans sentence with one word in the hairline script ─── */
.bz-sans { font-family: var(--bz-sans); font-weight: 300; letter-spacing: 0.02em; }
.bz-script {
  font-family: var(--bz-script); font-weight: 400;
  font-size: 1.55em; line-height: 0.8; letter-spacing: 0.01em;
  color: var(--bz-text-hi); padding: 0 0.04em;
  text-transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .bz-home::before { transition: none; }
}
