/* Blog styles — self-contained so the main app's styles.css and the blog
   never affect each other. Palette mirrors the main site for visual harmony. */

:root {
  --ink: #17211f;
  --muted: #61706c;
  --line: #dbe4df;
  --paper: #fafaf7;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0b4f49;
  --radius: 10px;
  --max: 760px;
  --shadow: 0 18px 60px rgba(31, 48, 44, 0.12);
}

* {
  box-sizing: border-box;
}

.blog-body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

.blog-body a {
  color: var(--accent);
  text-decoration: none;
}

.blog-body a:hover {
  text-decoration: underline;
}

/* Header */
.blog-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 28px;
  background: rgba(250, 250, 247, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  color: var(--ink);
}

.brand-logo {
  height: 48px;
  width: auto;
  display: block;
}

.blog-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.blog-nav a {
  color: var(--muted);
}

.topbar-action {
  padding: 9px 16px;
  color: #fff !important;
  background: var(--accent);
  border-radius: 999px;
  font-weight: 600;
}

.topbar-action:hover {
  text-decoration: none;
  background: var(--accent-dark);
}

/* Layout */
.blog-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) 24px;
}

/* Index hero */
.blog-hero {
  margin-bottom: 48px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.blog-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Post list */
.post-list {
  display: grid;
  gap: 18px;
}

.post-card {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.post-card-meta,
.post-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.post-card h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  line-height: 1.25;
}

.post-card h2 a {
  color: var(--ink);
}

.post-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.post-card-link {
  font-weight: 600;
}

/* Single post */
.post-back {
  margin: 0 0 24px;
  font-size: 0.9rem;
}

.post-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.post-header h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.12;
}

.post-content {
  font-size: 1.08rem;
}

.post-content h2 {
  margin: 40px 0 14px;
  font-size: 1.6rem;
}

.post-content h3 {
  margin: 28px 0 10px;
  font-size: 1.25rem;
}

.post-content p {
  margin: 0 0 20px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px;
  padding-left: 26px;
}

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

.post-content img {
  display: block;
  width: 100%;
  height: auto;
  margin: 28px 0;
  border-radius: var(--radius);
}

.post-content blockquote {
  margin: 24px 0;
  padding: 4px 20px;
  color: var(--muted);
  border-left: 3px solid var(--accent);
}

.post-content code {
  padding: 2px 6px;
  background: #eef2f0;
  border-radius: 5px;
  font-size: 0.92em;
}

.post-content pre {
  margin: 0 0 20px;
  padding: 18px;
  overflow-x: auto;
  background: #17211f;
  color: #f4f6f4;
  border-radius: var(--radius);
}

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

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

/* Footer */
.blog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px 56px;
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-footer a {
  color: var(--muted);
}

@media (max-width: 560px) {
  .blog-nav {
    gap: 14px;
    font-size: 0.85rem;
  }
}
