:root {
    --bg: #000;
    --fg: #fff;
    --muted: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.06);
    --link: #fff;
}

[data-theme="light"] {
    --bg: #fff;
    --fg: #111;
    --muted: rgba(0, 0, 0, 0.55);
    --card-border: rgba(0, 0, 0, 0.08);
    --link: #1e73ff;
}

html,
body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    -webkit-font-smoothing: antialiased;
    transition: background 0.2s, color 0.2s;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
}

header a {
    color: var(--fg);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.75;
    transition: opacity 0.15s;
}

header a:hover {
    opacity: 1;
}

.theme-toggle {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--fg);
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.15s;
}

.theme-toggle:hover {
    border-color: var(--muted);
}

.post-body {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.post-body h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 32px;
}

.post-body p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--muted);
    margin: 0 0 20px;
}

.post-body a {
    color: var(--link);
    text-decoration: underline;
    transition: color 0.15s;
}

.post-body a:hover {
    opacity: 0.9;
}

.post-body img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
}

.post-body code {
    background: #5a5a5a33;
    padding: 2px 6px;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.post-body pre {
    background: #5a5a5a33;
    padding: 14px 16px;
    border-radius: 10px;
    overflow-x: auto;
}

.post-body pre code {
    padding: 0;
    background: transparent;
    border-radius: 0;
}



@media (max-width: 640px) {
    .post-body {
        padding: 32px 18px 60px;
    }

    .post-body h1 {
        font-size: 1.5rem;
    }

    .post-body p {
        font-size: 1rem;
    }
}