@font-face { font-family: "Space Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/spacemono-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/spacemono-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/spacemono-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/spacemono-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "VT323"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/vt323-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "VT323"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/vt323-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #F2EFE3;
  --paper-raised: #FBFAF3;
  --ink: #1B2018;
  --ink-soft: #565C4C;
  --phosphor: #1F7A43;
  --phosphor-deep: #123D22;
  --line: #D6D0B8;
  --term-bg: #10160F;
  --term-fg: #6FE39B;
  --bezel: #C7BEA1;
  --bezel-dark: #A79A76;
  --bezel-darker: #8B7F5E;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bezel); }
body {
  margin: 0; background: var(--bezel); color: var(--ink);
  font-family: "Space Mono", ui-monospace, "Courier New", monospace;
  font-size: 15.5px; line-height: 1.65;
}
p { margin: 0; }
a { color: inherit; }
::selection { background: var(--phosphor); color: var(--paper-raised); }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: "VT323", ui-monospace, monospace;
  font-weight: 400; text-wrap: balance; margin: 0; letter-spacing: .01em;
}

/* ---------- CRT frame ---------- */
.crt { max-width: 1064px; margin: 28px auto; padding: 0 14px 40px; }
.screen {
  position: relative; background: var(--paper); border-radius: 16px;
  border: 14px solid var(--bezel-dark);
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,.18),
    inset 0 2px 14px rgba(0,0,0,.12),
    0 24px 48px -20px rgba(35,30,18,.45);
  overflow: hidden;
  animation: power-on .5s ease-out both, flicker 7s ease-in-out infinite;
  transform-origin: center;
}
@keyframes power-on {
  0% { opacity: 0; transform: scaleY(.02); }
  8% { opacity: 1; transform: scaleY(1.03); }
  13% { transform: scaleY(.98); }
  18% { transform: scaleY(1); }
}
@keyframes flicker { 0%, 96%, 100% { filter: brightness(1); } 97% { filter: brightness(1.015); } 98.5% { filter: brightness(.99); } }
.screen::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 998;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(18,18,10,.12) 100%);
}
.screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 999;
  background: repeating-linear-gradient(to bottom, rgba(27,32,24,.055) 0px, rgba(27,32,24,.055) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: multiply;
}
.plate {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 14px; font-size: 11px; letter-spacing: .08em; color: var(--bezel-darker);
  text-transform: uppercase;
}
.led {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--phosphor);
  box-shadow: 0 0 5px 1px rgba(31,122,67,.7);
  animation: blink 2.4s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.rail { max-width: 980px; margin: 0 auto; padding: 0 28px; }

.prompt { color: var(--phosphor); font-weight: 700; text-shadow: 0 0 6px rgba(31,122,67,.35); }
.eyebrow {
  font-size: 13px; letter-spacing: .02em; color: var(--phosphor);
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.cursor {
  display: inline-block; width: .5em; height: 1.05em; background: var(--phosphor);
  vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite;
  box-shadow: 0 0 8px 1px rgba(31,122,67,.55);
}

/* ---------- nav ---------- */
nav.top {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  max-width: 980px; margin: 0 auto; padding: 18px 28px; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
nav.top .word { color: var(--phosphor-deep); font-weight: 700; text-decoration: none; }
nav.top .word .p { color: var(--phosphor); }
nav.top .status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-soft); letter-spacing: .04em; }
nav.top .status .led { width: 6px; height: 6px; }
nav.top .links { display: flex; gap: 22px; flex-wrap: wrap; }
nav.top .links a { text-decoration: none; }
nav.top .links a:hover { text-decoration: underline; }
nav.top .links a.nav-current { color: var(--phosphor); }
nav.top .links a.nav-current::before { content: "> "; }

/* ---------- hero ---------- */
.hero { padding: 48px 0 40px; }
.hero.small { padding: 40px 0 8px; }
h1.name { font-size: clamp(44px, 8vw, 88px); line-height: .94; color: var(--phosphor-deep); }
.hero.small h1.name { font-size: clamp(40px, 6vw, 64px); }
.lede { margin-top: 18px; font-size: 16px; color: var(--ink-soft); line-height: 1.6; }

.boot { font-size: 12px; color: var(--ink-soft); margin-bottom: 22px; line-height: 1.9; }
.boot div {
  --n: 42;
  overflow: hidden; white-space: nowrap; width: 0ch; max-width: max-content;
  animation: type .5s steps(var(--n), end) forwards;
}
.boot div:nth-child(1) { animation-delay: .1s; }
.boot div:nth-child(2) { animation-delay: .5s; }
.boot div:nth-child(3) { animation-delay: .9s; }
.boot .ok { color: var(--phosphor); }
@keyframes type { from { width: 0ch; } to { width: calc(var(--n) * 1ch); } }

