:root {
  --c-primary: #0A6E73;
  --c-primary-light: #E8F4F5;
  --c-primary-dark: #085558;
  --c-accent: #C4956A;
  --c-accent-light: #FDF5EE;
  --c-text: #1C1C28;
  --c-text-secondary: #5A5A6E;
  --c-text-muted: #8E8E9F;
  --c-bg: #FFFFFF;
  --c-surface: #F7F8FA;
  --c-border: #E5E7EB;
  --c-border-light: #F0F1F3;
  --font-heading: 'Noto Serif KR', 'Pretendard', serif;
  --font-body: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;
  --transition: 200ms ease;
  --max-content: 780px;
  --max-wide: 1200px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-primary-dark); }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border-light);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  height: 64px;
}
.site-logo { display: flex; align-items: center; gap: var(--space-sm); }
.site-logo img { width: 36px; height: 36px; border-radius: var(--radius-sm); }
.site-logo-text {
  font-family: var(--font-heading);
  font-size: 1.05rem; font-weight: 600;
  color: var(--c-text); letter-spacing: -0.02em;
}
.nav-menu { display: flex; gap: var(--space-lg); list-style: none; }
.nav-menu a {
  font-size: 0.9rem; font-weight: 500; color: var(--c-text-secondary);
  padding: var(--space-xs) 0; position: relative;
}
.nav-menu a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: var(--c-primary);
  transition: width var(--transition);
}
.nav-menu a:hover { color: var(--c-primary); }
.nav-menu a:hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--space-sm); }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--c-text); }

@media (max-width: 768px) {
  .nav-menu {
    display: none; position: fixed; top: 64px; left: 0; right: 0;
    background: var(--c-bg); flex-direction: column;
    padding: var(--space-lg); gap: 0;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: var(--space-md) 0; font-size: 1rem; border-bottom: 1px solid var(--c-border-light); }
  .nav-menu a::after { display: none; }
  .nav-toggle { display: block; }
}

/* FOOTER */
.site-footer {
  background: #1A1A2E; color: rgba(255,255,255,0.7);
  padding: var(--space-4xl) var(--space-lg) var(--space-xl);
}
.footer-inner {
  max-width: var(--max-wide); margin: 0 auto;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2xl); margin-bottom: var(--space-3xl);
}
.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 1.1rem; font-weight: 600; color: #fff;
  margin-bottom: var(--space-md);
}
.footer-desc { font-size: 0.88rem; line-height: 1.7; margin-bottom: var(--space-lg); }
.footer-heading { font-size: 0.82rem; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-md); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: var(--space-sm); }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.88rem; transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-lg);
  font-size: 0.78rem; color: rgba(255,255,255,0.4);
  line-height: 1.8;
}
.footer-legal p { margin-bottom: var(--space-xs); }

@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; gap: var(--space-xl); }
}

/* CONTENT AREA */
.content-wrap {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg) var(--space-4xl);
}

/* SINGLE POST */
.single-hero-img {
  width: 100%; max-height: 480px; object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}
.single-meta {
  display: flex; gap: var(--space-md); align-items: center;
  font-size: 0.85rem; color: var(--c-text-muted);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--c-border-light);
}
.single-category {
  background: var(--c-primary-light); color: var(--c-primary);
  padding: 2px 10px; border-radius: 99px; font-size: 0.8rem; font-weight: 500;
}

.entry-content { font-size: 1.05rem; line-height: 1.8; color: var(--c-text); }
.entry-content h2 {
  font-family: var(--font-heading);
  font-size: 1.55rem; font-weight: 700; color: var(--c-text);
  margin: var(--space-3xl) 0 var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--c-primary);
  letter-spacing: -0.02em;
  line-height: 1.4;
}
.entry-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem; font-weight: 600; color: var(--c-text);
  margin: var(--space-2xl) 0 var(--space-md);
  padding-left: var(--space-md);
  border-left: 3px solid var(--c-accent);
  line-height: 1.4;
}
.entry-content p { margin-bottom: var(--space-lg); }
.entry-content img {
  border-radius: var(--radius-md); margin: var(--space-xl) 0;
  box-shadow: var(--shadow-sm);
}
.entry-content ul, .entry-content ol {
  margin: var(--space-lg) 0; padding-left: var(--space-xl);
}
.entry-content li { margin-bottom: var(--space-sm); line-height: 1.7; }

