@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;700&family=Newsreader:opsz,wght@6..72,400;6..72,600&family=Noto+Serif+SC:wght@400;600;700&display=swap');

:root {
  --bg: #071117;
  --surface: #0b141c;
  --surface-alt: #121d25;
  --surface-muted: #182028;
  --surface-hover: #1d2831;
  --border: #22303a;
  --border-strong: #31424e;
  --text: #e7f0fa;
  --text-secondary: #b1c3d0;
  --text-tertiary: #7f929e;
  --accent: #00ff88;
  --accent-hover: #5affab;
  --accent-cyan: #00d9ff;
  --accent-amber: #ffb86c;
  --success: #00ff88;
  --error: #ff7b72;
  --warning: #ffb86c;
  --bg-rgb: 7, 17, 23;
  --surface-rgb: 11, 20, 28;
  --accent-rgb: 0, 255, 136;
  --cyan-rgb: 0, 217, 255;
  --shadow-soft: 0 0 0 1px rgba(var(--accent-rgb), 0.03), 0 16px 48px rgba(0, 0, 0, 0.22);
  --page-pad: clamp(20px, 3vw, 36px);
  --radius: 0px;
  --content-max: 1200px;
  --reading-max: 780px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Serif SC', 'Newsreader', Georgia, serif;
  line-height: 1.75;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
code, pre, .badge, .eyebrow, .brand, .site-nav, .terminal-line, .terminal-output, .stat-card__label, .toc, .page-number, .extend {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  letter-spacing: 0;
}

::selection {
  background: rgba(var(--accent-rgb), 0.24);
  color: var(--text);
}

.tlj-grid,
.tlj-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.tlj-grid {
  background-image:
    linear-gradient(rgba(var(--cyan-rgb), 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--cyan-rgb), 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black, transparent 85%);
}
.tlj-scanlines {
  background: linear-gradient(to bottom, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 3px);
  background-size: 100% 4px;
  opacity: .22;
}

.container {
  width: min(var(--content-max), calc(100vw - 2 * var(--page-pad)));
  margin: 0 auto;
}

.tlj-main {
  padding: 2rem 0 6rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(var(--bg-rgb), 0.88);
  backdrop-filter: blur(10px);
}
.site-header__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.brand,
.brand:visited {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .92rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.brand-terminal {
  flex: 1 1 420px;
  min-width: 0;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .62rem .85rem;
  border: 1px solid var(--border);
  background: rgba(var(--surface-rgb), 0.88);
}
.brand-terminal:focus-within {
  border-color: var(--accent);
}
.brand-terminal__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: .9rem;
}
.brand-terminal__input::placeholder {
  color: var(--text-tertiary);
}
.brand__cursor,
.terminal-cursor {
  width: .55rem;
  height: 1.1rem;
  background: var(--accent);
  display: inline-block;
  animation: blink 1s step-end infinite;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-nav a {
  padding: .5rem 0;
  color: var(--text-tertiary);
  border-bottom: 1px solid transparent;
  transition: color .24s ease, border-color .24s ease;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: .55rem .9rem;
  border-radius: 0;
}

.section-block {
  margin-top: 5rem;
}
.section-block--article,
.section-block--page {
  margin-top: 3rem;
}
.panel {
  background: linear-gradient(180deg, rgba(var(--surface-rgb), 0.98), rgba(var(--surface-rgb), 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.panel:hover { border-color: var(--border-strong); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--accent-cyan);
  font-size: .78rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 1rem;
}
.prompt-mark { color: var(--accent); }

.home-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 1.5rem;
}
.hero-copy,
.terminal-window,
.page-head,
.article-head,
.article-cover,
.article-content-shell,
.article-toc,
.comments-placeholder,
.profile-card,
.info-card,
.album-card,
.album-entry,
.link-group,
.taxonomy-card,
.timeline-group,
.story-shell__sticky,
.story-step,
.post-card,
.stat-card,
.taxonomy-panel {
  padding: 1.4rem;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}
.hero-copy h1,
.page-head h1,
.article-head h1 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.hero-copy h1 { font-size: clamp(2.8rem, 8vw, 4.5rem); }
.page-head h1,
.article-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.hero-subtitle,
.page-head p,
.article-lead {
  color: var(--text-secondary);
  margin: 1rem 0 0;
  max-width: 60ch;
}
.hero-meta,
.hero-actions,
.chip-wrap,
.article-meta-bar,
.post-card__meta,
.article-tag-row,
.album-entry__head,
.story-status-list,
.footer-links,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.hero-actions { margin-top: 1.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 44px;
  padding: .8rem 1.1rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  transition: border-color .24s ease, color .24s ease, background-color .24s ease, transform .24s ease;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.btn:focus-visible,
.menu-toggle:focus-visible,
.code-copy:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn--primary {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--primary:hover {
  color: var(--bg);
  background: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 32px;
  padding: .45rem .65rem;
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  background: rgba(var(--surface-rgb), 0.68);
  text-transform: uppercase;
  font-size: .74rem;
  letter-spacing: .12em;
}
.badge--accent { border-color: var(--accent); color: var(--accent); }
.badge--cyan { border-color: var(--accent-cyan); color: var(--accent-cyan); }

.terminal-window__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .95rem;
  margin-bottom: .95rem;
  border-bottom: 1px solid var(--border);
}
.terminal-window__dots,
.code-toolbar__dots {
  display: inline-flex;
  gap: .4rem;
}
.terminal-window__dots span,
.code-toolbar__dots span {
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  background: var(--border-strong);
}
.terminal-window__title,
.code-toolbar__lang { color: var(--text-tertiary); font-size: .8rem; }
.terminal-line {
  display: flex;
  gap: .65rem;
  color: var(--text-secondary);
  margin-top: .85rem;
  word-break: break-word;
}
.terminal-prompt { color: var(--accent); font-weight: 700; }
.terminal-output { margin-left: 1.4rem; color: var(--text); }
.terminal-output--block {
  border-left: 1px solid var(--border);
  padding-left: 1rem;
  color: var(--text-secondary);
}
.terminal-output--success { color: var(--success); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.stat-card strong {
  display: block;
  margin-top: .35rem;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1;
}
.stat-card__label { color: var(--text-tertiary); font-size: .78rem; }

.section-heading h2,
.story-shell__sticky h2,
.story-step h3,
.post-card h3,
.article-toc h2,
.link-card h3,
.album-card h2,
.album-entry h2,
.timeline-group__year,
.profile-identity__body h2,
.taxonomy-card h2,
.taxonomy-panel h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.section-heading p,
.story-shell__lead,
.story-step p,
.taxonomy-panel p,
.post-card p,
.info-card p,
.link-card p,
.album-card p,
.page-head p,
.article-head p,
.comments-placeholder p {
  color: var(--text-secondary);
}
.section-heading { margin-bottom: 1.5rem; }

.story-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}
.story-shell__sticky {
  position: sticky;
  top: 96px;
}
.story-status {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-tertiary);
  padding: .65rem .75rem;
  cursor: pointer;
  text-align: left;
}
.story-status.is-active {
  border-color: var(--accent);
  color: var(--accent);
}
.story-console { margin-top: 1rem; }
.story-console__panel { display: none; }
.story-console__panel.is-active { display: block; }
.story-shell__track {
  display: grid;
  gap: 1rem;
}
.compact-list,
.log-entries { display: grid; gap: .8rem; }
.compact-list__item,
.log-entry {
  border-left: 1px solid var(--border);
  padding-left: 1rem;
  color: var(--text-secondary);
}
.compact-list__item strong { display: block; color: var(--text); margin-top: .2rem; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}
.post-grid__item { grid-column: span 6; }
.post-grid__item--wide { grid-column: span 6; }
.post-stack,
.log-list,
.link-groups,
.timeline-groups,
.album-detail,
.taxonomy-board,
.chip-board {
  display: grid;
  gap: 1rem;
}
.post-card {
  display: grid;
  overflow: hidden;
}
.post-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}
.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}
.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .5s ease;
}
.post-card:hover .post-card__media img {
  transform: scale(1.03);
  filter: brightness(.9);
}
.post-card__media--terminal {
  display: flex;
  align-items: center;
  padding: 1rem 1.2rem;
}
.post-card__body h3 { margin-top: .85rem; font-size: 1.4rem; }
.post-card__body h3 a:hover { color: var(--accent); }
.post-card__body p { margin: .75rem 0 0; }

