/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --font-pixel: 'Press Start 2P', monospace;
  --font-mono:  ui-monospace, 'Cascadia Code', 'Courier New', monospace;
  --font-sans:  ui-sans-serif, system-ui, -apple-system, sans-serif;

  --text:        #d4d4b8;
  --text-muted:  #7a7a62;
  --text-light:  #484838;
  --border:      #1e1e30;
  --bg:          #0c0c14;
  --bg-raised:   #12121e;
  --bg-code:     #161624;
  --accent:      #c8a020;
  --accent-dim:  #7a6010;

  --width: 720px;
}

/* ── Base ───────────────────────────────────────────── */
html { font-size: 17px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img { max-width: 100%; display: block; }

/* ── Layout ─────────────────────────────────────────── */
.container {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { flex: 1; padding: 2.5rem 0 4rem; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  border-bottom: 2px solid var(--border);
  padding: 1rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  line-height: 1.8;
  text-decoration: none;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.site-title:hover { text-decoration: none; opacity: 0.8; }

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  line-height: 2;
  text-decoration: none;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* ── Homepage ───────────────────────────────────────── */
.home-intro {
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
  text-align: center;
}

.home-logo-wrap {
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
}

/* vignette that fades any logo into the dark bg */
.home-logo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 48px 18px var(--bg);
  pointer-events: none;
}

.home-logo {
  width: 340px;
  height: 340px;
  display: block;
  border-radius: 12px;
  image-rendering: auto;
}

.home-logo:hover { opacity: 0.9; }

.home-quote {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  line-height: 2.2;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
}

.home-desc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
  text-align: left;
}

/* ── Post list ──────────────────────────────────────── */
.section-label {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  line-height: 2;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  line-height: 2;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-desc {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 2rem;
}

.post-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem 1.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.post-date {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  line-height: 2.2;
  color: var(--text-light);
  white-space: nowrap;
}

.post-link {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  line-height: 2;
  font-weight: normal;
  text-decoration: none;
  color: var(--text);
}

.post-link:hover { color: var(--accent); text-decoration: none; }

.tag-row { margin-top: 0.35rem; display: flex; gap: 0.35rem; flex-wrap: wrap; }

.tag {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--text-light);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 1px 6px;
}

.tag:hover { border-color: var(--accent-dim); color: var(--accent); text-decoration: none; }

/* ── Single post ────────────────────────────────────── */
.post-header { margin-bottom: 2rem; }

.post-section {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  line-height: 2;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.post-title {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--accent);
  margin-bottom: 1rem;
}

.post-byline {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  line-height: 2.2;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.byline-sep { color: var(--border); }
.byline-tags { display: flex; gap: 0.35rem; }

/* ── Post content ───────────────────────────────────── */
.post-content h2,
.post-content h3 {
  font-family: var(--font-pixel);
  font-weight: normal;
  color: var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

.post-content h2 { font-size: 0.65rem; }
.post-content h3 { font-size: 0.52rem; }

.post-content p { margin-bottom: 1.25rem; }

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-content li { margin-bottom: 0.3rem; }

.post-content blockquote {
  border-left: 3px solid var(--accent-dim);
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.5rem 0;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-code);
  color: #7ecfa0;
  padding: 0.15em 0.4em;
}

.post-content pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

.post-content pre code { background: none; padding: 0; color: inherit; }

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.post-content a { color: var(--accent); }
.post-content a:hover { text-decoration: underline; }

/* ── Post footer ────────────────────────────────────── */
.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.back-link {
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  line-height: 2;
  color: var(--text-muted);
  text-decoration: none;
}

.back-link::before { content: '< '; }
.back-link:hover { color: var(--accent); text-decoration: none; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  border-top: 2px solid var(--border);
  padding: 1rem 0;
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  line-height: 2.2;
  color: var(--text-light);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 520px) {
  html { font-size: 15px; }

  .home-logo { width: 260px; height: 260px; }

  .post-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .site-nav { gap: 1rem; }
}
