/* ======================================================================
   Blog — listing & detail
   ====================================================================== */

.blog-hero,
.blog-detail-hero {
  position: relative;
  padding: 5.5rem 0 3.5rem;
  overflow: hidden;
}

.blog-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blog-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 75%);
}

.blog-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
}

.blog-hero__orb--a {
  width: 320px;
  height: 320px;
  top: -80px;
  right: 8%;
  background: rgba(34, 211, 238, 0.22);
}

.blog-hero__orb--b {
  width: 260px;
  height: 260px;
  bottom: -60px;
  left: 5%;
  background: rgba(59, 130, 246, 0.18);
}

.blog-hero__panel,
.blog-detail-hero__panel {
  position: relative;
  max-width: 760px;
}

.blog-hero__title,
.blog-detail-hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0.5rem 0 0.75rem;
  line-height: 1.08;
}

.blog-hero__copy,
.blog-detail-hero__excerpt {
  max-width: 640px;
  color: var(--text-50);
  font-size: 1.02rem;
  line-height: 1.65;
  margin: 0;
}

.blog-shell {
  padding: 0 0 5rem;
}

/* ======================================================================
   Blog post detail page
   ====================================================================== */

.blog-post-page {
  padding-top: 5.25rem;
  padding-bottom: 5rem;
}

.blog-post-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 1.25rem 0 0.5rem;
  font-size: 0.82rem;
  color: var(--text-50);
}

.blog-post-crumb a {
  color: var(--text-50);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-post-crumb a:hover {
  color: var(--accent-1);
}

.blog-post-crumb i {
  font-size: 0.62rem;
  opacity: 0.45;
}

.blog-post-crumb span {
  color: var(--text-70);
}

.blog-post-hero {
  position: relative;
  margin-top: 0.5rem;
  min-height: 280px;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border-1);
}

.blog-post-hero--has-image {
  min-height: 420px;
}

.blog-post-hero__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 8s ease;
}

.blog-post-hero:hover .blog-post-hero__media {
  transform: scale(1.06);
}

.blog-post-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 6, 10, 0.35) 0%, rgba(5, 6, 10, 0.88) 72%, rgba(5, 6, 10, 0.96) 100%),
    linear-gradient(90deg, rgba(5, 6, 10, 0.55) 0%, transparent 55%);
}

.blog-post-hero__container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  min-height: inherit;
  padding: 2rem 0 2.25rem;
}

.blog-post-hero__inner {
  max-width: 820px;
}

.blog-post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-90);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.blog-post-back:hover {
  color: var(--text-100);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.1);
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.blog-post-meta__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-70);
  font-size: 0.78rem;
  font-weight: 500;
}

.blog-post-meta__chip i {
  color: var(--accent-1);
  font-size: 0.72rem;
}

.blog-post-hero__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.blog-post-hero__lead {
  margin: 0;
  max-width: 680px;
  color: var(--text-70);
  font-size: 1.05rem;
  line-height: 1.65;
}

.blog-post-main {
  margin-top: -1.5rem;
  position: relative;
  z-index: 2;
}

.blog-post-layout {
  max-width: 820px;
  margin: 0 auto;
}

.blog-post-card {
  position: relative;
  background: linear-gradient(165deg, rgba(18, 24, 42, 0.98) 0%, rgba(10, 12, 20, 0.98) 100%);
  border: 1px solid var(--border-1);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.blog-post-card__accent {
  height: 3px;
  background: var(--grad-accent);
}

.blog-post-content {
  padding: 2rem 2.25rem 1.5rem;
  color: var(--text-70);
  font-size: 1.05rem;
  line-height: 1.85;
}

.blog-post-content > *:first-child {
  margin-top: 0;
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4 {
  color: var(--text-100);
  margin: 2rem 0 0.85rem;
  line-height: 1.25;
}

.blog-post-content h2 { font-size: 1.55rem; }
.blog-post-content h3 { font-size: 1.3rem; }
.blog-post-content h4 { font-size: 1.1rem; }

.blog-post-content p {
  margin: 0 0 1.15rem;
}

.blog-post-content p:first-of-type {
  font-size: 1.12rem;
  color: var(--text-90);
  line-height: 1.75;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 0 0 1.15rem 1.35rem;
  padding: 0;
}

.blog-post-content li {
  margin-bottom: 0.45rem;
}

.blog-post-content a {
  color: var(--accent-1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-post-content a:hover {
  color: var(--text-100);
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
  margin: 1.25rem 0;
  border: 1px solid var(--border-1);
}

.blog-post-content blockquote {
  margin: 1.75rem 0;
  padding: 1.1rem 1.35rem;
  border-left: 3px solid var(--accent-1);
  background: rgba(34, 211, 238, 0.06);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-90);
  font-style: italic;
}

.blog-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

.blog-post-content th,
.blog-post-content td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-1);
}

.blog-post-content th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-100);
}

