:root {
  --blog-ink: #0c1324;
  --blog-soft: #f5f8ff;
  --blog-card: #ffffff;
  --blog-accent: #ffb703;
  --blog-accent-2: #8ecae6;
}

.blog-site {
  background: linear-gradient(180deg, #f4f7ff 0%, #f7fafc 40%, #f8fafc 100%);
}

.blog-site .site-header {
  min-height: 100vh;
}

.blog-site .nav-links .is-active {
  color: #ffffff;
}

.blog-header {
  padding-bottom: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(34, 211, 238, 0.22), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(59, 130, 246, 0.24), transparent 26%),
    radial-gradient(circle at 48% 90%, rgba(99, 102, 241, 0.16), transparent 24%),
    linear-gradient(rgba(7, 23, 47, 0.7), rgba(7, 23, 47, 0.7)),
    url('../site-images/hero-bg.jpg') center / cover no-repeat;
}

.blog-hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 118px);
  padding: 24px 0 58px;
}

.blog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 183, 3, 0.18);
  color: #ffe8a3;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}

.blog-hero-copy h1 {
  margin-top: 14px;
  max-width: 720px;
  font-family: "Inter", sans-serif;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 850;
}

.blog-hero-copy p {
  margin-top: 14px;
  max-width: 56ch;
  color: rgba(237, 242, 255, 0.85);
  font-size: 15px;
  line-height: 1.65;
}

.blog-main {
  padding: 42px 0 72px;
}

.blog-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.sidebar-card {
  background: var(--blog-card);
  border: 1px solid #e6edf7;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
  padding: 14px;
}

.sidebar-card h2,
.sidebar-card h3 {
  margin-bottom: 10px;
  color: #273a5c;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cat-link {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #2d3e5e;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.cat-link:hover {
  background: #f2f7ff;
  color: #17325e;
}

.cat-link.active {
  background: #eaf3ff;
  color: #0d3d88;
  font-weight: 600;
}

.blog-content {
  display: grid;
  gap: 22px;
}

.featured-post {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  border-radius: 24px;
  overflow: hidden;
  background: var(--blog-card);
  border: 1px solid #dbe5f3;
  box-shadow: 0 14px 46px rgba(15, 23, 42, 0.08);
}

.featured-media {
  min-height: 100%;
}

.featured-media img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.featured-body {
  padding: 18px;
}

.post-cat {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #edf4ff;
  color: #10326c;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.featured-body h2 {
  margin-top: 12px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.featured-body h2 a,
.post-card h3 a {
  color: #0d1d3b;
  transition: color 0.2s ease;
}

.featured-body h2 a:hover,
.post-card h3 a:hover {
  color: #0a4ba8;
}

.featured-body p {
  margin-top: 12px;
  color: #394a68;
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-post .post-meta {
  margin-top: 10px;
  gap: 10px;
}

.featured-post .post-meta span {
  font-size: 11px;
}

.post-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #53627d;
  font-size: 12px;
  font-weight: 500;
}

.post-meta i {
  width: 16px;
  height: 16px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.post-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: stretch;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dde7f6;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.post-thumb {
  height: 100%;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  min-height: 142px;
  object-fit: cover;
  display: block;
}

.post-body {
  padding: 14px;
}

.post-body h3 {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.24;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.post-body p {
  margin-top: 8px;
  color: #465675;
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card .post-meta {
  margin-top: 12px;
  gap: 10px;
}

.post-card .post-meta span {
  font-size: 11px;
}

.empty-state {
  border: 1px dashed #c8d5ec;
  background: #f8fbff;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}

.empty-state h3 {
  color: #10254b;
}

.empty-state p {
  margin-top: 8px;
  color: #52617f;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 4px;
}

.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  min-width: 108px;
  padding: 0 16px;
  border-radius: 12px;
  background: #0f2347;
  color: #fff;
  font-weight: 600;
}

.pager-btn.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.pager-info {
  color: #304263;
  font-weight: 600;
}

.blog-detail-hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 42px;
  background:
    linear-gradient(rgba(5, 16, 39, 0.72), rgba(5, 16, 39, 0.78)),
    radial-gradient(circle at 90% 15%, rgba(255, 183, 3, 0.22), transparent 28%),
    radial-gradient(circle at 20% 85%, rgba(142, 202, 230, 0.18), transparent 30%),
    var(--hero-cover) center / cover no-repeat;
}

.blog-detail-head {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0 56px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(234, 242, 255, 0.9);
  font-weight: 700;
}

.back-link:hover {
  color: #ffffff;
}

.hero-cat-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-detail-head h1 {
  margin-top: 16px;
  max-width: 720px;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 850;
}

.detail-excerpt {
  margin-top: 14px;
  max-width: 64ch;
  color: rgba(232, 240, 255, 0.9);
  line-height: 1.7;
}

.detail-meta-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.detail-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(220, 232, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 30px;
  align-items: start;
}

.detail-article {
  background: #ffffff;
  border: 1px solid #dce5f2;
  border-radius: 22px;
  box-shadow: 0 14px 46px rgba(15, 23, 42, 0.08);
  padding: clamp(20px, 3.5vw, 42px);
}

.article-content {
  color: #243652;
  font-size: 16px;
  line-height: 1.78;
}

.article-content > * + * {
  margin-top: 1.1em;
}

.article-content h2,
.article-content h3 {
  margin-top: 1.4em;
  color: #0f2142;
  line-height: 1.2;
}

.article-content h2 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.02em;
}

.article-content h3 {
  font-size: clamp(20px, 1.9vw, 25px);
}

.article-content ul,
.article-content ol {
  padding-left: 1.3em;
}

.article-content a {
  color: #0d4fb0;
  text-decoration: underline;
}

.article-content img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid #d6e4fa;
}

.detail-sidebar {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 14px;
}

.author-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
}

.author-avatar.fallback {
  display: grid;
  place-items: center;
  background: #e7eefb;
  color: #183b75;
}

.author-box strong {
  color: #10264b;
}

.author-box p {
  margin-top: 4px;
  color: #4a5c7a;
  font-size: 14px;
  line-height: 1.5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f2f7ff;
  color: #17366a;
  font-size: 12px;
  font-weight: 700;
}

.mini-post-list {
  display: grid;
  gap: 10px;
}

.mini-post {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.mini-post img {
  width: 74px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-post strong {
  display: block;
  color: #13294e;
  font-size: 14px;
  line-height: 1.34;
}

.mini-post small {
  margin-top: 4px;
  display: block;
  color: #5c6d8a;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    order: 2;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  .blog-hero {
    min-height: calc(100vh - 98px);
    padding-bottom: 42px;
  }

  .featured-post {
    grid-template-columns: 1fr;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-main {
    padding-top: 28px;
  }

  .blog-hero-copy h1,
  .blog-detail-head h1 {
    max-width: none;
  }

  .detail-article {
    padding: 18px;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-thumb img {
    min-height: 150px;
  }
}

@media (max-width: 540px) {
  .blog-hero-copy h1,
  .blog-detail-head h1 {
    font-size: 38px;
    line-height: 1.02;
  }
}
