*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius: 12px;
  --max-w: 1200px;
  --transition: .25s ease;
}
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.7;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

/* Header */
.header { background: var(--bg-white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow); }
.header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -.02em; cursor: pointer; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: .25rem; }
.nav a { padding: .5rem 1rem; border-radius: 8px; font-size: .9rem; font-weight: 500; color: var(--text-light); transition: all var(--transition); }
.nav a:hover, .nav a.active { color: var(--primary); background: var(--primary-light); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-white); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
  .nav.open { display: flex; }
  .nav a { padding: .75rem 1rem; }
}

/* Main */
.main { flex: 1; max-width: var(--max-w); margin: 0 auto; padding: 2rem 1.5rem; width: 100%; }
.page { display: none; animation: fadeIn .35s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Hero */
.hero { background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); border-radius: var(--radius); padding: 3.5rem 2.5rem; color: #fff; margin-bottom: 3rem; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; top: -50%; right: -20%; width: 400px; height: 400px; background: rgba(255,255,255,.08); border-radius: 50%; }
.hero h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: .75rem; line-height: 1.3; }
.hero p { font-size: 1.1rem; opacity: .9; max-width: 600px; line-height: 1.8; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.75rem; font-weight: 800; }
.hero-stat span { font-size: .85rem; opacity: .8; }

/* Section */
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 2px solid var(--primary); display: inline-block; }

/* Card Grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
@media (max-width: 480px) { .card-grid { grid-template-columns: 1fr; } }
.card { background: var(--bg-white); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: all var(--transition); cursor: pointer; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-thumb { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; }
.card-body { padding: 1.25rem 1.5rem 1.5rem; }
.card-tag { display: inline-block; background: var(--primary-light); color: var(--primary); font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 6px; margin-bottom: .5rem; }
.card-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; color: var(--text); }
.card-body p { font-size: .9rem; color: var(--text-light); line-height: 1.6; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .75rem; font-size: .8rem; color: var(--text-lighter); }

/* Article Detail */
.article-detail { max-width: 800px; margin: 0 auto; }
.article-detail .back-btn { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--text-light); margin-bottom: 1.5rem; cursor: pointer; padding: .4rem .8rem; border-radius: 8px; transition: all var(--transition); }
.article-detail .back-btn:hover { background: var(--primary-light); color: var(--primary); }
.article-detail h1 { font-size: 2rem; font-weight: 800; line-height: 1.4; margin-bottom: 1rem; }
.article-detail .meta { display: flex; gap: 1.5rem; font-size: .85rem; color: var(--text-lighter); margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.article-content h2 { font-size: 1.4rem; font-weight: 700; margin: 2rem 0 1rem; color: var(--text); }
.article-content h3 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 .75rem; }
.article-content p { margin-bottom: 1.25rem; color: var(--text); line-height: 1.85; }
.article-content ul, .article-content ol { margin: 1rem 0 1.25rem 1.5rem; }
.article-content li { margin-bottom: .5rem; line-height: 1.7; }
.article-content code { background: #f1f5f9; padding: .15rem .4rem; border-radius: 4px; font-size: .88em; color: #e11d48; }
.article-content pre { background: #1e293b; color: #e2e8f0; padding: 1.25rem 1.5rem; border-radius: 10px; overflow-x: auto; margin: 1.25rem 0; font-size: .88rem; line-height: 1.6; }
.article-content pre code { background: none; color: inherit; padding: 0; }
.article-content blockquote { border-left: 4px solid var(--primary); padding: 1rem 1.5rem; margin: 1.25rem 0; background: var(--primary-light); border-radius: 0 8px 8px 0; color: var(--text); }

/* Info Grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.info-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.info-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.info-card p { font-size: .9rem; color: var(--text-light); line-height: 1.7; }

/* Policy Pages */
.policy-content { max-width: 800px; margin: 0 auto; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; }
.policy-content h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; }
.policy-content .updated { font-size: .85rem; color: var(--text-lighter); margin-bottom: 2rem; }
.policy-content h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 .75rem; }
.policy-content p { margin-bottom: 1rem; color: var(--text); line-height: 1.8; }
.policy-content ul { margin: .5rem 0 1rem 1.5rem; }
.policy-content li { margin-bottom: .4rem; line-height: 1.7; }

/* Contact */
.contact-form { max-width: 640px; margin: 0 auto; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; }
.contact-form h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; }
.contact-form > p { color: var(--text-light); margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .4rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: .7rem 1rem; border: 1px solid var(--border); border-radius: 8px; font-size: .95rem; font-family: inherit; transition: border var(--transition); background: var(--bg); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.form-group textarea { min-height: 140px; resize: vertical; }
.btn-primary { background: var(--primary); color: #fff; border: none; padding: .75rem 2rem; font-size: .95rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: background var(--transition); }
.btn-primary:hover { background: var(--primary-dark); }

/* Footer */
.footer { background: var(--bg-white); border-top: 1px solid var(--border); margin-top: auto; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 2.5rem 1.5rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: .95rem; font-weight: 700; margin-bottom: .75rem; }
.footer-col p { font-size: .85rem; color: var(--text-light); line-height: 1.7; }
.footer-col a { display: block; font-size: .85rem; color: var(--text-light); padding: .2rem 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .8rem; color: var(--text-lighter); }

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--text-lighter); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb span { margin: 0 .4rem; }

/* Scroll top */
.scroll-top { position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px; background: var(--primary); color: #fff; border: none; border-radius: 50%; font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transition: all var(--transition); z-index: 999; }
.scroll-top.show { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-2px); }
