@font-face {
    font-family: "SpaceMono Nerd Font";
    font-display: swap;
    src:
        local("SpaceMono Nerd Font"),
        url(../fonts/SpaceMonoNF.woff2) format("woff2"),
        url(../fonts/SpaceMonoNF.woff) format("woff");
}

:root {
    color-scheme: dark;
}

html {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100svh;
    background-color: var(--background-color);
    background-image: url("../bgs/topography.svg");
    overflow-x: clip;
}

html.loaded {
    transition: background-color 0.2s ease-in-out;
}

body {
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    font-family:
        SpaceMono Nerd Font,
        monospace;
    justify-content: center;
    align-items: center;
    gap: 1em;
}

#art {
    opacity: 0;
    transition: opacity 0.2s ease-in;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Remove background, padding, and other styling from the container */
}

#art.loaded {
    opacity: 1;
}

#art pre {
    color: var(--accent-color-2) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.4em !important;
    line-height: 1 !important;
    white-space: pre !important;
    font-family: "SpaceMono Nerd Font", monospace !important;
    text-align: left !important;
    overflow: visible !important;
    display: block !important;

    /* Background styling moved to the pre element */
    background-color: rgba(0, 0, 0, 0.7) !important; /* More transparent */
    border: 3px solid var(--accent-color) !important;
    border-radius: 8px !important;
    backdrop-filter: blur(5px) !important;

    /* Make background fit content exactly */
    width: fit-content !important;
    max-width: none !important;
}

@media (max-width: 1200px) {
    #art pre {
        font-size: 0.35em !important;
        padding: 0.6em 0.8em !important;
    }
}

@media (max-width: 900px) {
    #art pre {
        font-size: 0.3em !important;
        padding: 0.5em 0.7em !important;
    }
}

@media (max-width: 600px) {
    #art {
        display: none;
    }
}

#text {
    opacity: 0;
    transition: opacity 0.2s ease-in;
    flex-shrink: 0;
}

#text.loaded {
    opacity: 1;
}

#text.loaded * {
    transition: color 0.2s ease-in-out;
}

#greeting {
    color: var(--accent-color-2);
    font-size: 2.5em;
    font-weight: 900;
    grid-column: 1/-1;
    text-align: center;
    display: grid;
}

#date {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--accent-color);
    display: grid;
    grid-column: 1/-1;
    text-align: center;
    margin: 1em 0;
}

.header {
    color: var(--accent-color);
    font-size: 1.6em;
    font-weight: 600;
}

#links {
    display: grid;
    grid-row-gap: 0.5em;
    grid-template-columns: repeat(2, 1fr);
}

ul {
    list-style-type: none;
    padding-left: 1em;
    margin-left: 0;
}

a {
    color: var(--text-color);
    font-size: 1.2em;
    text-decoration: none;
}

a:hover {
    color: var(--hover-color);
    font-style: italic;
}

.fazzi .urls:nth-child(even) {
    padding-left: 1.5em;
}

#search-container {
    display: flex;
    justify-content: center;
    margin: 1.5em 0;
    grid-column: 1/-1;
}

#search-form {
    width: 100%;
    max-width: 500px;
}

#search-box {
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1em;
    font-family: inherit;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    color: var(--text-color);
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#search-box::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

#search-box:focus {
    border-color: var(--accent-color-2);
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
}

#search-box:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

#carouselImage {
    height: 550px;
    aspect-ratio: 9 / 16;
    border-radius: 6px;
    box-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.5);
    object-fit: cover;
    transition: transform 0.3s ease;
}

#image {
    margin-right: 1em;
}

#carouselImage:hover {
    transform: scale(1.1);
    cursor: pointer;
}

@media (max-width: 800px) {
    img,
    #image {
        display: none;
        margin: 0;
        padding: 0;
    }
}

body {
    display: flex;
    flex-direction: row;
    color: var(--text-color);
    font-family:
        SpaceMono Nerd Font,
        monospace;
    justify-content: center;
    align-items: center;
    gap: 1em;
}
