:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-subtle: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --border: #e2e8f0;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --accent-bg: #eff6ff;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.07);
  --max-w: 1120px;
  --article-w: 780px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.article-wrap { width: 100%; max-width: var(--article-w); margin: 0 auto; }

/* Ecosystem Top Strip */
.eco-strip {
  background: #0f172a;
  color: #cbd5e1;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.eco-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  flex-wrap: wrap;
}
.eco-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.eco-links a {
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: color 0.15s;
}
.eco-links a:hover { color: #60a5fa; text-decoration: none; }
.eco-dot {
  width: 7px; height: 7px; border-radius: 999px; background: #22c55e; display: inline-block;
}
.eco-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

/* Main Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding: 8px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--accent-bg);
  color: var(--primary);
  text-decoration: none;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #172554 100%);
  color: #f8fafc;
  padding: 48px 0 42px;
  border-bottom: 1px solid #1e293b;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(147, 197, 253, 0.25);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.hero p {
  margin: 0 0 22px;
  max-width: 680px;
  color: #cbd5e1;
  font-size: 15.5px;
}
.search-box {
  display: flex;
  gap: 8px;
  max-width: 520px;
}
.search-input {
  flex: 1;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 14.5px;
  outline: none;
}
.search-input::placeholder { color: #94a3b8; }
.search-input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,0.25); }

/* Main Grid */
.section { padding: 36px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-title { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.pill:hover, .pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.card-thumb {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: #0f172a;
}
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cat-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  margin-bottom: 10px;
}
.card-title {
  margin: 0 0 10px;
  font-size: 1.12rem;
  line-height: 1.42;
  letter-spacing: -0.015em;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); text-decoration: none; }
.card-desc {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}
.card-meta {
  font-size: 12.5px;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--surface-subtle);
}

/* Ecosystem Tools Banner */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.eco-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.eco-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); text-decoration: none; }
.eco-card h3 { margin: 8px 0 6px; font-size: 1.05rem; color: var(--text); }
.eco-card p { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }

/* Article Layout */
.article-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 40px;
  margin: 28px auto 40px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 680px) {
  .article-shell { padding: 24px 18px; margin: 16px auto 28px; border-radius: 12px; }
}
.breadcrumb {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.article-header h1 {
  margin: 8px 0 14px;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.32;
  letter-spacing: -0.025em;
}
.article-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-light);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.article-hero-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

/* Article Typography */
.prose { font-size: 16.5px; color: #1e293b; }
.prose h2 {
  font-size: 1.42rem;
  margin: 38px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--surface-subtle);
  color: var(--text);
  letter-spacing: -0.02em;
  scroll-margin-top: 84px;
}
.prose h3 {
  font-size: 1.15rem;
  margin: 26px 0 10px;
  color: var(--text);
  scroll-margin-top: 84px;
}
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--accent-bg);
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
  color: #1e3a8a;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .wp-block-table { margin: 24px 0; overflow-x: auto; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 480px;
}
.prose th, .prose td {
  border: 1px solid #cbd5e1;
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
}
.prose th { background: #f1f5f9; font-weight: 700; color: var(--text); }
.prose tr:nth-child(even) td { background: #fafcff; }
.prose pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 22px 0;
}
.prose code {
  background: #f1f5f9;
  color: #be123c;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.88em;
}
.prose pre code { background: none; color: inherit; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

/* CTA & Ad Slot */
.cta-box {
  margin: 34px 0 24px;
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.cta-box h3 { margin: 0 0 6px; font-size: 1.1rem; color: #fff; }
.cta-box p { margin: 0; font-size: 14px; color: #cbd5e1; }
.cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border-radius: 10px;
  background: #38bdf8;
  color: #0f172a;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}
.cta-btn:hover { background: #7dd3fc; text-decoration: none; }

.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.tag-chip {
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--surface-subtle);
  padding: 4px 10px;
  border-radius: 6px;
}

.disclaimer-note {
  margin-top: 26px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  line-height: 1.6;
}

.related-box { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.related-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.related-item {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
}
.related-item:hover { border-color: var(--primary); background: #fff; text-decoration: none; }
.related-item strong { display: block; font-size: 14.5px; line-height: 1.45; margin-bottom: 6px; }
.related-item span { font-size: 12px; color: var(--text-light); }

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 0 36px;
  margin-top: 56px;
  font-size: 13.5px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: #cbd5e1; }
.footer-links a:hover { color: #60a5fa; }
.footer-copy { margin-top: 20px; font-size: 12.5px; color: #64748b; }
