/* ========================================================================
   SUBSTRATE//
   a g/acc neocities template
   ======================================================================== */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

/* ---------- tokens ---------- */
:root {
  --bg: #08060d;
  --bg-2: #0d0a17;
  --fg: #e8e6f0;
  --mut: #8a8497;
  --mag: #ff2d8a;
  --mag-d: #c91668;
  --cyn: #5cf2ff;
  --amber: #ffb347;
  --line: rgba(255, 255, 255, 0.08);
  --grid: rgba(255, 45, 138, 0.06);
}

/* alt theme: amber land-mode */
[data-theme="land"] {
  --bg: #060403;
  --bg-2: #0a0705;
  --fg: #ffd9a8;
  --mut: #8a7561;
  --mag: #ff7a1a;
  --mag-d: #c25500;
  --cyn: #ff3a00;
  --line: rgba(255, 122, 26, 0.12);
  --grid: rgba(255, 122, 26, 0.05);
}

/* ---------- base ---------- */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.95rem;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0;
}

/* CRT scanlines */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.025) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
}

/* vignette */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
}

::selection { background: var(--mag); color: var(--bg); }

a {
  color: var(--cyn);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color 0.15s, border-color 0.15s;
}
a:hover, a:focus-visible {
  color: var(--mag);
  border-bottom-color: var(--mag);
  outline: none;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-weight: 700;
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

hr {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 2rem 0;
}

/* ---------- marquee ---------- */
.marquee {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, rgba(255, 45, 138, 0.06), transparent);
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.marquee__track {
  display: inline-block;
  padding: 0.6em 0;
  animation: scroll 60s linear infinite;
  will-change: transform;
}
.marquee__track > span { margin: 0 1.6em; }
.marquee__track .dot { color: var(--mag); margin: 0 0.4em; }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- layout ---------- */
.site {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
}

/* ---------- header / hero ---------- */
header.hero {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
header.hero .bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 2.5rem;
}
header.hero .bar .right { display: flex; gap: 1rem; align-items: center; }
header.hero .bar .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--mag); margin-right: 0.5em;
  box-shadow: 0 0 8px var(--mag);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

header.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  background: linear-gradient(180deg, #ffffff 0%, var(--mag) 55%, var(--cyn) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(255, 45, 138, 0.15);
  position: relative;
  display: inline-block;
}
header.hero h1 .slash { color: var(--mag); -webkit-text-fill-color: var(--mag); }
header.hero p.tagline {
  color: var(--fg);
  font-size: 1.05rem;
  max-width: 64ch;
  margin-top: 1.2rem;
  min-height: 1.6em;
}
header.hero p.tagline::after {
  content: "_";
  color: var(--mag);
  animation: blink 1s steps(2) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* glitch on hover */
.glitch { position: relative; display: inline-block; }
.glitch:hover::before,
.glitch:hover::after {
  content: attr(data-text);
  position: absolute; top: 0; left: 0;
  width: 100%;
  background: var(--bg);
  -webkit-background-clip: text; background-clip: text;
}
.glitch:hover::before {
  color: var(--mag); -webkit-text-fill-color: var(--mag);
  transform: translate(-2px, 1px); clip-path: inset(0 0 55% 0);
  mix-blend-mode: screen;
}
.glitch:hover::after {
  color: var(--cyn); -webkit-text-fill-color: var(--cyn);
  transform: translate(2px, -1px); clip-path: inset(50% 0 0 0);
  mix-blend-mode: screen;
}

/* ---------- nav ---------- */
nav.primary {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  padding: 0.9rem 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  border-bottom: 1px solid var(--line);
}
nav.primary a {
  color: var(--mut);
  border: none;
}
nav.primary a:hover { color: var(--mag); }
nav.primary a[aria-current="page"] {
  color: var(--fg);
}
nav.primary a[aria-current="page"]::before {
  content: "[ "; color: var(--mag);
}
nav.primary a[aria-current="page"]::after {
  content: " ]"; color: var(--mag);
}
nav.primary .spacer { flex: 1; }
nav.primary .theme {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--mut);
}
nav.primary .theme:hover { color: var(--cyn); }

