/* ============================================
   BLOG.CSS — Blog listing page specific styles
   Covers: hero, grid, cards, loading, cta
   Does NOT override nav, footer, or global theme
   Matches visual language of home.css
   ============================================ */


/* ============================================
   BLOG HERO
   ============================================ */

.blog-hero {
  position: relative;
  padding: 120px 0 120px;
  overflow: hidden;
  background:
    radial-gradient(
      80% 60% at 10% 10%,
      rgba(255, 255, 255, 0.05),
      transparent 60%
    ),
    linear-gradient(180deg, #071a24 0%, #050f16 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* Noise overlay — matches hero::after */
.blog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
}

.blog-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-hero__label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(120, 220, 255, 0.7);
  margin-bottom: 24px;
}

.blog-hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 20px;
}

.blog-hero__sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  max-width: 560px;
}


/* ============================================
   BLOG MAIN + GRID
   ============================================ */

.blog-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px 100px;

  /* Subtle radial glow at top — matches .problem section */
  background: radial-gradient(
    1000px 500px at 50% 0%,
    rgba(255, 255, 255, 0.025),
    transparent 60%
  );
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.07); /* gap color = border color */
  border: 1px solid rgba(255, 255, 255, 0.07);
}


/* ============================================
   BLOG CARD
   ============================================ */

.blog-card {
  background: #050f16;
  transition: background 0.25s ease;
}

.blog-card:hover {
  background: #0c161c;
}

.blog-card__link {
  display: flex;
  flex-direction: column;
  padding: 36px 32px;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
  min-height: 280px;
}

/* Top row: tag + post ID */
.blog-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.blog-card__tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(120, 220, 255, 0.75);
  background: rgba(120, 220, 255, 0.06);
  border: 1px solid rgba(120, 220, 255, 0.15);
  padding: 4px 10px;
}

.blog-card__id {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.2);
  font-variant-numeric: tabular-nums;
}

/* Title */
.blog-card__title {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 14px;
  flex-grow: 1;
}

/* Excerpt */
.blog-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 28px;

  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row: date + read time */
.blog-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.blog-card__date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.04em;
}

.blog-card__read {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.04em;
}

/* Arrow — slide in on hover */
.blog-card__arrow {
  position: absolute;
  bottom: 14px; /* moved lower to avoid overlapping .blog-card__read */
  right: 32px;
  font-size: 0.95rem;
  color: rgba(120, 220, 255, 0.6);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.blog-card:hover .blog-card__arrow {
  opacity: 1;
  transform: translateX(0);
}


/* ============================================
   LOADING STATE
   ============================================ */

.blog-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 80px 0;
}

.blog-loading span {
  width: 6px;
  height: 6px;
  background: rgba(120, 220, 255, 0.4);
  border-radius: 50%;
  animation: blog-pulse 1.2s ease-in-out infinite;
}

.blog-loading span:nth-child(2) { animation-delay: 0.2s; }
.blog-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blog-pulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1);   }
}


/* ============================================
   EMPTY STATE
   ============================================ */

.blog-empty {
  text-align: center;
  padding: 80px 24px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* ============================================
   FOOTER CTA
   Matches .cta section from home.css
   ============================================ */

.blog-footer-cta {
  background-color: #0c161c;
  text-align: center;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}

/* Radial glow at top — matches site pattern */
.blog-footer-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    800px 400px at 50% 0%,
    rgba(255, 255, 255, 0.03),
    transparent 60%
  );
  pointer-events: none;
}

.blog-footer-cta__text {
  position: relative;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  letter-spacing: -0.01em;
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .blog-hero {
    padding: 80px 0 60px;
  }

  .blog-hero__title {
    font-size: 1.8rem;
  }

  .blog-hero__sub {
    font-size: 0.95rem;
  }

  .blog-main {
    padding: 60px 0 80px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card__link {
    padding: 28px 20px;
    min-height: auto;
  }

  .blog-card__arrow {
    display: none;
  }

  .blog-footer-cta {
    padding: 60px 20px;
  }
}

@media (max-width: 480px) {
  .blog-card__excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .blog-hero__label {
    font-size: 10px;
  }
}