:root {
    --max: 72ch;
    --fg: #111;
    --muted: #666;
    --bg: #fff;
    --link: #0a58ca;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fg: #e6e6e6;
        --muted: #aaa;
        --bg: #0b0b0b;
        --link: #7ab0ff;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
}

.container {
    max-width: var(--max);
    margin: 3rem auto;
    padding: 0 1rem;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #ddd;
}

.site-header .brand img {
    height: 32px;
}

.site-nav a {
    margin-right: .75rem;
    text-decoration: none;
    color: var(--link);
}

.site-footer {
    border-top: 1px solid #ddd;
    margin-top: 4rem;
    padding: 2rem 1rem;
    color: var(--muted);
}

.post-title {
    margin: 0 0 .25rem 0;
    font-size: 2rem;
    line-height: 1.2;
}

.post-meta {
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.post-summary {
    font-style: italic;
    color: var(--muted);
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-left: 3px solid var(--link);
    border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
    .post-summary {
        background: rgba(255, 255, 255, 0.02);
    }
}

.post-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    .post-links {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}

.post-links h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 1.1rem;
}

.post-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-links li {
    margin-bottom: 0.5rem;
}

.post-links a {
    color: var(--link);
    text-decoration: none;
}

.post-links a:hover {
    text-decoration: underline;
}

.post-body img {
    max-width: 100%;
    height: auto;
}

.post-body pre {
    overflow: auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.post-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

blockquote {
    border-left: 3px solid #ccc;
    padding-left: 1rem;
    color: var(--muted);
    margin-left: 0;
}

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

.tag-list a {
    margin-right: .5rem;
}

/* Post listing styles for homepage, tags, sitemap */
.post-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.post-list li {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    .post-list li {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}

.post-list li:last-child {
    border-bottom: none;
}

.post-list h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
}

.post-list h3 a {
    color: var(--fg);
    text-decoration: none;
}

.post-list h3 a:hover {
    color: var(--link);
}

.post-list .post-date {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.post-list .post-excerpt {
    color: var(--muted);
    margin: 0.75rem 0;
    line-height: 1.5;
}

.post-list .tags {
    margin-top: 0.75rem;
}

.post-list .tag {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: var(--link);
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    text-decoration: none;
}

.post-list .tag:hover {
    opacity: 0.8;
}

/* Author styles */
.author {
    color: var(--muted);
}
