@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --blood: #ff006e;
  --toxic: #39ff14;
  --void: #0a0014;
  --scream: #ffbe0b;
  --bruise: #8338ec;
  --text: #f0e6ff;
  --muted: #9a88c4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--void);
  color: var(--text);
  font-family: 'Comic Neue', 'Comic Sans MS', cursive;
  line-height: 1.55;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 18% 20%, rgba(131, 56, 236, 0.18) 0%, transparent 48%),
    radial-gradient(ellipse at 82% 70%, rgba(255, 0, 110, 0.12) 0%, transparent 42%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--toxic);
  text-underline-offset: 0.15em;
}

a:hover { color: var(--scream); }

.site-wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
}

/* Marquee ticker - used by index.html, 404.html, 500.html. Colors are
   overridable per page via --marquee-bg/--marquee-fg/--marquee-border. */
.marquee-wrap {
  position: relative;
  z-index: 1;
  background: var(--marquee-bg, var(--blood));
  color: var(--marquee-fg, var(--scream));
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 0;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 3px solid var(--marquee-border, var(--toxic));
}

.marquee-wrap span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 28s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
}

/* Modifier: dark panel chrome, edge-to-edge (nav lives outside .site-wrap). */
.topnav--panel {
  padding: 0.6rem 1.25rem;
  background: rgba(10, 0, 20, 0.92);
  border-bottom: 2px solid var(--nav-accent, var(--bruise));
  margin-bottom: 0;
}

/* Modifier: stick to viewport top + blur behind (homepage's loud entry bar). */
.topnav--sticky {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
}

.topnav .brand {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(110deg, var(--blood), var(--scream), var(--toxic), var(--bruise));
  background-size: 240% 240%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 0, 110, 0.45));
  animation: brand-scream 5s ease infinite;
}

.topnav .brand:hover {
  filter: drop-shadow(0 0 10px rgba(57, 255, 20, 0.55));
}

@keyframes brand-scream {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.topnav .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.topnav .links a {
  color: var(--muted);
  text-decoration: none;
}

.topnav .links a:hover,
.topnav .links a[aria-current="page"] {
  color: var(--toxic);
}

.topnav .links a[aria-current="page"] {
  border-bottom: 1px dashed var(--toxic);
}

.kicker {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blood);
  border: 1px dashed var(--blood);
  padding: 0.2rem 0.45rem;
  margin-bottom: 0.85rem;
  opacity: 0.9;
}

h1 {
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
  background: linear-gradient(110deg, var(--blood), var(--scream), var(--toxic), var(--bruise));
  background-size: 240% 240%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-drift 10s ease infinite;
}

@keyframes gradient-drift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.lede {
  font-family: 'Space Mono', monospace;
  font-size: 0.92rem;
  color: var(--toxic);
  margin-bottom: 2rem;
}

.card {
  border: 2px solid var(--bruise);
  background: rgba(20, 0, 40, 0.72);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.25rem;
  border-radius: 6px 18px 6px 18px;
  box-shadow: 6px 6px 0 rgba(255, 0, 110, 0.35);
}

.card:nth-child(even) {
  border-radius: 18px 6px 18px 6px;
  box-shadow: -6px 6px 0 rgba(57, 255, 20, 0.22);
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-list a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.post-list a.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(131, 56, 236, 0.4);
}

.post-list h2 {
  font-size: 1.35rem;
  color: var(--scream);
  margin-bottom: 0.4rem;
  text-decoration: underline wavy var(--blood);
  text-underline-offset: 0.2em;
}

.meta {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.blurb {
  font-size: 1.05rem;
  color: #e8dcff;
}

article.card {
  padding: 1.6rem 1.5rem 2rem;
}

article h1 {
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  margin-bottom: 0.4rem;
}

.prose {
  font-size: 1.12rem;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin-bottom: 1rem;
}

.prose h2 {
  font-size: 1.35rem;
  color: var(--scream);
  margin: 1.75rem 0 0.7rem;
  text-decoration: underline wavy var(--blood);
  text-underline-offset: 0.18em;
}

.prose h3 {
  font-size: 1.1rem;
  color: var(--toxic);
  font-family: 'Space Mono', monospace;
  margin: 1.4rem 0 0.55rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li { margin-bottom: 0.35rem; }

.prose blockquote {
  border-left: 4px solid var(--toxic);
  padding-left: 1rem;
  color: #c9b8ff;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
}

.prose code {
  font-family: 'Space Mono', monospace;
  font-size: 0.88em;
  background: rgba(131, 56, 236, 0.25);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.prose pre {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--bruise);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.25rem 0 0.4rem;
  border: 2px solid var(--bruise);
  border-radius: 4px;
  box-shadow: 5px 5px 0 rgba(255, 0, 110, 0.28);
}

.prose .figure-caption,
.prose em.caption {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 1.4rem;
  font-style: normal;
}

.prose hr {
  border: none;
  border-top: 1px dashed var(--bruise);
  margin: 1.75rem 0;
}

.footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--bruise);
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: #6a5a8a;
  text-align: center;
}

.footer a { color: var(--bruise); }

.error {
  color: var(--scream);
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
}

.empty {
  color: var(--muted);
  font-family: 'Space Mono', monospace;
}

/* Reference tag + action-link row - shared by 404/500 (and anywhere else that
   wants a compact "status/ref" line or a row of dashed-underline links). */
.ref {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--bruise);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
}

.actions a {
  color: var(--toxic);
  text-decoration: none;
  border-bottom: 1px dashed var(--toxic);
}