.taxonomy-layout,
.profile-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}
.profile-card--identity { grid-column: span 5; }
.profile-grid { grid-column: span 7; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.profile-avatar {
  width: min(220px, 100%);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.profile-identity__body h2 { margin-bottom: .8rem; }
.info-card blockquote {
  margin: 1rem 0 0;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  color: var(--text);
}
.kv-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.kv-list li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(var(--cyan-rgb), .08); padding-bottom: .6rem; }
.kv-list span { color: var(--text-tertiary); }
.kv-list strong { color: var(--text); text-align: right; }

.taxonomy-layout > * { grid-column: span 6; }
.taxonomy-panel h3 { margin-bottom: 1rem; }
.taxonomy-card,
.link-card {
  display: grid;
  gap: .75rem;
}
.taxonomy-card span,
.footer-meta,
.timeline-item span,
.timeline-item time,
.link-card p,
.album-card p,
.album-entry__head span,
.article-meta-bar span,
.post-card__meta span,
.comments-placeholder p,
.page-head p,
.article-lead,
.article-content p,
.article-content li,
.article-content blockquote,
.article-content figcaption {
  color: var(--text-secondary);
}
.taxonomy-card:hover,
.link-card:hover,
.album-card:hover,
.timeline-item:hover {
  border-color: var(--accent-cyan);
}
.taxonomy-card h2,
.album-card h2,
.link-card h3 { font-size: 1.35rem; }

.album-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.album-card {
  overflow: hidden;
}
.album-card img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.album-card__body { padding-top: .6rem; }
.album-entry__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.album-entry__grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border);
}
.link-card,
.timeline-item {
  padding: 1rem;
  border: 1px solid var(--border);
  background: rgba(var(--surface-rgb), .55);
}
.link-card {
  grid-template-columns: 72px 1fr;
  align-items: start;
}
.link-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.link-group__header { margin-bottom: 1rem; }

