:root {
  --bg: #050816;
  --bg-card: #0c1020;
  --bg-soft: #12172b;
  --accent: #5b8dff;
  --accent-soft: rgba(91, 141, 255, 0.14);
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --border: rgba(148, 163, 184, 0.35);
  --radius: 12px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 48%, #000 100%);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

.blog-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(3,7,18,0.9), rgba(3,7,18,0.6));
  border-bottom: 1px solid var(--border);
}

.blog-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.blog-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.blog-logo__icon {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: linear-gradient(135deg, #22c55e, #2563eb);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.blog-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.blog-nav a {
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.blog-nav a:hover { color: var(--text); background: rgba(15,23,42,0.7); }

.blog-main { padding: 32px 0 48px; }

.blog-title { font-size: 28px; margin: 0 0 8px; }

.blog-subtitle { color: var(--text-muted); margin: 0 0 28px; font-size: 15px; }

.posts-list { display: flex; flex-direction: column; gap: 14px; }

.posts-loading, .posts-error { color: var(--text-muted); padding: 16px 0; }

.posts-error { color: #fca5a5; }

.post-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  border-color: rgba(91, 141, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.post-card__title { font-size: 17px; margin: 0 0 6px; }

.post-card__date { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }

.post-card__excerpt { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* Single post */
.blog-main--post .container { max-width: 680px; }

.post-article { position: relative; }

.post-meta { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }

.post-title { font-size: 26px; margin: 0 0 20px; line-height: 1.25; }

.post-body {
  font-size: 15px;
  line-height: 1.65;
}

.post-body h1 { font-size: 1.5em; margin: 1.2em 0 0.6em; }
.post-body h2 { font-size: 1.25em; margin: 1.1em 0 0.5em; }
.post-body h3 { font-size: 1.1em; margin: 1em 0 0.4em; }
.post-body p { margin: 0 0 1em; }
.post-body ul, .post-body ol { margin: 0 0 1em; padding-left: 1.5em; }
.post-body li { margin: 0.25em 0; }
.post-body code {
  background: rgba(15,23,42,0.9);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  font-size: 0.9em;
  border: 1px solid var(--border);
}
.post-body pre {
  background: rgba(15,23,42,0.95);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 1em 0;
}
.post-body pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: 13px;
}
.post-body blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}
.post-body a { color: var(--accent); }
.post-body a:hover { text-decoration: underline; }

.post-error { color: #fca5a5; padding: 16px 0; }

.blog-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.blog-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
