@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600&display=swap');

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

:root {
    --bg: #1a1a1a;
    --bg-secondary: #242424;
    --text: #e0e0e0;
    --text-secondary: #888;
    --border: #333;
    --link: #8b8b8b;
    --link-hover: #ffffff;
    --nav-bg: rgba(26, 26, 26, 0.85);
    --code-bg: #242424;
    --accent: #4ade80;
}

[data-theme="light"] {
    --bg: #fafafa;
    --bg-secondary: #f0f0f0;
    --text: #1a1a1a;
    --text-secondary: #666;
    --border: #ddd;
    --link: #555;
    --link-hover: #000;
    --nav-bg: rgba(250, 250, 250, 0.85);
    --code-bg: #f0f0f0;
    --accent: #16a34a;
}

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-size: 15px;
    transition: background-color 0.3s, color 0.3s;
}

/* Navigation */
.nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-brand:hover {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    position: relative;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--accent);
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-family: inherit;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Main content */
.main {
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

/* Hero / About */
.hero {
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.hero .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 1.5rem;
}

.hero p {
    margin-bottom: 1rem;
    color: var(--text);
}

.hero a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}

.hero a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--accent);
}

/* Section headers */
.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--accent);
}

/* Lists */
.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 0.3rem 0;
    padding-left: 1.5em;
    position: relative;
}

.info-list li::before {
    content: '>';
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: 600;
}

/* Blog */
.blog-list {
    list-style: none;
    padding: 0;
}

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

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

.blog-item a {
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s;
}

.blog-item a:hover {
    color: var(--accent);
}

.blog-meta {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 0.3rem;
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 0.4rem;
    line-height: 1.6;
}

/* Blog post */
.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.post-date {
    color: var(--text-secondary);
    font-size: 13px;
}

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

.post-content h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 2rem 0 0.8rem;
    color: var(--accent);
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}

.post-content a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--accent);
}

.post-content blockquote {
    border-left: 2px solid var(--accent);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    background: var(--code-bg);
    border-radius: 2px;
}

.post-content code {
    background: var(--code-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    font-size: 0.9em;
    font-family: inherit;
}

.post-content pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 2px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border);
}

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

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

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

/* Back link */
.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Mobile */
@media (max-width: 640px) {
    .nav-wrapper {
        padding: 0.8rem 1rem;
    }

    .nav-links {
        gap: 1.2rem;
    }

    .main {
        padding: 2rem 1rem 4rem;
    }

    body {
        font-size: 14px;
    }
}
