/* aphid default theme — minimal readable stylesheet */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fafafa;
    margin: 0;
    padding: 0;
}

a {
    color: #1a6fb5;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 2rem;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.site-nav .nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

/* Main content */
.content {
    max-width: 48rem;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Blog post */
.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.post-meta .author::before {
    content: " · ";
}

.tag-list {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-list li a {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: #eef4fa;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* Blog/wiki list pages */
.blog-list,
.wiki-list,
.tag-index {
    list-style: none;
    padding: 0;
}

.blog-list li,
.wiki-list li,
.tag-index li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #eee;
}

.blog-list time {
    color: #888;
    font-size: 0.85rem;
    margin-left: 0.75rem;
}

/* TOC sidebar */
.toc {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 4px;
}

.toc h2 {
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    padding: 0.15rem 0;
    font-size: 0.9rem;
}

.toc-h3 {
    padding-left: 1rem;
}

.toc-h4 {
    padding-left: 2rem;
}

.toc-h5 {
    padding-left: 3rem;
}

.toc-h6 {
    padding-left: 4rem;
}

/* Backlinks */
.backlinks {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.backlinks h2 {
    font-size: 1rem;
    color: #666;
}

/* Code blocks */
code {
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
}

p code {
    background: #f0f0f0;
    padding: 0.15em 0.35em;
    border-radius: 3px;
}

pre.code-block {
    background: #2b2b2b;
    color: #d4d4d4;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Syntax highlighting */
.hl-keyword { color: #c586c0; }
.hl-keyword.hl-operator { color: #d4d4d4; }
.hl-storage { color: #569cd6; }
.hl-string { color: #ce9178; }
.hl-comment { color: #6a9955; font-style: italic; }
.hl-constant { color: #b5cea8; }
.hl-entity.hl-name.hl-function { color: #dcdcaa; }
.hl-entity.hl-name.hl-type { color: #4ec9b0; }
.hl-entity.hl-name.hl-tag { color: #569cd6; }
.hl-support.hl-function { color: #dcdcaa; }
.hl-support.hl-type { color: #4ec9b0; }
.hl-variable { color: #9cdcfe; }
.hl-variable.hl-parameter { color: #9cdcfe; }
.hl-punctuation { color: #d4d4d4; }

/* Wiki links */
.wikilink {
    font-weight: 500;
}

.wikilink.broken {
    color: #c0392b;
    border-bottom: 1px dashed #c0392b;
    cursor: help;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 0.85rem;
}