.timeline-group {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
}
.timeline-group__year {
  font-size: 2rem;
  color: var(--accent);
}
.timeline-group__list {
  display: grid;
  gap: .75rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 1rem;
  align-items: center;
}
.timeline-item strong { color: var(--text); }

.pagination-shell {
  margin-top: 1.5rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
}
#page-nav,
.pagination-shell {
  display: flex;
  justify-content: center;
}
#page-nav {
  gap: .55rem;
  flex-wrap: wrap;
}
.page-number,
.extend {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .85rem;
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  transition: border-color .24s ease, color .24s ease, background-color .24s ease;
}
.page-number:hover,
.extend:hover,
.page-number.current {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), .08);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}
.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}
.article-content-shell { min-width: 0; }
.article-content {
  max-width: var(--reading-max);
  margin: 0 auto;
}
.article-content > :first-child { margin-top: 0; }
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin: 2rem 0 .9rem;
}
.article-content h2::before,
.article-content h3::before {
  content: '#';
  color: var(--accent);
  margin-right: .55rem;
  font-family: 'JetBrains Mono', monospace;
}
.article-content a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-decoration-color: rgba(var(--cyan-rgb), .5);
}
.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-left: 2px solid var(--accent);
  background: rgba(var(--accent-rgb), .05);
}
.article-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.article-content th,
.article-content td {
  border: 1px solid var(--border);
  padding: .7rem .8rem;
  text-align: left;
}
.article-content th { font-family: 'JetBrains Mono', monospace; color: var(--accent-cyan); }
.article-content img {
  border: 1px solid var(--border);
  margin: 1.5rem auto;
}
.article-content ul,
.article-content ol { padding-left: 1.4rem; }
.article-content :not(pre) > code {
  padding: .15rem .4rem;
  background: rgba(var(--accent-rgb), .08);
  border: 1px solid rgba(var(--accent-rgb), .16);
  color: var(--accent);
}
.figure,
figure.highlight,
.code-standalone {
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  overflow: hidden;
}
figure.highlight table,
figure.highlight tr,
figure.highlight td {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: top;
}
figure.highlight table {
  margin: 0;
  border-collapse: collapse;
}
figure.highlight pre,
.code-standalone pre {
  margin: 0;
  padding: .7rem .95rem;
  overflow-x: auto;
  background: transparent;
  color: var(--text);
  line-height: 1.28;
}
figure.highlight .line {
  display: block;
  min-height: 1.28em;
}
figure.highlight br {
  display: none;
}
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin: 0;
  padding: .55rem .85rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.code-toolbar__dots {
  gap: .3rem;
}
.code-toolbar__dots span {
  width: .5rem;
  height: .5rem;
}
.code-toolbar__lang {
  font-size: .74rem;
}
.code-copy {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-tertiary);
  padding: .3rem .55rem;
  min-height: 28px;
  font-size: .74rem;
  line-height: 1.2;
  cursor: pointer;
}
.code-copy:hover { border-color: var(--accent); color: var(--accent); }

