:root {
    color-scheme: light dark;
    background: light-dark(white, black);
    color: light-dark(black, white);
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: 95vw;
    min-height: 100vh;
    font-family: system-ui, sans-serif;
    font-size: 1.5rem;
}

nav {
    text-align: right;
    li {
        display: inline;
    }
}

main {
    flex-grow: 1;
    text-align: center;
    ul {
        list-style: none;
    }
}

a {
    color: light-dark(black, white);

    &.on {
        font-style: italic;
    }

    &:not(:has(img)):hover,
    &:not(:has(img)):hover > * {
        background: light-dark(black, white);
        color: light-dark(white, black);
        text-decoration: none;
    }
}

img {
    height: auto;
    max-width: 95vw;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid light-dark(black, white);
    padding: 10px 0;
    margin-inline: calc(50% - 50dvi);
    padding-inline: calc(50dvi - 50%);
}

.logos img,
.footer-icons img {
    height: 64px;
    width: auto;
}

@media (prefers-color-scheme: dark) {
    .logos img,
    .footer-icons img {
        filter: invert(1) hue-rotate(180deg);
    }
}

.inline-icon {
    height: 1em;
    width: auto;
    vertical-align: -0.125em;
    display: inline-block;
    margin-right: 0.25em;
}

@media (prefers-color-scheme: dark) {
    .inline-icon {
        filter: invert(1) hue-rotate(180deg);
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card h2, .project-card p {
    margin: 0.5rem 0;
}

.project-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}
