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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #000;
    background: #fff;
    padding: 20px;
}

.container {
    max-width: 700px;
    margin: 0 auto;
}

/* Navigation */
.top-nav {
    margin-bottom: 40px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
}

.top-nav a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #000;
}

.top-nav a:hover {
    border-bottom: 1px solid #666;
}

.top-nav .sep {
    margin: 0 8px;
    color: #999;
}

.top-nav .current {
    color: #666;
}

/* Article Header */
.post-header {
    margin-bottom: 30px;
}

.post-header h1 {
    font-size: 22px;
    font-weight: normal;
    margin-bottom: 8px;
}

.meta {
    font-size: 11px;
    color: #999;
}

/* Content */
article {
    margin-bottom: 60px;
}

.intro {
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.7;
}

h2 {
    font-size: 16px;
    font-weight: normal;
    font-style: italic;
    margin-top: 40px;
    margin-bottom: 15px;
}

h3 {
    font-size: 14px;
    font-weight: normal;
    font-style: italic;
    margin-top: 25px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 12px;
    text-align: justify;
}

/* Math */
.equation {
    margin: 20px 0;
    text-align: center;
    font-size: 14px;
}

/* Code blocks */
.code-block {
    margin: 25px 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.code-block pre {
    margin: 0;
    padding: 18px 20px;
    overflow-x: auto;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Dank Mono', 'Menlo', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #2d3748;
}

.code-block code {
    background: none;
    padding: 0;
    font-feature-settings: 'liga' 1, 'calt' 1;
}

/* Syntax highlighting override */
.hljs {
    background: #f8f9fa;
    color: #2d3748;
}

.hljs-keyword {
    color: #d73a49;
    font-weight: 600;
}

.hljs-built_in {
    color: #005cc5;
    font-weight: 500;
}

.hljs-string {
    color: #22863a;
}

.hljs-comment {
    color: #6a737d;
    font-style: italic;
}

.hljs-number {
    color: #005cc5;
}

.hljs-function .hljs-title {
    color: #6f42c1;
    font-weight: 600;
}

.hljs-params {
    color: #e36209;
}

.hljs-class .hljs-title {
    color: #6f42c1;
    font-weight: 600;
}

/* Output */
.output {
    margin-top: -1px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-top: 1px dashed #adb5bd;
    border-radius: 0 0 6px 6px;
    padding: 15px 20px;
}

.output img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 8px auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.output-label {
    font-size: 9px;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.output pre {
    margin: 0;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Menlo', 'Courier New', monospace;
    font-size: 11px;
    color: #495057;
    white-space: pre-wrap;
    line-height: 1.5;
}

/* Figure descriptions */
.figure-description {
    margin: 15px 0;
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Lists */
ol, ul {
    margin: 15px 0 15px 30px;
}

li {
    margin-bottom: 8px;
}

ol li strong, ul li strong {
    font-weight: normal;
    font-style: italic;
}

/* Post footer */
.post-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.post-footer a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #000;
}

.post-footer a:hover {
    border-bottom: 1px solid #666;
}

.post-footer .tags {
    color: #666;
}

.post-footer .tags span {
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 700px) {
    body {
        padding: 15px;
    }
    
    .post-header h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 15px;
    }
    
    .code-block pre {
        font-size: 10px;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
