:root {
    color-scheme: dark light;
}

body {
    background-color: #000;
    font-family: "Roboto Mono", monospace;
    color: #4AF626;
    font-size: large;
    display: block;
    margin: 5%;
}

body.theme-dark {
    background-color: #000;
    color: #4AF626;
}

body.theme-light {
    background-color: #ffffff;
    color: #000000;
}

a {
    color: #4AF626;
    text-decoration: underline;
}

a:hover {
    text-shadow: 1px 1px 2px #4AF626;
}

.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    bottom: -3em;
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    font-size: 12px;
    z-index: 10;
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateY(0);
}

#cursor {
    animation: blink 1s step-start infinite;
    pointer-events: none; /* avoid selecting the block cursor */
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Hide revealable elements when animating to avoid flash */
#profile.hiding h1,
#profile.hiding h2,
#profile.hiding p,
#prompt.hiding {
    visibility: hidden;
}

/* Prompt styles */
#prompt {
    display: flex;
    align-items: baseline;
    gap: 0.5ch;
}

#cmdline {
    display: inline-block;
    min-width: 1ch;
    outline: none;
    white-space: pre;
    caret-color: transparent;
}

body.theme-light a {
    color: #000000;
}
body.theme-light a:hover {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/*
@media (prefers-color-scheme: light) {
    body:not(.theme-dark):not(.theme-light) {
        background-color: #ffffff;
        color: #000000;
    }
    body:not(.theme-dark):not(.theme-light) a {
        color: #000000;
        text-decoration: underline;
    }
    body:not(.theme-dark):not(.theme-light) a:hover {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }
}
*/