:root {
    --bg-color: #fffef0;      /* Ultra-pale lemon cream */
    --text-color: #1a1a1a;    /* Near black for high contrast */
    --accent-color: #fff44f;  /* Classic Lemon Yellow */
    --highlight-yellow: #fdfd96; /* Pastel Lemon */
    --border-width: 4px;
    --shadow-offset: 6px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

@font-face {
    font-family: 'Public Sans';
    src: local('Helvetica'), local('Arial'), sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 3rem;
    overflow-x: hidden;
}

img, picture, video, canvas, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

p, h1, h2, h3, h4, h5, h6, a {
    overflow-wrap: break-word;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

header, main, footer, article, .card {
    background: #fff;
    border: var(--border-width) solid var(--text-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--text-color);
    margin-bottom: 3rem;
    padding: 2.5rem;
}

/* Site Header */
body > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    background-color: var(--accent-color);
    max-width: none;
    margin: 0 0 3rem 0;
    text-align: left;
    border-bottom: var(--border-width) solid var(--text-color);
}

body > header h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -2px;
    background: transparent;
    padding: 0;
    line-height: 1;
}

body > header h1 a {
    color: inherit;
    text-decoration: none;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

nav a {
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 4px solid transparent;
    padding: 0.4rem 0.6rem;
    display: inline-block;
}

nav a:hover,
nav li.active a {
    background-color: var(--highlight-yellow);
    border-bottom-color: var(--text-color);
}

main {
    background-color: var(--highlight-yellow);
    min-height: 60vh;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem;
}

h1, h2, h3 {
    text-transform: uppercase;
    font-weight: 900;
    margin-top: 0;
    line-height: 1.1;
}

/* Article/Page titles */
article header time {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.meta {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

article h1,
article header h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    display: block;
    background-color: var(--accent-color);
    padding: 0.5rem;
}

article h2,
.article-list h2 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    text-align: center;
}

.article-list h2 a {
    color: var(--text-color);
    text-decoration: none;
    background-color: var(--accent-color);
    padding: 0.2rem 0.8rem;
    display: inline-block;
}

a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-decoration-thickness: 4px;
}

/* Body Text - Standard Scale */
.summary,
.entry-content {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 900px;
    margin: 1.5rem auto 0 auto;
}

.summary p,
.entry-content p {
    margin-bottom: 1.5rem;
}

.summary p:last-child,
.entry-content p:last-child {
    margin-bottom: 0;
}

/* Neo-Brutalist Read More Button */
.read-more {
    display: inline-block;
    margin-top: 1.5rem;
    background-color: var(--accent-color);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 900;
    font-size: 1.1rem;
    padding: 0.5rem 1.2rem;
    border: var(--border-width) solid var(--text-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease;
}

.read-more:hover {
    background-color: #fff;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--text-color);
}

footer {
    font-weight: bold;
    text-align: center;
    background-color: var(--accent-color);
    font-size: 1.2rem;
    max-width: none;
    margin-top: 5rem;
}

.newsletter-box {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    background: #fff;
    border: var(--border-width) solid var(--text-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--text-color);
    padding: 2rem;
}

.newsletter-box h3 {
    margin-top: 0;
    font-size: 1.8rem;
}

.newsletter-box p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.newsletter-footer {
    margin-top: 1rem;
    margin-bottom: 0 !important;
}

.newsletter-footer a {
    font-size: 0.8rem;
    font-weight: normal;
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
}

.newsletter-footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

.embeddable-buttondown-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.embeddable-buttondown-form input[type="email"] {
    flex: 1;
    padding: 0.8rem;
    border: var(--border-width) solid var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    border-radius: 0;
}

.embeddable-buttondown-form input[type="submit"] {
    background-color: var(--accent-color);
    color: var(--text-color);
    border: var(--border-width) solid var(--text-color);
    padding: 0.8rem 1.5rem;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 0;
    transition: background-color 0.1s ease;
}

.embeddable-buttondown-form input[type="submit"]:hover {
    background-color: #fff;
}

.gallery-container {
    margin-top: 5rem;
    border-top: var(--border-width) solid var(--text-color);
    padding-top: 3rem;
}

.gallery-container h2 {
    margin-bottom: 2.5rem;
}

/* Gallery styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
}

.gallery-item {
    border: var(--border-width) solid var(--text-color);
    box-shadow: 4px 4px 0px var(--text-color);
    background: #fff;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Mobile & Responsive Optimizations
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --border-width: 3px;
        --shadow-offset: 4px;
    }

    body {
        padding: 0.75rem;
    }

    header, main, footer, article, .card {
        padding: 1.25rem 1rem;
        margin-bottom: 1.5rem;
    }

    /* Site Header on Mobile */
    body > header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1rem;
        margin: 0 0 1.5rem 0;
        gap: 1rem;
    }

    body > header h1 {
        font-size: clamp(2rem, 9.5vw, 3.2rem);
        letter-spacing: -1px;
        text-align: center;
    }

    nav ul {
        justify-content: center;
        gap: 0.75rem;
    }

    nav a {
        font-size: 0.95rem;
        padding: 0.4rem 0.6rem;
    }

    main {
        padding: 1.25rem 0.75rem;
        min-height: auto;
    }

    article, .card {
        padding: 1.25rem 1rem;
    }

    /* Typography on Mobile */
    article header time {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
        text-align: center;
    }

    .meta {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    article h1,
    article header h1 {
        font-size: 1.35rem;
        padding: 0.4rem 0.6rem;
        margin-bottom: 1rem;
    }

    article h2,
    .article-list h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .article-list h2 a {
        padding: 0.25rem 0.6rem;
    }

    .summary,
    .entry-content {
        font-size: 1.15rem;
        line-height: 1.6;
        margin-top: 1rem;
    }

    .read-more {
        font-size: 1rem;
        padding: 0.5rem 1rem;
        margin-top: 1.25rem;
    }

    /* Footer on Mobile */
    footer {
        padding: 1.5rem 1rem;
        margin-top: 3rem;
        font-size: 1rem;
    }

    .newsletter-box {
        padding: 1.25rem 1rem;
        margin-bottom: 1.5rem;
    }

    .newsletter-box h3 {
        font-size: 1.4rem;
    }

    .newsletter-box p {
        font-size: 1rem;
    }

    .gallery-container {
        margin-top: 3rem;
        padding-top: 1.5rem;
    }

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

@media (max-width: 540px) {
    body {
        padding: 0.5rem;
    }

    header, main, footer, article, .card {
        padding: 1rem 0.75rem;
    }

    .embeddable-buttondown-form {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .embeddable-buttondown-form input[type="email"] {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }

    .embeddable-buttondown-form input[type="submit"] {
        width: 100%;
        min-height: 48px;
        font-size: 1.05rem;
        padding: 0.75rem 1rem;
    }
}
