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

:root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #888888;
    --border: #333333;
}

body {
    font-family: monospace, 'Courier New', Courier, monospace;
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    font-size: 14px;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

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

a:hover {
    background-color: var(--fg);
    color: var(--bg);
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.site-title {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 10px;
}

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

.site-title a:hover {
    background: none;
    color: var(--fg);
}

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

nav a {
    text-decoration: none;
}

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

nav a::before {
    content: '~/';
    color: var(--muted);
}

nav a.active {
    text-decoration: underline;
}

/* Sections */
section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

section:last-of-type {
    border-bottom: none;
}

h2 {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 15px;
    text-transform: lowercase;
}

h2::before {
    content: '# ';
    color: var(--muted);
}

h3 {
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 8px;
}

h3::before {
    content: '## ';
    color: var(--muted);
}

p {
    margin-bottom: 15px;
}

/* About */
.about-content {
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

/* Blog index */
.blog-toc {
    list-style: none;
    padding-left: 20px;
    border-left: 1px solid var(--border);
    margin-bottom: 40px;
}

.blog-toc li {
    margin-bottom: 6px;
}

.blog-toc .toc-date {
    color: var(--muted);
    font-size: 12px;
    margin-right: 12px;
}

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

.blog-list li {
    margin-bottom: 20px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.blog-date {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.blog-title {
    margin-bottom: 8px;
}

.blog-title a {
    text-decoration: none;
}

.blog-title a:hover {
    text-decoration: underline;
    background: none;
}

.blog-excerpt {
    color: var(--muted);
    font-size: 13px;
}

.blog-tags {
    margin-top: 8px;
    font-size: 12px;
}

.blog-tags span {
    color: var(--muted);
    margin-right: 10px;
}

/* Blog post (single) */
.post-header {
    padding-left: 20px;
    border-left: 1px solid var(--border);
    margin-bottom: 30px;
}

.post-meta {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.post-title {
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 10px;
}

.post-title::before {
    content: none;
}

.post-body {
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.post-body p {
    margin-bottom: 18px;
}

.post-body h2 {
    margin-top: 30px;
    margin-bottom: 12px;
}

.post-body h3 {
    margin-top: 20px;
    margin-bottom: 8px;
}

.post-body pre {
    background: #111;
    border: 1px solid var(--border);
    padding: 12px;
    overflow-x: auto;
    margin-bottom: 18px;
    font-size: 13px;
}

.post-body code {
    background: #111;
    padding: 0 4px;
    font-size: 13px;
}

.post-body pre code {
    background: none;
    padding: 0;
}

.post-body blockquote {
    border-left: 2px solid var(--muted);
    padding-left: 16px;
    color: var(--muted);
    margin-bottom: 18px;
}

.post-body ul,
.post-body ol {
    padding-left: 24px;
    margin-bottom: 18px;
}

.post-body li {
    margin-bottom: 6px;
}

.post-nav {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
}

.post-nav a {
    color: var(--fg);
}

/* Projects */
.project-list {
    list-style: none;
}

.project-list li {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.project-title {
    margin-bottom: 8px;
}

.project-title a {
    text-decoration: none;
}

.project-title a:hover {
    text-decoration: underline;
    background: none;
}

.project-desc {
    color: var(--muted);
    margin-bottom: 8px;
}

.project-meta {
    font-size: 12px;
    color: var(--muted);
}

.project-meta span {
    margin-right: 15px;
}

/* Contact */
.contact-list {
    list-style: none;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.contact-list li {
    margin-bottom: 10px;
}

.contact-list li::before {
    content: '> ';
    color: var(--muted);
}

/* PGP */
.pgp-block {
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.pgp-meta {
    margin-bottom: 20px;
}

.pgp-meta p {
    margin-bottom: 6px;
    font-size: 13px;
}

.pgp-meta .label {
    color: var(--muted);
}

.pgp-key {
    background: #0a0a0a;
    border: 1px solid var(--border);
    padding: 16px;
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre;
    word-break: break-all;
    margin-bottom: 16px;
}

.pgp-instructions {
    margin-top: 24px;
    font-size: 13px;
    color: var(--muted);
}

.pgp-instructions pre {
    background: #111;
    border: 1px solid var(--border);
    padding: 10px 14px;
    margin: 10px 0 18px 0;
    overflow-x: auto;
}

/* Footer */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

.ascii-art {
    font-size: 10px;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--muted);
}

/* Utility */
.muted {
    color: var(--muted);
}

.highlight {
    background-color: var(--fg);
    color: var(--bg);
    padding: 0 3px;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 15px;
        font-size: 13px;
    }

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

    nav {
        gap: 15px;
    }

    .post-nav {
        flex-direction: column;
        gap: 10px;
    }
}
