:root {
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e1e5e9;
    --accent-color: #ffe066;
    --accent-hover: #ffd43b;
    --code-bg: #ffe066;
    --max-width: 680px;
    --font-primary: 'Epunda Slab', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    padding: 16px 0 16px 0;
}

.site-title {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

.site-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    font-weight: 400;
}

.site-description {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    max-width: 500px;
}

/* Navigation */
nav {
    margin-top: 16px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    font-size: 24px;
    transition: color 0.2s ease;
}

nav a:hover,
nav a.active {
    color: var(--text-primary);
}

/* Main content */
main {
    padding: 24px 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

h1 {
    font-size: 28px;
    margin-bottom: 24px;
}

h2 {
    font-size: 22px;
    margin: 32px 0 16px 0;
}

h3 {
    font-size: 18px;
    margin: 24px 0 12px 0;
}

h4 {
    font-size: 16px;
    margin: 20px 0 8px 0;
}

p {
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

a {
    color: var(--text-primary);
    text-decoration: underline;
    background-color: transparent;
    transition: background-color 0.2s;
}


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

/* Articles */
.article {
    margin-bottom: 48px;
    padding-bottom: 48px;
}

.article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-header {
    margin-bottom: 24px;
}

.article-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.article-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.article-summary {
    color: var(--text-secondary);
    margin-top: 12px;
}

/* Code */
code {
    font-family: var(--font-mono);
    font-size: 14px;
    background-color: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-primary);
}

pre {
    font-family: var(--font-mono);
    font-size: 14px;
    background-color: var(--code-bg);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    line-height: 1.4;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* Lists */
ul,
ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

li {
    margin-bottom: 0;
    margin-top: 0;
}

/* Blockquotes */
blockquote {
    margin: 20px 0;
    padding: 0 0 0 20px;
    border-left: 3px solid var(--border-color);
    color: var(--text-secondary);
    font-style: italic;
}

/* Footer */
footer {
    padding: 40px 0;
    margin-top: 80px;
}

.footer-content {
    font-size: 24px;
    color: var(--text-muted);
    text-align: center;
}

.footer-content p {
    margin: 0 0 8px 0;
    color: inherit;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    header {
        padding: 24px 0 24px 0;
    }

    main {
        padding: 32px 0;
    }

    nav ul {
        gap: 20px;
        flex-wrap: wrap;
    }

    .site-title {
        font-size: 22px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .article {
        margin-bottom: 40px;
        padding-bottom: 40px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 16px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #a1a1aa;
        --text-muted: #71717a;
        --bg-primary: #09090b;
        --bg-secondary: #18181b;
        --border-color: #27272a;
        --accent-color: #60a5fa;
        --accent-hover: #93c5fd;
        --code-bg: #18181b;
    }
}