/* Variables */
:root {
    --color-background: #141414;
    --color-surface: #202321;
    --color-surface-alt: #292d29;

    --color-text: #ffffff;
    --color-text-muted: #b8b8b8;

    --color-link-hover: #b0b0b0;
    --color-link-active: #888;

    --color-accent: #78805c;
    --color-accent-light: #b9ad87;

    --color-border: #3a4039;
}

/* Basic reset */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-background);
}

main {
    flex: 1;
}

img,
picture,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* Accessibility ----------------------------------------------------------------*/

.skip-link {
    position: absolute;
    top: 0;
    left: 1rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    background-color: #000000;
    transform: translateY(-120%);
    transition: transform 0.2s;
    z-index: 1000;
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 3px;
}

/* Shared layout ------------------------------------------------------------------*/

.main-content,
.footer-container {
    width: min(100% - 2rem, 100rem);
    margin-inline: auto;
}

.main-content {
    padding-block: 3rem;
}

.inline-link {
    color: var(--color-text);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 0.1rem;
    text-underline-offset: 0.2rem;
    transition: color 0.2s ease;
}

.inline-link:hover {
    color: var(--color-link-hover);
}

.inline-link:active {
    color: var(--color-link-active);
}

/* Header -------------------------------------------------------------------------*/

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    padding-block: 1rem;
    background-color: var(--color-background);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.header-container {
    position: relative;
    display: flex;
    align-items: center;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-inline: 1rem;
}

.site-logo {
    width: clamp(8rem, 25vw, 11rem);
    height: auto;
}

.site-nav {
    padding-right: 2rem;
    font-size: 1rem;
}

.site-nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
}

.temp-header-link,
.site-nav a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-nav a[aria-current='page'] {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 0.125rem;
    text-underline-offset: 0.25rem;
}

.temp-header-link:hover,
.site-nav a:hover {
    color: var(--color-link-hover);
    /* temp: delete cursor pointer rule*/
    cursor: pointer;
}

.temp-header-link:active,
.site-nav a:active {
    color: var(--color-link-active);
}

.menu-toggle {
    width: 3.5rem;
    height: 3.5rem;
    padding: 0.875rem;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.25rem;
    cursor: pointer;
}

.menu-toggle span {
    width: 100%;
    height: 0.125rem;
    background-color: var(--color-text);
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

/* Mobile navigation - Burger Menu */

.site-nav {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    display: none;
    min-width: 12rem;
    padding: 1.25rem 2rem;
    font-size: 1rem;
    background-color: var(--color-background);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

.site-nav.is-open {
    display: block;
}

.site-nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    list-style: none;
}

.temp-header-link,
.site-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
}

/* Transform Burger Menu to an X when open */
.menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(0.75rem) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-0.75rem) rotate(-45deg);
}

/* Footer */

.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.35);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer p {
    margin: 0;
}

/* Media Queries ------------------------------------------------------------------ */

/* Tablets (48rem = 768px) */

@media (min-width: 48rem) {
    .header-container {
        flex-direction: row;
        align-items: center;
    }

    .menu-toggle {
        display: none;
    }

    .site-nav {
        position: static;
        display: block;
        min-width: auto;
        padding: 0 2rem;
        font-size: 1.125rem;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .site-nav ul {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }
}


@media (min-width: 64rem) {
    .site-nav {
        font-size: 1.2rem;
    }
}