/* Minimalist Typography-focused CSS */

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --link-color: #0066cc;
    --link-hover: #003399;
    --border-color: #eaeaea;
    --code-bg: #f5f5f5;
    --header-bg: #fafafa;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #e0e0e0;
        --link-color: #66b3ff;
        --link-hover: #99ccff;
        --border-color: #333;
        --code-bg: #1e1e1e;
        --header-bg: #1a1a1a;
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}

header {
    padding: 40px 0 20px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

nav a.brand {
    font-weight: 700;
    font-size: 1.2rem;
}

nav .links a {
    margin-left: 20px;
    font-size: 0.95rem;
}

nav a:hover {
    color: var(--link-color);
}

main {
    min-height: 60vh;
}

/* Markdown Content Styling */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.25;
}

h1 { font-size: 2em; }
h2 { font-size: 1.5em; padding-bottom: 0.3em; border-bottom: 1px solid var(--border-color); }
h3 { font-size: 1.25em; }

p {
    margin-top: 0;
    margin-bottom: 16px;
}

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

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

ul, ol {
    padding-left: 2em;
    margin-bottom: 16px;
}

li {
    margin-bottom: 0.25em;
}

blockquote {
    margin: 0 0 16px;
    padding: 0 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
}

@media (prefers-color-scheme: dark) {
    blockquote {
        color: #8b949e;
        border-color: #3b434b;
    }
}

code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: var(--code-bg);
    border-radius: 3px;
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
}

pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: var(--code-bg);
    border-radius: 6px;
}

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

img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

footer {
    margin-top: 60px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: #6a737d;
}

@media (prefers-color-scheme: dark) {
    footer {
        color: #8b949e;
    }
}

@media (max-width: 600px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    nav .links a {
        margin-left: 0;
        margin-right: 15px;
    }
}
