/* ===== tokens ===== */
:root {
  --bg: #171512;
  --surface: #201D18;
  --surface-2: #29251E;
  --border: #38322A;
  --text: #EDE7DD;
  --text-dim: #B9B0A0;
  --muted: #8A8378;
  --accent: #C97A2E;
  --accent-soft: #E0A868;
  --accent-2: #4FA8A0;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --content-w: 700px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* ===== header ===== */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 820px;
}
.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo-glyph { color: var(--accent); margin-right: 2px; }
.cursor {
  color: var(--accent-2);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.site-nav { display: flex; gap: 22px; font-family: var(--font-mono); font-size: 14px; }
.site-nav a { color: var(--text-dim); }
.site-nav a:hover { color: var(--accent-soft); }

/* ===== hero ===== */
.hero { max-width: 820px; padding-top: 56px; padding-bottom: 40px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
  margin: 0 0 14px;
  letter-spacing: 0.01em;
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.post-machine { color: var(--muted); }

.hero-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.hero-title.small { font-size: 32px; margin-bottom: 8px; }
.hero-sub {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 56ch;
  margin: 0 0 32px;
}

/* ===== fleet status (signature element) ===== */
.fleet-status {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-x: auto;
}
.fleet-row {
  display: grid;
  grid-template-columns: 16px 150px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.fleet-row:last-child { border-bottom: none; }
.fleet-row.muted { color: var(--muted); }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.dot-active { background: var(--accent-2); box-shadow: 0 0 6px rgba(79,168,160,0.6); }
.dot-planned { background: var(--muted); }
.fleet-name { color: var(--text); font-weight: 500; }
.fleet-detail { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; }
.fleet-state { color: var(--accent-2); justify-self: end; }
.fleet-row.muted .fleet-state { color: var(--muted); }

/* ===== post journal (index list) ===== */
.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
}
.post-journal { padding-bottom: 60px; }
.journal-list { list-style: none; margin: 0; padding: 0; }
.journal-item { border-bottom: 1px solid var(--border); }
.journal-item:first-child { border-top: 1px solid var(--border); }
.journal-link {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 4px;
  color: var(--text);
}
.journal-link:hover { text-decoration: none; background: var(--surface); }
.journal-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  min-width: 96px;
}
.journal-sep { color: var(--border); }
.journal-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
  flex: 1;
  min-width: 200px;
}
.journal-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  text-transform: lowercase;
}

/* ===== single post ===== */
.post { padding: 48px 24px 80px; }
.post-header { margin-bottom: 36px; }
.post-title {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 14px;
}
.post-tags { margin-top: 4px; }
.post-avatar {
  max-width: 280px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 18px 0 8px;
  display: block;
}

.post-body h2 {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent-soft);
  margin: 40px 0 14px;
  font-weight: 600;
}
.post-body h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text);
  margin: 28px 0 10px;
}
.post-body p { margin: 0 0 18px; color: var(--text); }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 22px; }
.post-body li { margin-bottom: 6px; }
.post-body strong { color: var(--accent-soft); }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 24px 0;
  padding: 4px 20px;
  color: var(--text-dim);
  font-style: italic;
}
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--accent-soft);
}
.post-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0 0 22px;
}
.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.post-body img { max-width: 100%; border-radius: 6px; border: 1px solid var(--border); }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 26px;
  font-size: 15px;
  overflow-x: auto;
  display: block;
}
.post-body th, .post-body td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.post-body th {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent-2);
  background: var(--surface);
}
.post-body tr:nth-child(even) td { background: var(--surface); }
.post-body table code { white-space: nowrap; }

/* ===== page header (used by list.html for /posts/, /tags/, etc) ===== */
.page-header { padding-top: 48px; padding-bottom: 8px; }

/* ===== footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 26px 0 60px;
}
.footer-inner {
  max-width: 820px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ===== responsive ===== */
@media (max-width: 640px) {
  .hero-title { font-size: 32px; }
  .post-title { font-size: 28px; }
  .fleet-row { grid-template-columns: 16px 120px 1fr; }
  .fleet-state { display: none; }
  .journal-date { min-width: 84px; }
  body { font-size: 17px; }
}
