body {
    font-family: 'EB Garamond', 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
}

* {
    box-sizing: border-box;
}

.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--header-color);
    padding: 12px 15px;
    align-items: center;
    justify-content: space-between;

    &:after {
        content: '';
        flex: 1;
    }
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
    background: var(--white-gradient);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.header-text {
    display: inline-block;
    background: var(--white-gradient);
    padding-inline: 1em;
    line-height: 1.2;
}

header {
    z-index: 100;
    background-image: url("../images/header.74d69c48a67e.png");
    background-position: center;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    header {
        position: sticky;
        top: 0;
        border-bottom: 2px solid var(--border-color);
        background-color: var(--header-color);
    }

    h1 {
        font-size: 1.5rem;
        font-weight: 300;
        letter-spacing: 2px;
        color: var(--text-color);
        margin: 0;
    }

    .header-container {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 15px;

        .hamburger-container {
            flex: 1;
        }

        &:after {
            content: '';
            flex: 1;
        }
    }

    a, button {
        padding: 15px 20px;
        text-decoration: none;
        color: var(--text-color);
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-color);
        transition: background-color 0.2s ease;
    }
    
    li:last-child a {
        border-bottom: none;
    }

    nav {
        width: 100%;
        overflow: hidden;
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.3s ease-out;

        ul {
            margin: 0;
            list-style: none;
            padding: 0;
            min-height: 0;
        }

        a {
            display: block;
        }

        button {
            font-size: 1.1rem;
            border: none;
            border-bottom: 3px solid transparent;
            transition: border-color 0.3s ease;
            display: block;
            background: none;
            font-family: inherit;
            cursor: pointer;
            letter-spacing: inherit;
            width: 100%;
            text-align: left;
        }

        &.open {
            grid-template-rows: 1fr;
        }
    }
    
    .mobile-nav-link:last-child {
        border-bottom: none;
    }
    
    .mobile-nav-link:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }
    
    .mobile-nav-link.active {
        font-weight: 500;
        color: var(--accent-color);
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }

    header {
        padding-top: var(--header-image-height);
        text-align: center;
        background-color: var(--header-color);
        border-bottom: 2px solid var(--border-color);
        position: sticky;
        top: calc(-1 * var(--header-image-height));
        z-index: 100;

        & h1 {
            letter-spacing: 0.25em;
            font-weight: 300;
            color: var(--text-color);
            animation: scroll-h1 linear;
            animation-fill-mode: forwards;
            animation-timeline: scroll();
            animation-range: 1px var(--header-image-height);
            transform: translateY(calc(-1/2 * var(--header-image-height) + 50%)) scale(2);
        }

        nav {
            transform: translateY(-30px);
            letter-spacing: 0.2em;
            transform-origin: bottom;
            animation: scroll-nav linear;
            animation-fill-mode: forwards;
            animation-timeline: scroll();
            animation-range: 1px var(--header-image-height);

            ul {
                display: flex;
                justify-content: center;
                gap: 20px;
                list-style: none;
                padding: 0;
                margin: 0;
            }

            a {
                text-decoration: none;
                color: var(--text-color);
            }

            .tabs {
                display: flex;
                justify-content: center;
                gap: 20px;
                position: sticky;
                top: 0;
            }

            .tab {
                padding: 12px calc(30px - 1em);
                font-size: 1.1rem;
                border: none;
                border-bottom: 3px solid transparent;
                transition: border-color 0.3s ease;
                display: block;
                background: none;
                font-family: inherit;
                cursor: pointer;
                letter-spacing: inherit;

                &.active,
                &:hover {
                    border-bottom-color: var(--accent-color);
                }
            }
        }
    }
}

main {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

@keyframes scroll-h1 {
    to {
        transform: translateY(0px);
        font-size: 2rem;
        letter-spacing: inherit;
        margin-block: 10px;
    }
}

@keyframes scroll-nav {
    to {
        transform: translateY(0px);
        padding-block: 0px;
        letter-spacing: inherit;
    }
}

footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    color: #666;
    font-size: 0.9em;
}

hr.separator {
    border: none;
    border-top: 1px solid var(--border-color);
    max-width: 300px;
    width: 100%;
}

.page-title {
    font-size: 2.5rem;
    margin-block: 32px;
    color: var(--accent-color);
    font-family: 'Pinyon Script', cursive;
}

.page-description {
    font-size: 1.2rem;
    color: var(--alt-text-color);
    margin-block: 32px;
}
