/* Blog-specific styles — builds on /css/main.css tokens */

.blog-main {
  padding-top: calc(var(--nav-h) + 2rem);
  min-height: calc(100svh - var(--nav-h) - 8rem);
}

.blog-container {
  max-width: 46rem;
}

.no-posts {
  text-align: center;
  padding-block: 4rem;
}

/* ---- Post list ---- */

.post-list {
  display: grid;
  gap: 1.875rem;
}

.post-card .date,
.post-single .date {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}

.post-title {
  font-size: 1.6rem;
  line-height: 1.35;
  margin-bottom: .75rem;
}

.post-title a {
  color: var(--heading);
}

.post-title a:hover {
  color: var(--primary);
  opacity: 1;
}

.post-cover {
  display: block;
  margin: -1.875rem -1.875rem 1.25rem;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
}

/* ---- Single post ---- */

.post-single .post-cover {
  margin: 0 0 1.5rem;
  border-radius: var(--radius);
}

.post-header {
  margin-bottom: 1.5rem;
}

.post-single .post-title {
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
}

/* ---- Post content (WYSIWYG output) ---- */

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

.post-content h2,
.post-content h3,
.post-content h4 {
  margin: 1.75rem 0 .75rem;
}

.post-content h2 {
  font-size: 1.5rem;
}

.post-content h3 {
  font-size: 1.2rem;
}

.post-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content img {
  border-radius: var(--radius);
  margin-block: 1rem;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1rem 1.4rem;
}

.post-content ul {
  list-style: disc;
}

.post-content ol {
  list-style: decimal;
}

.post-content blockquote {
  border-left: 3px solid var(--primary);
  padding: .25rem 0 .25rem 1.25rem;
  margin-block: 1.25rem;
  color: var(--heading);
  font-style: italic;
}

.post-content pre {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-block: 1.25rem;
  font-size: .9rem;
  line-height: 1.6;
}

.post-content code {
  background: rgba(255, 255, 255, .08);
  border-radius: 3px;
  padding: .1em .35em;
  font-size: .9em;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 2rem;
}

.post-content table {
  border-collapse: collapse;
  width: 100%;
  margin-block: 1.25rem;
}

.post-content th,
.post-content td {
  border: 1px solid var(--line);
  padding: .5rem .75rem;
  text-align: left;
}

.post-content th {
  color: var(--heading);
}

/* ---- Tags ---- */

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 2rem;
}

.tag-badge {
  background: var(--card);
  border: 1px solid rgba(255, 189, 57, .35);
  color: var(--heading);
  font-size: .8rem;
  padding: .2rem .8rem;
  border-radius: 999px;
}

.tag-badge:hover {
  border-color: var(--primary);
  opacity: 1;
}

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

/* ---- Pagination ---- */

.paginator {
  display: flex;
  justify-content: center;
  gap: .75rem;
  margin-top: 3rem;
}

.paginator .page-link {
  background: var(--card);
  border-radius: var(--radius);
  padding: .5rem 1.25rem;
  color: var(--heading);
  font-size: .95rem;
}

.paginator .page-link:hover {
  background: rgba(255, 189, 57, .15);
  opacity: 1;
}

.paginator .page-link.disabled {
  opacity: .4;
  pointer-events: none;
}
