:root {
    --text: #1a1a1a;
    --bg: #fafafa;
    --link: #2563eb;
    --link-hover: #1d4ed8;
    --code-bg: #f0f0f0;
    --border: #e0e0e0;
    --muted: #666;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text: #e0e0e0;
        --bg: #1a1a1a;
        --link: #60a5fa;
        --link-hover: #93bbfd;
        --code-bg: #2a2a2a;
        --border: #333;
        --muted: #999;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Navigation */
header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

nav {
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

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

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

nav a.active {
    color: var(--link);
    border-bottom: 2px solid var(--link);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
    margin-bottom: 1.25em;
}

a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

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

/* Lists */
ul, ol {
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.25em;
}

/* Code */
code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
    background: var(--code-bg);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

pre {
    margin-bottom: 1.25em;
    overflow-x: auto;
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 6px;
}

pre code {
    background: none;
    padding: 0;
    font-size: 0.85em;
}

/* Blockquotes */
blockquote {
    border-left: 3px solid var(--border);
    padding-left: 1rem;
    margin-bottom: 1.25em;
    color: var(--muted);
}

/* Horizontal rules */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25em;
}

th, td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
}

/* Blog listing */
.blog-listing {
    margin-top: 1.5rem;
}

.blog-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}

.blog-item:last-child {
    border-bottom: none;
}

.blog-item time {
    font-size: 0.85rem;
    color: var(--muted);
}

.blog-item h2 {
    font-size: 1.25rem;
    margin: 0.25rem 0;
}

.blog-item h2 a {
    text-decoration: none;
}

.blog-item p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* lite-youtube-embed */
lite-youtube {
    max-width: 100%;
    margin-bottom: 1.25em;
    border-radius: 6px;
    overflow: hidden;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}
