@font-face {
  font-family: "Space Mono";
  src: url("../assets/fonts/SpaceMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("../assets/fonts/SpaceMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #0a0a0a;
  --panel: #141313;
  --line-soft: #2c2a2a;
  --text: #ece7e1;
  --muted: #8d8783;
  --red: #ef3340;
  --accent: var(--red);
  --cut: 22px;
  --mono: "Space Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

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

::selection { background: var(--red); color: var(--ink); }

a { color: inherit; }

img { max-width: 100%; display: block; }

.accent-red { --accent: #ef3340; }
.accent-green { --accent: #b6d936; }
.accent-purple { --accent: #b45cff; }
.accent-yellow { --accent: #ffc21a; }
.accent-gold { --accent: #c9a24a; }
.accent-cyan { --accent: #19c6d4; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  border-bottom: 1.5px solid var(--red);
  background: rgba(10, 10, 10, .92);
  backdrop-filter: blur(6px);
}

.site-header .mark {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem 1.2rem;
  border-right: 1.5px solid var(--red);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.site-header .mark .star {
  color: var(--red);
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
  font-size: 1.9rem;
  line-height: 1;
  transition: transform .4s ease;
}

.site-header .mark:hover .star { transform: rotate(72deg); }

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.6rem;
  padding: .7rem 1.4rem;
  flex: 1;
}

.site-header nav a {
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
}

.site-header nav a::before { content: ">> "; opacity: .55; }
.site-header nav a:hover, .site-header nav a.active { color: var(--text); }
.site-header nav a.active::before { opacity: 1; color: var(--red); }

.site-header .clock {
  display: flex;
  align-items: center;
  padding: 0 1.2rem;
  border-left: 1.5px solid var(--red);
  color: var(--muted);
  font-size: .8rem;
  white-space: nowrap;
}

/* ---------- layout ---------- */

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.crumbs {
  color: var(--muted);
  font-size: .8rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.crumbs a { color: var(--red); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
  letter-spacing: .01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 3rem 0 1.2rem; }
h2::before { content: ">> "; color: var(--accent); }

.lead { max-width: 720px; color: var(--muted); font-size: 1.02rem; }

.serial {
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .12em;
}

/* ---------- hero poster frame ---------- */

.hero {
  display: grid;
  grid-template-columns: 120px 1fr;
  border: 1.5px solid var(--red);
  min-height: 74vh;
}

.hero .spine {
  border-right: 1.5px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero .spine span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-weight: 700;
  color: var(--red);
  letter-spacing: .05em;
  white-space: nowrap;
}

.hero .body { display: grid; grid-template-rows: auto auto auto 1fr; }

.hero .row {
  border-bottom: 1.5px solid var(--red);
  padding: 1.4rem 1.8rem;
  color: var(--red);
  font-weight: 700;
}

.hero .row.title { font-size: clamp(1.8rem, 4.4vw, 3.4rem); line-height: 1.1; text-transform: uppercase; }
.hero .row.title small { display: block; font-size: .45em; color: var(--text); margin-top: .5rem; }
.hero .row.prompts { font-size: clamp(1.1rem, 2.4vw, 1.7rem); line-height: 1.5; }
.hero .row.info { font-weight: 400; color: var(--text); font-size: 1rem; }

#typed::after { content: "_"; animation: blink 1s steps(1) infinite; }

@keyframes blink { 50% { opacity: 0; } }

.hero .block {
  position: relative;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem 1.8rem;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 72% 100%, 0 100%);
}

.hero .glyphs {
  display: flex;
  align-items: flex-end;
  gap: .4rem;
  color: var(--ink);
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
  line-height: 1;
}

.hero .glyphs .big {
  font-size: clamp(7rem, 16vw, 13rem);
  animation: spin 40s linear infinite;
}

.hero .glyphs .small {
  font-size: clamp(3rem, 6vw, 5rem);
  animation: spin 25s linear infinite reverse;
}

.hero .block .cta {
  align-self: flex-start;
  background: var(--ink);
  color: var(--red);
  padding: .8rem 1.2rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--ink);
}

.hero .block .cta:hover { background: transparent; color: var(--ink); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- ticker tape ---------- */

.ticker {
  margin: 3rem -1.5rem;
  overflow: hidden;
  background: var(--red);
  color: var(--ink);
  font-weight: 700;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(-1.2deg);
}

.ticker div {
  display: inline-block;
  white-space: nowrap;
  padding: .55rem 0;
  animation: tape 30s linear infinite;
}

@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- cut-corner cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.4rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  text-decoration: none;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut));
  transition: transform .25s ease, background .25s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--line-soft);
  clip-path: inherit;
  pointer-events: none;
  transition: border-color .25s;
}

.card:hover { transform: translateY(-5px); background: #1b1a1a; }
.card:hover::after { border-color: var(--accent); }

.card .thumb {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0f0f0f;
  border-bottom: 1.5px solid var(--line-soft);
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .5s ease;
  filter: grayscale(.25);
}

.card:hover .thumb img { transform: scale(1.04); filter: none; }

.card .thumb.contain img { object-fit: contain; padding: 1.2rem; }

.card .meta { padding: 1rem 1.1rem 1.2rem; }
.card .meta h3 { margin: .2rem 0 .4rem; font-size: 1rem; color: var(--accent); }
.card .meta p { margin: 0; color: var(--muted); font-size: .85rem; }

.tag {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  font-size: .7rem;
  font-weight: 700;
  padding: .05rem .5rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.barcode {
  height: 26px;
  margin-top: .9rem;
  opacity: .55;
  background: repeating-linear-gradient(90deg,
    var(--text) 0 2px, transparent 2px 4px,
    var(--text) 4px 5px, transparent 5px 8px,
    var(--text) 8px 11px, transparent 11px 12px,
    var(--text) 12px 13px, transparent 13px 17px);
}

/* ---------- filters ---------- */

.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 2rem; }

.filters button {
  font: inherit;
  font-weight: 700;
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
  padding: .4rem .9rem;
  cursor: pointer;
  text-transform: uppercase;
}

.filters button.active, .filters button:hover { background: var(--red); color: var(--ink); }

.card.hidden { display: none; }

/* ---------- project pages ---------- */

.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1.5px solid var(--accent);
  margin: 2rem 0;
}

.spec div { padding: .9rem 1.1rem; border-right: 1.5px solid var(--accent); }
.spec div:last-child { border-right: none; }
.spec dt { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.spec dd { margin: .2rem 0 0; font-weight: 700; color: var(--accent); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.4rem;
}

.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); }

.gallery.stickers {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  align-items: center;
}

.gallery figure {
  margin: 0;
  background: var(--panel);
  border: 1.5px solid var(--line-soft);
  cursor: zoom-in;
  transition: border-color .25s;
}

.gallery figure:hover { border-color: var(--accent); }
.gallery figure img { width: 100%; }
.gallery.stickers figure img { padding: 1.4rem; aspect-ratio: 1; object-fit: contain; }

.gallery figcaption {
  padding: .6rem .9rem;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1.5px solid var(--line-soft);
}

.gallery figcaption b { color: var(--accent); }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 1.5px solid var(--line-soft);
}

.pager a { color: var(--accent); text-decoration: none; font-weight: 700; }
.pager a:hover { color: var(--text); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }

.boxed { border: 1.5px solid var(--accent); padding: 1.4rem 1.6rem; }
.boxed ul { margin: 0; padding: 0; list-style: none; }
.boxed li::before { content: ">> "; color: var(--accent); font-weight: 700; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  background: rgba(5, 5, 5, .97);
}

.lightbox.open { display: flex; }
.lightbox img { max-height: 82vh; max-width: 92vw; object-fit: contain; border: 1.5px solid var(--red); }
.lightbox p { margin: 0; color: var(--muted); font-size: .85rem; text-align: center; }

.lightbox button {
  position: absolute;
  font: inherit;
  font-weight: 700;
  background: var(--red);
  color: var(--ink);
  border: none;
  padding: .5rem .9rem;
  cursor: pointer;
}

.lightbox .close { top: 1.2rem; right: 1.2rem; }
.lightbox .prev { left: 1.2rem; top: 50%; }
.lightbox .next { right: 1.2rem; top: 50%; }

/* ---------- footer label ---------- */

.site-footer {
  border-top: 1.5px solid var(--red);
  display: grid;
  grid-template-columns: 1fr auto auto;
  font-size: .78rem;
  color: var(--muted);
}

.site-footer > div { padding: 1.1rem 1.4rem; }
.site-footer > div + div { border-left: 1.5px solid var(--red); }
.site-footer .host { color: var(--red); font-weight: 700; text-transform: uppercase; }
.site-footer .id { writing-mode: vertical-rl; background: var(--red); color: var(--ink); font-weight: 700; padding: .8rem .5rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 64px 1fr; }
  .hero .block { flex-direction: column; align-items: flex-start; }
  .site-header .clock { display: none; }
  .two-col, .gallery.wide { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer > div + div { border-left: none; border-top: 1.5px solid var(--red); }
  .site-footer .id { writing-mode: horizontal-tb; }
}
