/* ============================================================
   HTC Publication Skin — blog-specific layout
   Loaded on top of the shared /sass/htc.css brand stylesheet, so
   everything here uses the same colour/font/spacing tokens the
   static site defines (--ht-pink, --font-heading, --space-*, etc).
   ============================================================ */

.htc-blog { background: var(--bg); }
.htc-blog .container { max-width: 800px; }
.htc-blog .htc-archive-grid-wrap.container,
.htc-blog .htc-archive-header.container { max-width: 1100px; }

/* ---------- Single post ---------- */
.htc-post-header {
  background: var(--ht-grey-pale);
  padding: var(--space-8) 0 var(--space-7);
}
.htc-post-header-inner { max-width: 800px; }
.htc-post-cat {
  display: inline-block;
  text-decoration: none;
}
.htc-post-title { margin: 0 0 var(--space-4); }
.htc-post-byline { opacity: .8; }

.htc-post-thumb {
  margin-top: calc(-1 * var(--space-6));
  margin-bottom: var(--space-7);
}
.htc-post-thumb img {
  border-radius: var(--r-lg);
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-md);
}

.htc-post-body-wrap { padding: var(--space-6) 0 var(--space-8); }

.htc-post-content {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
  color: var(--fg);
}
.htc-post-content > * + * { margin-top: var(--space-5); }
.htc-post-content h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw + 1rem, 2rem);
  line-height: var(--lh-heading);
  letter-spacing: var(--tr-tight);
  color: var(--ht-aubergine);
  margin: var(--space-7) 0 var(--space-4);
}
.htc-post-content h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: var(--lh-heading);
  color: var(--ht-aubergine);
  margin: var(--space-6) 0 var(--space-3);
}
.htc-post-content p { margin: 0; }
.htc-post-content a { color: var(--ht-pink); text-decoration: underline; text-underline-offset: 3px; }
.htc-post-content a:hover { color: var(--ht-pink-ink); }
.htc-post-content ul,
.htc-post-content ol {
  padding-left: 1.4em;
  list-style: revert;
}
.htc-post-content li + li { margin-top: var(--space-2); }
.htc-post-content blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  border-left: 4px solid var(--ht-pink);
  background: var(--ht-grey-pale);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic;
}
.htc-post-content blockquote p { margin: 0; }
.htc-post-content strong { color: var(--ht-aubergine); font-weight: 700; }
.htc-post-content img { border-radius: var(--r-md); }
.htc-post-content hr { border: none; border-top: 1px solid var(--border); margin: var(--space-7) 0; }

.htc-post-footer-nav { padding-bottom: var(--space-8); }

/* ---------- Archive ---------- */
.htc-archive-header { padding: var(--space-8) 0 var(--space-6); }
.htc-archive-desc {
  max-width: 780px;
  color: var(--fg-muted);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
  margin-top: var(--space-3);
}
.htc-archive-grid-wrap { padding-bottom: var(--space-9); }
.htc-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.htc-archive-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid var(--ht-grey-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.htc-archive-card:hover {
  border-color: var(--ht-pink-soft);
  box-shadow: var(--shadow-md);
}
.htc-archive-card-thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.htc-archive-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.htc-archive-card-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.htc-archive-card-title { margin: 0; }
.htc-archive-card-excerpt {
  margin: 0;
  color: var(--fg-muted);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
  flex: 1;
}
.htc-archive-pagination { margin-top: var(--space-7); text-align: center; }
.htc-archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  margin: 0 4px;
  border-radius: var(--r-pill);
  text-decoration: none;
  color: var(--ht-aubergine);
  font-weight: 600;
  font-size: var(--fs-body-sm);
}
.htc-archive-pagination .page-numbers.current { background: var(--ht-pink); color: #fff; }
.htc-archive-empty { color: var(--fg-muted); padding: var(--space-6) 0; }

@media (max-width: 900px) {
  .htc-archive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .htc-archive-grid { grid-template-columns: 1fr; }
  .htc-post-thumb { margin-top: 0; }
}
