/* === 폰트 및 기본 설정 === */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --max-width: 800px;
    --header-height: 64px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: #374151;
        --border-color: #374151;
        --border-light: #4b5563;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    word-break: keep-all;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

/* === 레이아웃 === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    .container { padding: 0 1rem; }
}

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

@media (prefers-color-scheme: dark) {
    .header { background: rgba(17, 24, 39, 0.8); }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.blog-title {
    font-size: 1.75rem; /* 제목 크기 키움 */
    font-weight: 900;   /* 제목 가장 굵게 */
    text-decoration: none;
    color: var(--text-primary);
}

.header-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 1.5rem; /* 메뉴 사이 간격 */
    font-size: 1rem;     /* 메뉴 글자 크기 */
    transition: color 0.2s;
}

.header-nav a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .header-nav a { margin-left: 1rem; }
}

/* === 메인 콘텐츠 === */
.main {
    min-height: calc(100vh - var(--header-height) - 150px);
    padding: 3rem 0;
}

/* === 글 목록 === */
.post-list {
    display: grid;
    gap: 3rem;
}

.post-item {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 2rem;
}

.post-item .post-title a {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}
.post-item .post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    margin: 0.5rem 0 1rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.post-meta span {
    margin-right: 1rem;
}

.post-summary {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === 개별 글 === */
.post-header {
    text-align: left;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-header .post-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .post-header .post-title { font-size: 2rem; }
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2, .post-content h3, .post-content h4 {
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 1.75rem;
    margin: 3rem 0 1.5rem 0;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem 0;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.post-content ul, .post-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 0.5rem 1.5rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    color: var(--text-secondary);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

/* === 댓글, 페이지네이션, 푸터 등 기타 요소 === */
.comments {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
    gap: 0.5rem;
}
.pagination a, .pagination strong {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 0.375rem;
    transition: all 0.2s;
}
.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.pagination strong {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}