@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
  --color-primary: #1a365d;
  --color-primary-light: #2b5797;
  --color-accent: #2b8a9e;
  --color-accent-light: #38b2ac;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f9fc;
  --color-bg-warm: #fafafa;
  --color-text: #1a202c;
  --color-text-secondary: #4a5568;
  --color-text-muted: #718096;
  --color-border: #e2e8f0;
  --color-border-light: #edf2f7;
  --font-heading: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.10);
  --shadow-xl: 0 20px 50px rgba(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-fast: 150ms ease;
  --transition-base: 250ms ease;
  --max-width: 1200px;
  --content-width: 760px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary); }

/* WP default overrides */
.wp-site-blocks, .wp-block-group, .wp-block-template-part { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
.wp-block-post-content { max-width: var(--content-width) !important; margin: 0 auto !important; padding: 0 var(--space-md) !important; }

/* ===== HEADER / NAV ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  transition: box-shadow var(--transition-base);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  max-width: var(--max-width); 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); text-decoration: none; }
.site-logo img { width: 36px; height: 36px; border-radius: var(--radius-sm); }
.site-logo-text {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem;
  color: var(--color-primary); letter-spacing: -0.02em;
}
.nav-menu { display: flex; gap: var(--space-lg); list-style: none; align-items: center; }
.nav-menu a {
  font-size: 0.9rem; font-weight: 500; color: var(--color-text-secondary);
  padding: var(--space-xs) 0; position: relative; transition: color var(--transition-fast);
}
.nav-menu a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: var(--color-accent); transition: width var(--transition-base);
}
.nav-menu a:hover { color: var(--color-primary); }
.nav-menu a:hover::after { width: 100%; }
.mobile-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: var(--space-sm);
}
.mobile-toggle span {
  display: block; width: 22px; height: 2px; background: var(--color-text);
  margin: 5px 0; transition: all var(--transition-fast); border-radius: 1px;
}

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

/* ===== ARTICLE / SINGLE ===== */
.article-container {
  max-width: var(--content-width); margin: 0 auto;
  padding: calc(64px + var(--space-4xl)) var(--space-lg) var(--space-4xl);
}
.article-container h1 {
  font-family: var(--font-heading); font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800; line-height: 1.3; letter-spacing: -0.03em;
  color: var(--color-primary); margin-bottom: var(--space-lg);
}
.article-meta {
  display: flex; gap: var(--space-md); font-size: 0.85rem;
  color: var(--color-text-muted); margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg); border-bottom: 1px solid var(--color-border-light);
}
.article-hero-img {
  width: 100%; border-radius: var(--radius-lg); margin-bottom: var(--space-2xl);
  aspect-ratio: 16/9; object-fit: cover;
}
.article-content { font-size: 1.05rem; line-height: 1.8; color: var(--color-text); }
.article-content p { margin-bottom: 1.6em; }
.article-content h2 {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700;
  color: var(--color-primary); margin: 2.5em 0 1em;
  padding-left: var(--space-md); border-left: 4px solid var(--color-accent);
  line-height: 1.4; letter-spacing: -0.02em;
}
.article-content h3 {
  font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600;
  color: var(--color-primary-light); margin: 2em 0 0.8em;
}
.article-content img {
  border-radius: var(--radius-md); margin: 2em 0;
  box-shadow: var(--shadow-sm);
}
.article-content ul, .article-content ol {
  margin: 1.2em 0; padding-left: 1.5em;
}
.article-content li { margin-bottom: 0.5em; line-height: 1.7; }
.article-content table {
  width: 100%; border-collapse: collapse; margin: 2em 0;
  font-size: 0.95rem; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.article-content table thead { background: var(--color-primary); color: #fff; }
.article-content table th {
  padding: 12px 16px; font-weight: 600; text-align: left;
  font-size: 0.9rem;
}
.article-content table td {
  padding: 12px 16px; border-bottom: 1px solid var(--color-border-light);
}
.article-content table tbody tr:nth-child(even) { background: var(--color-bg-alt); }
.article-content table tbody tr:hover { background: #edf5f8; }
.article-content blockquote {
  margin: 2em 0; padding: var(--space-lg) var(--space-xl);
  background: var(--color-bg-alt); border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: normal; color: var(--color-text-secondary);
}
.article-content .callout-box {
  margin: 2em 0; padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border: 1px solid #fed7d7; border-radius: var(--radius-md);
  position: relative;
}
.article-content .callout-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, #e53e3e, #fc8181);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.article-content .callout-box.info {
  background: linear-gradient(135deg, #ebf8ff 0%, #fff 100%);
  border-color: #bee3f8;
}
.article-content .callout-box.info::before {
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
}
.article-content .step-timeline {
  margin: 2em 0; padding: 0; list-style: none; position: relative;
}
.article-content .step-timeline::before {
  content: ''; position: absolute; left: 20px; top: 0; bottom: 0;
  width: 2px; background: var(--color-border);
}
.article-content .step-timeline li {
  position: relative; padding-left: 52px; margin-bottom: var(--space-xl);
}
.article-content .step-timeline li::before {
  content: attr(data-step); position: absolute; left: 8px; top: 2px;
  width: 26px; height: 26px; background: var(--color-accent); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; z-index: 1;
}
.article-content .checklist { list-style: none; padding-left: 0; }
.article-content .checklist li {
  padding: var(--space-sm) 0 var(--space-sm) var(--space-xl);
  position: relative;
}
.article-content .checklist li::before {
  content: ''; position: absolute; left: 0; top: 14px;
  width: 18px; height: 18px; border: 2px solid var(--color-accent);
  border-radius: var(--radius-sm);
}
.article-content .comparison-chart {
  margin: 2em 0; display: flex; flex-direction: column; gap: var(--space-md);
}
.article-content .comparison-chart .bar-row {
  display: flex; align-items: center; gap: var(--space-md);
}
.article-content .comparison-chart .bar-label {
  min-width: 100px; font-size: 0.9rem; font-weight: 500; text-align: right;
}
.article-content .comparison-chart .bar-track {
  flex: 1; height: 28px; background: var(--color-bg-alt);
  border-radius: 14px; overflow: hidden;
}
.article-content .comparison-chart .bar-fill {
  height: 100%; border-radius: 14px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: var(--space-md); font-size: 0.8rem; color: #fff; font-weight: 600;
  transition: width 1s ease;
}

@media(max-width:600px) {
  .article-content table { font-size: 0.85rem; display: block; overflow-x: auto; }
  .article-content table th, .article-content table td { padding: 8px 10px; white-space: nowrap; }
  .article-content .comparison-chart .bar-label { min-width: 70px; font-size: 0.8rem; }
}

/* ===== CARDS ===== */
.post-card {
  background: var(--color-bg); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card .card-thumb {
  aspect-ratio: 4/3; overflow: hidden;
}
.post-card .card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--transition-base);
}
.post-card:hover .card-thumb img { transform: scale(1.04); }
.post-card .card-body { padding: var(--space-lg); flex: 1; display: flex; flex-direction: column; }
.post-card .card-cat {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  color: var(--color-accent); letter-spacing: 0.05em; margin-bottom: var(--space-sm);
}
.post-card .card-title {
  font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700;
  color: var(--color-text); line-height: 1.4; margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}
.post-card .card-excerpt {
  font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.6;
  flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card .card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 600; color: var(--color-accent);
  margin-top: var(--space-md); transition: gap var(--transition-fast);
}
.post-card .card-link:hover { gap: 10px; }
.post-card .card-link svg { width: 14px; height: 14px; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-primary); color: rgba(255,255,255,.7);
  padding: var(--space-4xl) var(--space-lg) var(--space-2xl);
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-3xl);
  padding-bottom: var(--space-2xl); border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: var(--space-2xl);
}
.footer-brand .footer-logo { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.footer-brand .footer-logo img { width: 32px; height: 32px; border-radius: var(--radius-sm); }
.footer-brand .footer-logo-text { font-weight: 700; color: #fff; font-size: 1rem; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; margin-bottom: var(--space-sm); }
.footer-links h4 {
  color: #fff; font-size: 0.85rem; font-weight: 600;
  margin-bottom: var(--space-md); text-transform: uppercase; letter-spacing: 0.05em;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: var(--space-sm); }
.footer-links a { color: rgba(255,255,255,.6); font-size: 0.85rem; transition: color var(--transition-fast); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: var(--space-md);
}
.footer-legal { font-size: 0.78rem; color: rgba(255,255,255,.4); line-height: 1.8; max-width: 760px; }
.footer-legal p { margin-bottom: 4px; }
.footer-copyright { font-size: 0.78rem; color: rgba(255,255,255,.4); }

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

/* ===== RELATED POSTS ===== */
.related-posts {
  margin-top: var(--space-4xl); padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border-light);
}
.related-posts h3 {
  font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700;
  color: var(--color-primary); margin-bottom: var(--space-xl);
}
.related-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-lg);
}

/* ===== TOC ===== */
.toc-box {
  background: var(--color-bg-alt); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md); padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
}
.toc-box h4 {
  font-size: 0.9rem; font-weight: 700; color: var(--color-primary);
  margin-bottom: var(--space-md); text-transform: uppercase; letter-spacing: 0.03em;
}
.toc-box ol { padding-left: 1.2em; }
.toc-box li { margin-bottom: var(--space-sm); font-size: 0.9rem; }
.toc-box a { color: var(--color-text-secondary); }
.toc-box a:hover { color: var(--color-accent); }

/* ===== LEGAL NOTICES ===== */
.legal-notice { font-size: 0.85em !important; }
.ai-notice { font-size: 0.85em !important; }

/* ===== UTILITIES ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ===== FOCUS / ACCESSIBILITY ===== */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-accent); outline-offset: 2px;
}

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