/* ---------- main grid ---------- */
main.grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  padding: 2.5rem 0 4rem;
}
@media (max-width: 820px) {
  main.grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- post list ---------- */
.feed-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line);
}
.feed-head h2 {
  font-size: 0.8rem; color: var(--mut);
  text-transform: uppercase; letter-spacing: 0.25em;
  font-family: 'IBM Plex Mono', monospace;
}
.feed-head .count { font-size: 0.7rem; color: var(--mut); letter-spacing: 0.2em; }

article.post {
  border-bottom: 1px solid var(--line);
  padding: 1.6rem 0;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.4rem;
  align-items: start;
  transition: background 0.2s;
}
article.post:hover { background: linear-gradient(90deg, rgba(255, 45, 138, 0.04), transparent 80%); }
article.post:last-child { border-bottom: none; }

article.post .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  color: var(--mag);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
article.post .num::before { content: "//"; color: var(--mut); font-size: 0.8em; margin-right: 2px; }

article.post h3 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}
article.post h3 a { color: var(--fg); border: none; }
article.post h3 a:hover { color: var(--mag); }

article.post .meta {
  font-size: 0.7rem;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.7rem;
  display: flex; gap: 1rem; flex-wrap: wrap;
}
article.post .meta .status[data-s="PUBLISHED"] { color: var(--cyn); }
article.post .meta .status[data-s="DRAFT"]     { color: var(--mag); }
article.post .meta .status[data-s="FORTHCOMING"] { color: var(--amber); opacity: 0.8; }

article.post .excerpt {
  color: var(--fg);
  margin-bottom: 0.8rem;
}

article.post .tags {
  font-size: 0.68rem;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}
article.post .tags span { margin-right: 0.8em; }
article.post .tags span::before { content: "#"; color: var(--mag); }

@media (max-width: 600px) {
  article.post { grid-template-columns: 1fr; gap: 0.5rem; }
  article.post .num { font-size: 1.4rem; }
}

/* empty state for the feed */
#js-feed .empty {
  padding: 3rem 1.5rem;
  border: 1px dashed var(--line);
  text-align: center;
  color: var(--mut);
  background: linear-gradient(180deg, transparent, rgba(255,45,138,0.03));
}
#js-feed .empty p { margin-bottom: 0.6rem; }
#js-feed .empty .hint { font-size: 0.78rem; opacity: 0.8; }
#js-feed .empty code {
  background: rgba(255, 45, 138, 0.1);
  padding: 0.05em 0.4em;
  color: var(--cyn);
  font-size: 0.92em;
}

