
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,300;1,400&display=swap');

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

body {
    background-color: #f9f9f7;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    color: #333;
    font-family: "Verdana", "Geneva", sans-serif;
    line-height: 1.7;
    font-size: 17px;
    padding: 2rem 1rem;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 10px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Verdana", "Geneva", sans-serif;
    color: #222;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

.post-title {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.post-meta {
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dotted #bbb;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

#theme-toggle-btn {
    background: none;
    border: none;
    font-family: "Courier New", monospace;
    font-size: 0.8rem;
    color: #888;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

#theme-toggle-btn:hover {
    color: #444;
}

p {
    margin-bottom: 1.4rem;
}

a {
    color: #c0504d;
    text-decoration: underline;
}

a:hover {
    color: #a0302d;
    background-color: #f0f0f0;
}

ul,
ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* "Note" style blockquote */
blockquote {
    background-color: #f0f0f0;
    border-left: 4px solid #ddd;
    padding: 1rem 1.2rem;
    margin: 2rem 0;
    color: #555;
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 0.95rem;
}

code {
    font-family: "Consolas", "Monaco", monospace;
    background-color: #eee;
    padding: 0.2em 0.4em;
    border-radius: 2px;
    font-size: 0.85em;
    color: #444;
}

pre {
    background-color: #eee;
    padding: 1rem;
    border-radius: 2px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
}

pre code {
    background-color: transparent;
    padding: 0;
    color: #333;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border: 1px solid #ddd;
    padding: 4px;
    background: #fff;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05);
}

/* Navigation */
.navigation {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px dotted #bbb;
    display: flex;
    justify-content: space-between;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
}

.nav-button {
    color: #555;
    text-decoration: underline;
}

.nav-button:hover {
    color: #222;
    background-color: #fffdd0;
}

.nav-button[disabled],
.nav-button[style*="opacity: 0.5"] {
    color: #ccc;
    pointer-events: none;
    text-decoration: none;
}

/* Dark Mode */
body.dark-mode {
    background-color: #1e1e1e;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    color: #ccc;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: #eee;
}

body.dark-mode .post-meta {
    border-bottom-color: #444;
    color: #777;
}

body.dark-mode #theme-toggle-btn {
    color: #666;
}

body.dark-mode #theme-toggle-btn:hover {
    color: #aaa;
}

body.dark-mode a {
    color: #e0807d;
}

body.dark-mode a:hover {
    background-color: #333;
}

body.dark-mode blockquote {
    background-color: #252525;
    border-left-color: #444;
    color: #aaa;
}

body.dark-mode code,
body.dark-mode pre {
    background-color: #2a2a2a;
    border-color: #333;
    color: #ccc;
}

body.dark-mode pre code {
    color: #ccc;
}

body.dark-mode img {
    border-color: #333;
    background: #252525;
    box-shadow: none;
    opacity: 0.9;
}

body.dark-mode .navigation {
    border-top-color: #444;
}

body.dark-mode .nav-button {
    color: #999;
}

body.dark-mode .nav-button:hover {
    color: #eee;
    background-color: #333;
}

body.dark-mode .nav-button[disabled] {
    color: #444;
}