:root {
    --color-background: #07101b;
    --color-surface: rgba(7, 24, 40, 0.62);
    --color-surface-strong: rgba(7, 24, 40, 0.82);
    --color-surface-hover: rgba(100, 181, 246, 0.16);
    --color-text: #f4f9fd;
    --color-text-muted: #b7cee1;
    --color-accent: #64b5f6;
    --color-accent-bright: #a9d9ff;
    --color-success: #61e294;
    --color-border: rgba(255, 255, 255, 0.2);
    --color-border-strong: rgba(255, 255, 255, 0.32);
    --shadow-glass: 0 18px 45px rgba(2, 12, 24, 0.28);
    --glass-blur: 14px;
}

body {
    position: relative;
    font-family: Arial, Helvetica, sans-serif;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-background);
    isolation: isolate;
}

body::before,
body::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

body::before {
    z-index: -2;
    background: url("../images/fitness-background-outdoor.webp") center center / cover no-repeat;
}

body::after {
    z-index: -1;
    background: linear-gradient(110deg, rgba(3, 12, 22, 0.7), rgba(8, 31, 58, 0.38));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding: 18px 22px;
    overflow: visible;
    color: var(--color-text);
    background:
        radial-gradient(circle at 85% 0%, rgba(64, 196, 255, 0.3), transparent 38%),
        linear-gradient(135deg, rgba(7, 24, 40, 0.82), rgba(13, 92, 171, 0.68));
    border: 1px solid var(--color-border);
    border-radius: 0 0 18px 18px;
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.site-header::after {
    content: "";
    position: absolute;
    inset: auto -30px -55px auto;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.site-header__brand {
    position: relative;
    z-index: 1;
}

.site-header__eyebrow {
    display: block;
    margin-bottom: 1px;
    color: var(--color-accent-bright);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

.site-header h1 {
    margin: 0;
    color: inherit;
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.site-header__status {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    padding: 7px 11px;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.site-header__status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(97, 226, 148, 0.16), 0 0 12px rgba(97, 226, 148, 0.9);
}

.site-header__actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-menu {
    position: relative;
}

.project-menu summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.project-menu summary::-webkit-details-marker {
    display: none;
}

.project-menu summary::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 2px solid var(--color-accent-bright);
    border-bottom: 2px solid var(--color-accent-bright);
    transform: rotate(45deg);
    transition: transform 160ms ease;
}

.project-menu[open] summary::after {
    margin-top: 3px;
    transform: rotate(225deg);
}

.project-menu summary:hover,
.project-menu summary:focus-visible {
    background: var(--color-surface-hover);
    outline: none;
}

.project-menu nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    gap: 4px;
    min-width: 210px;
    padding: 10px;
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border-strong);
    border-radius: 14px;
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.project-menu a {
    padding: 9px 11px;
    color: var(--color-text);
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 700;
}

.project-menu a:hover,
.project-menu a:focus-visible {
    color: var(--color-accent-bright);
    background: var(--color-surface-hover);
    text-decoration: none;
    outline: none;
}

.page-layout {
    flex: 1;
    width: 100%;
    padding: 0 24px;
    box-sizing: border-box;
}

.site-sidebar {
    position: sticky;
    top: 138px;
    width: 220px;
}

.site-sidebar__desktop {
    padding: 20px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.site-sidebar__label {
    display: block;
    margin: 0 10px 10px;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.site-sidebar ul {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: var(--color-text);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.site-sidebar a span {
    width: 7px;
    height: 7px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(100, 181, 246, 0.13);
}

.site-sidebar a:hover,
.site-sidebar a:focus-visible {
    color: var(--color-accent-bright);
    background: var(--color-surface-hover);
    text-decoration: none;
    transform: translateX(3px);
}

.site-sidebar__mobile {
    display: none;
}

footer {
    margin: 36px 24px 0;
    padding: 20px 4px;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    text-align: center;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

h1 {
    color: var(--color-accent);
}

a {
    color: var(--color-accent-bright);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    body {
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
        padding: 0;
    }

    .site-header {
        top: 0;
        gap: 14px;
        margin-bottom: 24px;
        padding: 15px 16px;
        border-radius: 0 0 15px 15px;
    }

    .site-header__status span:last-child {
        display: none;
    }

    .site-header__status {
        padding: 9px;
    }

    .page-layout {
        padding: 0 12px;
    }

    .site-sidebar {
        position: static;
        width: 100%;
    }

    .site-sidebar__desktop {
        display: none;
    }

    .site-sidebar__mobile {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: 14px;
        box-shadow: var(--shadow-glass);
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
    }

    .site-sidebar__mobile label {
        color: var(--color-text);
        font-size: 0.78rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .site-sidebar__select-wrap {
        position: relative;
    }

    .site-sidebar__select-wrap::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 14px;
        width: 7px;
        height: 7px;
        border-right: 2px solid var(--color-accent);
        border-bottom: 2px solid var(--color-accent);
        transform: translateY(-70%) rotate(45deg);
        pointer-events: none;
    }

    .site-sidebar select {
        width: 100%;
        min-height: 42px;
        padding: 8px 40px 8px 12px;
        color: var(--color-text);
        background: var(--color-surface-strong);
        border: 1px solid var(--color-border-strong);
        border-radius: 10px;
        font: inherit;
        font-size: 0.9rem;
        font-weight: 700;
        appearance: none;
        cursor: pointer;
    }

    .site-sidebar select:focus-visible {
        border-color: var(--color-accent);
        outline: 3px solid rgba(21, 101, 192, 0.16);
    }

    .site-sidebar option {
        color: var(--color-text);
        background: var(--color-background);
    }

    footer {
        margin: 28px 12px 0;
    }

    body::before {
        background-position: 62% center;
    }

    .site-header__actions {
        gap: 7px;
    }

    .project-menu summary {
        padding: 9px 10px;
    }
}

@media (orientation: landscape) and (max-width: 1180px) {
    body::before {
        background-position: center center;
    }
}
