:root {
    --theme: hsl(0, 92%, 51%);

    --bg-dark: hsl(240, 12%, 9%);
    --bg-mid: hsl(240, 12%, 12%);
    --bg-light: hsl(240, 12%, 16%);

    --border: hsl(240, 12%, 18%);
    --border-light: hsl(240, 12%, 27%);

    --header: hsl(240, 14%, 7%);
    --footer: hsl(240, 14%, 7%);

    --text: hsl(0, 0%, 95%);
    --text-muted: hsl(0, 0%, 80%);
    --text-dark: hsl(0, 0%, 68%);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    box-sizing: border-box;
    width: 100%;
    height: 100%;
}

main {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

hr {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border);
    margin: 24px 0;
}

::selection {
    background-color: var(--theme);
    color: black;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--bg-light) 70%, white 30%);
    border-radius: 10px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-light);
}

::-webkit-scrollbar-corner {
    background: var(--bg-dark);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 5%;
    background: transparent;
    border: 1px solid transparent;
    backdrop-filter: none;
    position: sticky;
    top: 0;
    left: 8px;
    z-index: 1000;
    box-sizing: border-box;
    height: 64px;
    border-radius: 8px;
    width: calc(100% - 16px);
    transition: all 0.3s ease;
}

body.scrolled header {
    background: color-mix(in srgb, var(--header), transparent 20%);
    border: 1px solid var(--border);
    backdrop-filter: blur(1vh);
    top: 8px;
}

header .logo,
footer .logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-dark);
    transition: transform 160ms ease;
    margin: 0 !important;
}

header .logo:hover,
footer .logo:hover {
    text-decoration: none !important;
    transform: scale(1.02);
}

header .logo span,
footer .logo span {
    color: var(--theme);
}

header .button {
    display: inline-block;
    background: var(--theme);
    color: var(--bg-dark);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    box-sizing: border-box;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    user-select: none;
    cursor: pointer;
    transition: transform 160ms ease;
}

header .button:hover {
    transform: translateY(-2px);
}

header nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

header nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: transform 200ms ease, filter 200ms ease;
}

header nav a:hover {
    transform: translateY(-1px);
    filter: brightness(1.2);
}

footer {
    background: color-mix(in srgb, var(--footer), transparent 20%);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(10vh);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    z-index: 2;
}

.footer-content {
    padding: 40px 10%;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    color: #777;
    font-size: 0.9rem;
    width: 100%;
    max-width: 900px;
}

.footer-content hr {
    margin-top: 12px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 28px;
}

.footer-content .links {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 28px;
    width: 100%;
    row-gap: 12px;
}

.footer-content .links div {
    width: 100%;
    max-width: 220px;
    display: flex;
    flex-direction: column;
}

.footer-content label {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    color: var(--theme);
}

.footer-content a {
    text-decoration: none;
    color: var(--text-muted);
    margin: 5px 0;
}

.footer-content a:hover {
    text-decoration: underline;
}

.footer-content sub a {
    color: #777;
}

.mobile-show {
    display: none;
}

.mobile-hide {
    display: block;
}

@media (max-width: 650px) {
    header {
        padding: 10px 3%;
    }

    header nav a {
        display: none;
        font-size: 0.9rem;
    }

    header nav a.mobile-show {
        display: block;
    }

    header nav a.mobile-keep {
        display: block;
    }

    header .mobile-hide {
        display: none !important;
    }

    header .logo {
        font-size: 1.1rem;
    }

    .footer-content .primary {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    footer .mobile-show {
        display: block;
    }
}