:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #0058c8;
  --brand-soft: #eaf2ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #e8f0ff 0, #f5f7fb 40%, #f5f7fb 100%);
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
}

.header-inner {
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 600;
}

.main-nav a:hover {
  color: var(--brand);
}

.page-title {
  margin: 30px 0 6px;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
}

.page-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  margin-bottom: 40px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(13, 38, 76, 0.06);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card h3 a {
  color: var(--text);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--brand);
}
.post-image {width: 100%;}
.post-image-link {
  display: block;
  margin: -18px -18px 12px;
}

.post-image,
.post-image-fallback {
  width: 100%;
  height: 180px;
  border-radius: 16px 16px 0 0;
}

.post-image {
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line);
}

.post-image-fallback {
  background: linear-gradient(135deg, #dbeafe, #f1f5f9);
  color: #1e3a8a;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.tag-list,
.category-list,
.inline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions {
  margin-top: 14px;
}

.read-btn {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--brand);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.read-btn:hover {
  background: #0048a5;
}

.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d7e4fb;
  background: var(--brand-soft);
  color: var(--brand);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.sidebar .section-title {
  margin: 0 0 10px;
  font-size: 1rem;
}

.post-body {
  line-height: 1.8;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.post-navigation .pill {
  min-width: 220px;
}

.breadcrumb {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--brand);
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 20px 0 40px;
}

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

  .main-nav a {
    margin-left: 10px;
    font-size: 0.92rem;
  }
}
