:root {
    --bg: #0d1117;
    --bg-secondary: #161b22;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --accent-green: #3fb950;
    --accent-orange: #d29922;
    --accent-purple: #a371f7;
    --border: #30363d;
    --max-width: 680px;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Nav */
.site-header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-title {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-green);
    text-decoration: none;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.25rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

/* Home */
.intro {
    margin-bottom: 3rem;
}

.intro h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.intro p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Post previews */
.post-preview {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}

.post-preview:last-child {
    border-bottom: none;
}

.post-section {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-purple);
    display: block;
    margin-bottom: 0.25rem;
}

.post-preview h2,
.post-preview h3 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.post-preview h2 a,
.post-preview h3 a {
    color: var(--text);
    text-decoration: none;
}

.post-preview h2 a:hover,
.post-preview h3 a:hover {
    color: var(--accent);
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-excerpt {
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* Section titles */
.home h2,
.list-page h1 {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Single post */
.post-header {
    margin-bottom: 2.5rem;
}

.post-header .post-section {
    margin-bottom: 0.5rem;
}

.post-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.post-tags {
    margin-top: 1rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-orange);
    text-decoration: none;
    margin-right: 1rem;
}

.tag:hover {
    text-decoration: underline;
}

/* Post content */
.post-content {
    margin-bottom: 3rem;
}

.post-content h2 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.post-content h3 {
    font-size: 1.15rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content a {
    color: var(--accent);
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.4rem;
}

.post-content blockquote {
    border-left: 2px solid var(--accent-green);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-secondary);
    padding: 0.15em 0.35em;
    border-radius: 3px;
    color: var(--accent-orange);
}

.post-content pre {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text);
}

.post-content img {
    max-width: 100%;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

.post-content strong {
    color: var(--text);
}

/* Post footer */
.post-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.post-footer a {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent);
    text-decoration: none;
}

.post-footer a:hover {
    text-decoration: underline;
}

/* Site footer */
.site-footer {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.footer-links a:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .nav {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .site-footer {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .post-header h1 {
        font-size: 1.6rem;
    }
}
