/* Blog styles — typography, post cards, tag nav, code blocks. */

/* Page layout */
.blog {
  padding: 120px 0 80px;
}

.blog .container {
  max-width: 760px;
}

/* Full article pages use a wider container for comfortable reading. */
.blog-article .container {
  max-width: 1200px;
}

/* Tag navigation */
.tag-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.tag-nav .tag {
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.45rem 1.1rem;
}

.tag-nav .tag.active {
  background: var(--primary-color);
  color: white;
}

/* Tag pills used as links (on full article pages) should not be underlined. */
a.tag {
  text-decoration: none;
  cursor: pointer;
}

/* Post list / feed */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-card {
  background: #fff;
  border: 1px solid var(--light-color);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.post-card-title {
  margin-bottom: 0.4rem;
  font-size: 1.4rem;
}

.post-card-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.post-card-title a:hover {
  text-decoration: underline;
}

.post-card-date {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.post-card-summary {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.read-more:hover {
  text-decoration: underline;
}

/* Full article page */
.post {
  background: #fff;
  border: 1px solid var(--light-color);
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.post-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--light-color);
  padding-bottom: 1.5rem;
}

.post-header h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.post-meta {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.post-content {
  line-height: 1.7;
  font-size: 1.05rem;
}

.post-content h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 2rem 0 1rem;
}

.post-content h3 {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin: 1.5rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.25rem 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content a {
  color: var(--primary-color);
}

.post-content blockquote {
  border-left: 4px solid var(--primary-color);
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  background: var(--light-color);
  color: var(--text-color);
  border-radius: 0 4px 4px 0;
}

.post-content code {
  background: var(--light-color);
  color: var(--primary-color);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 1.25rem;
}

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

.post-back {
  margin-top: 2rem;
}

.post-back a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.post-back a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .blog {
    padding: 100px 0 60px;
  }
  .post {
    padding: 1.5rem;
  }
  .post-header h1 {
    font-size: 1.6rem;
  }
}