figure.highlight .comment,
figure.highlight .quote {
  color: var(--text-tertiary);
  font-style: italic;
}
figure.highlight .keyword,
figure.highlight .selector-tag,
figure.highlight .literal,
figure.highlight .section,
figure.highlight .link,
figure.highlight .attr,
figure.highlight .attribute {
  color: var(--accent-cyan);
}
figure.highlight .string,
figure.highlight .meta .string,
figure.highlight .addition {
  color: var(--accent);
}
figure.highlight .number,
figure.highlight .symbol,
figure.highlight .bullet,
figure.highlight .regexp {
  color: var(--accent-amber);
}
figure.highlight .title,
figure.highlight .title.class_,
figure.highlight .title.function_,
figure.highlight .name,
figure.highlight .built_in,
figure.highlight .builtin-name,
figure.highlight .type {
  color: var(--text);
  font-weight: 600;
}
figure.highlight .meta,
figure.highlight .operator,
figure.highlight .punctuation,
figure.highlight .params {
  color: var(--text-secondary);
}
figure.highlight .deletion {
  color: var(--error);
}
figure.highlight .emphasis {
  font-style: italic;
}
figure.highlight .strong {
  font-weight: 700;
}

.article-toc {
  position: sticky;
  top: 96px;
}
.toc ol,
.toc ul { list-style: none; padding-left: 0; margin: 0; display: grid; gap: .6rem; }
.toc li { padding-left: .8rem; border-left: 1px solid rgba(var(--cyan-rgb), .14); }
.toc a {
  color: var(--text-tertiary);
  transition: color .24s ease;
}
.toc a.is-active,
.toc a:hover { color: var(--accent); }

