/* ============================================================
   THE DIGITAL OAK — blog.css
   ============================================================ */

/* ── Nav active state ─────────────────────────── */
.nav-active {
  color: var(--accent) !important;
}

/* ══════════════════════════════════════════════
   PAGE HERO (shared with other pages)
══════════════════════════════════════════════ */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 5rem) var(--gutter) 5rem;
  background: var(--bg);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
}

.page-hero-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--text);
  margin: 1.5rem 0 1.5rem;
}

.page-hero-title em {
  font-style: italic;
  color: var(--accent);
}

.page-hero-sub {
  font-size: 0.925rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
  max-width: 540px;
}

.page-hero-pulse {
  position: absolute;
  top: 0; right: 12%;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--accent) 45%, var(--accent-dim) 55%, transparent);
  opacity: 0;
  animation: heroPulse 6s ease-in-out infinite;
  pointer-events: none;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--faint) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse 60% 80% at 80% 50%, black 20%, transparent 100%);
  pointer-events: none;
}


/* ══════════════════════════════════════════════
   BLOG INDEX
══════════════════════════════════════════════ */
.blog-section {
  padding: 6rem 0;
  background: var(--bg);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
}

/* ── Blog Card ─────────────────────────────── */
.blog-card {
  background: var(--bg-alt);
  transition: background 0.2s;
}

.blog-card:hover {
  background: var(--surface);
}

.blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.03);
}

.blog-card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.blog-category {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.blog-date {
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--muted);
}

.blog-card-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.25;
}

.blog-card-excerpt {
  font-size: 0.83rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.75;
  flex: 1;
}

.blog-read-more {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: block;
}

/* ── Empty / Coming Soon State ─────────────── */
.blog-empty {
  grid-column: 1 / -1;
  padding: 6rem 3rem;
  text-align: center;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.blog-empty .eyebrow {
  justify-content: center;
}

.blog-empty-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1.1;
}

.blog-empty-title em {
  font-style: italic;
  color: var(--accent);
}

.blog-empty-text {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
  max-width: 480px;
}


/* ══════════════════════════════════════════════
   BLOG POST PAGE
══════════════════════════════════════════════ */
.post-article {
  padding: calc(var(--nav-h) + 4rem) 0 6rem;
  background: var(--bg);
}

.post-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Post Header ────────────────────────────── */
.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-back {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.2s;
}

.post-back:hover { color: var(--accent); }

.post-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1rem;
}

.post-description {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.post-author { font-weight: 500; color: var(--text); }

.post-byline span:not(.post-author)::before {
  content: '·';
  margin-right: 1.5rem;
}

/* ── Hero Image ─────────────────────────────── */
.post-hero-img {
  margin-bottom: 3rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.post-hero-img img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Post Content ───────────────────────────── */
.post-content {
  margin-bottom: 3.5rem;
}

.post-content p {
  font-size: 0.975rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.2;
  margin: 2.5rem 0 1rem;
}

.post-content h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-content li {
  font-size: 0.975rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.post-content strong {
  font-weight: 500;
  color: var(--text);
}

.post-content em {
  font-style: italic;
  color: var(--accent);
}

.post-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(182,212,76,0.3);
  transition: border-color 0.2s;
}

.post-content a:hover {
  border-color: var(--accent);
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border: 1px solid var(--border);
}

.post-content blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}

/* ── Post CTA ───────────────────────────────── */
.post-cta {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2.5rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.post-cta-text {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.4;
}

/* ── Author Bio ─────────────────────────────── */
.post-author-bio {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.author-bio-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.author-bio-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.author-bio-desc {
  font-size: 0.83rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.75;
}


/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: calc(var(--nav-h) + 3rem) var(--gutter) 3rem;
  }

  .post-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-byline {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .post-byline span:not(.post-author)::before {
    display: none;
  }
}

@media (max-width: 600px) {
  .blog-card-body {
    padding: 1.5rem;
  }

  .blog-empty {
    padding: 4rem 1.5rem;
  }

  .post-container {
    padding: 0 1.5rem;
  }

  .post-cta {
    padding: 1.75rem;
  }
}
