/* Pocket Rave — amber terminal / retro cyberpunk */
:root {
  --amber: #ffa020;
  --hot: #ffd98a;
  --dim: #8a4f0c;
  --deep: #3a1f03;
  --line: rgba(255, 160, 32, .28);
  --line-strong: rgba(255, 160, 32, .6);
  --panel: rgba(6, 3, 0, .80);
  --glow: 0 0 6px rgba(255, 140, 0, .45);
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --nav-h: 56px;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { background: #000; }
html, body { margin: 0; color: var(--amber); }
body { background: transparent; }   /* keep transparent: the ASCII canvas sits behind it */
body {
  font: 15px/1.7 var(--mono);
  letter-spacing: .01em;
  text-shadow: var(--glow);
  min-height: 100vh;
  overflow-x: hidden;
}
::selection { background: var(--amber); color: #000; text-shadow: none; }

/* ---------- background layers ---------- */
#bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -3; pointer-events: none; display: block; }
.crt {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.22) 2px 3px),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
  mix-blend-mode: multiply;
}

/* ---------- typography ---------- */
a { color: var(--hot); text-decoration: none; border-bottom: 1px dashed var(--dim); transition: background .15s, color .15s; }
a:hover, a:focus-visible { background: var(--amber); color: #000; text-shadow: none; border-bottom-color: var(--amber); outline: none; }
h1, h2, h3 { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin: 0; color: var(--hot); }
h1 { font-size: clamp(22px, 3.2vw, 34px); }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 1em; }
.muted { color: var(--dim); text-shadow: none; }
.hot { color: var(--hot); }
.cursor::after { content: "▍"; animation: blink 1s steps(1) infinite; margin-left: 2px; color: var(--hot); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--nav-h);
  display: flex; align-items: center; gap: 18px; padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(0,0,0,.92), rgba(0,0,0,.65));
  border-bottom: 1px solid var(--line);
  font-size: 13px; text-transform: uppercase; letter-spacing: .14em;
}
.nav .brand { border: 0; font-weight: 700; color: var(--hot); white-space: nowrap; }
.nav .brand:hover { background: none; color: var(--hot); text-shadow: var(--glow); }
.nav .links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav .links a { border: 0; padding: 4px 10px; color: var(--amber); }
.nav .links a:hover, .nav .links a:focus-visible { background: var(--amber); color: #000; text-shadow: none; }
.nav .links a::before { content: "["; color: var(--dim); margin-right: 4px; }
.nav .links a::after { content: "]"; color: var(--dim); margin-left: 4px; }
.nav .links a[aria-current="page"] { background: var(--amber); color: #000; text-shadow: none; }
.nav .links a[aria-current="page"]::before, .nav .links a[aria-current="page"]::after { color: #000; }
.nav .links a:hover::before, .nav .links a:hover::after, .nav .links a:focus-visible::before, .nav .links a:focus-visible::after { color: #000; }
.snd {
  font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
  background: none; color: var(--dim); border: 1px solid var(--line); padding: 4px 10px; text-shadow: none;
}
.snd[aria-pressed="true"] { color: #000; background: var(--amber); border-color: var(--amber); }
.snd:hover, .snd:focus-visible { border-color: var(--amber); color: var(--hot); outline: none; }
.snd[aria-pressed="true"]:hover { color: #000; }
.addr { color: var(--dim); text-shadow: none; font-size: 11px; white-space: nowrap; }

@media (max-width: 860px) {
  .addr { display: none; }
}
@media (max-width: 640px) {
  :root { --nav-h: 92px; }
  .nav { flex-wrap: wrap; align-content: center; gap: 6px 10px; padding-top: 8px; padding-bottom: 8px; }
  .nav .links { margin-left: 0; order: 3; width: 100%; justify-content: space-between; }
  .nav .links a { padding: 2px 4px; letter-spacing: .04em; font-size: 11px; }
  .nav .links a::before, .nav .links a::after { display: none; }
  .route > h1, .route > p.muted, .tagline { margin-left: 0; }
  .snd { margin-left: auto; }
}

/* ---------- layout ---------- */
main { padding: calc(var(--nav-h) + 32px) var(--gutter) 40px; max-width: 1240px; margin: 0 auto; }
.route { display: none; }
.route.active { display: block; animation: route-in .5s steps(6) both; }
@keyframes route-in {
  0% { opacity: 0; clip-path: inset(0 0 100% 0); }
  100% { opacity: 1; clip-path: inset(0 0 0 0); }
}

.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 32px); margin-bottom: 28px;
  backdrop-filter: blur(3px);
}
.panel::before, .panel::after {                       /* corner brackets */
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--amber);
}
.panel::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.panel > .bar {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: calc(-1 * clamp(18px, 3vw, 32px)) calc(-1 * clamp(18px, 3vw, 32px)) 22px;
  padding: 6px clamp(18px, 3vw, 32px); border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); text-shadow: none;
}
.panel > .bar b { color: var(--amber); font-weight: 400; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- home ---------- */
.ascii-logo {
  margin: 0 0 8px; font: 700 10px/1 var(--mono); color: var(--amber); white-space: pre; overflow: hidden;
  text-shadow: 0 0 8px rgba(255, 140, 0, .6); user-select: none;
}
.tagline { font-size: clamp(15px, 1.6vw, 18px); color: var(--hot); margin: 0 0 28px; }
.tagline::before { content: "> "; color: var(--dim); }
.bio p { font-size: 15.5px; }
.spec { width: 100%; border-collapse: collapse; font-size: 13px; margin: 18px 0 0; }
.spec th { text-align: left; font-weight: 400; color: var(--dim); text-shadow: none; padding: 6px 14px 6px 0; vertical-align: top; white-space: nowrap; text-transform: uppercase; letter-spacing: .12em; width: 1%; }
.spec td { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--line); padding: 1px 8px; font-size: 12px; }
.chips.solid li { background: rgba(255, 160, 32, .08); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
  display: inline-block; border: 1px solid var(--amber); padding: 8px 16px; color: var(--amber);
  text-transform: uppercase; letter-spacing: .14em; font-size: 13px;
}
.btn::before { content: "> "; }
.btn.primary { background: var(--amber); color: #000; text-shadow: none; }
.btn.primary:hover { background: var(--hot); }

/* ---------- photos ---------- */
.ph {
  position: relative; display: block; margin: 0; border: 1px solid var(--line); background: #000;
  overflow: hidden; cursor: zoom-in;
}
.ph img, .ph video { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter .5s; }
.ph img, .ph video {
  filter: grayscale(1) sepia(1) saturate(2.6) hue-rotate(-14deg) brightness(.78) contrast(1.2);
}
.ph::after {                                           /* scanlines on photos */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.28) 2px 3px);
  transition: opacity .5s;
}
.ph:hover img, .ph:hover video, .ph:focus-visible img { filter: none; }
.ph:hover::after { opacity: .35; }
.ph figcaption {
  position: absolute; left: 0; bottom: 0; z-index: 2; padding: 2px 8px; font-size: 10px; letter-spacing: .14em;
  background: rgba(0,0,0,.75); color: var(--amber); text-transform: uppercase;
}
.hero-photo { aspect-ratio: 3 / 4; }

/* ---------- live acts ---------- */
.tracks { display: grid; gap: 14px; }
.tracks iframe { width: 100%; border: 1px solid var(--line); background: #000; display: block; }
.strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.strip .ph { aspect-ratio: 4 / 5; }

/* ---------- projects ---------- */
.project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); }
.project:nth-of-type(even) .gallery { order: -1; }
@media (max-width: 860px) {
  .project { grid-template-columns: minmax(0, 1fr); }
  .project:nth-of-type(even) .gallery { order: 0; }
}
.project h2 { font-size: clamp(18px, 2vw, 22px); margin-bottom: 6px; }
.meta { font-size: 12px; color: var(--dim); text-shadow: none; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.meta span + span::before { content: " // "; }
.roles { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin: 14px 0 0; }
.roles::before { content: "ROLE: "; color: var(--dim); text-shadow: none; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.gallery .ph { aspect-ratio: 4 / 3; }
.gallery .ph:only-child, .gallery .ph.wide { grid-column: 1 / -1; aspect-ratio: 16 / 10; }

/* ---------- press kit ---------- */
.term-head { font-size: 13px; margin-bottom: 16px; }
.term-head .prompt { color: var(--dim); text-shadow: none; }
.files { width: 100%; border-collapse: collapse; font-size: 14px; }
.files th { text-align: left; font-weight: 400; font-size: 11px; color: var(--dim); text-shadow: none; letter-spacing: .14em; text-transform: uppercase; padding: 0 10px 8px 0; border-bottom: 1px solid var(--line); }
.files td { padding: 9px 10px 9px 0; border-bottom: 1px dashed var(--line); vertical-align: middle; }
.files td:first-child { color: var(--dim); text-shadow: none; width: 3ch; }
.files td.size, .files th.size { text-align: right; white-space: nowrap; }
.files td.act { text-align: right; width: 1%; white-space: nowrap; }
.files tr:hover td { background: rgba(255, 160, 32, .06); }
@media (max-width: 640px) { .files .type { display: none; } }
.press-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.press-grid .ph { aspect-ratio: 3 / 4; }
@media (max-width: 860px) { .press-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- footer ---------- */
footer {
  max-width: 1240px; margin: 0 auto; padding: 24px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-size: 13px;
}
footer .copy { margin-left: auto; color: var(--dim); text-shadow: none; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: none; place-items: center;
  background: rgba(0,0,0,.92); padding: 56px 16px 40px;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 80vh; border: 1px solid var(--amber); box-shadow: 0 0 40px rgba(255,140,0,.25); }
.lightbox .lb-bar { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.lightbox button { font: inherit; color: var(--amber); background: none; border: 1px solid var(--line); padding: 4px 12px; cursor: pointer; letter-spacing: inherit; }
.lightbox button:hover { background: var(--amber); color: #000; }
.lightbox .lb-nav { position: absolute; bottom: 14px; display: flex; gap: 10px; }

@media (prefers-reduced-motion: reduce) {
  .route.active { animation: none; }
  .cursor::after { animation: none; }
}

/* project card: title bar spans both columns and always stays on top */
.project > .bar { grid-column: 1 / -1; order: -2; margin-bottom: 0; }
/* page headings sit on a dark plate so they stay readable over the flythrough */
.route > h1, .route > p.muted { display: table; background: rgba(0, 0, 0, .78); padding: 2px 12px; margin-left: -12px; }
.tagline { display: table; background: rgba(0, 0, 0, .7); padding: 2px 12px; margin-left: -12px; }

/* SoundCloud widgets can't be styled inside: tint the whole iframe amber, true colors on hover */
.tracks iframe { filter: invert(1) grayscale(1) sepia(1) saturate(3) hue-rotate(-12deg) brightness(.8) contrast(1.1); transition: filter .4s; }
.tracks iframe:hover, .tracks iframe:focus-within { filter: none; }

/* home: "sounds like" decoder in the spec table */
.spec .who { color: var(--hot); white-space: nowrap; }
.spec .who .scr { color: var(--amber); opacity: .8; }
.spec .who::after { content: "▍"; margin-left: 2px; animation: blink 1s steps(1) infinite; }

/* live acts: latest video */
.video { position: relative; display: block; width: 100%; padding: 0; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: #000; cursor: pointer; overflow: hidden; font: inherit; color: inherit; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter .5s;
  filter: grayscale(1) sepia(1) saturate(2.6) hue-rotate(-14deg) brightness(.7) contrast(1.2); }
.video::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.3) 2px 3px); }
.video .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  padding: 10px 22px; background: rgba(0,0,0,.8); border: 1px solid var(--amber); color: var(--hot);
  font-size: clamp(14px, 1.6vw, 18px); letter-spacing: .16em; text-transform: uppercase; }
.video:hover img, .video:focus-visible img { filter: none; }
.video:hover .play, .video:focus-visible .play { background: var(--amber); color: #000; text-shadow: none; }
.video:focus-visible { outline: 1px solid var(--amber); outline-offset: 3px; }
.video.loaded { cursor: default; }
.video.loaded::after { display: none; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- project page: BLACKBOX (projects/blackbox/) ---------- */
.bb .crumbs { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 6px; }
.bb .feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(18px, 3vw, 36px); }
.bb .feature > .bar { grid-column: 1 / -1; order: -2; margin-bottom: 0; }
.bb .feature:nth-of-type(odd) .screens { order: -1; }
@media (max-width: 860px) {
  .bb .feature { grid-template-columns: minmax(0, 1fr); }
  .bb .feature:nth-of-type(odd) .screens { order: 0; }
}
.bb .feature h2 { margin-bottom: 12px; }
.bb .screens { display: grid; gap: 10px; align-content: start; }
.bb .screens.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* device screenshots: true colours (the palette is a feature), crisp pixels, caption under the screen */
.bb .ph.scr { aspect-ratio: auto; cursor: zoom-in; }
.bb .ph.scr img { height: auto; filter: none; image-rendering: pixelated; }
.bb .ph.scr::after { opacity: .25; }
.bb .ph.scr figcaption { position: static; display: block; border-top: 1px solid var(--line); }
.bb .spec { margin: 6px 0 16px; }
.bb .spec.midi th { color: var(--hot); font-size: 15px; letter-spacing: .04em; }
.bb .example { border-left: 2px solid var(--amber); padding-left: 12px; }
.bb .shotnote { font-size: 12px; margin: 18px 0 0; }
.bb code { color: var(--hot); background: rgba(255, 160, 32, .08); padding: 0 4px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.swatches span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 1px 8px 1px 4px; font-size: 12px; }
.swatches span::before { content: ""; width: 14px; height: 14px; background: var(--c); border: 1px solid rgba(255, 255, 255, .25); }
.bb h3 { margin: 18px 0 8px; }
.bb .howto { margin: 0 0 10px; padding-left: 22px; }
.bb .howto li { margin-bottom: 6px; }
.bb .howto li::marker { color: var(--dim); }
/* illustration of the Blackbox header bar during a quantized preset switch (mod palette: text #F2F2F2, red #FF7A45) */
.hdrdemo { margin: 0; border: 1px solid var(--line); background: #0C0D0F; padding: 14px; }
.hdrdemo ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hdrdemo .when { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); text-shadow: none; margin-bottom: 4px; }
.hdrdemo .hdr { display: flex; justify-content: space-between; gap: 12px; background: #000; padding: 4px 10px;
  font: 700 clamp(15px, 2vw, 20px)/1.2 var(--mono); letter-spacing: .18em; color: #F2F2F2; text-shadow: none; }
.hdrdemo .hdr b { font-weight: 700; white-space: nowrap; overflow: hidden; }
.hdrdemo .hdr i { font-style: normal; }
.hdrdemo .hdr.pend b { color: #FF7A45; }
.hdrdemo li + li .when::before { content: "↓ "; }
.hdrdemo figcaption { margin-top: 12px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); border-top: 1px solid var(--line); padding-top: 4px; }

/* live acts: the video fills the panel edge to edge (no frame inside the frame) */
.video-panel > .bar { margin-bottom: 0; }
.video-panel > .video { width: calc(100% + 2 * clamp(18px, 3vw, 32px)); max-width: none; margin: 0 calc(-1 * clamp(18px, 3vw, 32px)) calc(-1 * clamp(18px, 3vw, 32px)); border: 0; }
