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

body {
    font-family: 'American Typewriter', 'Courier New', monospace;
    background: white;
    color: black;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 3rem;
    font-weight: normal;
    margin-bottom: 1rem;
    border-bottom: 1px solid black;
    padding-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: normal;
    margin: 2rem 0 1rem 0;
}

h3 {
    font-size: 1.2rem;
    font-weight: normal;
    margin: 1.5rem 0 0.5rem 0;
}

main {
    margin-top: 2rem;
}

section {
    margin-bottom: 2rem;
}

.intro {
    text-align: center;
    margin: 3rem 0;
}

.intro p {
    margin: 1rem 0;
}

.features ul {
    list-style: none;
    padding-left: 1rem;
}

.features li {
    margin: 0.5rem 0;
    padding-left: 1rem;
    position: relative;
}

.features li:before {
    content: "•";
    position: absolute;
    left: 0;
}

.links {
    text-align: center;
    margin-top: 3rem;
}

a {
    color: black;
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

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

.blog-list li {
    margin: 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ccc;
}

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

.post-date {
    font-size: 0.9rem;
    color: #666;
}

.post-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

article {
    margin-bottom: 2rem;
}

pre {
    background: #f5f5f5;
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid black;
    margin: 1rem 0;
}

code {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
}

pre code {
    background: none;
    padding: 0;
}

blockquote {
    border-left: 3px solid black;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
}

/* Blog sidebar layout */
body.blog-layout {
    max-width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    min-height: 100vh;
    flex-direction: row;
}

.nav-sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid black;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    left: 0;
    top: 0;
}

.nav-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

.nav-header h2 a {
    text-decoration: none;
    color: black;
}

.nav-header h2 a:hover {
    text-decoration: underline;
}

.nav-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2rem;
}

.post-list {
    margin-top: 2rem;
}

.post-link {
    margin-bottom: 1.5rem;
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 0.5rem 1rem 1rem 1rem;
    border-bottom: 1px solid #ddd;
}

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

.post-link.current {
    background: #e6f3ff;
}

.post-link a {
    text-decoration: none;
    color: black;
    display: block;
}

.post-link a:hover {
    opacity: 0.7;
}

.post-link .date {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.post-link .title {
    display: block;
    font-size: 0.95rem;
    line-height: 1.4;
}

.content-area {
    margin-left: 300px;
    padding: 3rem 4rem;
    max-width: 1200px;
    flex: 1;
}

.content-area article h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

.content-area article time {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2rem;
}

.content-area article .content {
    margin-top: 2rem;
}

.blog-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 300px;
    padding: 1rem 1.5rem;
    border-top: 1px solid black;
    background: white;
    text-align: center;
    font-size: 0.9rem;
}

/* TOC layout */
.post-with-toc {
    display: flex;
    gap: 3rem;
    position: relative;
}

.post-content {
    width: 700px;
    flex-shrink: 0;
}

.toc-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.toc-sticky {
    position: sticky;
    top: 2rem;
}

.toc-sidebar h4 {
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid black;
}

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

.toc-h2 {
    margin-bottom: 0.15rem;
}

.toc-h3 {
    margin-bottom: 0.1rem;
}

.toc-sublist {
    list-style: none;
    padding-left: 0.75rem;
    margin-top: 0.1rem;
}

.toc-link {
    font-size: 0.9rem;
    text-decoration: none;
    color: #333;
    display: block;
    padding: 0.15rem 0;
    line-height: 1.3;
}

.toc-link:hover {
    color: black;
    text-decoration: underline;
}

.toc-h3 .toc-link {
    font-size: 0.85rem;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body.blog-layout {
        flex-direction: column;
    }

    .nav-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid black;
    }

    .content-area {
        margin-left: 0;
        padding: 2rem;
    }

    .blog-footer {
        position: relative;
        width: 100%;
    }

    .post-with-toc {
        flex-direction: column;
    }

    .post-content {
        max-width: 100%;
    }

    .toc-sidebar {
        width: 100%;
        order: -1;
        margin-bottom: 2rem;
    }

    .toc-sticky {
        position: relative;
        top: 0;
        background: #f5f5f5;
        padding: 1rem;
        border: 1px solid black;
    }
}
