.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: auto;
    min-height: 72px;
    padding: 20px 48px;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.site-header .brand {
    color: inherit;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.site-header .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    box-shadow: none;
}

.site-header .menu-toggle:hover {
    background: transparent;
    color: inherit;
}

.menu-toggle__icon {
    display: inline-flex;
}

.menu-toggle__icon svg {
    display: block;
    width: 40px;
    height: 40px;
    stroke: var(--theme-header-text-inactive, currentColor);
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
}

.menu-toggle__icon--close {
    display: none;
}

body.site-menu-open .menu-toggle__icon--open {
    display: none;
}

body.site-menu-open .menu-toggle__icon--close {
    display: inline-flex;
}

.site-header.site-header--home {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    width: auto;
    background: transparent;
    color: var(--hero-foreground, var(--ink));
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.site-header.active {
    background: var(--theme-header-active-background, var(--theme-primary, var(--primary)));
    color: var(--theme-header-text-active, var(--theme-on-primary, var(--paper)));
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.site-header.active .menu-toggle__icon svg {
    stroke: var(--theme-header-text-active, var(--theme-on-primary, currentColor));
}

body.site-menu-open .site-header {
    background: var(--theme-primary, var(--primary));
    color: var(--theme-on-primary, var(--paper));
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.site-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    background: rgba(16, 24, 22, 0.46);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 0s linear 180ms;
}

body.site-menu-open .site-menu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 180ms ease, visibility 0s linear 0s;
}

.site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 14px;
    width: min(360px, calc(100% - 48px));
    max-width: 100%;
    margin: 0;
    padding: 96px 28px 32px;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: var(--theme-menu, var(--theme-primary, var(--primary)));
    background-image: url("../img/background/menu-bg-fade.png");
    background-repeat: repeat;
    background-position: 0 0;
    background-size: 640px auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 200ms ease, visibility 0s linear 200ms;
}

body.site-menu-open .site-nav {
    transform: translateX(0);
    visibility: visible;
    transition: transform 200ms ease, visibility 0s linear 0s;
}

.site-nav a,
.site-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 22px;
    border: 1px solid var(--theme-sidemenu-button, var(--theme-on-primary, var(--paper)));
    border-radius: 999px;
    background: transparent;
    color: var(--theme-sidemenu-button, var(--theme-on-primary, var(--paper)));
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
}

.site-nav a:hover,
.site-nav button:hover,
.site-nav a:focus,
.site-nav button:focus,
.site-nav a:active,
.site-nav button:active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
    transform: none;
}

.site-nav a.is-active,
.site-nav a.is-active:hover,
.site-nav a.is-active:focus,
.site-nav a.is-active:active {
    background: rgba(255, 255, 255, 0.16);
    border-bottom: 1px solid var(--theme-on-primary, var(--paper));
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    transform: none;
}

.site-nav .site-theme-toggle {
    gap: 10px;
}

.site-nav .site-theme-toggle:focus-visible {
    outline: 2px solid var(--theme-sidemenu-button, var(--theme-on-primary, #ffffff));
    outline-offset: 2px;
}

.site-theme-toggle__icon {
    display: none;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.site-theme-toggle__icon svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-theme-toggle[data-theme-mode="light"] .site-theme-toggle__icon--sun,
.site-theme-toggle[data-theme-mode="dark"] .site-theme-toggle__icon--moon {
    display: inline-flex;
}

.site-theme-toggle__text {
    line-height: 1.2;
}

body.site-menu-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .site-header {
        padding: 18px 32px;
    }
}

@media (max-width: 768px) {
    .site-header {
        min-height: 64px;
        padding: 16px 20px;
    }

    .site-nav {
        width: min(320px, calc(100% - 32px));
        padding: 88px 20px 28px;
        background-size: 480px auto;
    }
}

@media (max-width: 390px) {
    .site-header {
        min-height: 60px;
        padding: 14px 16px;
    }

    .site-header .brand {
        letter-spacing: 0.04em;
    }

    .site-nav {
        width: calc(100% - 24px);
        padding: 80px 16px 24px;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-nav,
    .site-menu-overlay,
    .theme-picker,
    .theme-picker-card {
        transition: none;
    }
}

/*---THEME PICKER---*/
.theme-picker {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(16, 24, 22, 0.46);
    font-family: "Prompt", sans-serif;
}

body.theme-picker-open {
    overflow: hidden;
}

.theme-picker[hidden] {
    display: none !important;
}

.theme-picker-card {
    position: relative;
    width: min(480px, 100%);
    max-height: calc(100dvh - 48px);
    overflow: auto;
    padding: 28px 24px 24px;
    border-radius: 16px;
    background: var(--theme-background, var(--paper));
    color: var(--theme-text, var(--ink));
}

.theme-picker-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--theme-text, var(--ink));
    box-shadow: none;
}

.theme-picker-close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
}

.theme-picker-title {
    margin: 0 40px 18px 0;
    font-size: 24px;
    line-height: 1.3;
}

.theme-picker-list {
    display: grid;
    gap: 10px;
}

.theme-choice {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--theme-text, var(--ink));
    border-radius: 999px;
    background: transparent;
    color: var(--theme-text, var(--ink));
    font-family: inherit;
    font-weight: 600;
    text-align: left;
    box-shadow: none;
}

.theme-choice:hover,
.theme-picker-close:hover {
    background: transparent;
    color: var(--theme-text, var(--ink));
    transform: none;
}

.theme-choice.is-selected {
    border-color: var(--theme-primary, var(--primary));
    box-shadow: inset 0 0 0 2px var(--theme-primary, var(--primary));
}

.theme-choice-colors {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.theme-choice-swatch {
    width: 28px;
    height: 28px;
    border: 1px solid var(--theme-text, var(--ink));
    border-radius: 999px;
    background: var(--theme-primary, var(--primary));
}

.theme-choice-name {
    min-width: 0;
}

body.about-page,
body.terms-page,
body.articles-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

body.about-page main,
body.terms-page main,
body.articles-page main {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    width: 100%;
}

.site-footer {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 28px 0;
    border-top: 0;
    background: var(--theme-footer, var(--theme-primary));
    color: #ffffff;
}

.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px 32px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 50px;
}

.site-footer-menu,
.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
}

.site-footer-links {
    justify-content: flex-end;
    gap: 4px;
}

.site-footer-link,
.site-footer-icon {
    color: var(--theme-footer-text, #ffffff);
    text-decoration: none;
    transition: color 180ms ease, background-color 180ms ease;
}

.site-footer-link:visited,
.site-footer-icon:visited {
    color: var(--theme-footer-text, #ffffff);
    text-decoration: none;
}

.site-footer-link:hover,
.site-footer-link:active,
.site-footer-link:focus {
    color: #e5e5e5;
    text-decoration: none;
}

.site-footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--theme-footer-text, #ffffff);
    border-radius: 999px;
}

.site-footer-icon:hover,
.site-footer-icon:active,
.site-footer-icon:focus {
    color: #e5e5e5;
    background: rgba(255, 255, 255, 0.16);
    text-decoration: none;
}

.site-footer-icon svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: var(--theme-footer-text, currentColor);
}

.site-footer-icon--x svg,
.site-footer-icon--instagram svg,
.site-footer-icon--other svg,
.site-footer-icon--email svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 915px) {
    .site-footer-inner {
        flex-direction: column;
        align-items: center;
        padding: 0 16px;
    }

    .site-footer-menu {
        justify-content: center;
        text-align: center;
    }

    .site-footer-links {
        justify-content: flex-end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-footer-link,
    .site-footer-icon {
        transition: none;
    }
}
