:root {
  --content-width: 1200px;
  --sidebar-width: 320px;
  --shadow-soft: 0 10px 40px rgba(15, 23, 42, 0.08);
}

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-gray, #f1f5f9);
  color: var(--text-dark, #0f172a);
  line-height: 1.7;
}

a {
  color: var(--primary, #2563eb);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--primary-dark, #1d4ed8);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #ffffff;
  border-bottom: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.site-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(120deg, #1d4ed8, #3b82f6);
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: var(--text-gray, #475569);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-link:hover {
  color: var(--text-dark, #0f172a);
  background: var(--bg-gray, #f1f5f9);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
  font-weight: 600;
  font-size: 13px;
}

.blog-hero {
  margin: 32px auto 20px;
  padding: 36px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.08));
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.blog-hero h1 {
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.2;
  color: var(--text-dark, #0f172a);
}

.blog-hero p {
  margin: 0;
  color: var(--text-gray, #475569);
  max-width: 780px;
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 28px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border, #e2e8f0);
  background: #ffffff;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-gray, #475569);
  cursor: pointer;
}

.filter-chip.active {
  border-color: var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary, #2563eb);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 50px rgba(15, 23, 42, 0.12);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light, #94a3b8);
  font-size: 13px;
  font-weight: 600;
}

.card-title {
  margin: 0;
  font-size: 20px;
  color: var(--text-dark, #0f172a);
  line-height: 1.35;
}

.card-excerpt {
  margin: 0;
  color: var(--text-gray, #475569);
}

.read-more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.blog-layout {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) var(--sidebar-width);
  gap: 24px;
  margin: 28px auto 60px;
}

.share-rail {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.share-rail__title {
  font-size: 12px;
  color: var(--text-light, #94a3b8);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.share-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  display: grid;
  place-items: center;
  color: var(--text-gray, #475569);
  box-shadow: var(--shadow-soft);
}

.share-button:hover {
  color: var(--primary, #2563eb);
  transform: translateY(-2px);
}

.article-shell {
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: var(--shadow-soft);
}

.article-kicker {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--text-gray, #475569);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-title {
  margin: 8px 0 14px;
  font-size: 34px;
  line-height: 1.25;
}


.article-body {
  margin-top: 20px;
  color: var(--text-gray, #475569);
}

.article-note {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid var(--border, #e2e8f0);
  padding: 14px 16px;
  border-radius: 14px;
  margin: 0 0 18px;
  color: var(--text-dark, #0f172a);
}

.article-body h2,
.article-body h3 {
  color: var(--text-dark, #0f172a);
  margin: 32px 0 12px;
  line-height: 1.25;
}

.article-body p {
  margin: 0 0 16px;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
  margin: 0 0 18px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body blockquote {
  margin: 18px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--primary, #2563eb);
  background: rgba(37, 99, 235, 0.06);
  border-radius: 12px;
  color: var(--text-dark, #0f172a);
}

.article-body pre,
.article-body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.article-body code {
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.15em 0.35em;
  border-radius: 8px;
}

.article-body pre {
  background: #0b1021;
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: 14px;
  overflow-x: auto;
  border: 1px solid rgba(226, 232, 240, 0.15);
  box-shadow: 0 16px 40px rgba(11, 16, 33, 0.45);
}

.article-body figure {
  margin: 0 0 18px;
}

.article-body figcaption {
  margin-top: 8px;
  color: var(--text-light, #94a3b8);
  font-size: 14px;
  text-align: center;
}

.section-note {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid var(--border, #e2e8f0);
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0 16px;
  color: var(--text-dark, #0f172a);
  font-weight: 600;
}

.sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-card {
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.sidebar-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}

.sidebar-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

.sidebar-item__title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}

.sidebar-item__meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-light, #94a3b8);
}

.footer {
  margin: 60px 0 20px;
  color: var(--text-light, #94a3b8);
  font-size: 14px;
  text-align: center;
}

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

  .share-rail {
    position: static;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    order: -1;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .nav {
    overflow-x: auto;
  }

  .blog-hero {
    padding: 24px;
  }

  .article-title {
    font-size: 30px;
  }
}
