/* ayushexel — design system v3 (audited)
   Identity: bookish serif + mono utility, cobalt accent, phase-plane motif.
   Width system: listing/overview pages use .page-wide (66rem);
   long-form articles use .page (50rem reading measure). Every page is one or the other.
   NOTE: bump the ?v= query on <link>/<script>/fetch URLs whenever this file changes
   (GitHub Pages caches assets for 10 min; versioned URLs prevent HTML/CSS skew). */

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;
  --ground: #f4f6f9;
  --card: #ffffff;
  --ink: #1a222e;
  --muted: #4d5766;
  --faint: #66707f;
  --line: #dde2ea;
  --accent: #2b50d8;
  --accent-ink: #24399b;
  --accent-soft: #e9edfb;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #f4f6f9; --card: #ffffff; --ink: #1a222e; --muted: #4d5766;
  --faint: #66707f; --line: #dde2ea; --accent: #2b50d8; --accent-ink: #24399b;
  --accent-soft: #e9edfb;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { background: var(--ground); margin: 0; padding: 0; }
body {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.62;
  font-size: 1.0425rem;
  -webkit-font-smoothing: antialiased;
}
.page { max-width: 50rem; margin: 0 auto; padding: 1.6rem 1.4rem 4.5rem; }
.page-wide { max-width: 66rem; margin: 0 auto; padding: 1.6rem 1.5rem 3.5rem; }
/* short pages: footer stays at the bottom of the viewport */
.page, .page-wide { display: flex; flex-direction: column; min-height: 100vh; width: 100%; }
.page > footer.site, .page-wide > footer.site { margin-top: auto; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px;
}
code { font-family: var(--mono); font-size: 0.88em; }

/* skip link: WCAG 2.4.1. The same 7-item nav opens every page, so keyboard and screen
   reader users need a way past it. Hidden until focused. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; color: var(--accent-ink);
  background: var(--card); border: 1px solid var(--accent); border-radius: 0 0 6px 0;
  padding: 0.6rem 1rem;
}
.skip:focus { left: 0; }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; gap: 0.4rem 0.7rem; flex-wrap: wrap;
  padding-bottom: 1.1rem; margin-bottom: 2.4rem; border-bottom: 1px solid var(--line);
}
.nav a.item {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  padding: 0.3rem 0.15rem; margin-left: 0.7rem; white-space: nowrap;
}
/* no wordmark in the nav: the name is already the page content, and every page has a
   Home link, so the first item sits flush with the content edge instead */
.nav a.item:first-of-type { margin-left: 0; }
/* the corner mark (see diffusionMark in site.js). Purely decorative, so it is
   aria-hidden and not a link; the 28x28 buffer is scaled up without smoothing. */
.nav .mark { flex: none; display: inline-flex; margin-right: 0.95rem; }
.nav .mark canvas {
  display: block; width: 28px; height: 28px;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
.nav .mark + a.item { margin-left: 0; }
.nav a.item:hover { color: var(--accent-ink); }
.nav a.item[aria-current="page"] {
  color: var(--accent-ink); border-bottom: 2px solid var(--accent); padding-bottom: 0.18rem;
}

/* ---------- typography ---------- */
h1 {
  font-size: clamp(2.1rem, 5vw, 3rem); line-height: 1.05; margin: 0.1rem 0 0.7rem;
  font-weight: 700; letter-spacing: -0.02em; text-wrap: balance;
}
h2 { font-size: 1.45rem; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 1rem; text-wrap: balance; }
section { margin-bottom: 2.6rem; }
.eyebrow {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent-ink);
}
.dek {
  font-size: 1.12rem; line-height: 1.55; color: var(--muted);
  font-style: italic; margin: 0; max-width: 44rem; text-wrap: balance;
}
.small-mono { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.byline { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }

/* editorial section header: title + rule running right */
.sechead { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.1rem; }
.sechead h2 {
  font-size: 1.02rem; font-weight: 700; letter-spacing: 0.01em; margin: 0; white-space: nowrap;
}
.sechead::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* section lead line */
.lead { margin: -0.2rem 0 1rem; font-size: 0.95rem; color: var(--muted); }
.lead strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Prose paragraphs, wherever they sit. These used to be styled only as .hero .bio, so
   the same class rendered at a different width and size once it was used in a section:
   the hero got a 46rem measure and everything else stretched to the full 66rem page. */
.bio {
  margin: 0.85rem 0 0; font-size: 0.99rem; line-height: 1.65;
  max-width: 46rem;
}
.bio a { color: var(--accent-ink); }

/* ---------- hero ---------- */
.hero { margin-bottom: 2.2rem; }
/* the hero paragraphs read as a lede, so they stay lighter than body prose */
.hero .bio { color: var(--muted); }
.hero .links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.15rem; }
.hero .links a {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.85rem;
  background: var(--card);
}
.hero .links a:hover { border-color: var(--accent); }

