.blog-header {
  padding: 80px 0 20px;
  background: var(--paper);
}

.blog-header h2 {
  font-size: clamp(45px, 6vw, 76px);
  margin: 16px 0 0;
}

.blog-header h2 span {
  color: var(--blue);
}

.blog-list {
  padding: 40px 0 100px;
  background: var(--paper); /* Match the hero background for seamless flow */
}

/* 4-column grid for blog posts, using the same variable from styles.css */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.blog-grid-card {
  padding: 30px 25px;
  display: flex;
  flex-direction: column;
}

.blog-grid-card .blog-meta {
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  color: #9ca2ab;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.blog-grid-card h3 {
  font-size: 20px;
  margin: 0 0 12px;
  line-height: 1.2;
}

.blog-grid-card h3 a {
  transition: color 0.2s;
}

.blog-grid-card h3 a:hover {
  color: var(--blue);
}

.blog-grid-card h3 a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.blog-grid-card {
  padding: 30px 25px;
  display: flex;
  flex-direction: column;
  position: relative; /* Added to constrain the absolutely positioned pseudo-element */
}

.blog-grid-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Pagination */
.pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
}

.pagination-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
  align-items: center;
}

.pagination-link, .pagination-next {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  transition: 0.2s;
}

.pagination-link:hover, .pagination-next:hover {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(17, 19, 24, 0.05);
}

.pagination-link.active {
  background: var(--ink);
  color: #fff;
}

.pagination-ellipsis {
  color: #aeb4bd;
  padding: 0 4px;
}

/* Post view specific styles */
.post-header {
  padding: 80px 0 50px;
  background: var(--paper);
}

.post-header h1 {
  font-size: clamp(40px, 5vw, 64px);
  margin: 16px 0 30px;
  line-height: 1.05;
}

.post-content {
  padding: 40px 0 100px;
  background: #fff;
}

.post-body {
  font-size: 17px;
  line-height: 1.7;
  color: #353941;
}

.post-body h2 {
  font-size: 32px;
  margin: 50px 0 20px;
  color: var(--ink);
}

.post-body h3 {
  font-size: 24px;
  margin: 40px 0 16px;
  color: var(--ink);
}

.post-body p {
  margin: 0 0 24px;
}

.post-body ul, .post-body ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 10px;
}

.post-body strong {
  color: var(--ink);
}

.post-body blockquote {
  border-left: 4px solid var(--blue);
  margin: 30px 0;
  padding: 5px 0 5px 20px;
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
}

.post-author {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
}

.post-author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--lime);
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  overflow: hidden;
}

.post-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author-info b {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.post-author-info b a {
  transition: color 0.2s;
}

.post-author-info b a:hover {
  color: var(--blue);
}

.post-author-info span {
  font-size: 14px;
  color: var(--muted);
}

/* Responsiveness */
@media(max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width: 620px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}