:root {
    --background-color: #f9f3e6;
    --text-color: #3a3a3a;
    --highlight-color: #f0e6d2;
    --header-footer-bg: #e6d9c2;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --link-color: #6b5b3d;
}

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

body {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px; /* Base font size */
}

header, footer {
    background-color: var(--header-footer-bg);
    padding: 2rem 1rem;
    box-shadow: 0 2px 4px var(--shadow-color);
}

header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-content {
    text-align: center;
    flex-grow: 1;
}

.lang-selector {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.3em 0.5em;
    border: 1px solid var(--link-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.lang-selector:hover, .lang-selector:focus {
    background-color: var(--link-color);
    color: var(--background-color);
}

footer {
    margin-top: auto;
    font-style: italic;
    text-align: center;
}

main {
    max-width: 800px;
    width: 95%; /* Slightly increased from 90% */
    margin: 2rem auto; /* Reduced top and bottom margin */
    padding: 0 0.5rem; /* Reduced side padding */
}

h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: normal;
    font-style: italic;
}

h3 {
    font-size: 2.25rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-weight: normal;
}

h4 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: normal;
}

p {
    margin-bottom: 1rem;
    max-width: 70ch;
    font-size: 1.25rem; /* Increased from 1.125rem */
}

.highlight {
    background-color: var(--highlight-color);
    padding: 0.2em 0.4em;
    border-radius: 0.2em;
}

strong {
    font-weight: normal;
    font-style: italic;
}

@media (max-width: 600px) {
    body {
        font-size: 18px; /* Increased base font size for mobile */
    }
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.75rem;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }

    h4 {
        font-size: 1.25rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }

    p {
        font-size: 1.125rem; /* Increased from 1rem */
        margin-bottom: 0.75rem;
    }

    .lang-selector {
        font-size: 0.9rem;
    }
}

@media (min-width: 601px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 2.25rem;
    }

    h4 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1.25rem; /* Kept the same as the base size */
    }
}

@media (min-width: 1200px) {
    main {
        max-width: 1000px;
    }

    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 2.5rem;
    }

    h4 {
        font-size: 1.75rem;
    }

    p {
        font-size: 1.25rem;
    }
}

