@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans");

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

hr {
    display: none;
}

:root {
    --bg: #fff;
    --text: #000;
    --text-muted: #666;
    --link: #0000ff;
    --code-bg: #f4f4f4;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000;
        --text: #fff;
        --text-muted: #999;
        --link: #0000ff;
        --code-bg: #222;
    }
}

body {
    font-family: "Instrument Sans", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    font-size: 16px;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    margin-bottom: 3rem;
}

header h1 {
    font-size: 16px;
    margin-bottom: 0.2rem;
    font-weight: 400;
}

header h1 a {
    color: var(--text);
    text-decoration: none;
}

header h1 a:hover {
    text-decoration: none;
    font-style: italic;
    font-weight: 700;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: -0.3rem;
}

.subtitle a {
    color: var(--text-muted);
    text-decoration: none;
}

.subtitle a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Main content */
main {
    flex: 1;
}

/* Post list */
.post-item {
    margin-bottom: 2.5rem;
}

.post-item h3 {
    font-size: 18px;
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.2;
}

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

.post-item h3 a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.post-item time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Post view */
article > header {
    margin-bottom: 2rem;
}

article > header h1 {
    font-size: 18px;
    margin-bottom: 0;
    margin-top: 0;
    line-height: 1.2;
}

article > header time {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-nav {
    margin-top: 3rem;
}

.post-nav a {
    color: var(--text-muted);
    text-decoration: none;
}

.post-nav a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Article content */
article h1, article h2, article h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Keep article title not bold */
article > header h1 {
    font-weight: 400;
}

article h1 {
    font-size: 18px;
}

article h2 {
    font-size: 18px;
}

article h3 {
    font-size: 18px;
}

article p {
    margin-bottom: 1rem;
    font-size: 16px;
}

article ul, article ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

article li {
    margin-bottom: 0.5rem;
}

article a {
    color: var(--link);
    text-decoration: none;
}

article a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

article code {
    background: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: "Monaco", "Courier New", monospace;
    font-size: 0.9em;
}

article pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

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

article blockquote {
    border-left: 3px solid var(--text-muted);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-muted);
    font-style: italic;
}

article img {
    max-width: min(400px, 100%);
    height: auto;
    display: block;
    margin: 1rem 0;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        font-size: 16px;
    }
    
    .container {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 18px;
    }
}
