/* ===== blog.html extras (filters, blog grid/cards) ===== */

/* Page header (also shared by roadmap/technology — defined here for the
   blog listing; the .label/.page-header h1 rules are generic.) */
.page-header {
  padding: 140px 0 48px;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 400px;
  background:
    radial-gradient(ellipse 50% 50% at 30% 40%, rgba(0, 212, 255, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 45% 50% at 70% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
  pointer-events: none;
}
.page-header h1 {
  font: 700 clamp(32px, 4.5vw, 52px)/1.1 var(--font-d);
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 16px;
}
.page-header p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--fg2);
  max-width: 580px;
}

/* ===== Filters ===== */
.filters {
  display: flex;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font: 500 13px/1 var(--font-b);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.filter-btn:hover { color: var(--fg); border-color: rgba(255, 255, 255, 0.14); }
.filter-btn.active { color: #fff; border-color: var(--cyan); background: rgba(0, 212, 255, 0.08); }

/* ===== Blog grid ===== */
.blog-section { padding: 24px 0 100px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  cursor: pointer;
  will-change: transform;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.blog-card:active { transform: translateY(-1px); }
/* `.hidden` must beat `.featured`'s display rule — same specificity, so the
   utility is forced to win regardless of source order / layout overrides. */
.blog-card.hidden { display: none !important; }
.blog-thumb {
  height: 200px;
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.blog-thumb-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 30px 30px;
}
.blog-thumb-icon { font-size: 42px; position: relative; z-index: 1; opacity: 0.6; }
.blog-thumb-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.12;
  z-index: 0;
}
.blog-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.blog-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
}
.blog-tag {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.blog-tag.research { background: rgba(0, 212, 255, 0.08); color: var(--cyan); }
.blog-tag.engineering { background: rgba(139, 92, 246, 0.08); color: var(--purple); }
.blog-tag.product { background: rgba(16, 185, 129, 0.08); color: var(--green); }
.blog-tag.insight { background: rgba(245, 158, 11, 0.08); color: var(--amber); }
.blog-card h3 {
  font: 600 19px/1.4 var(--font-d);
  color: #fff;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.blog-card:hover h3 { color: var(--cyan); }
.blog-card .card-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}
.blog-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font: 500 13px/1 var(--font-b);
  color: var(--cyan);
  transition: gap 0.25s var(--ease);
}
.blog-card:hover .read-more { gap: 10px; }

/* Featured card (first post, full width) */
.blog-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
.blog-card.featured .blog-thumb { height: 100%; min-height: 320px; }
.blog-card.featured .blog-body { padding: 36px; justify-content: center; }
.blog-card.featured h3 { font-size: 24px; line-height: 1.3; }

/* Blog listing uses a tighter CTA block padding. */
.cta-block { text-align: center; padding: 0 0 100px; }
.cta-box { padding: 56px 48px; }
.cta-box p { margin-bottom: 32px; max-width: 460px; }

/* ===== Lazy-load sentinel + skeleton ===== */
.blog-sentinel { height: 1px; }
.blog-card.skeleton {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  min-height: 360px;
}
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
  font-family: var(--font-m);
}
.blog-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-family: var(--font-m);
  font-size: 13px;
}

@media (max-width: 900px) {
  .blog-card.featured { grid-template-columns: 1fr; }
  .blog-card.featured .blog-thumb { min-height: 200px; }
}
@media (max-width: 640px) {
  .page-header { padding: 110px 0 32px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card.featured h3 { font-size: 20px; }
}