/* home lists: readable measure on the wide frame */
ul.facts { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; max-width: 47rem; }
ul.facts li { font-size: 0.98rem; line-height: 1.6; color: var(--muted); }
ul.facts li::marker { color: var(--accent); }
ul.facts li strong, ul.facts li a { color: var(--accent-ink); }

/* ---------- layout ---------- */
.cols {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2.6rem; align-items: start;
}
@media (max-width: 56rem) { .cols { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 0.7rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
@media (max-width: 40rem) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 1rem 1.2rem;
}

/* co-created project cards */
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
@media (max-width: 40rem) { .proj-grid { grid-template-columns: 1fr; } }
.project {
  padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.25rem;
  transition: border-color 120ms ease, transform 120ms ease;
}
.project:hover { border-color: var(--accent); transform: translateY(-1px); }
.project .top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; }
.project h3 { margin: 0; font-size: 1.04rem; letter-spacing: -0.01em; }
.project h3 a { text-decoration: none; }
.project h3 a:hover { text-decoration: underline; }
.project .meta {
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent-ink);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.project .role {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint);
  margin: 0;   /* the work page's section-level .role rule must not reach card labels */
}
.project p {
  margin: 0.15rem 0 0; font-size: 0.9rem; line-height: 1.5; color: var(--muted);
}
.project .paper {
  margin-top: 0.55rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em;
}

/* OSS narrative threads */
.thread { margin-bottom: 1.5rem; }
.thread h3 { margin: 0 0 0.3rem; font-size: 1.02rem; letter-spacing: -0.01em; }
.thread p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--muted); }
.thread p a { color: var(--accent-ink); }

/* dense contribution rows (repo + what I contributed) */
.repo-list { padding: 0.3rem 1.15rem; }
.repo-list .row { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.repo-list .row:last-child, .repo-list details .row:last-child { border-bottom: none; }
.repo-list .line1 { display: flex; align-items: baseline; gap: 0.8rem; }
.repo-list .name {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.repo-list .name a { text-decoration: none; }
.repo-list .name a:hover { text-decoration: underline; }
.repo-list .stats {
  font-family: var(--mono); font-size: 0.72rem; color: var(--faint);
  margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.repo-list .stats .stars { color: var(--accent-ink); }
.repo-list .contrib { font-size: 0.84rem; line-height: 1.45; color: var(--muted); margin-top: 0.12rem; }
.repo-list .contrib::before { content: "\2937  "; color: var(--accent); }
/* the full contributor list is long, so let it flow into columns when there is room
   rather than running as one very tall single column */
/* rows are a single line now, so they tile tighter than they did with blurbs */
.repo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  column-gap: 2rem; align-items: start;
}
/* grid items default to min-width:auto, so a long nowrap repo name would refuse to
   shrink and push the track past the viewport. Let them shrink and ellipsise. */
.repo-grid .row, .repo-grid .line1, .repo-grid .name { min-width: 0; }
/* the row borders are the column separators here, so drop the last-child exception
   that only makes sense in a single column */
.repo-grid .row:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 48rem) {
  .repo-grid { grid-template-columns: 1fr; }
  .repo-grid .row:last-child { border-bottom: none; }
}

/* publications */
.pub { display: flex; gap: 0.9rem; align-items: baseline; padding: 0.8rem 1.15rem; }
.pub .cites {
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent-ink);
  white-space: nowrap; margin-left: auto; font-variant-numeric: tabular-nums;
}
.pub .title { font-size: 0.92rem; line-height: 1.45; }
.pub .title a { text-decoration: none; }
.pub .title a:hover { text-decoration: underline; }
.pub .venue { font-family: var(--mono); font-size: 0.68rem; color: var(--faint); }

