:root {
    --background-color: #f5f1ea;
    --card-background-color: #fffef9;
    --card-border-color: #e8e3dc;
    --text-color: #2b2520;
    --link-color: #1a5490 ;
    --link-hover-color: #0d3a5f;
}

:root, html, body {
    padding: 0;
    margin: 0;
    font-family: sans-serif;
    width: 100svw;
    height: 100svh;
    background-color: var(--background-color);
    color: var(--text-color);
}

body {
    overflow: auto;
}


@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0d0d0d;
        --card-background-color: #1c1c1e;
        --card-border-color: #2c2c2e;
        --text-color: #f5f5f7;
        --link-color: #4a9eff;
        --link-hover-color: #6bb0ff;
    }
}

.card {
    background-color: var(--card-background-color);
    padding: 2rem;
    border: 1px solid var(--card-border-color);
    border-radius: 1rem;
    box-shadow: 4 4 2 2 darkgray;
    max-width: 60%;
    display: grid;
    grid-template-areas: 
        "heading img"
        "content img"
    ;
    grid-template-rows: auto 1fr;

    gap: 2rem;
}

h1 {
    grid-area: heading;
}

.content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: space-between;
}

img {
    border: 1px solid var(--card-border-color);
    width: auto;
    height: auto;
    object-fit: cover;
    grid-area: img;
    max-width: 100%;
    margin: auto;
}

.crane {
    max-width: 5rem;
    max-height: 5rem;
    border: none;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    width: 100%;
}

a {
    font-weight: bold;
    text-decoration: underline solid;
    color: var(--link-color);
}

a:hover {
    text-decoration: underline dotted;
    color: var(--link-hover-color);
}

ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-evenly;
    padding: 0px;
}

li {
    list-style: none;
}

details {
    border: 1px solid var(--card-border-color);
    padding: 1rem;
    border-radius: 1rem;
}

details summary {
    cursor: pointer;
}

details[open] summary {
    margin-bottom: 1rem;
}

@media screen and (max-width: 960px) {
    .card {
        grid-template-areas: 
            "heading img"
            "content content"
        ;
    }
    
    img {
        max-height: 10rem;
        min-width: 5rem;
    }

    .card {
        max-width: 95%;
    }
}