:root {
    --bg: #ffffff;
    --fg: #333333;
    --accent: #0066cc;
    --gray: #888888;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
    --max-width: 680px;
    --header-height: 80px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a1a;
        --fg: #eeeeee;
        --accent: #66b3ff;
        --gray: #999999;
    }
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; margin-top: 0.5em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

a:hover {
    border-bottom-color: var(--accent);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.date {
    color: var(--gray);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.post-list {
    list-style: none;
    padding: 0;
    margin-top: 3rem;
}

.post-item {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.post-item .date {
    min-width: 100px;
    text-align: right;
}

code {
    font-family: var(--font-mono);
    background: #f4f4f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

@media (prefers-color-scheme: dark) {
    code {
        background: #333;
    }
}

pre {
    background: #f4f4f4;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 5px;
    margin: 1.5em 0;
}

@media (prefers-color-scheme: dark) {
    pre {
        background: #333;
    }
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1em 0;
}

blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.5em 0;
    padding-left: 1rem;
    color: var(--gray);
    font-style: italic;
}

/* Utilities */
.nav-link {
    font-weight: 600;
    color: var(--fg);
}

.post-header-centered {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.post-category {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--fg);
}

.post-title-main {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0.5rem 0 1.5rem;
    line-height: 1.1;
}

.post-meta-centered {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.post-tags-centered {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    color: var(--gray);
    font-size: 0.9rem;
}

.post-hero {
    margin-bottom: 3rem;
    width: 100%;
}

.hero-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 20px;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

@media (max-width: 680px) {
    .post-title-main {
        font-size: 2.5rem;
    }
}