/* post cards (blog index, publications, home "now") */
.post { padding: 1.05rem 1.2rem; transition: border-color 120ms ease; }
.post:hover { border-color: var(--accent); }
.post h3 { margin: 0.1rem 0 0.25rem; font-size: 1.08rem; }
.post h3 a { text-decoration: none; }
.post h3 a:hover { text-decoration: underline; }
.post .date {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint);
}
.post p { margin: 0.3rem 0 0; font-size: 0.92rem; color: var(--muted); }
.postline { display: flex; align-items: baseline; gap: 0.7rem; }
.postline .pill {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px;
  padding: 0.16rem 0.6rem; white-space: nowrap;
}

/* writing published elsewhere: year gutter, then title */
ul.articles {
  margin: 0; padding: 0; list-style: none; max-width: 50rem;
  display: flex; flex-direction: column; gap: 0.55rem;
}
ul.articles li { display: flex; gap: 0.9rem; align-items: baseline; font-size: 0.95rem; line-height: 1.5; }
ul.articles .yr {
  font-family: var(--mono); font-size: 0.7rem; color: var(--faint);
  flex: none; width: 2.3rem; font-variant-numeric: tabular-nums;
}
/* where a piece ran, when it wasn't here */
ul.articles .src {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em;
  text-transform: lowercase; color: var(--faint); white-space: nowrap;
}
.articles-note { margin: 0.9rem 0 0; max-width: 44rem; line-height: 1.5; }
.venue-head {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint); font-weight: 500; margin: 0 0 0.75rem;
}
/* the compact "elsewhere" columns sit tighter than the card grid */
.grid-2 > div > ul.articles { gap: 0.45rem; }

