/* ============================================================
   BLOG STYLES — Dr. Kelvin Ng
   ============================================================ */

/* ---- Blog Hero ---- */
.blog-hero {
  padding: calc(var(--nav-h) + 64px) 24px 64px;
  text-align: center;
  background: var(--bg-card-alt);
  border-bottom: 1px solid var(--border);
}
.blog-hero-content {
  max-width: 640px;
  margin: 0 auto;
}
.blog-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 16px;
}
.blog-hero p {
  font-size: 1.05rem;
}

/* ---- Blog Listing ---- */
.blog-listing {
  padding: 72px 24px;
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.post-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-3px);
}
.post-card-image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.post-card:hover .post-card-image img {
  transform: scale(1.04);
}
.post-card-content {
  padding: 24px;
}
.post-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.post-category {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  padding: 3px 9px;
  border-radius: 4px;
}
.post-date {
  font-size: .75rem;
  color: var(--text-muted);
}
.post-card h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.4;
}
.post-card h2 a {
  color: var(--text);
}
.post-card h2 a:hover { color: var(--gold); }
.post-card p {
  font-size: .875rem;
  margin-bottom: 16px;
}
.read-more {
  font-size: .85rem;
  font-weight: 600;
  color: var(--gold);
}
.read-more:hover { color: var(--gold-light); }

/* ---- Blog Post Article ---- */
.post-header {
  background: var(--bg-card-alt);
  border-bottom: 1px solid var(--border);
  padding: calc(var(--nav-h) + 48px) 24px 48px;
}
.post-header-inner {
  max-width: 760px;
  margin: 0 auto;
}
.back-link {
  display: inline-block;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.back-link:hover { color: var(--gold); }
.post-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 20px;
  line-height: 1.25;
}
.post-intro {
  font-size: 1.1rem;
  color: var(--text-sub);
  line-height: 1.75;
  margin-bottom: 28px;
}
.post-author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--gold-border);
}
.author-name {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}
.author-title {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
}

/* ---- Featured Image ---- */
.post-featured-image {
  max-height: 480px;
  overflow: hidden;
  background: var(--bg-card);
}
.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ---- Post Body ---- */
.post-body {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
}
.post-content h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 14px;
  color: var(--text);
}
.post-content h2:first-child { margin-top: 0; }
.post-content h3 {
  font-size: 1.1rem;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--gold);
  font-family: var(--sans);
  font-weight: 600;
}
.post-content p {
  font-size: .975rem;
  line-height: 1.8;
  color: var(--text-sub);
  margin-bottom: 18px;
}
.post-content ul {
  list-style: none;
  margin: 0 0 18px 0;
}
.post-content ul li {
  position: relative;
  padding-left: 20px;
  font-size: .95rem;
  color: var(--text-sub);
  margin-bottom: 8px;
  line-height: 1.7;
}
.post-content ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
  font-size: .8rem;
  top: 3px;
}
.post-content strong { color: var(--text); }

/* CTA Box */
.post-cta-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(201,168,96,.06) 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  padding: 36px;
  margin-top: 48px;
  text-align: center;
}
.post-cta-box h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text);
  font-family: var(--serif);
}
.post-cta-box p {
  margin-bottom: 24px;
}
.post-cta-box .btn-primary,
.post-cta-box .btn-secondary {
  margin: 6px;
}

/* ---- Sidebar ---- */
.post-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.sidebar-author {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}
.sidebar-author img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin: 0 auto 16px;
  border: 2px solid var(--gold-border);
}
.sidebar-author h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}
.sidebar-author p {
  font-size: .8rem;
  margin-bottom: 12px;
}
.sidebar-author .btn-secondary {
  font-size: .8rem;
  padding: 8px 16px;
  width: 100%;
  justify-content: center;
}
.sidebar-topics {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.sidebar-topics h4 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.sidebar-topics ul { list-style: none; }
.sidebar-topics ul li {
  font-size: .82rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-topics ul li:last-child { border-bottom: none; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .post-body {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 48px 24px;
  }
  .post-sidebar {
    position: static;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
}
