/* static/blog/blog.css */

/* -------------------------------------------------------
   Blog layout
   Uses CSS custom properties so it inherits from your
   site's own design system. Override these in your
   site's base CSS if needed.
------------------------------------------------------- */

:root {
  --blog-max-width: 800px;
  --blog-font-body: inherit;
  --blog-color-muted: #666;
  --blog-color-tag-bg: #f0f0f0;
  --blog-color-tag-fg: #333;
  --blog-spacing-section: 2.5rem;
}

/* Index & tag listing
------------------------------------------------------- */
.blog-index {
  max-width: var(--blog-max-width);
  margin: 0 auto;
  padding: 1rem;
}

.blog-header {
  margin-bottom: var(--blog-spacing-section);
}

.blog-tags-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: var(--blog-spacing-section);
  font-size: 0.875rem;
}

.blog-tags-label {
  color: var(--blog-color-muted);
  margin-right: 0.25rem;
}

.blog-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-article-entry {
  padding: 1.5rem 0;
  border-bottom: 1px solid #e8e8e8;
}

.blog-article-entry:last-child {
  border-bottom: none;
}

.blog-article-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.3rem;
}

.blog-article-title a {
  text-decoration: none;
}

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

/* Meta line (date, author, tags)
------------------------------------------------------- */
.blog-article-meta {
  font-size: 0.85rem;
  color: var(--blog-color-muted);
  margin-bottom: 0.75rem;
}

.blog-article-meta time {
  font-variant-numeric: tabular-nums;
}

.blog-article-author {
  font-style: italic;
}

/* Tags
------------------------------------------------------- */
.blog-tag {
  display: inline-block;
  padding: 0.15em 0.55em;
  border-radius: 3px;
  background: var(--blog-color-tag-bg);
  color: var(--blog-color-tag-fg);
  font-size: 0.8rem;
  text-decoration: none;
  margin: 0 0.1rem;
}

.blog-tag:hover {
  opacity: 0.75;
}

.blog-tag-count {
  opacity: 0.6;
}

/* Summary excerpt
------------------------------------------------------- */
.blog-article-summary {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  color: #333;
}

.blog-article-summary p:first-child {
  margin-top: 0;
}

.blog-read-more {
  font-size: 0.875rem;
}

/* Article detail
------------------------------------------------------- */
.blog-article-detail {
  max-width: var(--blog-max-width);
  margin: 0 auto;
  padding: 1rem;
}

.blog-article-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e8e8e8;
}

.blog-article-header h1 {
  margin-bottom: 0.4rem;
}

/* Article body typography
------------------------------------------------------- */
.blog-article-body {
  line-height: 1.75;
  font-size: 1.0rem;
}

.blog-article-body h2,
.blog-article-body h3,
.blog-article-body h4 {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.blog-article-body p {
  margin: 0 0 1.2rem 0;
}

.blog-article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 3px;
}

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

/* Inline code
------------------------------------------------------- */
.blog-article-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  background: #f5f5f5;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

/* Code blocks (Pygments .highlight wrapper)
------------------------------------------------------- */
.blog-article-body .highlight {
  background: #f8f8f8;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.2rem 0;
}

.blog-article-body .highlight code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Plain <pre> blocks (non-highlighted)
------------------------------------------------------- */
.blog-article-body pre {
  background: #f8f8f8;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 1.2rem 0;
}

/* Tables
------------------------------------------------------- */
.blog-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.9rem;
}

.blog-article-body th,
.blog-article-body td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e8e8e8;
}

.blog-article-body th {
  font-weight: 600;
  border-bottom-width: 2px;
}

/* Article footer
------------------------------------------------------- */
.blog-article-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #e8e8e8;
  font-size: 0.875rem;
}
