
:root {
  --blog-bg: #0f172a;
  --blog-bg-soft: #eef4ff;
  --blog-card-border: rgba(15, 23, 42, 0.08);
  --blog-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  --blog-radius: 1.5rem;
}

body.blog-shell {
  background:
    radial-gradient(circle at top right, rgba(51, 209, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 40%, #f8fbff 100%);
}

.blog-hero,
.post-hero {
  background:
    radial-gradient(circle at top left, rgba(51, 209, 255, 0.22), transparent 26%),
    linear-gradient(135deg, #091327 0%, #0f1f3d 45%, #2563eb 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.blog-hero::after,
.post-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(10px);
  pointer-events: none;
}

.blog-hero h1,
.post-hero h1,
.blog-hero .section-sub,
.post-hero .section-sub {
  color: #fff;
}

.glass-panel,
.toolbar-card,
.blog-card,
.info-card,
.stat-card {
  border: 1px solid var(--blog-card-border);
  border-radius: var(--blog-radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--blog-shadow);
  backdrop-filter: blur(10px);
}

.featured-story {
  position: relative;
  overflow: hidden;
}

.featured-story::before {
  content: "";
  position: absolute;
  inset: auto auto -35% -8%;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.featured-type,
.blog-type {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
}

.type-insight {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
.type-case-study {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
}
.type-article {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.toolbar-card {
  padding: 1.5rem;
}

.blog-card {
  padding: 1.35rem;
  height: 100%;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.blog-card:hover,
.blog-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 18px 46px rgba(13, 27, 42, 0.1);
  border-color: rgba(37, 99, 235, 0.22);
  background-color: #ffffff;
}

.blog-card .card-title,
.featured-story h2,
.post-hero-copy h1 {
  color: #0f172a;
}

.blog-meta,
.related-meta,
.post-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  color: #64748b;
  font-size: 0.95rem;
}

.read-more-link,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  text-decoration: none;
  font-weight: 700;
  color: #2563eb;
}

.read-more-link:hover,
.back-link:hover {
  color: #155eef;
}

.empty-state .glass-panel {
  border-style: dashed;
}

.post-body {
  line-height: 1.75;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.post-body p,
.post-body li {
  color: #334155;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

.meta-grid {
  display: grid;
  gap: 1rem;
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.meta-value {
  font-weight: 700;
  color: #0f172a;
}

.related-link {
  text-decoration: none;
  display: block;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.related-link:hover {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.18);
}

.blog-shell .navbar .nav-link.active,
.detail-shell .navbar .nav-link.active {
  font-weight: 700;
}

.detail-main {
  position: relative;
}

.detail-article {
  position: relative;
  overflow: hidden;
}

.detail-article::before {
  content: "";
  position: absolute;
  inset: auto auto -10rem -7rem;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  pointer-events: none;
}

.detail-article-head {
  position: relative;
  z-index: 1;
}

.detail-summary {
  max-width: 60ch;
}

.detail-hero-image {
  width: 100%;
  border-radius: 1.25rem;
  margin-top: 1.75rem;
}

.detail-divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  margin-top: 2rem;
}

.detail-sidebar .info-card:first-child {
  position: sticky;
  top: 6rem;
}

.tag-bubble {
  display: inline-flex;
  align-items: center;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  font-size: .78rem;
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  .detail-sidebar .info-card:first-child {
    position: static;
  }
}

@media (max-width: 991.98px) {
  .toolbar-card,
  .glass-panel,
  .blog-card,
  .stat-card {
    border-radius: 1.25rem;
  }
}

@media (max-width: 767.98px) {
  .detail-article,
  .detail-sidebar .info-card {
    border-radius: 1.25rem;
  }

  .detail-article .display-5 {
    font-size: calc(1.55rem + 1.5vw);
  }
}
