:root {
  --blog-bg: #f4f7fb;
  --blog-card: #ffffff;
  --blog-text: #0f172a;
  --blog-muted: #64748b;
  --blog-line: #e2e8f0;
  --blog-primary: #2563eb;
  --blog-primary-2: #3b82f6;
  --blog-soft: #dbeafe;
  --blog-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --blog-shadow-hover: 0 24px 56px rgba(15, 23, 42, 0.14);
  --blog-radius-lg: 28px;
  --blog-radius-md: 20px;
  --blog-radius-sm: 14px;
  --blog-max: 1180px;
}

html.blog-page {
  scroll-behavior: smooth;
}

body.blog-page {
  margin: 0;
  background: linear-gradient(180deg, #f7faff 0%, var(--blog-bg) 100%);
  color: var(--blog-text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.blog-shell {
  min-height: 100vh;
}

.blog-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
}

.blog-topbar-inner,
.blog-footer-inner,
.blog-container {
  width: min(calc(100% - 32px), var(--blog-max));
  margin: 0 auto;
}

.blog-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.blog-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blog-text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.blog-brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blog-primary), var(--blog-primary-2));
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12);
}

.blog-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.blog-nav a {
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.blog-nav a:hover,
.blog-nav a.is-current {
  color: var(--blog-primary);
}

.blog-nav .blog-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blog-primary), var(--blog-primary-2));
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.blog-main {
  padding: 44px 0 88px;
}

.blog-hero,
.post-hero,
.blog-category-hero {
  position: relative;
  padding: 44px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.98));
  border: 1px solid rgba(219, 234, 254, 0.9);
  box-shadow: var(--blog-shadow);
  overflow: hidden;
}

.blog-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blog-primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.blog-hero h1,
.post-hero h1,
.blog-category-hero h1 {
  margin: 16px 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.blog-hero p,
.post-hero p,
.blog-category-hero p {
  margin: 0;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.75;
  color: #475569;
}

.blog-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.blog-hero-stats span,
.post-meta span,
.blog-category-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(219, 234, 254, 0.96);
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.blog-section {
  margin-top: 28px;
}

.blog-search-panel {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--blog-radius-lg);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.96);
  box-shadow: var(--blog-shadow);
}

.blog-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.blog-search-input {
  flex: 1 1 320px;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--blog-line);
  background: #fff;
  font-size: 16px;
  color: var(--blog-text);
}

.blog-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-filter-btn {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #d7e2f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease;
}

.blog-filter-btn:hover,
.blog-filter-btn.is-active {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--blog-primary);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.12);
}

.blog-results-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--blog-muted);
  font-size: 14px;
  font-weight: 600;
}

.blog-grid,
.related-grid,
.blog-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.blog-card,
.related-card,
.blog-category-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--blog-card);
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--blog-radius-lg);
  box-shadow: var(--blog-shadow);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.blog-card:hover,
.related-card:hover,
.blog-category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--blog-shadow-hover);
  border-color: rgba(37, 99, 235, 0.16);
}

.blog-card-link,
.related-card-link,
.blog-category-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.blog-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #dbeafe, #f8fbff);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-card-body,
.related-card-body,
.blog-category-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
}

.blog-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blog-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.blog-card h2,
.related-card h3,
.blog-category-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.32;
  letter-spacing: -0.03em;
}

.blog-card h3,
.related-card strong,
.blog-category-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.34;
  letter-spacing: -0.03em;
}

.blog-card p,
.related-card p,
.blog-category-card p,
.post-summary {
  margin: 0;
  font-size: 16px;
  line-height: 1.78;
  color: #475569;
}

.blog-card-meta,
.post-meta,
.related-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}

.blog-more {
  color: var(--blog-primary);
  font-size: 14px;
  font-weight: 800;
}

.blog-empty-state {
  display: none;
  margin-top: 22px;
  padding: 34px 26px;
  border-radius: var(--blog-radius-lg);
  background: #fff;
  border: 1px dashed #c7d2e0;
  color: #64748b;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-top: 28px;
}

.post-main {
  min-width: 0;
}

.post-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
}

.post-breadcrumbs a {
  color: #475569;
  text-decoration: none;
}