.actions a:hover {
  color: var(--scream);
  border-bottom-color: var(--scream);
}

/* Spectrum mark + tools banner */
.spectrum-sig {
  display: block;
  width: min(320px, 100%);
  height: auto;
  margin: 0 0 0.65rem;
  border-radius: 6px;
}

.spectrum-sig--hero {
  width: min(420px, 100%);
  margin: 0.35rem 0 1rem;
}

.spectrum-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  padding: 0.85rem 0.1rem;
  margin: 0 0 1.75rem;
  transition: padding-left 0.15s;
}

.spectrum-banner::before,
.spectrum-banner::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 100vw;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--blood), var(--scream), var(--toxic), var(--bruise), var(--blood));
  background-size: 200% 100%;
  animation: gradient-drift 6s linear infinite;
}

.spectrum-banner::before { top: 0; }
.spectrum-banner::after { bottom: 0; }

.spectrum-banner:hover {
  color: inherit;
  padding-left: 0.3rem;
}

.spectrum-banner .spectrum-sig {
  flex: none;
  width: 108px;
  margin: 0;
}

.spectrum-banner-copy {
  min-width: 0;
}

.spectrum-banner-headline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.spectrum-banner .spectrum-banner-title {
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
  background: linear-gradient(110deg, var(--blood), var(--scream), var(--toxic), var(--bruise));
  background-size: 240% 240%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-drift 10s ease infinite;
}

.spectrum-banner .spectrum-banner-blurb {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.15rem 0 0;
  max-width: 44rem;
}

.spectrum-banner .spectrum-banner-cta {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--toxic);
}

.spectrum-banner:hover .spectrum-banner-cta {
  color: var(--scream);
}

/* tool cards: launch primary + external shells */
.tool-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tool-card {
  position: relative;
  border: 2px solid var(--bruise);
  background: rgba(20, 0, 40, 0.72);
  border-radius: 6px 18px 6px 18px;
  box-shadow: 6px 6px 0 rgba(255, 0, 110, 0.35);
  overflow: hidden;
}

.tool-card:nth-child(even) {
  border-radius: 18px 6px 18px 6px;
  box-shadow: -6px 6px 0 rgba(57, 255, 20, 0.22);
}

.tool-card-main {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.35rem 1.4rem 1rem;
  transition: background 0.15s;
}

.tool-card-main:hover {
  background: rgba(131, 56, 236, 0.12);
  color: inherit;
}

.tool-card-main h2 {
  font-size: 1.35rem;
  color: var(--scream);
  margin-bottom: 0.4rem;
  text-decoration: underline wavy var(--blood);
  text-underline-offset: 0.2em;
}

.tool-card-main:hover h2 {
  color: var(--toxic);
}

.tool-card-links {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  padding: 0.65rem 1.15rem 0.9rem;
  border-top: 1px dashed rgba(131, 56, 236, 0.45);
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
}

.tool-card-links a {
  text-decoration: none;
  border: 1px solid var(--bruise);
  border-radius: 4px;
  padding: 0.28rem 0.55rem;
  color: var(--muted);
  background: rgba(10, 0, 20, 0.45);
}

.tool-card-links a:hover {
  color: var(--toxic);
  border-color: var(--toxic);
}

.tool-card-links a.tool-launch {
  color: var(--void);
  background: var(--toxic);
  border-color: var(--toxic);
  font-weight: 700;
}

.tool-card-links a.tool-launch:hover {
  color: var(--void);
  background: var(--scream);
  border-color: var(--scream);
}

.tool-card-links a.is-soon {
  opacity: 0.55;
  cursor: default;
  border-style: dashed;
}

.tool-card-links a.is-soon:hover {
  color: var(--muted);
  border-color: var(--bruise);
}

.tool-card-links .license-tag {
  display: inline-flex;
  align-items: center;
  border: 1px dashed var(--bruise);
  border-radius: 4px;
  padding: 0.28rem 0.55rem;
  color: var(--muted);
  background: transparent;
  opacity: 0.75;
}

.tool-card a.tool-card-spectrum-stamp {
  float: right;
  display: block;
  margin: 0.85rem 0.85rem 0.9rem 1.1rem;
  transform: rotate(4deg);
  transition: transform 0.15s, filter 0.15s;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.35));
}

.tool-card a.tool-card-spectrum-stamp:hover {
  transform: rotate(0deg) scale(1.04);
}

.tool-card a.tool-card-spectrum-stamp img {
  display: block;
  height: 76px;
  width: auto;
}

.spectrum-cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.1rem 0 1.4rem;
}

.spectrum-cta-links a {
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid var(--toxic);
  border-radius: 4px;
  padding: 0.5rem 0.9rem;
  color: var(--void);
  background: var(--toxic);
  transition: background 0.15s, border-color 0.15s;
}

.spectrum-cta-links a:hover {
  background: var(--scream);
  border-color: var(--scream);
}

.nonsense-lane {
  margin-top: 0.75rem;
}

.nonsense-lane-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.nonsense-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nonsense-card {
  border: 1px dashed var(--bruise);
  border-radius: 6px;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.nonsense-card:hover {
  opacity: 1;
}

.nonsense-card a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0.85rem;
  text-decoration: none;
  color: inherit;
}

.nonsense-card a:hover .nonsense-title {
  color: var(--toxic);
}

.nonsense-title {
  font-weight: 700;
  font-size: 0.92rem;
}

.nonsense-desc {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
}

.spectrum-dial {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0.25rem 0 1.25rem;
}
