:root {
    --orbit-sun-radius: 250px;
    --orbit-moon-radius: 210px;
    --sun-radius: 48px;
    --moon-radius: 24px;
}

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

/* Rotating orbiting circle */
.orbit-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;

    &.orbit-container-up {
        clip-path: inset(0 0 50% 0);
    }

    &.orbit-container-down {
        clip-path: inset(50% 0 0 0);
    }
}

.circle {
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;

    &.circle-sun {
        animation: orbitSun 30s linear infinite;
        width: var(--sun-radius);
        height: var(--sun-radius);

        &.circle-sun-up {
            background: rgb(244, 230, 45);
            box-shadow: 0 0 50px rgb(244, 230, 45);
        }

        &.circle-sun-down {
            border: 1px solid #d1d2d9;
        }
    }

    &.circle-moon {
        animation: orbitMoon 15s linear infinite;
        width: var(--moon-radius);
        height: var(--moon-radius);

        &.circle-moon-up {
            background: #f3f3f3;
            box-shadow: 0 0 30px rgba(252, 252, 252, 0.7);
        }

        &.circle-moon-down {
            border: 1px solid #b6b7c0;
        }
    }
}

@keyframes orbitSun {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translate(0, var(--orbit-sun-radius));
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg) translate(0, var(--orbit-sun-radius));
    }
}

@keyframes orbitMoon {
    0% {
        transform: translate(-50%, -50%) rotate(-180deg) translate(0, var(--orbit-moon-radius));
    }

    100% {
        transform: translate(-50%, -50%) rotate(180deg) translate(0, var(--orbit-moon-radius));
    }
}

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    grid-template-areas: "main";
    color: #332a2a;
    font-family: 'Fira Mono', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
}

@keyframes fadeInAnimation {
    0% {
        transform: rotate(0) scale(0);
    }

    25% {
        transform: rotate(5deg) scale(1.1);
    }

    75% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0) scale(1);
    }
}

a {
    color: #4eaaff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s, transform 0.2s;
}

a:hover {
    color: #333b91;
    transform: scale(1.1);
    text-decoration: underline;
}

.content {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 3rem;
    border-radius: 1rem;
    box-shadow: 0 5px 24px rgb(0, 0, 0);
    text-align: center;
    max-width: 600px;
    grid-area: main;

    animation: fadeInAnimation 0.5s linear;
}

.horizon {
    grid-area: main;
    width: 100%;

    hr {
        margin: 0;
        padding: 0;
    }
}

.fractal-tree {
    grid-area: main;
    transform: translateY(-50%);
    z-index: -2;
}

.links {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

@media (prefers-color-scheme: dark) {
    body {
        background: #181a1b;
        color: #f3f3f3;
    }

    .content {
        background: rgba(52, 55, 58, 0.9);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
    }

    a {
        color: #7ecbff;
    }

    a:hover {
        color: #a3b8ff;
    }
}