/* ---------- sidebar ---------- */
aside.sidebar { font-size: 0.85rem; }
aside.sidebar section {
  margin-bottom: 1.8rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
aside.sidebar section:last-child { border-bottom: none; }
aside.sidebar h3 {
  color: var(--mut);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  margin-bottom: 0.7rem;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
}
aside.sidebar h3::before { content: "$ "; color: var(--mag); }
aside.sidebar p { font-size: 0.85rem; color: var(--fg); }
aside.sidebar ul { list-style: none; }
aside.sidebar li { padding: 0.18rem 0; font-size: 0.82rem; }
aside.sidebar li::before { content: "// "; color: var(--mag); }
aside.sidebar .now {
  color: var(--mut);
  font-size: 0.75rem;
}
aside.sidebar .now strong { color: var(--cyn); font-weight: 400; }
aside.sidebar .counter {
  font-size: 1.6rem;
  color: var(--cyn);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: inline-block;
  padding: 0.1rem 0.4rem;
  background: rgba(92, 242, 255, 0.06);
  border: 1px solid rgba(92, 242, 255, 0.2);
}

/* webring controls */
.webring {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
}
.webring a {
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.webring a:hover {
  color: var(--mag);
  border-color: var(--mag);
  background: rgba(255, 45, 138, 0.08);
}

/* ---------- footer ---------- */
footer.foot {
  border-top: 1px solid var(--line);
  padding: 2rem 0 4rem;
  font-size: 0.72rem;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
}
footer.foot .ascii {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  line-height: 1.15;
  color: var(--mag);
  opacity: 0.55;
  white-space: pre;
  text-transform: none;
  letter-spacing: 0;
}
footer.foot .right { text-align: right; }
footer.foot .right .stamp { color: var(--cyn); }

/* ---------- single post ---------- */
article.entry {
  max-width: 70ch;
  margin: 0 auto;
  padding: 3rem 0;
}
article.entry .preface {
  font-size: 0.72rem;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
article.entry .preface .num { color: var(--mag); }
article.entry .preface .status[data-s="PUBLISHED"] { color: var(--cyn); }
article.entry .preface .status[data-s="DRAFT"]     { color: var(--mag); }
article.entry h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0.4rem 0 1rem;
  line-height: 1.05;
}
article.entry .lede {
  color: var(--mut);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  font-style: italic;
  border-left: 2px solid var(--mag);
  padding-left: 1rem;
}
article.entry .body { font-size: 1rem; line-height: 1.75; }
article.entry .body h2 {
  margin: 2.6rem 0 1rem;
  color: var(--mag);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
}
article.entry .body h2::before { content: "§ "; color: var(--mut); }
article.entry .body h3 {
  margin: 2rem 0 0.8rem;
  font-size: 1.15rem;
  color: var(--cyn);
}
article.entry .body p { margin-bottom: 1.2rem; }
article.entry .body blockquote {
  border-left: 2px solid var(--mag);
  padding: 0.4rem 1rem;
  color: var(--mut);
  font-style: italic;
  margin: 1.4rem 0;
  background: rgba(255, 45, 138, 0.04);
}
article.entry .body code {
  background: rgba(255, 45, 138, 0.1);
  padding: 0.1em 0.4em;
  font-size: 0.92em;
  color: var(--cyn);
}
article.entry .body strong { color: var(--cyn); font-weight: 600; }
article.entry .body em { color: var(--fg); }
article.entry .body hr { margin: 2rem 0; }
article.entry .footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- table of transmissions (archive) ---------- */
table.archive {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 2rem 0;
}
table.archive th, table.archive td {
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
table.archive th {
  font-size: 0.68rem;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 500;
}
table.archive tr:hover td { background: rgba(255, 45, 138, 0.04); }
table.archive .num { color: var(--mag); font-family: 'Space Grotesk', sans-serif; font-weight: 700; width: 60px; }
table.archive .date { color: var(--mut); font-size: 0.78rem; width: 110px; white-space: nowrap; }
table.archive .title a { color: var(--fg); border: none; }
table.archive .title a:hover { color: var(--mag); }
table.archive .status { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.22em; width: 110px; }
table.archive .status[data-s="PUBLISHED"]   { color: var(--cyn); }
table.archive .status[data-s="DRAFT"]        { color: var(--mag); }
table.archive .status[data-s="FORTHCOMING"] { color: var(--amber); opacity: 0.8; }

/* ---------- about page bits ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding: 2.5rem 0 4rem;
}
.about-grid .card {
  border: 1px solid var(--line);
  padding: 1rem;
  font-size: 0.78rem;
  color: var(--mut);
}
.about-grid .card .label {
  color: var(--mag); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.25em;
  margin-bottom: 0.4rem; display: block;
}
.about-grid .card .value { color: var(--fg); font-size: 0.95rem; }
.about-grid .card + .card { margin-top: 0.8rem; }
.about-grid .body { max-width: 65ch; line-height: 1.75; }
.about-grid .body h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1.5rem; }
.about-grid .body h2 { color: var(--mag); margin: 2rem 0 0.8rem; font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; }
.about-grid .body h2::before { content: "§ "; color: var(--mut); }
.about-grid .body p { margin-bottom: 1.1rem; }
.about-grid .body ul { padding-left: 1.4rem; margin-bottom: 1rem; }
.about-grid .body ul li { padding: 0.15rem 0; }
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  header.hero p.tagline::after { animation: none; }
  header.hero .bar .dot { animation: none; }
  html { scroll-behavior: auto; }
}