/* ---------- feed ---------- */
section.block { padding: 36px 0 64px; border-top: 1px solid var(--line); }
.hero.small + section.block { border-top: 0; }
.feed { display: flex; flex-direction: column; }
.entry { padding: 22px 0; border-bottom: 1px dashed var(--line); }
.entry:first-child { padding-top: 6px; }
.entry .meta { font-size: 12px; color: var(--ink-soft); letter-spacing: .02em; display: flex; gap: 14px; flex-wrap: wrap; }
.entry h2 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.05; margin-top: 6px; }
.entry h2 a { text-decoration: none; color: var(--ink); }
.entry h2 a:hover { color: var(--phosphor); text-decoration: underline; }
.entry .excerpt { margin-top: 8px; font-size: 14.5px; color: var(--ink-soft); max-width: 70ch; }
.entry .preview { margin-top: 10px; font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); max-width: 72ch; }
.entry .preview > * + * { margin-top: .7em; }
.entry .preview h2, .entry .preview h3, .entry .preview h4 { font-size: 24px; margin-top: 1em; color: var(--ink); }
.entry .preview figure, .entry .preview iframe, .entry .preview video, .entry .preview audio,
.entry .preview .kg-embed-card, .entry .preview .kg-image-card, .entry .preview .kg-gallery-card { display: none; }
.entry .more { margin-top: 10px; font-size: 13px; }
.entry .more a { color: var(--phosphor-deep); font-weight: 700; text-decoration: none; }
.entry .more a:hover { text-decoration: underline; }
.entry.compact { padding: 14px 0; }
.entry.compact h2 { font-size: clamp(20px, 2.6vw, 26px); }
.entry.compact .more { margin-top: 6px; }
.topics { display: flex; flex-direction: column; }
.topic { display: grid; grid-template-columns: 1fr auto; gap: 2px 18px; padding: 16px 0; border-bottom: 1px dashed var(--line); text-decoration: none; color: var(--ink); }
.topic:hover .t-name { color: var(--phosphor); text-decoration: underline; }
.topic .t-name { font-family: "VT323", monospace; font-size: 30px; line-height: 1; }
.topic .t-count { font-size: 12px; color: var(--ink-soft); align-self: end; }
.topic .t-desc { grid-column: 1 / -1; font-size: 14px; color: var(--ink-soft); max-width: 70ch; }
a.kind {
  color: var(--phosphor-deep); font-weight: 700; text-decoration: none; text-transform: uppercase;
  font-size: 11px; letter-spacing: .06em;
}
a.kind::before { content: "[ "; color: var(--phosphor); }
a.kind::after { content: " ]"; color: var(--phosphor); }
a.kind:hover { text-decoration: underline; }
.empty { font-size: 14px; color: var(--ink-soft); padding: 8px 0; }

.pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; font-size: 13px; }
.pager a { color: var(--phosphor-deep); font-weight: 700; text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.pager .count { color: var(--ink-soft); }

/* ---------- article ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 44px 0 64px; }
.article-title { font-size: clamp(36px, 5.4vw, 60px); line-height: .98; color: var(--ink); }
.article .meta { margin-top: 14px; font-size: 12px; color: var(--ink-soft); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.article .meta .sep { color: var(--phosphor); }
.feature { margin: 28px 0 0; }
.feature img { display: block; width: 100%; border: 1px solid var(--line); }
figcaption { margin-top: 8px; font-size: 12px; color: var(--ink-soft); text-align: center; }

.gh-content { margin-top: 32px; font-size: 16px; line-height: 1.8; }
.gh-content > * + * { margin-top: 1.1em; }
.gh-content h2 { font-size: 38px; margin-top: 1.8em; color: var(--phosphor-deep); }
.gh-content h3 { font-size: 30px; margin-top: 1.5em; }
.gh-content h4 { font-size: 24px; margin-top: 1.4em; }
.gh-content a { color: var(--phosphor-deep); text-decoration: underline; text-underline-offset: 3px; }
.gh-content a:hover { color: var(--phosphor); }
.gh-content ul, .gh-content ol { padding-left: 1.4em; }
.gh-content li + li { margin-top: .35em; }
.gh-content blockquote {
  margin-left: 0; margin-right: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--phosphor);
  color: var(--ink-soft); font-style: italic;
}
.gh-content hr { border: 0; border-top: 1px dashed var(--line); margin: 2.2em 0; }
.gh-content code {
  font-family: "Space Mono", ui-monospace, monospace; font-size: .88em;
  background: var(--paper-raised); border: 1px solid var(--line); padding: 1px 5px;
}
.gh-content pre {
  background: var(--term-bg); color: var(--term-fg); padding: 16px 18px; overflow-x: auto;
  font-size: 13px; line-height: 1.7; border: 1px solid #06090A;
}
.gh-content pre code { background: none; border: 0; padding: 0; color: inherit; }
.gh-content table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.gh-content th, .gh-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.gh-content th { background: var(--paper-raised); }
.gh-content img { display: block; margin: 0 auto; }

/* Ghost editor cards */
.kg-width-wide { width: 100%; }
.kg-width-full { width: 100%; }
.kg-card { margin-top: 1.4em; }
.kg-image-card img { margin: 0 auto; }
.kg-embed-card { display: flex; justify-content: center; }
.kg-embed-card iframe { max-width: 100%; }

.article .tags { margin-top: 36px; font-size: 12px; color: var(--ink-soft); }
.article .tags a { color: var(--phosphor-deep); text-decoration: none; margin-right: 8px; font-weight: 700; }
.article .tags a::before { content: "#"; }
.back { margin-top: 28px; font-size: 13px; }
.back a { color: var(--phosphor-deep); font-weight: 700; text-decoration: none; }
.back a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
footer.note {
  max-width: 980px; margin: 0 auto; padding: 22px 28px; font-size: 12px; color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
footer.note a { text-decoration: none; }
footer.note a:hover { text-decoration: underline; color: var(--phosphor-deep); }

@media (max-width: 640px) {
  .crt { margin: 0; padding: 0 0 28px; }
  .screen { border-radius: 0; border-width: 8px; }
  .rail, nav.top { padding-left: 18px; padding-right: 18px; }
  nav.top .status { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  .led, .cursor { animation: none; }
  .boot div { animation: none; width: auto; }
}