/* side projects: year gutter, then name and what it is */
ul.sideprojects {
  margin: 0; padding: 0; list-style: none; max-width: 52rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
ul.sideprojects li { display: flex; gap: 0.9rem; align-items: baseline; font-size: 0.95rem; line-height: 1.55; }
ul.sideprojects .yr {
  font-family: var(--mono); font-size: 0.7rem; color: var(--faint);
  flex: none; width: 2.3rem; font-variant-numeric: tabular-nums;
}
ul.sideprojects .desc { color: var(--muted); }

/* video rows (publications talks) */
.video { display: flex; gap: 0.9rem; align-items: baseline; padding: 0.8rem 1.15rem; transition: border-color 120ms ease; }
.video:hover { border-color: var(--accent); }
.video .title { font-size: 0.93rem; line-height: 1.45; }
.video .title a { text-decoration: none; }
.video .title a:hover { text-decoration: underline; }
.video .tag, .vidcard .tag {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px;
  padding: 0.16rem 0.55rem; white-space: nowrap; margin-left: auto;
}

/* video cards (tutorials): thumbnail + lite embed */
.vidcard { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.vidcard .thumb {
  display: block; position: relative; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: none; background: #000; cursor: pointer; overflow: hidden;
}
.vidcard .thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 120ms ease;
}
.vidcard .thumb:hover img { opacity: 0.85; }
.vidcard .playbtn {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 1.1rem; pointer-events: none; text-indent: 0.2rem;
}
.vidcard .playbtn::before {
  content: ""; position: absolute; width: 3.2rem; height: 3.2rem; border-radius: 999px;
  background: rgba(15, 20, 27, 0.72); border: 1px solid rgba(255,255,255,0.35);
}
.ytframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; background: #000; }
.video-group { margin-bottom: 2.5rem; }
.video-group:last-child { margin-bottom: 0; }
.vidcard .vidbody { padding: 0.75rem 1.05rem 0.9rem; }
.vidcard .title { font-size: 0.92rem; line-height: 1.45; }
.vidcard .title a { text-decoration: none; }
.vidcard .title a:hover { text-decoration: underline; }
.vidcard .videoidea { margin: 0.4rem 0 0; font-size: 0.84rem; line-height: 1.5; color: var(--muted); }
.vidcard .tag { display: inline-block; margin: 0.65rem 0 0; }

/* ---------- article pages (long-form posts) ---------- */
article.post-body { font-size: 1.04rem; }
article.post-body h2 { font-size: 1.4rem; margin: 2.2rem 0 0.9rem; }
article.post-body h3 { font-size: 1.12rem; margin: 1.8rem 0 0.6rem; }
article.post-body p { margin: 0 0 1.05rem; }
article.post-body ul, article.post-body ol { margin: 0 0 1.05rem; padding-left: 1.4rem; }
article.post-body li { margin-bottom: 0.4rem; }
article.post-body li::marker { color: var(--accent); }
article.post-body pre {
  font-family: var(--mono); font-size: 0.78rem; line-height: 1.6;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 1rem 1.2rem; overflow-x: auto; margin: 1.35rem 0; tab-size: 4;
}
article.post-body code { font-family: var(--mono); font-size: 0.86em; background: var(--accent-soft); border-radius: 3px; padding: 0.08em 0.3em; }
article.post-body pre code { background: none; padding: 0; font-size: inherit; }
article.post-body figure { margin: 1.5rem 0; }
article.post-body img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); display: block; margin: 0 auto; }
article.post-body figcaption { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); text-align: center; margin-top: 0.5rem; }
article.post-body blockquote { margin: 1.6rem 0; padding: 0.2rem 0 0.2rem 1.2rem; border-left: 3px solid var(--accent); font-style: italic; }
article.post-body .tablewrap { overflow-x: auto; margin: 1.35rem 0; }
article.post-body table { border-collapse: collapse; width: 100%; font-size: 0.9rem; background: var(--card); border: 1px solid var(--line); }
article.post-body th, article.post-body td { padding: 0.5rem 0.85rem; border-bottom: 1px solid var(--line); text-align: left; }
article.post-body thead th { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--ground); }

