/* Blog-specific styles - overrides and extensions to styles.css */

/* Article header */
.article-header .lede {
  margin-top: 0.75rem;
  max-width: 68ch;
}

article h2 {
  margin: 2.5rem 0 1.125rem;
}

article h3 {
  margin: 2rem 0 1rem;
}

article h4 {
  margin: 1.75rem 0 0.75rem;
}

article h5,
article h6 {
  margin: 1.5rem 0 0.625rem;
}

/* Code blocks */
article pre {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}

article pre code {
  background: none;
  border: none;
  padding: 0;
  display: block;
}

/* Blockquotes */
article blockquote {
  border-left: 3px solid var(--brand);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
}

article blockquote p {
  margin-bottom: 0.875rem;
}

article blockquote p:last-child {
  margin-bottom: 0;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.25rem;
  margin-bottom: 3rem;
}

.post-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.post-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.post-link:focus:not(:focus-visible) {
  outline: none;
}

.post-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

.post-link:hover {
  color: var(--brand-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: currentColor;
}

.post-date {
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
  article h2 {
    margin: 2rem 0 0.875rem;
  }

  article h3 {
    margin: 1.75rem 0 0.75rem;
  }

  article pre {
    padding: 1rem 1.25rem;
    margin: 1.25rem -0.5rem;
    border-radius: 4px;
  }

  .post-list {
    margin-bottom: 2.5rem;
  }
}

/* Mermaid diagrams */
.mermaid-figure {
  margin: 1rem 0;
  padding: .6rem;
  overflow-x: auto;
  text-align: center;
}

.mermaid-figure img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}
