:root {
  --bg-primary: #fafcfa;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --bg-accent-light: #f0f7f2;
  --text-primary: #1a2e1a;
  --text-secondary: #4a5d4a;
  --text-muted: #7a8d7a;
  --brand-green: #2d6a4f;
  --brand-green-dark: #1b4332;
  --brand-green-light: #52b788;
  --brand-accent: #40916c;
  --border-light: #d8e4d8;
  --border-card: #e8f0e8;
  --shadow-sm: 0 1px 3px rgba(45,106,79,0.06);
  --shadow-md: 0 4px 16px rgba(45,106,79,0.08);
  --shadow-lg: 0 8px 32px rgba(45,106,79,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --font-sans: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  --font-serif: 'Noto Serif KR', Georgia, serif;
  --content-width: 780px;
  --site-width: 1200px;
}

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

body {
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--brand-green); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-green-dark); }

img { max-width: 100%; height: auto; }

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 var(--space-md);
}
.site-header-inner {
  max-width: var(--site-width);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo img { width: 36px; height: 36px; border-radius: 8px; }
.site-logo-text { font-weight: 700; font-size: 1.15em; color: var(--text-primary); letter-spacing: -0.02em; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.92em; font-weight: 500; color: var(--text-secondary);
  transition: background .2s, color .2s;
}
.site-nav a:hover { background: var(--bg-accent-light); color: var(--brand-green); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--text-primary); }

/* ===== SINGLE POST ===== */
.post-hero { position: relative; overflow: hidden; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.post-hero img { width: 100%; height: 400px; object-fit: cover; display: block; }
.post-hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(27,67,50,0.85));
  padding: var(--space-lg) var(--space-md); color: #fff;
}
.post-hero-overlay h1 {
  font-family: var(--font-serif); font-size: 2.2em; font-weight: 700;
  line-height: 1.3; letter-spacing: -0.03em;
}

.post-content {
  max-width: var(--content-width); margin: var(--space-xl) auto;
  padding: 0 var(--space-md);
}
.post-content h2 {
  font-family: var(--font-serif); font-size: 1.5em; font-weight: 700;
  color: var(--brand-green-dark); margin: 48px 0 18px;
  padding-bottom: 10px; border-bottom: 2px solid var(--bg-accent-light);
  letter-spacing: -0.02em;
}
.post-content h3 {
  font-size: 1.2em; font-weight: 600; color: var(--text-primary);
  margin: 32px 0 12px;
}
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { margin: 12px 0 18px 20px; }
.post-content li { margin-bottom: 6px; }
.post-content table { border: 1px solid var(--border-light); border-radius: var(--radius-sm); overflow: hidden; }
.post-content table th, .post-content table td { border-bottom: 1px solid var(--border-light); }
.post-content figure { margin: 32px 0; }
.post-content figcaption { font-size: 0.88em; color: var(--text-muted); }
.post-content blockquote { margin: 24px 0; }

.post-content .post-summary-box { font-size: 1.02em; }

/* Related posts */
.related-posts { max-width: var(--content-width); margin: 0 auto var(--space-xl); padding: 0 var(--space-md); }
.related-posts h2 { font-family: var(--font-serif); font-size: 1.3em; margin-bottom: var(--space-md); color: var(--brand-green-dark); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-md); }
.related-card {
  background: var(--bg-white); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s; text-decoration: none; color: inherit;
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.related-card img { width: 100%; height: 160px; object-fit: cover; }
.related-card-body { padding: var(--space-sm); }
.related-card-body h3 { font-size: 1em; font-weight: 600; line-height: 1.4; margin: 0; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--brand-green-dark); color: rgba(255,255,255,0.75);
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  font-size: 0.88em; line-height: 1.7;
}
.site-footer-inner { max-width: var(--site-width); margin: 0 auto; }
.footer-brand { font-weight: 700; font-size: 1.15em; color: #fff; margin-bottom: var(--space-sm); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin: var(--space-sm) 0; }
.footer-links a { color: rgba(255,255,255,0.7); }
.footer-links a:hover { color: #fff; }
.footer-legal { margin-top: var(--space-md); font-size: 0.85em; color: rgba(255,255,255,0.5); }
.footer-notice { margin-top: var(--space-sm); font-size: 0.82em; color: rgba(255,255,255,0.45); line-height: 1.6; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .site-header-inner { height: 56px; }
  .site-nav { display: none; position: fixed; top: 56px; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.98); flex-direction: column; padding: var(--space-md); z-index: 99; }
  .site-nav.active { display: flex; }
  .site-nav a { padding: 14px 16px; font-size: 1.05em; border-bottom: 1px solid var(--border-light); }
  .nav-toggle { display: block; }
  .post-hero img { height: 240px; }
  .post-hero-overlay h1 { font-size: 1.5em; }
  .post-content { margin-top: var(--space-lg); }
  .post-content h2 { font-size: 1.3em; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

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

/* ===== PAGE TEMPLATE ===== */
.page-content {
  max-width: var(--content-width); margin: var(--space-xl) auto;
  padding: 0 var(--space-md);
}
.page-content h1 {
  font-family: var(--font-serif); font-size: 2em; font-weight: 700;
  color: var(--brand-green-dark); margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}
.page-content h2 { font-size: 1.3em; font-weight: 600; color: var(--text-primary); margin: 32px 0 12px; }
.page-content p { margin-bottom: 14px; }
.page-content ul, .page-content ol { margin: 10px 0 16px 20px; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ===== WP OVERRIDES ===== */
.wp-block-post-content, .entry-content { font-family: var(--font-sans); }
.wp-site-blocks { padding: 0; }
body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { max-width: none; }
