:root {
    --bg: #10141a;
    --bg-alt: #1c2026;
    --fg: #dfe2eb;
    --muted: #889482;
    --primary: #8fff88;
    --primary-dim: #6ae368;
    --border: #2a3028;
    --border-dim: #3e4a3b;
}

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

body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dim); text-decoration: underline; text-underline-offset: 3px; }

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    background: rgba(16,20,26,0.95);
}
.site-logo {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dim);
}
.site-logo:hover { text-decoration: none; color: var(--primary); }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
    font-family: 'Space Mono', monospace;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}
.site-nav a:hover { color: var(--primary); text-decoration: none; }

/* Main */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 4rem;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--fg);
    line-height: 1.25;
    margin: 1.5em 0 .6em;
}
h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; color: var(--primary-dim); }

p { margin: 0 0 1.1em; }
.lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 2rem; }
.muted { color: var(--muted); }

/* Post list (home blog) */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: 0; }
.post-list time {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: .75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .3rem;
}
.post-list a {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--fg);
}
.post-list a:hover { color: var(--primary); text-decoration: none; }
.post-list p {
    color: var(--muted);
    margin: .4rem 0 0;
    font-size: .95rem;
}

/* Single post */
.post-header { margin-bottom: 2rem; }
.post-header time {
    font-family: 'Space Mono', monospace;
    font-size: .75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .1em;
}
.post-header h1 { margin-top: .3rem; }

.post-body {
    font-size: 1rem;
}
.post-body img { max-width: 100%; height: auto; border-radius: 2px; }

/* Code */
code {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: .1em .35em;
    border-radius: 2px;
    font-family: 'Space Mono', monospace;
    font-size: .88em;
    color: var(--primary);
}
pre {
    background: var(--bg-alt);
    border-left: 3px solid var(--primary);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 1.25em 0;
    font-size: .88rem;
}
pre code {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--fg);
    font-size: inherit;
}

/* Quote */
blockquote {
    border-left: 3px solid var(--muted);
    margin: 1.25em 0;
    padding: .4rem 1rem;
    color: var(--muted);
    font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

/* Lists */
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: .35em; }

/* Table */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.25em 0;
    font-size: .95rem;
}
th, td {
    padding: .5rem .75rem;
    border: 1px solid var(--border);
    text-align: left;
}
th { background: var(--bg-alt); color: var(--primary-dim); }

/* Footer post */
.post-footer {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-family: 'Space Mono', monospace;
    font-size: .85rem;
}

/* Site footer */
.site-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: 'Space Mono', monospace;
    font-size: .75rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--primary-dim); text-decoration: none; }

/* Mobile */
@media (max-width: 640px) {
    .site-header { padding: .9rem 1rem; }
    .site-nav { gap: 1rem; }
    .container { padding: 2rem 1rem 3rem; }
    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.25rem; }
}