.post-breadcrumbs a:hover {
  color: var(--blog-primary);
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.post-btn,
.blog-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.post-btn:hover,
.blog-cta-btn:hover {
  transform: translateY(-2px);
}

.post-btn-primary,
.blog-cta-btn-primary {
  background: linear-gradient(135deg, var(--blog-primary), var(--blog-primary-2));
  color: #fff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
}

.post-btn-light,
.blog-cta-btn-light {
  background: #fff;
  color: #0f172a;
  border: 1px solid #dbe4ef;
}

.post-article {
  margin-top: 24px;
  padding: 34px;
  background: #fff;
  border-radius: 30px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  box-shadow: var(--blog-shadow);
}

.post-body {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.9;
}

.post-body > *:first-child {
  margin-top: 0;
}

.post-body > *:last-child {
  margin-bottom: 0;
}

.post-body h2,
.post-body h3 {
  margin-top: 44px;
  margin-bottom: 14px;
  letter-spacing: -0.03em;
}

.post-body h2 {
  font-size: 34px;
  line-height: 1.24;
}

.post-body h3 {
  font-size: 25px;
  line-height: 1.34;
}

.post-body p,
.post-body li,
.post-body blockquote {
  font-size: 18px;
  line-height: 1.9;
  color: #334155;
}

.post-body ul,
.post-body ol {
  padding-left: 24px;
}

.post-body li + li {
  margin-top: 8px;
}

.post-body a {
  color: var(--blog-primary);
  font-weight: 700;
}

.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 22px auto;
  border-radius: 24px;
}

.post-body blockquote {
  margin: 24px 0;
  padding: 22px 24px;
  border-left: 4px solid var(--blog-primary);
  border-radius: 0 18px 18px 0;
  background: #f8fbff;
}

.post-sidebar {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.sidebar-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 24px;
  box-shadow: var(--blog-shadow);
}

.sidebar-card h3 {
  margin: 0 0 14px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.sidebar-toc,
.sidebar-tags,
.sidebar-links {
  display: grid;
  gap: 10px;
}

.sidebar-toc a,
.sidebar-links a {
  text-decoration: none;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.sidebar-toc a:hover,
.sidebar-links a:hover {
  color: var(--blog-primary);
}

.sidebar-tags a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blog-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.post-cta-block {
  margin-top: 28px;
  padding: 32px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 34%),
    linear-gradient(180deg, #f8fbff, #eef4ff);
  border: 1px solid #dbeafe;
  box-shadow: var(--blog-shadow);
}

.post-cta-block h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.post-cta-block p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.78;
}

.post-cta-actions,
.blog-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.related-section,
.pager-section {
  margin-top: 28px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.pager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pager-card {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.96);
  box-shadow: var(--blog-shadow);
  text-decoration: none;
  color: inherit;
}

.pager-card em {
  display: inline-block;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.pager-card strong {
  display: block;
  font-size: 21px;
  line-height: 1.42;
  letter-spacing: -0.03em;
}

.blog-footer {
  padding: 34px 0 48px;
  border-top: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.84);
}

.blog-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  color: #64748b;
  font-size: 14px;
}

.blog-footer strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 16px;
}

@media (max-width: 1100px) {
  .blog-grid,
  .related-grid,
  .blog-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .blog-main {
    padding: 26px 0 72px;
  }

  .blog-topbar-inner {
    min-height: 66px;
  }

  .blog-nav {
    display: none;
  }

  .blog-hero,
  .post-hero,
  .blog-category-hero,
  .post-article,
  .post-cta-block,
  .blog-search-panel,
  .sidebar-card {
    padding: 24px;
    border-radius: 24px;
  }

  .blog-grid,
  .related-grid,
  .blog-category-grid,
  .pager-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-card-body,
  .related-card-body,
  .blog-category-card-body {
    padding: 22px;
  }

  .blog-card h2,
  .blog-category-card h2 {
    font-size: 22px;
  }

  .blog-card h3,
  .related-card strong {
    font-size: 21px;
  }

  .post-body,
  .post-body p,
  .post-body li,
  .post-body blockquote {
    font-size: 17px;
  }

  .post-body h2 {
    font-size: 28px;
  }

  .post-body h3 {
    font-size: 22px;
  }
}
