:root {
  --bg: #040506;
  --panel: rgba(8, 11, 14, 0.78);
  --panel-solid: rgba(10, 14, 18, 0.92);
  --text: #dce7e2;
  --muted: #7d9287;
  --green: #7af4c1;
  --green-soft: rgba(122, 244, 193, 0.16);
  --cyan: #87b8d8;
  --line: rgba(122, 244, 193, 0.14);
  --line-strong: rgba(122, 244, 193, 0.34);
  --red: #ff6d61;
  --shadow: 0 24px 60px rgba(0,0,0,.56);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(122,244,193,.05), transparent 18%),
    radial-gradient(circle at 80% 20%, rgba(135,184,216,.06), transparent 18%),
    linear-gradient(180deg, #040506 0%, #05080a 40%, #040506 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
.mono,.brand,.status,.substatus,.nav-links,.panel-head,.micro,.footer,.tag,button,input { font-family: "IBM Plex Mono", "Courier New", monospace; }
.scanlines,.grain,.vignette,.hum { position: fixed; inset: 0; pointer-events: none; z-index: 99; }
.scanlines { opacity: .09; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 1px, transparent 2px, transparent 4px); }
.grain { opacity: .06; background-image: radial-gradient(circle at 12% 20%, rgba(255,255,255,.5) 0 .6px, transparent .9px), radial-gradient(circle at 70% 38%, rgba(255,255,255,.22) 0 .6px, transparent .9px), radial-gradient(circle at 48% 78%, rgba(255,255,255,.18) 0 .5px, transparent .8px); background-size: 180px 180px,140px 140px,120px 120px; animation: grainShift 10s linear infinite; }
.vignette { box-shadow: inset 0 0 240px rgba(0,0,0,.78); }
.hum { background: radial-gradient(circle at center, transparent 28%, rgba(0,0,0,.28) 100%); opacity: .72; }
@keyframes grainShift { from { transform: translateY(0); } to { transform: translateY(15px); } }
body::before { content: ""; position: fixed; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.018), transparent 22%, transparent 78%, rgba(255,255,255,.018)); pointer-events: none; z-index: 98; }
.shell { width: min(1420px, calc(100% - 24px)); margin: 0 auto; position: relative; z-index: 4; padding-bottom: 42px; }
.topbar { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; padding: 14px 4px 10px; border-bottom: 1px solid rgba(122,244,193,.08); }
.brand { color: var(--green); letter-spacing: .18em; font-size: clamp(1.05rem, 2vw, 1.45rem); }
.status { color: var(--green); font-size: .92rem; }
.substatus { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px 18px; border-bottom: 1px solid rgba(122,244,193,.08); margin-bottom: 12px; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line); color: var(--text); padding: 10px 12px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .84rem; }
.nav-links a { padding: 8px 10px; border: 1px solid transparent; transition: .18s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--green); border-color: var(--line); background: rgba(255,255,255,.02); }
.page-wrap { padding: 6px 4px 0; }
.page-title { margin: 18px 0 8px; font-size: clamp(2.2rem, 4.5vw, 4.6rem); letter-spacing: -.05em; }
.page-intro { margin: 0 0 16px; max-width: 74ch; color: var(--muted); line-height: 1.6; }
.footer { margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(122,244,193,.08); color: var(--muted); font-size: .82rem; }

/* art wall */
.visual-wall {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.visual-entry { grid-column: span 4; }
.visual-entry.large { grid-column: span 5; }
.visual-entry.tall { grid-column: span 3; }
.visual-entry.wide { grid-column: span 7; }
.visual-meta {
  color: var(--muted);
  font-size: .76rem;
  margin-bottom: 8px;
  letter-spacing: .04em;
}
.visual-frame {
  width: 100%;
  min-height: 280px;
  background: #050608 center center / cover no-repeat;
  border: 1px solid rgba(122,244,193,.10);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.visual-entry.tall .visual-frame { min-height: 420px; }
.visual-entry.wide .visual-frame { min-height: 300px; }
.visual-entry.large .visual-frame { min-height: 360px; }
.visual-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 20%);
  box-shadow: inset 0 0 90px rgba(0,0,0,.45);
  pointer-events: none;
}

/* hover distortion */
.clickable {
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, filter .2s ease;
}
.clickable:hover {
  transform: scale(1.012) skewX(-0.5deg);
  border-color: var(--line-strong);
  filter: contrast(1.08) saturate(1.08);
}
.clickable:hover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,0,110,.05) 35%, rgba(0,255,180,.06) 60%, transparent 100%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: distortSweep .22s linear 1;
}
@keyframes distortSweep {
  0% { transform: translateX(-18px); opacity: .15; }
  50% { transform: translateX(8px); opacity: .35; }
  100% { transform: translateX(0); opacity: .1; }
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0, rgba(255,255,255,.025) 1px, transparent 2px, transparent 4px);
  pointer-events: none;
}
.lightbox-img {
  max-width: 90%;
  max-height: 86%;
  border: 1px solid rgba(122,244,193,.18);
  box-shadow: 0 0 40px rgba(122,244,193,.08);
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 30px;
  color: var(--green);
  font-size: 24px;
  cursor: pointer;
}
.lightbox.glitch-open .lightbox-img {
  animation: glitchPop .38s steps(2, end) 1;
}
@keyframes glitchPop {
  0% { transform: scale(.96) translateX(-8px); filter: contrast(1.5) saturate(1.2); opacity: .4; }
  20% { transform: scale(1.01) translateX(5px); filter: hue-rotate(18deg); opacity: .9; }
  40% { transform: scale(.995) translateX(-4px); filter: hue-rotate(-14deg); }
  100% { transform: scale(1) translateX(0); filter: none; opacity: 1; }
}

/* art sources */
.art-hero { background-image: url('assets/hero-ambient.jpg') !important; }
.art-glitch { background-image: url('assets/glitch-art.png') !important; }
.art-city { background-image: url('assets/city-panel.jpeg') !important; }
.art-doodle1 { background-image: url('assets/hero-ambient.jpg') !important; }
.art-doodle2 { background-image: url('assets/doodle-2.jpg') !important; }
.sc1900 { background-image: url('assets/sc1900.png') !important; }
.art-control { background-image: url('assets/control-room.jpeg') !important; }
.art-hall { background-image: url('assets/scifi-hall.jpg') !important; }
.art-cover { background-image: url('assets/album-cover.png') !important; }

@media (max-width: 980px) {
  .visual-wall { grid-template-columns: repeat(6, 1fr); }
  .visual-entry, .visual-entry.large, .visual-entry.tall, .visual-entry.wide { grid-column: span 6; }
  .visual-frame, .visual-entry.large .visual-frame, .visual-entry.tall .visual-frame, .visual-entry.wide .visual-frame { min-height: 280px; }
}

@media (max-width:820px) {
  .topbar { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    border-top: 1px solid rgba(122,244,193,.08);
    padding-top: 10px;
  }
  .nav-links.open { display: flex; }
  .nav-wrap { flex-direction: column; align-items: stretch; }
}