/* ---------- footer ---------- */
footer.site {
  margin-top: 3rem; padding-top: 1.3rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.7rem; color: var(--faint);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
footer.site a { color: var(--muted); }

/* ---------- cyber theme ----------
   CYBERPUNK: neon night, rgb-split glitch name, cut-corner cards, grid horizon */
:root[data-theme="cyber"] {
  color-scheme: dark;
  --ground: #0a0714;
  --card: #130e24;
  --ink: #e8e6ff;
  --muted: #a89fd6;
  --faint: #6c62a0;
  --line: #2c2352;
  --accent: #ff2ee6;
  --accent-ink: #00f0ff;
  --accent-soft: #2a1440;
  --serif: "Avenir Next", "Helvetica Neue", sans-serif;
}
[data-theme="cyber"] body {
  background:
    linear-gradient(transparent 82%, rgba(255, 46, 230, 0.06) 96%),
    repeating-linear-gradient(90deg, rgba(0, 240, 255, 0.04) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(0, 240, 255, 0.035) 0 1px, transparent 1px 64px),
    radial-gradient(100% 70% at 50% 0%, #120c26, #070510 78%) fixed;
}
[data-theme="cyber"] h1 {
  text-transform: uppercase; letter-spacing: 0.03em; font-weight: 800;
  text-shadow: -3px 0 rgba(255, 46, 230, 0.85), 3px 0 rgba(0, 240, 255, 0.85);
  animation: glitch 3.2s steps(1) infinite;
}
@keyframes glitch {
  0%, 91%, 100% { transform: none; text-shadow: -3px 0 rgba(255,46,230,.85), 3px 0 rgba(0,240,255,.85); }
  92% { transform: translateX(2px) skewX(-4deg); text-shadow: 4px 0 rgba(255,46,230,.9), -4px 0 rgba(0,240,255,.9); }
  94% { transform: translateX(-3px); text-shadow: -6px 0 rgba(255,46,230,.9), 6px 0 rgba(0,240,255,.9); }
  96% { transform: none; }
}
[data-theme="cyber"] .sechead h2 {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.82rem; font-weight: 700;
  color: var(--accent-ink);
}
[data-theme="cyber"] .sechead h2::before { content: "// "; color: var(--accent); }
[data-theme="cyber"] .sechead::after { height: 1px; border: none; background: linear-gradient(90deg, var(--accent), var(--accent-ink) 40%, transparent 85%); opacity: 0.55; }
[data-theme="cyber"] .card {
  border: 1px solid var(--line); border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: 0 0 26px rgba(255, 46, 230, 0.08);
}
[data-theme="cyber"] .project:hover { transform: none; border-color: var(--accent); }
[data-theme="cyber"] ul.facts li::marker { content: "▸ "; color: var(--accent-ink); }
[data-theme="cyber"] .repo-list .contrib::before { content: "▸ "; color: var(--accent-ink); }
[data-theme="cyber"] .hero .links a {
  border-radius: 0; border: 1px solid var(--accent-ink); color: var(--accent-ink);
  background: transparent; box-shadow: 0 0 12px rgba(0, 240, 255, 0.25) inset;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
[data-theme="cyber"] .hero .links a:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px rgba(255,46,230,.3) inset; }
[data-theme="cyber"] .nav a.item[aria-current="page"] { color: var(--accent); border-color: var(--accent); }
[data-theme="cyber"] .postline .pill, [data-theme="cyber"] .video .tag, [data-theme="cyber"] .vidcard .tag {
  border-radius: 0; background: var(--accent); color: #0a0714; font-weight: 700;
}
@media (prefers-reduced-motion: reduce) { [data-theme="cyber"] h1 { animation: none; } }

/* the kick: living scene. Animated synthwave horizon + CRT sweep + neon brand */
[data-theme="cyber"] body { position: relative; }
[data-theme="cyber"] body::before {
  content: ""; position: fixed; left: -20vw; right: -20vw; bottom: -2vh; height: 38vh;
  z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 46, 230, 0.35) 0 2px, transparent 2px 80px),
    repeating-linear-gradient(0deg, rgba(255, 46, 230, 0.3) 0 2px, transparent 2px 44px),
    linear-gradient(rgba(255, 46, 230, 0.16), rgba(0, 240, 255, 0.05));
  transform: perspective(240px) rotateX(62deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(transparent, #000 55%);
  mask-image: linear-gradient(transparent, #000 55%);
  animation: gridrun 2.6s linear infinite;
}
@keyframes gridrun { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 0 0, 0 44px, 0 0; } }
[data-theme="cyber"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.09) 0 1px, transparent 1px 4px),
    linear-gradient(rgba(0, 240, 255, 0) 0%, rgba(0, 240, 255, 0.05) 48%, rgba(255, 255, 255, 0.045) 50%, rgba(0, 240, 255, 0) 53%) no-repeat;
  background-size: 100% 100%, 100% 260%;
  animation: crtsweep 8s linear infinite;
  mix-blend-mode: screen;
}
@keyframes crtsweep { from { background-position: 0 0, 0 -130%; } to { background-position: 0 0, 0 130%; } }
@media (prefers-reduced-motion: reduce) {
  [data-theme="cyber"] body::before, [data-theme="cyber"] body::after { animation: none; }
  }

