:root {
    --page-bg: #000;
    --page-text: #fff;
    --panel-bg: rgba(0, 0, 0, 0.7);
    --panel-border: #333;
    --muted-text: rgba(255, 255, 255, 0.68);
    --link-hover: rgba(255, 255, 255, 0.65);
    --accent: #ff6969;
    --nebula-image: url("../assets/img/2264.png");
}

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

html {
    min-height: 100%;
    background: var(--page-bg);
    color-scheme: dark;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    margin: 0;
    background-color: var(--page-bg);
    background-image: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: var(--page-text);
    font-family: monospace;
    overflow-x: hidden;
    opacity: 0;
    animation: fadeInPage 700ms ease-out forwards;
    transition: background-image 300ms ease, background-color 300ms ease;
}

body.bg-nebula {
    background-image: var(--nebula-image);
}

@keyframes fadeInPage {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    left: var(--star-x);
    top: var(--star-y);
    width: 1px;
    height: 1px;
    border-radius: 50%;
    background-color: #fff;
    opacity: 0.45;
    animation:
        starDrift var(--star-duration) ease-in-out var(--star-delay) infinite alternate,
        starTwinkle calc(var(--star-duration) * 0.8) ease-in-out var(--star-delay) infinite alternate;
    will-change: transform, opacity;
}

@keyframes starDrift {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(var(--star-dx), var(--star-dy), 0);
    }
}

@keyframes starTwinkle {
    from {
        opacity: 0.22;
    }

    to {
        opacity: 0.85;
    }
}

.site-nav {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 32px;
    z-index: 10;
    gap: 20px;
    padding: 0 24px;
}

.site-nav a,
.top-button {
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: color 180ms ease;
}

.site-nav a:hover,
.top-button:hover {
    color: var(--link-hover);
    text-decoration: none;
}

.site-footer {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    padding: 24px 24px 18px;
    z-index: 10;
}

.footer-logo-button {
    display: block;
    width: 50px;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 180ms ease;
}

.footer-logo-button:hover {
    opacity: 1;
}

.footer-logo-button img {
    display: block;
    width: 100%;
    height: auto;
}

.page-layer {
    position: relative;
    flex: 1 0 auto;
    z-index: 1;
}

.desktop-only {
    display: block;
}

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

@media (max-width: 600px) {
    .site-nav {
        margin-top: 22px;
        gap: 16px;
        padding: 0 14px;
    }

    .site-nav a,
    .top-button {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }

    .stars {
        display: none;
    }
}
