:root {
  --bg: #05060a;
  --fg: #c8f7c5;
  --dim: #3c5f47;
  --accent: #7dff8b;
  --cyan: #54d6ff;
  --border: #1b2a20;
  --maxw: 780px;
  --mono: "JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); }

body {
  font-family: var(--mono);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

/* Background */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.5; pointer-events: none; }
.crt { position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply; }

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  border-bottom: 1px solid var(--border);
  background: rgba(5,6,10,0.9);
  backdrop-filter: blur(6px);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 42px; width: auto; display: block; }
.nav nav a { margin-left: 18px; color: var(--dim); font-size: 13px; text-decoration: none; }
.nav nav a:hover { color: var(--accent); }
.logo-caret { animation: blink 1s steps(1) infinite; }

/* Hero */
.hero { text-align: center; padding: 56px 16px 40px; }

.ascii {
  display: inline-block;
  margin: 0;
  padding: 10px 8px 8px;
  font-size: 13px;
  line-height: 1.05;
  color: var(--fg);
  letter-spacing: 0;
  text-align: left;
  overflow-x: auto;
  user-select: none;
}

@media (max-width: 640px) {
  .ascii { font-size: 9px; }
}
.prompt { min-height: 24px; margin: 18px 0 0; color: var(--accent); font-size: 14px; }
.prompt .caret { animation: blink 1s steps(1) infinite; }
.hero-sub { color: var(--dim); font-size: 13px; margin-top: 6px; }

/* Blocks */
.block {
  border: 1px solid var(--border);
  background: rgba(8,12,10,0.86);
  padding: 16px 20px;
  margin: 0 0 16px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(125,255,139,0.04), 0 8px 30px rgba(0,0,0,0.5);
}
.lead { margin: 0 0 10px; font-size: 14px; color: var(--cyan); }
.p { color: var(--accent); font-weight: 700; }
.accent { color: var(--accent); }
.muted { color: var(--dim); }
.ok { color: var(--green, #34d37f); }
.dim { color: var(--dim); }

/* KV */
.kv { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.kv li { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border-bottom: 1px dashed rgba(60,95,71,0.35); }
.kv li:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--dim); }

/* Log / blog list */
.log { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.log li { padding: 6px 0; border-bottom: 1px dashed rgba(60,95,71,0.35); }
.log li:last-child { border-bottom: 0; }
.log a { color: var(--fg); text-decoration: none; }
.log a:hover { color: var(--accent); }
.log .dim { margin-right: 8px; }

/* Button */
.btn { margin-top: 8px; font-family: var(--mono); font-size: 13px; color: var(--accent);
  background: transparent; border: 1px solid var(--accent); border-radius: 4px; padding: 8px 14px; cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.btn:hover { background: var(--accent); color: #05060a; box-shadow: 0 0 18px rgba(125,255,139,0.45); }

/* Article */
.page-title { margin: 28px 0 6px; font-size: 26px; }
.post-meta { color: var(--dim); font-size: 12px; margin-bottom: 24px; }
.article { line-height: 1.85; font-size: 14.5px; }
.article h1, .article h2, .article h3 { color: var(--accent); }
.article a { color: var(--accent); }
.article code { background: #0d1713; border: 1px solid var(--border); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.article pre { background: #0d1713; border: 1px solid var(--border); padding: 14px; border-radius: 8px; overflow-x: auto; }
.article blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 14px; color: var(--dim); }
.article img { max-width: 100%; }
.article hr { border: none; border-top: 1px dashed var(--border); margin: 28px 0; }

/* Footer */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 22px 0;
  color: var(--dim); font-size: 12px; text-align: center; }
.site-footer .c { color: var(--accent); }
.site-footer a { color: var(--dim); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* Animations */
@keyframes blink { 50% { opacity: 0; } }
@keyframes flicker { 0%, 97%, 100% { opacity: 1; } 98% { opacity: 0.92; } 99% { opacity: 1; } }
.block, .term-footer, .hero { animation: flicker 8s infinite; }

::selection { background: var(--accent); color: #05060a; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0f0d; }
::-webkit-scrollbar-thumb { background: #1b2a20; border-radius: 5px; }