.blog-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 1.25rem 2.25rem 2rem;
  border-top: 1px solid var(--border-1);
  background: rgba(255, 255, 255, 0.02);
}

.blog-post-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border-1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-90);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.blog-post-btn:hover {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
  color: var(--text-100);
  transform: translateY(-1px);
}

.blog-post-btn--primary {
  border: 0;
  background: var(--grad-accent);
  color: #04111f;
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.25);
}

.blog-post-btn--primary:hover {
  color: #04111f;
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.38);
}

.blog-related--post {
  max-width: 1100px;
  margin: 3.5rem auto 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.blog-grid--related {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-1);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.blog-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-2);
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.blog-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-30);
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(59, 130, 246, 0.08));
}

.blog-card__date {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(5, 6, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-90);
  font-size: 0.74rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.15rem 1.25rem;
}

.blog-card__title {
  margin: 0 0 0.55rem;
  font-size: 1.1rem;
  line-height: 1.35;
}

.blog-card__title a {
  color: var(--text-100);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card__title a:hover {
  color: var(--accent-1);
}

.blog-card__excerpt {
  margin: 0 0 1rem;
  color: var(--text-50);
  font-size: 0.9rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-1);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.blog-card__link:hover {
  color: var(--text-100);
}

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.blog-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border-1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-90);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.blog-page-btn:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.08);
  color: var(--text-100);
}

.blog-page-info {
  color: var(--text-50);
  font-size: 0.88rem;
}

.blog-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  border: 1px dashed var(--border-1);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.02);
}

.blog-empty i {
  font-size: 2.5rem;
  color: var(--accent-1);
  margin-bottom: 1rem;
}

.blog-empty h2 {
  margin: 0 0 0.5rem;
}

.blog-empty p {
  color: var(--text-50);
  margin: 0 0 1.25rem;
}

.blog-related {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-1);
}

.blog-related .section-head {
  margin-bottom: 1.5rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--blog-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.blog-empty .blog-post-btn--primary {
  display: inline-flex;
}

@media (max-width: 991.98px) {
  .blog-grid,
  .blog-grid--related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .blog-hero {
    padding: 4.5rem 0 2.5rem;
  }

  .blog-grid,
  .blog-grid--related {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .blog-card__body {
    padding: 1rem;
  }

  .blog-post-hero {
    border-radius: var(--r-lg);
    min-height: 240px;
  }

  .blog-post-hero--has-image {
    min-height: 340px;
  }

  .blog-post-hero__container {
    padding: 1.5rem 0 1.75rem;
  }

  .blog-post-hero__title {
    font-size: 1.65rem;
  }

  .blog-post-hero__lead {
    font-size: 0.95rem;
  }

  .blog-post-main {
    margin-top: -1rem;
  }

  .blog-post-content {
    padding: 1.35rem 1.15rem 1rem;
    font-size: 1rem;
    line-height: 1.75;
  }

  .blog-post-content p:first-of-type {
    font-size: 1.02rem;
  }

  .blog-post-actions {
    flex-direction: column;
    padding: 1rem 1.15rem 1.35rem;
  }

  .blog-post-btn {
    width: 100%;
  }

  .blog-post-crumb {
    font-size: 0.78rem;
  }
}