.post-nav-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.nav-card {
  display: grid;
  gap: .45rem;
}
.nav-card strong { color: var(--text); font-family: 'Space Grotesk', sans-serif; }
.nav-card small { color: var(--text-tertiary); }
.comments-placeholder h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; }
.comments-shell {
  margin-top: 1.25rem;
}
.comment-wrap {
  margin-top: 1rem;
}
.waline-host {
  --waline-theme-color: var(--accent);
  --waline-active-color: var(--accent-hover);
  --waline-bg-color: rgba(var(--surface-rgb), 0.78);
  --waline-bg-color-light: rgba(var(--surface-rgb), 0.92);
  --waline-border-color: var(--border);
  --waline-disable-bg-color: var(--surface-muted);
  --waline-disable-color: var(--text-tertiary);
  --waline-color: var(--text);
  --waline-info-color: var(--text-tertiary);
  --waline-text-color: var(--text);
  --waline-box-shadow: none;
  --waline-bq-color: var(--surface-muted);
  --waline-avatar-size: 3rem;
}
.waline-host .wl-panel,
.waline-host .wl-card,
.waline-host .wl-editor,
.waline-host .wl-input,
.waline-host .wl-login-nick,
.waline-host .wl-login-mail,
.waline-host .wl-login-link,
.waline-host .wl-sort li,
.waline-host .wl-more {
  border-radius: 0;
}
.waline-host .wl-card {
  border: 1px solid var(--border);
}
.waline-host .wl-content pre,
.waline-host .wl-content code {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

.article-content.prose,
.info-card .article-content {
  line-height: 1.78;
}

.reveal {
  opacity: 1;
  transform: none;
}
.stagger-group > * { transition-delay: 0s; }
.stagger-group.is-visible > *:nth-child(1),
.reveal.is-visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-group.is-visible > *:nth-child(2),
.reveal.is-visible > *:nth-child(2) { transition-delay: .08s; }
.stagger-group.is-visible > *:nth-child(3),
.reveal.is-visible > *:nth-child(3) { transition-delay: .16s; }
.stagger-group.is-visible > *:nth-child(4),
.reveal.is-visible > *:nth-child(4) { transition-delay: .24s; }

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 1.2rem;
  align-items: start;
}
.footer-meta {
  display: grid;
  justify-items: end;
  gap: .4rem;
  font-family: 'JetBrains Mono', monospace;
}

.inline-link {
  color: var(--accent-cyan);
  text-decoration: none;
  position: relative;
}
.inline-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: currentColor;
  transition: transform .24s ease;
}
.inline-link:hover::after { transform: scaleX(1); }
.muted { color: var(--text-tertiary); }

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

@media (max-width: 1080px) {
  .home-hero,
  .story-shell,
  .article-layout,
  .site-footer__inner,
  .profile-layout,
  .taxonomy-layout {
    grid-template-columns: 1fr;
  }
  .profile-card--identity,
  .profile-grid,
  .taxonomy-layout > * { grid-column: auto; }
  .article-toc,
  .story-shell__sticky { position: static; }
  .profile-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .stats-grid,
  .album-grid,
  .link-grid,
  .profile-grid,
  .post-grid,
  .post-nav-grid {
    grid-template-columns: 1fr 1fr;
  }
  .post-grid__item,
  .post-grid__item--wide { grid-column: span 1; }
  .timeline-group,
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-item { gap: .45rem; }
}

@media (max-width: 720px) {
  html { scroll-behavior: auto; }
  .menu-toggle { display: inline-flex; }
  .site-header__inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .brand-terminal {
    order: 1;
    max-width: 100%;
    width: 100%;
    flex-basis: 100%;
  }
  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: .6rem var(--page-pad) 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(var(--bg-rgb), 0.98);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { width: 100%; padding: .8rem 0; }
  .home-hero,
  .stats-grid,
  .album-grid,
  .link-grid,
  .profile-grid,
  .post-grid,
  .post-nav-grid,
  .album-entry__grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: clamp(2.4rem, 12vw, 3.5rem); }
  .page-head h1,
  .article-head h1 { font-size: clamp(1.8rem, 9vw, 2.4rem); }
  .terminal-window,
  .hero-copy,
  .page-head,
  .article-head,
  .article-content-shell,
  .article-toc,
  .comments-placeholder,
  .profile-card,
  .info-card,
  .album-card,
  .album-entry,
  .link-group,
  .story-shell__sticky,
  .story-step,
  .post-card,
  .stat-card { padding: 1rem; }
  .article-content { max-width: 100%; }
  .section-block { margin-top: 3.6rem; }
  .aplayer.aplayer-fixed {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    max-width: none;
    width: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .story-shell__sticky,
  .article-toc { position: static; }
}
