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

:root {
    --bg: #faf8f5;
    --fg: #24211d;
    --muted: #857f76;
    --accent: #b5493f;
    --line: #e6e1d9;
    --card: #ffffff;
    --code-bg: #f1ede6;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #161513;
        --fg: #e8e5e0;
        --muted: #948f86;
        --accent: #e0776c;
        --line: #2e2c28;
        --card: #1e1c1a;
        --code-bg: #24221f;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
    font-size: 17px;
    line-height: 1.8;
    word-break: keep-all;
}

.site-header {
    max-width: 680px;
    margin: 0 auto;
    padding: 2.2rem 1.25rem 1.2rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
}
.site-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--fg);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.site-nav a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 0.9rem;
    font-size: 0.95rem;
}
.site-nav a:hover { color: var(--accent); }

.content {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

a { color: var(--accent); }

.site-desc { color: var(--muted); margin-top: 0.2rem; }

/* ---- 글 목록 ---- */
.post-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.post-list li {
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--line);
}
.post-list .post-link {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    text-decoration: none;
}
.post-list time {
    color: var(--muted);
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.post-list .post-title {
    color: var(--fg);
    font-weight: 700;
    font-size: 1.05rem;
}
.post-list .post-link:hover .post-title { color: var(--accent); }
.post-list .excerpt {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.65;
}
.tag-line { margin: 0.35rem 0 0; }

/* ---- 태그 ---- */
.tag-chip {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--muted);
    background: var(--code-bg);
    border-radius: 999px;
    padding: 0.05rem 0.6rem;
    margin-right: 0.35rem;
    text-decoration: none;
}
.tag-chip:hover { color: var(--accent); }
.tag-cloud { line-height: 2.6; }
.tag-cloud .tag-chip { font-size: 0.95rem; padding: 0.15rem 0.8rem; }

/* ---- 본문 ---- */
.post header h1, .page h1 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin: 0.5rem 0 0.3rem;
}
.post .meta { color: var(--muted); font-size: 0.9rem; margin-top: 0; }
.post h2 {
    font-size: 1.25rem;
    margin-top: 2.2rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--line);
}
.post h3 { font-size: 1.08rem; margin-top: 1.8rem; }
.post img { max-width: 100%; border-radius: 8px; }

blockquote {
    margin: 1.2rem 0;
    padding: 0.1rem 1.1rem;
    border-left: 3px solid var(--accent);
    background: var(--card);
    color: var(--muted);
    border-radius: 0 8px 8px 0;
}

code {
    background: var(--code-bg);
    padding: 0.12rem 0.4rem;
    border-radius: 5px;
    font-size: 0.88em;
    font-family: Consolas, "D2Coding", monospace;
}
pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 10px;
    overflow-x: auto;
    line-height: 1.55;
}
pre code { background: none; padding: 0; }

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.2rem 0;
    font-size: 0.92rem;
}
th, td {
    border: 1px solid var(--line);
    padding: 0.45rem 0.7rem;
    text-align: left;
    overflow-wrap: anywhere;
}
th { background: var(--code-bg); }

hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

.post-nav { margin-top: 2.5rem; font-size: 0.95rem; }

.site-footer {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.2rem 1.25rem 2.5rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}
.site-footer a { color: var(--muted); }

@media (max-width: 480px) {
    .site-header { flex-direction: column; gap: 0.3rem; }
    .site-nav a { margin: 0 0.9rem 0 0; }
    .post-list .post-link { flex-direction: column; gap: 0.1rem; }
}
