:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --max: 800px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

/* ── Nav ── */
header { border-bottom: 1px solid var(--border); padding: 0.9rem 1rem; }
nav {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title { font-weight: 600; font-size: 1.05rem; color: var(--text); }
.site-title:hover { color: var(--accent); text-decoration: none; }
nav ul { list-style: none; display: flex; gap: 1.5rem; }
nav ul a { color: var(--muted); font-size: 0.95rem; }
nav ul a:hover { color: var(--text); text-decoration: none; }
nav ul a.active { color: var(--text); }

/* ── Main ── */
main { max-width: var(--max); margin: 0 auto; padding: 2rem 1rem; }

/* ── About ── */
.about-layout { display: flex; gap: 2.5rem; align-items: flex-start; }
.about-sidebar { flex-shrink: 0; width: 180px; text-align: center; }
.about-sidebar img {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 2px solid var(--border);
}
.about-sidebar .subtitle {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.75rem;
  line-height: 1.45;
}
.social-links { display: flex; justify-content: center; gap: 1rem; margin-top: 0.75rem; }
.social-links a { font-size: 0.85rem; }

.about-content h1 { font-size: 1.7rem; margin-bottom: 0.4rem; }
.about-content > p { margin-bottom: 1rem; }
.about-content h2 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.about-content h3 { font-size: 1rem; margin: 1rem 0 0.3rem; color: var(--accent); }
.about-content ul { margin: 0.4rem 0 0.75rem 1.5rem; }
.about-content li { margin-bottom: 0.2rem; }
.about-content strong { color: var(--text); }

/* ── Blog index ── */
.page-title { font-size: 1.6rem; margin-bottom: 1.5rem; }
.post-list { list-style: none; }
.post-item { padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.post-item:first-child { border-top: 1px solid var(--border); }
.post-date { color: var(--muted); font-size: 0.82rem; }
.post-item h2 { font-size: 1.05rem; margin: 0.2rem 0; }
.post-item h2 a { color: var(--text); }
.post-item h2 a:hover { color: var(--accent); text-decoration: none; }
.post-description { color: var(--muted); font-size: 0.875rem; margin-top: 0.2rem; }
.post-tags { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  padding: 0.1rem 0.5rem;
  border-radius: 2rem;
}

/* ── Post ── */
.back-link { display: inline-block; margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--muted); }
.back-link:hover { color: var(--accent); text-decoration: none; }
.post-header { margin-bottom: 1.75rem; }
.post-header h1 { font-size: 1.8rem; margin-bottom: 0.4rem; }
.post-meta { color: var(--muted); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

article h1 { font-size: 1.5rem; margin: 1.75rem 0 0.65rem; }
article h2 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.65rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
article h3 { font-size: 1.05rem; margin: 1.25rem 0 0.45rem; color: var(--accent); }
article h4 { font-size: 0.95rem; margin: 1rem 0 0.35rem; }
article p { margin-bottom: 0.9rem; }
article ul, article ol { margin: 0.5rem 0 0.9rem 1.5rem; }
article li { margin-bottom: 0.25rem; }
article hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
article strong { color: var(--text); }

/* ── Code ── */
code {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Cascadia Code', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
  font-size: 0.875em;
  padding: 0.15em 0.4em;
}
pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
  padding: 1rem;
  margin: 0.75rem 0 1rem;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.775rem;
  line-height: 1.55;
}

/* ── Images ── */
.post-img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
  margin: 1rem auto;
}
.img-row { display: flex; gap: 0.75rem; margin: 1rem 0; }
.img-row .post-img { flex: 1; min-width: 0; margin: 0; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1.5rem 1rem;
  margin-top: 3rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .about-layout { flex-direction: column-reverse; }
  .about-sidebar { width: 100%; }
  .img-row { flex-direction: column; }
  .post-header h1 { font-size: 1.4rem; }
}
