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

body {
    /* Subtle paper-like texture using noise */
    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.6;
    font-size: 17px;
    padding: 2rem 1rem;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    /* Slightly imperfect centering */
    padding-left: 20px;
    padding-right: 10px;
}

/* Header */
.header {
    margin-bottom: 3.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dotted #bbb;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.lab-title {
    font-family: "Georgia", serif;
    font-size: 1.1rem;
    color: #555;
    font-style: italic;
}

.lab-title a {
    color: #555;
    text-decoration: underline;
    margin-left: 0.5rem;
}

.lab-title a:hover {
    color: #000;
    background-color: #fffdd0;
    /* Highlight effect */
}

#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;
}

/* Posts */
.post {
    margin-bottom: 3.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

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

.post-title {
    font-family: "Verdana", "Geneva", sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.post-meta {
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 1.2rem;
}

.post-content {
    margin-bottom: 1.2rem;
    color: #444;
}

.read-more {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 0.95rem;
    color: #c0504d;
    /* Muted red accent */
    text-decoration: underline;
}

.read-more:hover {
    color: #a0302d;
    background-color: #f0f0f0;
}

/* Utility */
.divergence {
    display: 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 .header {
    border-bottom-color: #444;
}

body.dark-mode .lab-title,
body.dark-mode .lab-title a {
    color: #999;
}

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

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

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

body.dark-mode .post-title {
    color: #ddd;
}

body.dark-mode .post-meta {
    color: #666;
}

body.dark-mode .post-content {
    color: #bbb;
}

body.dark-mode .post {
    border-bottom-color: #333;
}

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

body.dark-mode .read-more:hover {
    background-color: #2a2a2a;
}