:root {
    --bg: #ffffff;
    --fg: #000000;
    --dim: #666666;
    --border: #eeeeee;
    --accent: #0033cc;
    --font: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
}

body.dark-mode {
    --bg: #000000;
    --fg: #ffffff;
    --dim: #888888;
    --border: #222222;
    --accent: #3399ff;
}

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

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    line-height: 1.5;
    font-size: 15px;
    padding: 2rem 1rem;
    transition: background 0.2s, color 0.2s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--fg);
}

.site-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links a {
    color: var(--dim);
    text-decoration: none;
    margin-right: 1.5rem;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--fg);
    text-decoration: underline;
}

#theme-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--dim);
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
}

#theme-toggle-btn:hover {
    color: var(--fg);
    border-color: var(--fg);
}

.site-note {
    color: var(--dim);
    font-size: 0.85rem;
    margin-bottom: 3rem;
}

/* Post List */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.post-entry {
    border: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.post-entry:hover {
    border-color: var(--fg);
}

.post-meta {
    color: var(--dim);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.post-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

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

.post-excerpt {
    color: var(--fg);
    opacity: 0.8;
    font-size: 0.95rem;
}

/* Bionic Reading */
.b-letter {
    font-weight: 700;
    color: var(--fg);
}

/* Footer */
.footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.visitor-counter img {
    height: 16px;
    filter: grayscale(1);
}

/* Mobile */
@media (max-width: 600px) {
    body {
        font-size: 14px;
        padding: 1rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1.5rem;
    }
}
