:root {
  --bg: #000;
  --bg-elevated: #0a0a0a;
  --bg-card: #0a0a0a;
  --bg-card-hover: #111;
  --fg: #f0f0f0;
  --fg-dim: #aaa;
  --fg-faint: #777;
  --accent: #97fd00;
  --accent-soft: rgba(151, 253, 0, 0.1);
  --accent-dim: #6fc700;
  --purple: #5852fb;
  --purple-soft: rgba(88, 82, 251, 0.1);
  --amber: #97fd00;
  --border: rgba(151, 253, 0, 0.1);
  --border-strong: rgba(88, 82, 251, 0.15);
  --font-sans: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(151, 253, 0, 0.05) 0%, transparent 15%),
    radial-gradient(circle at 90% 80%, rgba(88, 82, 251, 0.05) 0%, transparent 15%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--purple);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--accent); }

code, pre, .prompt-line, .logo, .post-meta, .post-card-meta, .site-nav a {
  font-family: var(--font-mono);
}

.rule {
  border-top: 1px solid var(--border);
}

/* Header */
.site-header {
  padding-top: 1.75rem;
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 1.1rem;
}
.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
  white-space: nowrap;
}
.logo-slash { color: var(--purple); }
.logo-user { color: var(--accent); text-shadow: 0 0 8px rgba(151, 253, 0, 0.5); }
.logo:hover { text-decoration: none; }
.cursor {
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.site-nav { display: flex; gap: 1.5rem; font-size: 0.9rem; }
.site-nav a { color: var(--fg-dim); transition: color 0.15s ease; }
.site-nav a:hover { color: var(--accent); }

/* Main */
.main { padding: 3rem 0 4rem; }

.prompt-line {
  color: var(--fg-faint);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.prompt-line .prompt, .prompt { color: var(--accent); }

.hero { margin-bottom: 3.5rem; }
.hero h1 {
  margin: 0 0 0.6rem;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(151, 253, 0, 0.35);
}
.hero .tagline {
  color: var(--fg-dim);
  font-size: 1.15rem;
  max-width: 40em;
}

/* Section title */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.section-num {
  font-size: 0.8rem;
  color: var(--purple);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.1em 0.5em;
}
.section-title h2 {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--fg-dim);
  font-weight: 600;
  margin: 0;
}
.section-title h2 small { color: var(--fg-faint); font-weight: 400; }

.list-header { margin-bottom: 2.5rem; }
.list-header h1 { font-size: 2rem; margin: 0 0 0.5rem; }
.section-desc { color: var(--fg-dim); }

/* Post grid / cards */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover {
  border-color: var(--purple);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(88, 82, 251, 0.15);
}

.post-card-link {
  display: flex;
  flex-direction: column;
  color: var(--fg);
  height: 100%;
}
.post-card-link:hover { text-decoration: none; }

.post-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border-strong);
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.35rem 1.4rem;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--fg-faint);
}
.post-card-tag {
  background: var(--purple-soft);
  color: var(--purple);
  border-radius: 999px;
  padding: 0.15em 0.65em;
  font-size: 0.72rem;
  text-transform: lowercase;
}

.post-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--fg);
}

.post-card-summary {
  margin: 0;
  color: var(--fg-dim);
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
}

.post-card-more {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--accent);
}

.all-posts-link {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.all-posts-link a { color: var(--purple); }
.all-posts-link a:hover { color: var(--accent); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.pagination a { color: var(--purple); }
.pagination a:hover { color: var(--accent); }
.pagination-status { color: var(--fg-faint); }

.empty-state {
  color: var(--fg-faint);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* Post */
.post-header { margin-bottom: 2.5rem; }
.post-header h1 {
  color: var(--fg);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}
.post-meta { color: var(--fg-faint); font-size: 0.85rem; }
.post-meta .sep { margin: 0 0.5em; }

.post-hero-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  margin-bottom: 2.5rem;
}

.post-content { max-width: 70ch; }
.post-content h2, .post-content h3 {
  color: var(--accent);
  margin-top: 2em;
}
.post-content h2 { font-size: 1.4rem; }
.post-content h3 { font-size: 1.15rem; }
.post-content p { color: var(--fg); }
.post-content a { color: var(--purple); border-bottom: 1px solid var(--purple); }
.post-content a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }
.post-content code {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.88em;
}
.post-content pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
}
.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--fg);
}
.post-content blockquote {
  border-left: 3px solid var(--purple);
  margin: 1.2rem 0;
  padding: 0.3rem 1.2rem;
  color: var(--fg-dim);
}
.post-content img { max-width: 100%; border-radius: var(--radius); }
.post-content ul, .post-content ol { color: var(--fg); }
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.92rem;
}
.post-content th, .post-content td {
  border: 1px solid var(--border-strong);
  padding: 0.5rem 0.8rem;
  text-align: left;
}
.post-content th {
  color: var(--accent);
  background: var(--bg-elevated);
  font-weight: 600;
}
.post-content td code { font-size: 0.85em; }

/* Footer */
.site-footer {
  color: var(--fg-faint);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.footer-row {
  padding: 1.5rem 0 2.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-row .prompt { color: var(--accent-dim); }
.footer-nav a { color: var(--fg-faint); margin-left: 1.25rem; }
.footer-nav a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .post-grid { grid-template-columns: 1fr; }
}
