:root {
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #6b7280;
    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-border: #e5e7eb;
    --color-tag-bg: #f3f4f6;
    --max-width: 720px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* Header */

.site-header {
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 2rem;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.site-name:hover {
    color: var(--color-text);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

nav a:hover {
    color: var(--color-text);
    text-decoration: none;
}

/* Content */

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

/* Intro */

.intro {
    margin-bottom: 3rem;
}

.intro h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.intro p {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
}

/* Posts section */

.posts-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

/* Post list */

.post-list {
    list-style: none;
}

.post-list li {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--color-border);
}

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

.post-list h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.post-list a {
    color: var(--color-text);
}

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

.post-meta {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.25rem;
}

.empty-state {
    color: var(--color-text-secondary);
    font-style: italic;
    padding: 2rem 0;
}

/* Individual post */

.post h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-content {
    margin-top: 2rem;
}

.post-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.post-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

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

.post-content code {
    font-family: "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--color-tag-bg);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

.post-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.post-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

.post-content blockquote {
    border-left: 3px solid var(--color-accent);
    padding-left: 1rem;
    margin-bottom: 1.25rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

.post-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Tags */

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag-list li a {
    display: inline-block;
    background: var(--color-tag-bg);
    color: var(--color-text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tag-list li a:hover {
    background: var(--color-border);
    text-decoration: none;
}

/* About page content */

.content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

/* Footer */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 2rem;
    text-align: center;
}

.site-footer p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* Responsive */

@media (max-width: 600px) {
    .site-header {
        padding: 1rem;
    }

    .content {
        padding: 2rem 1rem;
    }

    .intro h1 {
        font-size: 1.6rem;
    }

    .post h1 {
        font-size: 1.6rem;
    }
}
