:root {
  --bg: #07090d;
  --panel: #10141a;
  --panel-2: #171c24;
  --ink: #edf3ea;
  --muted: #8d9a96;
  --acid: #c7ff3f;
  --cyan: #5ce1e6;
  --orange: #ff784f;
  --line: rgba(237, 243, 234, .18);
  --gap: clamp(8px, 1vw, 15px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: transparent;
  font-family: "Space Grotesk", sans-serif;
  min-height: 100vh;
}
button, a { font: inherit; }
button { color: inherit; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px clamp(16px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(7,9,13,.82);
  backdrop-filter: blur(16px);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: .12em;
}
.brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { color: var(--acid); font-weight: 600; }
.header-status { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 12px var(--acid); }

main { padding: 0 clamp(12px, 2.5vw, 40px) 60px; }
.hero {
  min-height: min(45vh, 680px);
  display: grid;
  align-content: center;
  padding: clamp(70px, 10vw, 150px) 0 clamp(60px, 8vw, 120px);
  position: relative;
}
.hero::after {
  content: "SCROLL / INDEX BELOW";
  position: absolute;
  right: 0;
  bottom: 25px;
  color: var(--muted);
  font: 10px "IBM Plex Mono", monospace;
  letter-spacing: .14em;
  writing-mode: vertical-rl;
}
.eyebrow, .card-type, .card-action, .overlay-kicker, .filter, footer {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow { color: var(--acid); font-size: 11px; }
h1 { 
  margin: 12px 0 20px; 
  font-size: var(--quote-size, clamp(50px, 9vw, 138px));
  line-height: .83; 
  letter-spacing: -.075em; 
  max-width: 1200px; 
}
.quotes-main,
.quotes-sub{
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
h1 .quotes-sub { color: transparent; -webkit-text-stroke: 1px rgba(237,243,234,.55); }
.intro { color: var(--muted); max-width: 480px; font-size: clamp(16px, 2vw, 21px); }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 35px; margin-bottom: 35px; }
.filter {
  border: 1px solid var(--line);
  background: transparent;
  padding: 9px 13px;
  cursor: pointer;
  font-size: 10px;
}
.filter:hover, .filter.is-active { border-color: var(--acid); color: var(--bg); background: var(--acid); }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 42px;
  grid-auto-flow: dense;
  gap: var(--gap);
}
.archive-card {
  --accent: var(--acid);
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  min-height: 190px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  isolation: isolate;
  transition: transform .25s ease, border-color .25s ease;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.archive-card:nth-child(3n+2) { clip-path: polygon(0 12px, 12px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%); }
.archive-card:nth-child(5n) { clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 22px)); }
.archive-card:hover, .archive-card:focus-visible { transform: translateY(-4px); border-color: var(--accent); outline: none; z-index: 4; }
.archive-card[data-type="audio"] { --accent: var(--acid); }
.archive-card[data-type="project"] { --accent: var(--cyan); }
.archive-card[data-type="game"] { --accent: var(--orange); }
.archive-card.is-hidden { display: none; }
.card-image-wrap { position: absolute; inset: 0; }
.card-image { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08) brightness(.68); transition: filter .35s ease, transform .55s ease; }
.archive-card:hover .card-image { filter: grayscale(.15) contrast(1.05) brightness(.8); transform: scale(1.035); }
.card-image-wrap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(7,9,13,.25) 50%, rgba(7,9,13,.95)); }
.scanline { position: absolute; inset: 0; opacity: .12; background: repeating-linear-gradient(0deg, transparent 0 3px, #fff 4px); mix-blend-mode: overlay; }
.card-index { position: absolute; top: 13px; right: 16px; z-index: 2; font: 10px "IBM Plex Mono", monospace; color: var(--accent); }
.card-content { position: absolute; inset: auto 0 0; z-index: 2; padding: clamp(12px, 6cqi, 28px); }
.card-type { color: var(--accent); font-size: clamp(8px, 2.4cqi, 9px); }
.card-title { margin: 5px 0 4px; font-size: clamp(17px, 8cqi, 38px); line-height: .95; letter-spacing: -.04em; overflow-wrap: anywhere; }
.card-subtitle { margin: 0; color: #c2cac5; font-size: clamp(10px, 3.2cqi, 13px); }
.card-action { display: inline-block; margin-top: 18px; font-size: 9px; opacity: 0; transform: translateY(5px); transition: .2s ease; }
.archive-card:hover .card-action { opacity: 1; transform: none; color: var(--accent); }

footer { display: flex; justify-content: space-between; padding: 28px clamp(16px, 3vw, 48px); border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

.overlay {
  width: min(1100px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  color: var(--ink);
  background: rgba(8,11,15,.97);
  border: 1px solid rgba(237,243,234,.3);
  box-shadow: 0 30px 100px rgba(0,0,0,.75);
}
.overlay::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.overlay-shell { min-height: min(720px, calc(100vh - 26px)); display: grid; grid-template-rows: auto 1fr; }
.overlay-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding: 20px clamp(18px, 3vw, 35px); border-bottom: 1px solid var(--line); }
.overlay-header h2 { margin: 5px 0 0; font-size: clamp(25px, 4vw, 48px); line-height: .95; }
.overlay-kicker { color: var(--acid); font-size: 9px; }
.close-button { border: 0; background: transparent; cursor: pointer; font: 10px "IBM Plex Mono", monospace; color: var(--muted); padding: 7px; }
.close-button:hover { color: var(--acid); }
.overlay-body { overflow: auto; padding: clamp(18px, 3vw, 35px); }

.project-view { display: grid; grid-template-columns: minmax(260px, .8fr) 1.2fr; gap: clamp(25px, 5vw, 70px); align-items: center; }
.project-view img { width: 100%; max-height: 520px; object-fit: cover; filter: saturate(.85) contrast(1.08); border: 1px solid var(--line); }
.meta-line { color: var(--cyan); font: 11px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .1em; }
.project-copy p { color: var(--muted); font-size: clamp(16px, 2vw, 21px); line-height: 1.6; }
.external-link { display: inline-block; margin-top: 22px; padding: 13px 18px; color: var(--bg); background: var(--cyan); text-decoration: none; font: 11px "IBM Plex Mono", monospace; }
.external-link.is-disabled { pointer-events: none; opacity: .35; }

.audio-view { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: clamp(24px, 5vw, 70px); }
.album-art { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); }
.audio-meta { margin: 15px 0; font: 11px "IBM Plex Mono", monospace; color: var(--acid); }
.now-playing { padding: 18px; background: var(--panel-2); border-left: 3px solid var(--acid); }
.now-label { color: var(--muted); font: 9px "IBM Plex Mono", monospace; }
.now-title { margin-top: 6px; font-size: 20px; }
audio { width: 100%; margin-top: 16px; }
.track-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.track-button { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 14px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.track-button:hover, .track-button.is-playing { color: var(--acid); background: rgba(199,255,63,.05); }
.track-number, .track-play { font: 10px "IBM Plex Mono", monospace; color: var(--muted); }

.game-view { height: min(690px, calc(100vh - 170px)); display: grid; grid-template-rows: 1fr auto; gap: 12px; }
.game-frame { width: 100%; height: 100%; border: 1px solid var(--line); background: #000; }
.game-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; color: var(--muted); font: 10px "IBM Plex Mono", monospace; }
.game-toolbar a { color: var(--orange); }

.error-state { grid-column: 1 / -1; padding: 50px 20px; border: 1px solid var(--orange); color: var(--orange); font-family: "IBM Plex Mono", monospace; }

@media (max-width: 900px) {
  .archive-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 38px; }
  .project-view, .audio-view { grid-template-columns: 1fr; }
  .album-art { max-width: 360px; }
}
@media (max-width: 560px) {
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 52px; }
  .site-header { padding-inline: 12px;justify-content: center; }
  .brand span { font-size: 10px; }
  .header-status { display: none; }
  .hero::after { display: none; }
  .overlay { width: 100vw; max-height: 100vh; height: 100vh; border: 0; }
  .overlay-shell { min-height: 100vh; }
  .game-view { height: calc(100vh - 160px); }
}

/* =========================================================
   LYNCHIAN PARALLAX BACKGROUND
   ========================================================= */

:root {
  --parallax-x: 0;
  --parallax-y: 0;
  --scroll-depth: 0;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* Keep all actual page content above the background. */
.site-header,
main,
footer,
.overlay,
.noise {
  position: relative;
}

.site-header,
main,
footer {
  z-index: 2;
}

.lynch-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #030305;
  perspective: 900px;
}

.lynch-bg > * {
  position: absolute;
  inset: -8%;
}

.lynch-bg__red,
.lynch-bg__light,
.lynch-bg__fog,
.lynch-bg__figure { will-change: transform, opacity; }

/* Deep black-blue void. */
.lynch-bg__void {
  inset: 0;
  background:
          radial-gradient(
                  ellipse at 50% 42%,
                  rgba(35, 37, 42, .48) 0%,
                  rgba(9, 10, 13, .82) 36%,
                  #020204 76%
          ),
          linear-gradient(
                  180deg,
                  #08090d 0%,
                  #030305 55%,
                  #000 100%
          );
  transform:
          translate3d(
                  calc(var(--parallax-x) * -3px),
                  calc(var(--parallax-y) * -2px),
                  -60px
          )
          scale(1.1);
}

/* Slow, ominous red presence behind everything. */
.lynch-bg__red {
  inset: -30%;
  opacity: .42;
  background:
          radial-gradient(
                  circle at 50% 48%,
                  rgba(125, 0, 5, .42),
                  rgba(66, 0, 4, .18) 25%,
                  transparent 58%
          );
  filter: blur(35px);
  animation: lynch-red-pulse 9s ease-in-out infinite;
  transform:
          translate3d(
                  calc(var(--parallax-x) * -8px),
                  calc(var(--parallax-y) * -5px),
                  -20px
          )
          scale(1.18);
}

/* Abstract red velvet curtains. */
.lynch-bg__curtain {
  top: -10%;
  bottom: -10%;
  width: 35%;
  opacity: .38;
  filter: blur(.3px) saturate(.75);
  background:
          repeating-linear-gradient(
                  90deg,
                  rgba(92, 0, 7, .9) 0 7%,
                  rgba(26, 0, 3, .95) 9% 14%,
                  rgba(111, 0, 8, .72) 17% 23%
          );
  box-shadow:
          inset 0 0 100px rgba(0, 0, 0, .9),
          0 0 90px rgba(80, 0, 5, .15);
}

.lynch-bg__curtain--left {
  left: -10%;
  right: auto;
  clip-path: polygon(
          0 0,
          100% 0,
          82% 13%,
          96% 27%,
          78% 43%,
          92% 58%,
          72% 76%,
          84% 100%,
          0 100%
  );
  transform:
          translate3d(
                  calc(var(--parallax-x) * -13px),
                  calc(var(--parallax-y) * -4px),
                  15px
          )
          scale(1.08);
}

.lynch-bg__curtain--right {
  right: -10%;
  left: auto;
  clip-path: polygon(
          0 0,
          100% 0,
          100% 100%,
          14% 100%,
          28% 78%,
          8% 60%,
          24% 43%,
          7% 25%,
          18% 11%
  );
  transform:
          translate3d(
                  calc(var(--parallax-x) * 13px),
                  calc(var(--parallax-y) * -4px),
                  15px
          )
          scale(1.08);
}

/* Unstable overhead cone of light. */
.lynch-bg__light {
  inset: -20% -10%;
  opacity: .28;
  background:
          conic-gradient(
                  from 166deg at 50% -5%,
                  transparent 0deg,
                  rgba(230, 235, 220, .1) 13deg,
                  rgba(230, 235, 220, .32) 18deg,
                  rgba(230, 235, 220, .06) 27deg,
                  transparent 38deg
          );
  filter: blur(8px);
  mix-blend-mode: screen;
  transform:
          translate3d(
                  calc(var(--parallax-x) * 7px),
                  calc(var(--parallax-y) * 5px),
                  20px
          )
          rotate(calc(var(--parallax-x) * .15deg));
  animation: lynch-light-flicker 7s steps(1, end) infinite;
}

/* Suggestion of a room, corridor or stage. */
.lynch-bg__room {
  top: 33%;
  left: 22%;
  right: 22%;
  bottom: -15%;
  opacity: .19;
  border: 1px solid rgba(230, 235, 220, .15);
  background:
          linear-gradient(
                  90deg,
                  transparent 0 48%,
                  rgba(230, 235, 220, .08) 49% 51%,
                  transparent 52%
          ),
          repeating-linear-gradient(
                  90deg,
                  rgba(255, 255, 255, .025) 0 1px,
                  transparent 1px 14%
          ),
          linear-gradient(
                  180deg,
                  rgba(26, 29, 32, .2),
                  rgba(0, 0, 0, .85)
          );
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
  transform:
          translate3d(
                  calc(var(--parallax-x) * 5px),
                  calc(var(--parallax-y) * 3px + var(--scroll-depth) * -8px),
                  -5px
          )
          scale(1.06);
}

/* Floor stripes with an unsettling stage-like perspective. */
.lynch-bg__room::after {
  content: "";
  position: absolute;
  left: -35%;
  right: -35%;
  top: 52%;
  bottom: -30%;
  opacity: .3;
  background:
          repeating-linear-gradient(
                  90deg,
                  rgba(230, 235, 220, .12) 0 5%,
                  rgba(0, 0, 0, .12) 5% 11%
          );
  transform: perspective(330px) rotateX(63deg);
  transform-origin: center top;
  filter: blur(.5px);
}

/* Floating fog. */
.lynch-bg__fog {
  inset: auto -30% -15%;
  height: 55%;
  opacity: .18;
  background:
          radial-gradient(
                  ellipse at center,
                  rgba(205, 215, 210, .28),
                  transparent 65%
          );
  filter: blur(35px);
  mix-blend-mode: screen;
}

.lynch-bg__fog--one {
  animation: lynch-fog-one 18s ease-in-out infinite alternate;
  transform:
          translate3d(
                  calc(var(--parallax-x) * -12px),
                  calc(var(--parallax-y) * 8px),
                  25px
          );
}

.lynch-bg__fog--two {
  bottom: 6%;
  opacity: .1;
  animation: lynch-fog-two 24s ease-in-out infinite alternate;
  transform:
          translate3d(
                  calc(var(--parallax-x) * 16px),
                  calc(var(--parallax-y) * 10px),
                  30px
          );
}

/* Barely visible distant person/silhouette. */
.lynch-bg__figure {
  inset: auto auto 5% 50%;
  width: clamp(38px, 4vw, 68px);
  height: clamp(140px, 23vh, 280px);
  opacity: .11;
  filter: blur(2px);
  background:
          radial-gradient(
                  circle at 50% 10%,
                  #000 0 12%,
                  transparent 13%
          ),
          linear-gradient(
                  90deg,
                  transparent 13%,
                  #000 28% 72%,
                  transparent 87%
          );
  transform:
          translate3d(
                  calc(-50% + var(--parallax-x) * 20px),
                  calc(var(--parallax-y) * 9px + var(--scroll-depth) * -12px),
                  55px
          );
  animation: lynch-figure 13s ease-in-out infinite;
}

.lynch-bg__vignette {
  inset: 0;
  background:
          radial-gradient(
                  ellipse at center,
                  transparent 22%,
                  rgba(0, 0, 0, .22) 55%,
                  rgba(0, 0, 0, .88) 100%
          ),
          linear-gradient(
                  180deg,
                  rgba(0, 0, 0, .15),
                  transparent 25%,
                  rgba(0, 0, 0, .48)
          );
  transform: none;
}

@keyframes lynch-red-pulse {
  0%,
  100% {
    opacity: .27;
    transform:
            translate3d(
                    calc(var(--parallax-x) * -8px),
                    calc(var(--parallax-y) * -5px),
                    -20px
            )
            scale(1.12);
  }

  50% {
    opacity: .48;
    transform:
            translate3d(
                    calc(var(--parallax-x) * -8px),
                    calc(var(--parallax-y) * -5px),
                    -20px
            )
            scale(1.24);
  }
}

@keyframes lynch-light-flicker {
  0%,
  17%,
  19%,
  48%,
  51%,
  83%,
  100% {
    opacity: .27;
  }

  18%,
  49%,
  84% {
    opacity: .09;
  }

  50% {
    opacity: .38;
  }
}

@keyframes lynch-fog-one {
  from {
    margin-left: -8%;
    filter: blur(38px);
  }

  to {
    margin-left: 10%;
    filter: blur(27px);
  }
}

@keyframes lynch-fog-two {
  from {
    margin-left: 12%;
    filter: blur(28px);
  }

  to {
    margin-left: -14%;
    filter: blur(44px);
  }
}

@keyframes lynch-figure {
  0%,
  100% {
    opacity: .055;
    margin-left: -1%;
  }

  45% {
    opacity: .12;
    margin-left: 0;
  }

  47% {
    opacity: .025;
  }

  50% {
    opacity: .1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lynch-bg * {
    animation: none !important;
  }
}

@media (max-width: 560px) {
  .lynch-bg__curtain {
    width: 52%;
    opacity: .25;
  }

  .lynch-bg__room {
    left: 5%;
    right: 5%;
  }

  .lynch-bg__figure {
    opacity: .06;
  }
}
