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

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #222;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: #cc3333;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: #111;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.site-logo:hover {
    text-decoration: none;
    color: #ccc;
}

/* Main navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}

.main-nav a {
    color: #ccc;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.main-nav a:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

.main-nav a.active {
    color: #fff;
    background: #cc3333;
}

/* Menu toggle (hamburger) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: transform 0.2s;
}

/* Main content */
.site-main {
    flex: 1;
    padding: 2rem 0;
}

.page-content h1,
.post-content h1,
.post-list-page h1,
.recent-posts h2,
.more-posts h3 {
    margin-bottom: 1rem;
}

.page-content h1 {
    font-size: 2rem;
}

.content-body h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.content-body h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content-body p {
    margin-bottom: 1rem;
}

.content-body ul,
.content-body ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-body li {
    margin-bottom: 0.25rem;
}

.content-body code {
    background: #f4f4f4;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.content-body pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.content-body pre code {
    background: none;
    padding: 0;
}

.content-body blockquote {
    border-left: 3px solid #cc3333;
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1rem;
    color: #666;
}

.content-body hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 2rem 0;
}

/* Post previews */
.post-preview {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

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

.post-preview h2,
.post-preview h3 {
    margin-bottom: 0.25rem;
}

.post-preview h2 a,
.post-preview h3 a {
    color: #222;
}

.post-preview h2 a:hover,
.post-preview h3 a:hover {
    color: #cc3333;
}

.post-preview time {
    color: #888;
    font-size: 0.85rem;
}

.post-preview p {
    color: #555;
    margin: 0.5rem 0;
}

.read-more {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Post page */
.post-header {
    margin-bottom: 2rem;
}

.post-meta {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.post-author::before {
    content: '·';
    margin: 0 0.5rem;
}

.post-tags {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
    color: #666;
}

/* Home page */
.home-page {
    margin-bottom: 3rem;
}

.recent-posts h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.more-posts {
    margin: 2rem 0;
}

.more-posts ul {
    list-style: none;
    padding: 0;
}

.more-posts li {
    margin-bottom: 0.25rem;
}

.all-posts-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #111;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9rem;
}

.all-posts-link:hover {
    background: #cc3333;
    text-decoration: none;
}

/* Footer */
.site-footer {
    background: #111;
    color: #ccc;
    padding: 2rem 0;
    font-size: 0.85rem;
}

.footer-inner {
    text-align: center;
}

.footer-copyright {
    margin-bottom: 1rem;
}

.footer-license img {
    vertical-align: middle;
    margin-right: 0.5rem;
}

.footer-license a {
    color: #88ccff;
}

.footer-license a:hover {
    color: #aaddff;
}

.footer-license span {
    display: inline-block;
    margin-top: 0.5rem;
}

/* Responsive: Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #111;
        padding: 0.5rem 0;
        border-top: 1px solid #333;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 0;
    }

    .header-inner {
        position: relative;
    }

    .site-main {
        padding: 1.5rem 0;
    }

    .page-content h1 {
        font-size: 1.5rem;
    }

    .content-body h2 {
        font-size: 1.25rem;
    }
}