.entry-content table {
  width: 100%; border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.entry-content table thead th {
  background: var(--c-primary); color: #fff;
  padding: 12px 16px; text-align: left;
  font-weight: 600; font-size: 0.88rem;
  white-space: nowrap;
}
.entry-content table td {
  padding: 11px 16px; border-bottom: 1px solid var(--c-border-light);
  vertical-align: top;
}
.entry-content table tbody tr:last-child td { border-bottom: none; }
.entry-content table tbody tr:nth-child(even) { background: var(--c-surface); }

.entry-content blockquote {
  background: var(--c-primary-light);
  border-left: 4px solid var(--c-primary);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1rem; color: var(--c-primary-dark);
}
.entry-content blockquote p { margin-bottom: var(--space-xs); }
.entry-content blockquote p:last-child { margin-bottom: 0; }

/* Info callout */
.info-callout {
  background: var(--c-accent-light);
  border: 1px solid var(--c-accent);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  font-size: 0.95rem;
}

/* Bar chart */
.bar-chart { margin: var(--space-xl) 0; }
.bar-chart-item {
  display: flex; align-items: center; gap: var(--space-md);
  margin-bottom: var(--space-sm);
}
.bar-chart-label {
  min-width: 100px; font-size: 0.88rem; font-weight: 500;
  text-align: right; color: var(--c-text-secondary);
}
.bar-chart-track {
  flex: 1; height: 28px; background: var(--c-surface);
  border-radius: var(--radius-sm); overflow: hidden;
}
.bar-chart-fill {
  height: 100%; background: linear-gradient(90deg, var(--c-primary), var(--c-primary-dark));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: var(--space-sm); color: #fff; font-size: 0.78rem; font-weight: 600;
  min-width: 32px;
  transition: width 0.8s ease;
}

/* Timeline */
.step-timeline {
  display: flex; gap: 0; margin: var(--space-xl) 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.step-item {
  flex: 1; min-width: 120px; text-align: center; position: relative;
  padding: var(--space-md) var(--space-sm);
}
.step-item::before {
  content: ''; position: absolute; top: 22px; left: 50%; right: -50%;
  height: 2px; background: var(--c-border);
}
.step-item:last-child::before { display: none; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  position: relative; z-index: 1;
  margin-bottom: var(--space-sm);
}
.step-text { font-size: 0.82rem; font-weight: 500; color: var(--c-text); line-height: 1.4; }

/* Related posts */
.related-posts { margin-top: var(--space-3xl); padding-top: var(--space-xl); border-top: 1px solid var(--c-border); }
.related-posts h2 {
  font-family: var(--font-heading); font-size: 1.3rem;
  margin-bottom: var(--space-xl); border-bottom: none; padding-bottom: 0;
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-lg); }
.related-card {
  border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--c-border-light);
  transition: transform var(--transition), box-shadow var(--transition);
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.related-card img { width: 100%; height: 140px; object-fit: cover; }
.related-card-body { padding: var(--space-md); }
.related-card-title {
  font-size: 0.92rem; font-weight: 600; color: var(--c-text);
  line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Legal notice */
.legal-notice, .ai-notice { font-size: 0.85rem !important; }

/* TABLE RESPONSIVE */
@media (max-width: 640px) {
  .entry-content table { font-size: 0.82rem; display: block; overflow-x: auto; }
  .entry-content table thead th, .entry-content table td { padding: 8px 10px; }
  .step-timeline { gap: 0; }
  .step-item { min-width: 90px; }
}

/* PAGE TEMPLATE */
.page-content { max-width: var(--max-content); margin: 0 auto; padding: var(--space-3xl) var(--space-lg) var(--space-4xl); }
.page-content h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem; font-weight: 700; margin-bottom: var(--space-xl);
  color: var(--c-text);
}
.page-content h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem; font-weight: 600;
  margin: var(--space-2xl) 0 var(--space-md);
  color: var(--c-text);
}
.page-content p { margin-bottom: var(--space-md); line-height: 1.8; }
.page-content ul { margin: var(--space-md) 0; padding-left: var(--space-xl); }
.page-content li { margin-bottom: var(--space-xs); line-height: 1.7; }

/* SCROLL ANIMATIONS */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; }
}