/* ---------- about page: role sections ---------- */
.role { margin-bottom: 2.8rem; }
.rolehead { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.15rem; }
.rolehead h2 { font-size: 1.35rem; margin: 0; }
.roledates { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.rolehead::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; }
.rolesub { margin: 0 0 0.9rem; font-size: 0.95rem; font-style: italic; color: var(--muted); }
.role ul.facts li strong { color: var(--ink); font-weight: 700; }

/* ---------- local edit mode (assets/edit.js, localhost only) ---------- */
.edit-egg {
  cursor: pointer; padding: 0.3rem 0.85rem; margin-left: 0.5rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-ink);
}
.edit-egg:hover { border-color: var(--accent); }
.edit-egg:disabled { opacity: 0.45; cursor: not-allowed; }
.is-editing {
  outline: 1px dashed var(--line); outline-offset: 4px; border-radius: 2px;
}
/* an empty block is invisible and unclickable, so give it a body while editing */
.is-editing:empty::before {
  content: "empty block — click ✕ to delete";
  color: var(--faint); font-family: var(--mono); font-size: 0.7rem;
}
.is-editing:empty { display: block; min-height: 1.2rem; }
.is-emptied { outline-color: #a8352a !important; opacity: 0.55; }
#edit-del {
  position: absolute; z-index: 60; display: none; cursor: pointer;
  width: 1.5rem; height: 1.5rem; padding: 0; line-height: 1;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font-family: var(--mono); font-size: 0.7rem; color: #a8352a;
}
#edit-del:hover { border-color: #a8352a; background: #a8352a; color: #fff; }
/* the "which posts show here" checklist: only while editing */
.research-picker { display: none; }
body.edit-mode .research-picker {
  display: block; margin-top: 1.2rem; padding: 0.9rem 1.1rem;
  border: 1px dashed var(--line); border-radius: 6px; background: var(--card);
}
.research-picker p { margin: 0 0 0.6rem; }
.research-picker label {
  display: flex; gap: 0.55rem; align-items: baseline;
  font-size: 0.92rem; line-height: 1.5; color: var(--muted); margin-bottom: 0.35rem;
}
.is-editing:hover { outline-color: var(--accent); }
.is-editing:focus { outline: 2px solid var(--accent); outline-offset: 4px; }
#edit-status {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 50; max-width: 30rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 0.6rem 0.9rem; white-space: pre-wrap;
  font-family: var(--mono); font-size: 0.7rem; line-height: 1.5; color: var(--muted);
  box-shadow: 0 6px 20px rgba(20, 28, 40, 0.10);
}
#edit-status.ok { color: #276b43; border-color: #276b43; }
#edit-status.err { color: #a8352a; border-color: #a8352a; }

/* footer easter egg: the door to the other place */
/* styled like the hero link pills so it reads as part of the family;
   the neon only leaks out on hover */
.cyber-egg {
  cursor: pointer; padding: 0.3rem 0.85rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-ink);
  transition: color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.cyber-egg:hover {
  color: #ff2ee6; border-color: #ff2ee6;
  box-shadow: 0 0 10px rgba(255, 46, 230, 0.3);
}

/* work in progress: drafts flagged "wip" in data/posts.json */
.wip-tag {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 999px;
  padding: 0.05rem 0.45rem; margin-left: 0.5rem; vertical-align: 1px;
}
ul.wip-list .yr { color: var(--accent-ink); text-transform: uppercase; letter-spacing: 0.08em; }
ul.wip-list .teaser { display: block; font-size: 0.88rem; color: var(--muted); margin-top: 0.1rem; }
