/* ==========================================================================
   NULLOG BLOG — Article & Listing Stylesheet
   Extends the enterprise design system (styles.css) with editorial typography
   ========================================================================== */

/* ---------- Blog Shell ---------- */
.z-10 { z-index: 10; }

.blog-shell {
  max-width: 760px;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (min-width: 1024px) {
  .blog-shell { padding-left: 2rem; padding-right: 2rem; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
}

.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--emerald-light); }
.breadcrumbs .sep { opacity: 0.5; }
.breadcrumbs .current { color: var(--emerald-light); }

/* ---------- Article Header ---------- */
.article-header { margin-bottom: 3rem; }

.article-meta-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  border-radius: 9999px;
  background-color: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--emerald-light);
  margin-bottom: 1.5rem;
}

.article-meta-top .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald-primary);
  box-shadow: 0 0 8px var(--emerald-primary);
}

.article-header h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .article-header h1 { font-size: 2.6rem; }
}

.article-lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-color);
}

.article-meta-row .meta-item { display: inline-flex; align-items: center; gap: 6px; }
.article-meta-row strong { color: var(--text-secondary); font-weight: 600; }

/* ---------- Article Body Typography ---------- */
.article-body { padding-top: 2.5rem; }

.article-body > p {
  font-size: 1rem;
  line-height: 1.85;
  color: #C3CAD6;
  margin-bottom: 1.4rem;
}

.article-body h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin: 3rem 0 1.1rem;
  padding-top: 0.5rem;
}

.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #E5E7EB;
  margin: 2.2rem 0 0.75rem;
}

.article-body ul, .article-body ol {
  margin: 0 0 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.article-body ul li {
  list-style: none;
  position: relative;
  padding-left: 1.4rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #C3CAD6;
}

.article-body ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--emerald-light);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
}

.article-body ol { counter-reset: blog-step; margin-left: 0; }
.article-body ol li {
  list-style: none;
  counter-increment: blog-step;
  position: relative;
  padding-left: 2.6rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #C3CAD6;
  margin-bottom: 0.75rem;
}

.article-body ol li::before {
  content: counter(blog-step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.7rem; height: 1.7rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald-light);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.article-body a {
  color: var(--emerald-light);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(52, 211, 153, 0.35);
  text-underline-offset: 3px;
}

.article-body a:hover { color: var(--emerald-mint); text-decoration-color: currentColor; }

.article-body strong { color: #FFFFFF; font-weight: 700; }

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--emerald-mint);
}

/* Key-point callout */
.callout {
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
  border-radius: 12px;
  padding: 1.1rem 1.35rem;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #C3CAD6;
}

.callout strong { color: var(--emerald-light); }

.callout-warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.callout-warn strong { color: #FBBF24; }

/* In-article data table */
.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin: 1.75rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 480px;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: #C3CAD6;
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table td.good { color: var(--emerald-light); font-weight: 600; }
.data-table td.bad { color: #F87171; }

/* FAQ blocks inside articles */
.article-faq { margin-top: 3.5rem; }

.article-faq > h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

/* ---------- CTA Banner (in-article) ---------- */
.article-cta {
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.1), rgba(8, 11, 16, 0.4));
  border-radius: 16px;
  padding: 1.75rem;
  margin: 2.5rem 0;
  text-align: center;
}

.article-cta h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: #FFFFFF;
}

.article-cta p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  line-height: 1.6;
}

/* ---------- Related Posts ---------- */
.related-posts { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border-color); }

.related-posts > h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Blog Cards (listing + related + homepage) ---------- */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.4rem;
  transition: all 0.2s ease;
  height: 100%;
}

.blog-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.blog-card .card-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--emerald-light);
  margin-bottom: 0.65rem;
}

.blog-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  color: #FFFFFF;
  margin-bottom: 0.6rem;
}

.blog-card:hover h3 { color: var(--emerald-mint); }

.blog-card .card-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.blog-card .card-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.1rem;
}

@media (min-width: 640px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Blog Listing Hero ---------- */
.listing-hero {
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid var(--border-color);
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.05), transparent 60%);
}

.listing-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  line-height: 1.12;
  margin-bottom: 1rem;
}

@media (min-width: 640px) { .listing-hero h1 { font-size: 3rem; } }

.listing-hero p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 44rem;
}

/* Category filter pills */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 0;
}

.filter-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.filter-pill:hover { color: #FFF; border-color: var(--border-color-light); }
.filter-pill.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--emerald-primary);
  color: var(--emerald-light);
}

/* ---------- Pagination-lite ---------- */
.listing-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

/* ---------- Author Box ---------- */
.author-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-top: 3rem;
}

.author-box .author-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.author-box h4 { font-size: 0.92rem; font-weight: 700; color: #FFF; margin-bottom: 0.25rem; }
.author-box p { font-size: 0.8rem; line-height: 1.6; color: var(--text-secondary); }

/* ---------- Share / footer note ---------- */
.article-footer-note {
  margin-top: 2.5rem;
  padding: 1.1rem 1.35rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-tertiary);
}

.article-footer-note a { color: var(--emerald-light); }
