/* ============================================================
   기본 설정
   ============================================================ */
:root {
    --primary: #1a6b9e;
    --primary-dark: #124f76;
    --accent: #f4a261;
    --accent-dark: #e07a3a;
    --green: #2d9e6b;
    --text: #2d3436;
    --text-muted: #636e72;
    --border: #dfe6e9;
    --bg: #f7f9fc;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.14);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans KR', -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 15px;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ============================================================
   헤더
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(26,107,158,0.3));
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.3px;
}

.logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(26,107,158,0.08);
}

.menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
    margin-left: auto;
}

.menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ============================================================
   히어로
   ============================================================ */
.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0d3b5e 0%, #1a6b9e 40%, #f4a261 100%);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(13,59,94,0.6), transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 24px;
    color: white;
}

.hero-eyebrow {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 16px;
}

.hero-title {
    font-family: 'Playfair Display', 'Noto Sans KR', serif;
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 18px;
    max-width: 600px;
}

.hero-desc {
    font-size: 16px;
    opacity: 0.85;
    max-width: 520px;
    margin-bottom: 24px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 28px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tag--light {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.tag--blue {
    background: rgba(26,107,158,0.12);
    color: var(--primary);
}

.tag--orange {
    background: rgba(244,162,97,0.15);
    color: var(--accent-dark);
}

.tag--green {
    background: rgba(45,158,107,0.12);
    color: var(--green);
}

.btn-read {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-read:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* ============================================================
   메인 레이아웃
   ============================================================ */
.main-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}

/* ============================================================
   포스트 섹션
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ============================================================
   포스트 카드
   ============================================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.post-card.hidden {
    display: none;
}

.post-thumb {
    height: 180px;
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 14px;
}

.post-thumb--1 { background: linear-gradient(135deg, #1a3a5c 0%, #2980b9 60%, #a8d8ea 100%); }
.post-thumb--2 { background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%); }
.post-thumb--3 { background: linear-gradient(135deg, #134e5e 0%, #71b280 100%); }
.post-thumb--4 { background: linear-gradient(135deg, #c0392b 0%, #e67e22 100%); }
.post-thumb--5 { background: linear-gradient(135deg, #6c3483 0%, #1abc9c 100%); }
.post-thumb--6 { background: linear-gradient(135deg, #2c3e50 0%, #e74c3c 100%); }

.post-tag {
    background: rgba(0,0,0,0.35);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.post-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.post-date {
    font-size: 12px;
    color: var(--text-muted);
}

.post-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text);
}

.post-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 16px;
}

.post-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.2s;
}

.post-link:hover { color: var(--primary-dark); }

.load-more-wrap {
    text-align: center;
    margin-top: 36px;
}

.btn-outline {
    padding: 12px 32px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ============================================================
   사이드바
   ============================================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 88px;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg);
    color: var(--text);
}

/* 소개 카드 */
.about-card { text-align: center; }

.about-avatar {
    font-size: 52px;
    margin-bottom: 12px;
}

.about-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.about-bio {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat strong {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.stat span {
    font-size: 11px;
    color: var(--text-muted);
}

/* 카테고리 */
.category-list li a {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--bg);
    transition: color 0.2s;
}

.category-list li a:hover { color: var(--primary); }

.category-list li a span {
    background: var(--bg);
    color: var(--text-muted);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* 인기글 */
.popular-list {
    list-style: decimal;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popular-list li a {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    transition: color 0.2s;
}

.popular-list li a:hover { color: var(--primary); }

/* 태그 클라우드 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-item {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tag-cloud-item:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* 뉴스레터 */
.newsletter-widget {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.newsletter-widget .widget-title {
    color: white;
    border-color: rgba(255,255,255,0.15);
}

.newsletter-widget p {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 16px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.newsletter-form input {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.newsletter-form button {
    padding: 10px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s;
}

.newsletter-form button:hover {
    background: var(--accent-dark);
}

/* ============================================================
   푸터
   ============================================================ */
.site-footer {
    background: #0d1f2d;
    color: rgba(255,255,255,0.6);
    padding: 48px 24px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo span {
    font-size: 20px;
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 6px;
}

.footer-logo p {
    font-size: 13px;
    font-style: italic;
    color: rgba(255,255,255,0.45);
}

.footer-nav {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    font-size: 13px;
    transition: color 0.2s;
}

.footer-nav a:hover { color: white; }

.footer-copy {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    margin-top: 8px;
}

/* ============================================================
   반응형
   ============================================================ */
@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
        padding: 40px 20px;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .main-nav { display: none; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 4px;
        box-shadow: var(--shadow);
        z-index: 99;
    }

    .menu-btn { display: flex; }

    .hero { min-height: 420px; }
    .hero-content { padding: 40px 20px; }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
