/* =========================
   BLOG LIST PAGE
   ========================= */

.blog-page {
  width: 100%;
  min-height: calc(100vh - var(--header-height, 72px));
  padding: 78px 24px 96px;
  background:
    radial-gradient(circle at 18% 8%, rgba(247, 37, 168, 0.12), transparent 30rem),
    radial-gradient(circle at 82% 18%, rgba(255, 138, 42, 0.08), transparent 28rem),
    linear-gradient(
      180deg,
      var(--color-background) 0%,
      var(--color-background-soft) 48%,
      var(--color-background) 100%
    );
  color: var(--color-text);
}

.blog-page *,
.blog-page *::before,
.blog-page *::after {
  box-sizing: border-box;
}

/* =========================
   HERO
   ========================= */

.blog-hero {
  width: min(100%, 1120px);
  margin: 0 auto 48px;
  text-align: center;
}

.blog-hero::before {
  content: "Mindbyte";
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--color-primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.blog-hero h1 {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(2.3rem, 4.8vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.blog-hero p {
  max-width: 680px;
  margin: 18px auto 0;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 1.25vw, 1.14rem);
  line-height: 1.7;
}

/* =========================
   GRID
   ========================= */

.blog-grid {
  width: min(100%, 1120px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

/* =========================
   CARD
   ========================= */

.blog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--color-surface) 90%, transparent),
      color-mix(in srgb, var(--color-surface) 68%, transparent)
    );
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(247, 37, 168, 0.28);
  box-shadow: 0 24px 64px rgba(247, 37, 168, 0.12);
}

.blog-card-image-link {
  display: block;
  overflow: hidden;
}

.blog-card-image {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  filter: saturate(0.94) contrast(1.02);
  transition: transform 260ms ease;
}

.blog-card:hover .blog-card-image {
  transform: scale(1.035);
}

.blog-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.blog-card-author,
.blog-card-date {
  display: inline-flex;
  align-items: center;
}

.blog-card-date::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(247, 37, 168, 0.12);
}

.blog-card-title {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.blog-card-title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 160ms ease;
}

.blog-card-title a:hover {
  color: var(--color-primary);
}

.blog-card-abstract {
  margin: 13px 0 18px;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: auto;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 850;
  transition:
    color 160ms ease,
    gap 160ms ease;
}

.blog-card-link::after {
  content: "→";
  color: var(--color-secondary);
  font-weight: 900;
}

.blog-card-link:hover {
  gap: 12px;
  color: var(--color-secondary);
}

/* =========================
   EMPTY STATE
   ========================= */

.blog-empty {
  width: min(100%, 1120px);
  min-height: 38vh;
  margin-inline: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.blog-empty-box {
  width: min(100%, 620px);
  padding: 46px 32px;
  border-radius: 22px;
  border: 1px solid rgba(247, 37, 168, 0.24);
  background:
    radial-gradient(circle at top left, rgba(247, 37, 168, 0.14), transparent 42%),
    radial-gradient(circle at bottom right, rgba(255, 138, 42, 0.09), transparent 42%),
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--color-surface) 88%, transparent),
      color-mix(in srgb, var(--color-surface) 64%, transparent)
    );
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.blog-empty-box h2 {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.blog-empty-box p {
  margin: 14px auto 0;
  max-width: 480px;
  color: var(--color-text-muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

/* =========================
   DARK THEME TUNING
   ========================= */

html[data-theme="dark"] .blog-card {
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--color-surface) 92%, transparent),
      color-mix(in srgb, var(--color-surface) 72%, transparent)
    );
}

html[data-theme="dark"] .blog-card:hover {
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .blog-empty-box {
  background:
    radial-gradient(circle at top left, rgba(247, 37, 168, 0.16), transparent 42%),
    radial-gradient(circle at bottom right, rgba(255, 138, 42, 0.10), transparent 42%),
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--color-surface) 92%, transparent),
      color-mix(in srgb, var(--color-surface) 70%, transparent)
    );
}

/* =========================
   RESPONSIVE
   ========================= */

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

@media (max-width: 760px) {
  .blog-page {
    padding: 58px 16px 76px;
  }

  .blog-hero {
    margin-bottom: 34px;
  }

  .blog-hero h1 {
    font-size: clamp(2.15rem, 10vw, 3.2rem);
  }

  .blog-hero p {
    font-size: 1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .blog-card-image {
    height: 200px;
  }

  .blog-card-content {
    padding: 20px;
  }

  .blog-empty-box {
    padding: 38px 22px;
    border-radius: 20px;
  }
}

@media (max-width: 430px) {
  .blog-page {
    padding: 46px 12px 64px;
  }

  .blog-card-image {
    height: 180px;
  }

  .blog-card-content {
    padding: 18px;
  }

  .blog-card-title {
    font-size: 1.16rem;
  }
}