@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

:root {
  --bg: #000000;
  --text: #e8e8e8;
  --dim: #666666;
  --bright: #ffffff;
  --cursor: #e8e8e8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.75;
}

body {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  min-height: 100vh;
}

/* Scanlines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.07) 3px,
    rgba(0, 0, 0, 0.07) 4px
  );
  pointer-events: none;
  z-index: 100;
}

/* ── Typography ── */

h1, h2, h3 {
  font-weight: 600;
  color: var(--bright);
  letter-spacing: 0.02em;
}

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

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { color: var(--bright); }

em { font-style: italic; opacity: 0.85; }
strong { font-weight: 600; color: var(--bright); }

hr {
  border: none;
  border-top: 1px solid #222;
  margin: 2em 0;
}

blockquote {
  border-left: 2px solid #333;
  margin: 1.5em 0;
  padding-left: 1.2em;
  color: var(--dim);
  font-style: italic;
}

/* ── Top nav ── */

.top-nav {
  margin-bottom: 40px;
  font-size: 12px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #1a1a1a;
  padding-bottom: 14px;
}

.top-nav a {
  color: var(--dim);
  text-decoration: none;
  margin-right: 3ch;
  transition: color 0.1s;
}

.top-nav a:hover { color: var(--bright); }

/* ── Back row ── */

.back-row {
  margin-top: 40px;
}

.back-link {
  font-size: 12px;
  color: var(--dim);
  text-decoration: none;
}

.back-link:hover { color: var(--bright); }

/* ── Prompt line ── */

.prompt {
  display: flex;
  align-items: baseline;
  gap: 0.5ch;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--dim);
}

.prompt-user  { color: var(--bright); font-weight: 600; }
.prompt-sym   { color: var(--dim); }
.prompt-cmd   { color: var(--text); }

/* ── Cursor ── */

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background: var(--cursor);
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
  margin-left: 1px;
}

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

/* ── Typewriter ── */

.typewriter {
  overflow: hidden;
  white-space: nowrap;
}

/* ── Post content ── */

.post-header {
  margin-bottom: 36px;
}

.post-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--bright);
  margin-bottom: 6px;
}

.post-meta {
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.05em;
}

.post-body {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.85;
}

.post-body h2 {
  font-size: 15px;
  margin: 2em 0 0.6em;
}

.post-body h3 {
  font-size: 14px;
  margin: 1.6em 0 0.5em;
  color: var(--text);
}

/* ── Archive list ── */

.archive-list {
  list-style: none;
  width: 100%;
}

.archive-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1ch;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid #111;
  cursor: pointer;
  transition: color 0.1s;
}

.archive-item:hover .arc-title { color: var(--bright); }

.arc-title {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arc-date {
  color: var(--dim);
  font-size: 12px;
  white-space: nowrap;
}

/* ── Nav ── */

.nav {
  margin-top: 52px;
  font-size: 12px;
  color: var(--dim);
}

.nav a {
  color: var(--dim);
  text-decoration: none;
  margin-right: 2ch;
}

.nav a:hover { color: var(--bright); }

/* ── Status/loading ── */

.status {
  color: var(--dim);
  font-size: 13px;
  font-style: italic;
}

/* ── ASCII art ── */

.ascii-art {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
  margin: 0.5em 0;
}

/* ── Flicker loader ── */

.flicker-status {
  font-size: 12px;
  color: var(--dim);
  font-style: italic;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

/* ── Post snap-in ── */

.post-snap {
  opacity: 0;
  transition: opacity 0.15s ease-in;
}

.post-snap--visible {
  opacity: 1;
}

/* ── Fade in sections ── */

.fade-in {
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

/* ── Scrollbar ── */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #222; }
