body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    background: #eef0f2;
    color: #011502;
    font-size: 18px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    max-width: 800px;
    margin: auto;
    padding: 2rem 1rem;
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

header h1 {
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.3;
}

footer {
    clear: both;
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #d1d5db;
    background: #eef0f2;
}

.footer-content {
    max-width: 800px;
    margin: auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #011502;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    color: #011502;
    font-size: 0.9em;
    line-height: 1.5;
}

.footer-section a {
    color: #0a5d0b;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-section a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.rss-icon {
    height: 1.5em;
    width: auto;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.rss-icon:hover {
    opacity: 1;
}

/* Posts Grid Styles */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.post-card {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-card h3 {
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.post-card h3 a {
    color: #011502;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.post-card h3 a:hover {
    color: #0a5d0b;
}

.post-card time {
    color: #6b7280;
    font-size: 0.9em;
    display: block;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 1rem;
    }

    .footer-section h4 {
        text-align: center;
    }

    footer {
        padding: 1.5rem 0;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .post-card {
        padding: 1rem;
    }
}

/* For TAGLIST.HTML */
.taglist {
    text-align: center;
    clear: both;
    margin-top: 2rem;
    padding-top: 1rem;
}

/* For NEXTPREV.HTML */
/* For NEXTPREV.HTML */
#nextprev {
    /* The container for both the previous and next articles. */
    margin: 2rem 0;
    clear: both;
}
#prevart {
    float: left;
    text-align: left;
}
#nextart {
    float: right;
    text-align: right;
}
#nextart,
#prevart {
    max-width: 33%;
    transition: opacity 0.2s ease;
}

#nextart:hover,
#prevart:hover {
    opacity: 0.8;
}

/* Additional improvements */
p {
    margin-bottom: 1.2rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #011502;
}

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

li {
    margin-bottom: 0.5rem;
}

a {
    color: #0a5d0b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    background: #d1d5db;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 0.9em;
}

/* Navigation Styles */
nav {
    background: #eef0f2;
    border-bottom: 1px solid #d1d5db;
    margin-bottom: 2rem;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul li {
    margin: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 1.25rem 1.5rem;
    color: #011502;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 4px;
}

nav ul li.nav-text {
    padding: 1.25rem 1.5rem;
    color: #011502;
    font-size: 0.9em;
    opacity: 0.8;
}

nav ul li.nav-text a {
    display: inline;
    padding: 0;
    color: #0a5d0b;
    text-decoration: underline;
}

nav ul li.nav-text a:hover {
    background: none;
    color: #0a5d0b;
}

nav ul li a:hover {
    color: #0a5d0b;
    text-decoration: none;
    background: #d1d5db;
}

nav ul li a.menuactive {
    color: #0a5d0b;
    background: #d1d5db;
    font-weight: 600;
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    main {
        padding: 1rem 0.5rem;
    }

    header h1 {
        margin-bottom: 1.5rem;
    }

    footer {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    nav ul {
        flex-wrap: wrap;
    }

    nav ul li a {
        padding: 0.8rem 1rem;
        font-size: 0.9em;
    }
}
