/* ==========================================
   BRAYNEX — Blog Styles
   ========================================== */

/* ---- BLOG HERO ---- */
.blog-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}
.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 12px 0 16px;
}
.blog-hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.7;
}

/* ---- BLOG LAYOUT ---- */
.blog-body { padding: 64px 0 96px; }

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
}

/* ---- POST CARDS (index) ---- */
.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.post-card:first-child { padding-top: 0; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.post-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-glow);
  border: 1px solid rgba(124, 106, 247, 0.2);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post-date {
  font-size: 13px;
  color: var(--text-dim);
}
.post-read-time {
  font-size: 13px;
  color: var(--text-dim);
}

.post-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}
.post-title a {
  color: var(--white);
  transition: color var(--transition);
}
.post-title a:hover { color: var(--accent); }

.post-excerpt {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 20px;
}
.post-read-more {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  transition: color var(--transition);
}
.post-read-more:hover { color: var(--accent-2); }

/* ---- SIDEBAR ---- */
.blog-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 14px;
}
.sidebar-widget p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-link {
  display: inline-block;
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.tag-link:hover, .tag-link.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.upcoming-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upcoming-list li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 12px;
  border-left: 2px solid var(--border);
  line-height: 1.5;
}
.upcoming-list li a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.upcoming-list li a:hover { color: var(--accent); }

/* ---- NAV ACTIVE STATE ---- */
.nav-active { color: var(--text) !important; }

/* ---- POST PAGE ---- */
.post-page { padding: 64px 0 96px; }

.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: start;
}

.post-content {}

.post-header {
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 16px 0 20px;
}
.post-lead {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  font-style: italic;
}

/* ---- POST BODY TYPOGRAPHY ---- */
.post-body {
  font-size: 17px;
  line-height: 1.8;
  color: #c8c8c8;
}
.post-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}
.post-body p { margin-bottom: 20px; }
.post-body ul, .post-body ol {
  margin: 0 0 20px 24px;
}
.post-body li { margin-bottom: 8px; }
.post-body strong { color: var(--text); font-weight: 600; }
.post-body a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(124,106,247,0.3); }
.post-body a:hover { color: var(--accent-2); }
.post-body em { color: var(--text-muted); }
.post-body code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 14px;
  font-family: 'Monaco', 'Menlo', monospace;
  color: var(--accent-2);
}
.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 32px 0;
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-body blockquote p {
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
  font-size: 16px;
}
.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

.post-nav { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .blog-layout, .post-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar { position: static; }
}

@media (max-width: 600px) {
  .blog-hero { padding: 60px 0 40px; }
  .blog-body, .post-page { padding: 40px 0 64px; }
  .post-header h1 { font-size: 26px; }
  .post-body { font-size: 16px; }
}
