:root {
  --bg: #0a0a0a;
  --fg: #c8c8c8;
  --dim: #555;
  --hl: #fff;
  --green: #5af78e;
  --cyan: #59cfff;
  --yellow: #f3f99d;
  --glow-green: rgba(90, 247, 142, 0.4);
  --glow-cyan: rgba(89, 207, 255, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 14px;
  line-height: 1.7;
}

::selection {
  background: var(--cyan);
  color: var(--bg);
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 120px 24px 60px;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1a1a1a;
}

.nav-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: var(--green);
  text-decoration: none;
  font-size: 13px;
  text-shadow: 0 0 6px var(--glow-green);
}
.logo:hover { color: var(--hl); }

.nav-links { display: flex; gap: 20px; }

.nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--glow-cyan);
}

/* ── Blog index ── */
h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 32px;
  letter-spacing: 1px;
  text-shadow: 0 0 8px var(--glow-cyan);
}

.post-list {
  display: flex;
  flex-direction: column;
}

.post-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #151515;
  text-decoration: none;
  transition: background 0.15s;
}
.post-link:hover { background: rgba(255, 255, 255, 0.02); }

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

.post-title {
  font-size: 14px;
  color: var(--fg);
}
.post-link:hover .post-title {
  color: var(--cyan);
  text-shadow: 0 0 6px var(--glow-cyan);
}

.empty {
  color: var(--dim);
  padding: 40px 0;
}

/* ── Post article ── */
article header {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1a1a1a;
}

article h1 {
  font-size: 24px;
  line-height: 1.3;
  margin-bottom: 8px;
}

article time {
  font-size: 12px;
  color: var(--dim);
}

.content {
  font-size: 14px;
  line-height: 1.9;
}

.content h2 {
  font-size: 18px;
  color: var(--cyan);
  margin: 48px 0 16px;
  font-weight: 700;
  text-shadow: 0 0 6px var(--glow-cyan);
}

.content h3 {
  font-size: 16px;
  color: var(--hl);
  margin: 36px 0 12px;
  font-weight: 700;
}

.content p { margin-bottom: 16px; color: var(--fg); }

.content a {
  color: var(--yellow);
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 4px;
  text-decoration-color: var(--dim);
}
.content a:hover { color: var(--hl); }

.content code {
  font-size: 13px;
  background: #151515;
  padding: 2px 6px;
  color: var(--green);
}

.content pre {
  background: #111;
  border: 1px solid #1a1a1a;
  padding: 16px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 13px;
}

.content pre code {
  background: none;
  padding: 0;
}

.content blockquote {
  border-left: 2px solid var(--cyan);
  padding-left: 16px;
  color: var(--dim);
  margin: 24px 0;
  font-style: italic;
}

.content ul, .content ol {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--fg);
}

.content li { margin-bottom: 8px; }

.content img {
  max-width: 100%;
  margin: 24px 0;
  filter: grayscale(80%) contrast(1.1);
}

.back {
  display: inline-block;
  margin-top: 48px;
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
}
.back::before { content: "< "; color: var(--green); }
.back:hover { color: var(--cyan); }
