/* Blog-specific styling layered on top of shared.css */

/* Sticky footer: keep the footer pinned to the bottom of the viewport on
   short pages so there is no dead whitespace below it. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.blog-index,
.blog-post {
  flex: 1 0 auto;
  /* Top padding clears the fixed .nav-header so the page heading doesn't
     tuck under / touch the navigation. */
  padding: 8rem 0 6rem;
}

.footer {
  flex-shrink: 0;
}

.blog-header {
  text-align: center;
  margin-bottom: 3rem;
}

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

.blog-subtitle {
  color: #555;
  font-size: 1.1rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.blog-card {
  border: 1px solid #e6e6ec;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.blog-card-cover img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: 1rem 1.25rem 1.25rem;
}

.blog-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.blog-card h2 a {
  color: inherit;
  text-decoration: none;
}

.blog-card-meta {
  color: #666;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.blog-empty {
  text-align: center;
  color: #666;
  padding: 4rem 0;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.blog-post-back {
  margin-bottom: 1.5rem;
}

.blog-post-header h1 {
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.blog-post-meta {
  color: #666;
  margin-bottom: 1.5rem;
}

.blog-post-cover {
  width: 100%;
  border-radius: 0.5rem;
  margin: 1.5rem 0 2rem;
}

.blog-post-body {
  font-size: 1.05rem;
  line-height: 1.65;
}

.blog-post-body h2,
.blog-post-body h3 {
  margin-top: 2rem;
}

.blog-post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.4rem;
  margin: 1.5rem 0;
}

.blog-post-body blockquote {
  border-left: 3px solid #071fc8;
  padding-left: 1rem;
  color: #444;
  margin: 1.5rem 0;
}

.blog-post-body pre {
  background: #f4f6ff;
  padding: 1rem;
  border-radius: 0.4rem;
  overflow-x: auto;
}

.blog-post-tags {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-tag {
  background: #f4f6ff;
  color: #071fc8;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.85rem;
}
