@font-face {
    font-family: Inter;
    font-weight: 100;
    src:
        url("/static/InterVariable.woff2") format("woff2"),
        url("/static/InterVariable.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-style: italic;
    font-weight: 100;
    src:
        url("/static/InterVariable-Italic.woff2") format("woff2"),
        url("/static/InterVariable-Italic.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-weight: 200;
    src:
        url("/static/InterVariable.woff2") format("woff2"),
        url("/static/InterVariable.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-style: italic;
    font-weight: 200;
    src:
        url("/static/InterVariable-Italic.woff2") format("woff2"),
        url("/static/InterVariable-Italic.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-weight: 300;
    src:
        url("/static/InterVariable.woff2") format("woff2"),
        url("/static/InterVariable.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-style: italic;
    font-weight: 300;
    src:
        url("/static/InterVariable-Italic.woff2") format("woff2"),
        url("/static/InterVariable-Italic.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    src:
        url("/static/InterVariable.woff2") format("woff2"),
        url("/static/InterVariable.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-style: italic;
    src:
        url("/static/InterVariable-Italic.woff2") format("woff2"),
        url("/static/InterVariable-Italic.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-weight: 500;
    src:
        url("/static/InterVariable.woff2") format("woff2"),
        url("/static/InterVariable.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-style: italic;
    font-weight: 500;
    src:
        url("/static/InterVariable-Italic.woff2") format("woff2"),
        url("/static/InterVariable-Italic.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-weight: 600;
    src:
        url("/static/InterVariable.woff2") format("woff2"),
        url("/static/InterVariable.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-style: italic;
    font-weight: 600;
    src:
        url("/static/InterVariable-Italic.woff2") format("woff2"),
        url("/static/InterVariable-Italic.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-weight: 700;
    src:
        url("/static/InterVariable.woff2") format("woff2"),
        url("/static/InterVariable.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-style: italic;
    font-weight: 700;
    src:
        url("/static/InterVariable-Italic.woff2") format("woff2"),
        url("/static/InterVariable-Italic.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-weight: 800;
    src:
        url("/static/InterVariable.woff2") format("woff2"),
        url("/static/InterVariable.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-style: italic;
    font-weight: 800;
    src:
        url("/static/InterVariable-Italic.woff2") format("woff2"),
        url("/static/InterVariable-Italic.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-weight: 900;
    src:
        url("/static/InterVariable.woff2") format("woff2"),
        url("/static/InterVariable.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-style: italic;
    font-weight: 900;
    src:
        url("/static/InterVariable-Italic.woff2") format("woff2"),
        url("/static/InterVariable-Italic.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-weight: 950;
    src:
        url("/static/InterVariable.woff2") format("woff2"),
        url("/static/InterVariable.ttf") format("truetype");
}

@font-face {
    font-family: Inter;
    font-style: italic;
    font-weight: 950;
    src:
        url("/static/InterVariable-Italic.woff2") format("woff2"),
        url("/static/InterVariable-Italic.ttf") format("truetype");
}

:root {
    --blue: #0043c4;

    --overflow: -1rem;
    --block-padding: 1rem;
    --grid-spacing: 2rem;
    --page-width: 1100px;
    @media (min-width: 1210px) {
        --overflow: -2rem;
    }
    @media (min-width: 1300px) {
        --overflow: -4rem;
    }
}

body {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.875rem;
    background-color: var(--blue);
    padding: 0;
    margin: 0;
}

body > * {
    max-width: var(--page-width);
    margin: 0 auto;
}

body > *:not(nav) {
    margin-bottom: var(--grid-spacing);
}

img,
picture {
    max-width: 100%;
    height: auto;
}

main *,
article * {
    box-sizing: border-box;
}

nav {
    color: white;
    padding: 1rem;
    a {
        text-decoration: none;
        &:hover {
            text-decoration: underline;
        }
    }
}
a {
    color: inherit;
}
.nav {
    display: flex;
    align-items: center;
}
menu {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0 0 0 auto;
    font-size: 0.8rem;
    font-weight: 400;
}
h1,
h2,
h3,
h4 {
    font-weight: 600;
    text-wrap: balance;
    margin: 0;
}
h1 {
    font-size: 3.5rem;
    line-height: 3.5rem;
}

p {
    text-wrap: pretty;
    line-height: 1.5rem;
    font-size: 1rem;
}
.blue {
    color: var(--blue);
}
.white-text {
    color: white;
}
.large-af {
    font-size: 5rem;
}
.centered {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 100px);
    margin: 0;
    gap: 3rem;
    max-width: unset;
}
.white-box {
    background-color: white;
    padding: var(--block-padding);
    box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3);
}

.overflow {
    margin-inline: var(--overflow) !important;
}

.overflow-left {
    margin-left: var(--overflow) !important;
}

.overflow-right {
    margin-right: var(--overflow) !important;
}

article {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--grid-spacing);
    container-type: inline-size;
    .info {
        flex-basis: calc(100% - var(--grid-spacing) - 202px);
        @media (max-width: 800px) {
            flex: 0 0 100%;
        }
    }
    .author {
        flex: 0 0 200px;
        @media (max-width: 800px) {
            flex: 0 0 100%;
            order: 10;
        }
    }
    .content {
        flex: 0 0 100%;
        max-width: 100%;
        a {
            color: var(--blue);
            text-decoration: none;
            &:hover {
                text-decoration: underline;
            }
        }
        a[href^="http"]::after {
            content: url("data:image/svg+xml,%3Csvg%20width%3D%2217px%22%20height%3D%2217px%22%20viewBox%3D%220%200%2017%2017%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%09%3Cpath%20d%3D%22M15%202v7.5h-1v-5.668l-9.334%209.334-0.707-0.707%209.459-9.459h-5.918v-1h7.5zM11%2016h-10v-10h6.574v-1h-7.574v12h12v-7.714h-1v6.714z%22%20fill%3D%22%230043c4%22%20%2F%3E%0A%3C%2Fsvg%3E");

            margin-left: 0.25em;
        }
    }
}

code[class*="language-"],
pre[class*="language-"] {
    font-size: 0.8rem !important;
}

.image-and-text {
    display: grid;
    gap: 1rem;
    grid-template-columns: [image-start text-start] 1fr [image-end text-end];
    grid-template-rows: [image-start] auto [image-end text-start] 1fr [text-end];
    .text {
        grid-column: text;
        grid-row: text;
    }
    picture {
        grid-column: image;
        grid-row: image;
    }
}
@container (min-width: 500px) {
    .image-and-text {
        grid-template-rows: 1fr;
    }
    .image-and-text--left {
        grid-template-columns: [image-start] 1fr [image-end text-start] 1fr [text-end];
    }
    .image-and-text--right {
        grid-template-columns: [text-start] 1fr [text-end image-start] 1fr [image-end];
    }
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
    a {
        text-decoration: none;
        font-size: 0.8rem;
        &:hover {
            font-weight: bold;
        }
    }
}

.grid {
    list-style: none;
    --maxWidth: calc(var(--page-width) + 2 * var(--block-padding));
    max-width: var(--maxWidth);
    padding: 0;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--grid-spacing);
    @media (min-width: 500px) {
        grid-template-columns: repeat(2, 1fr);
    }
    @media (min-width: 900px) {
        grid-template-columns: repeat(3, 1fr);
    }
    @media (min-width: 1130px) {
        grid-template-columns: repeat(4, 1fr);
    }
}

.card {
    user-select: none;
    h2 {
        margin: 0;
    }
    p {
        margin: 0;
    }
    a {
        text-decoration: none;
        display: block;
    }
    picture,
    img {
        display: block;
        width: 100%;
        height: auto;
    }
    .card__image {
        margin: calc(-1 * var(--block-padding));
        margin-bottom: var(--block-padding);
    }
    .card__title {
        text-decoration: none;
    }
    .card__subtitle {
        font-size: 0.875rem;
        color: var(--blue);
    }
    .card__info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
    }
    time {
        font-size: 0.8rem;
        color: #666;
    }
}

.card.card--article {
    picture,
    img {
        height: 100%;
        object-fit: cover;
    }
    .card-image {
        aspect-ratio: 1.91;
    }
}

.author-page {
    display: flex;
    flex-direction: column;
    gap: var(--grid-spacing);
    @media (min-width: 600px) {
        flex-direction: row;
        align-items: center;
    }
    h1 {
        margin: 0;
    }
    .img {
        flex: 0 0 300px;
        align-self: center;
    }
    .texts {
        flex: 1;
    }
}

@media (min-width: 601px) {
    .corner-grid {
        position: fixed;
        width: 25vw;
        max-width: 250px;
        aspect-ratio: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(4, 1fr);
        pointer-events: none;
        z-index: -1;
    }

    .corner-grid .grid-cell {
        background-color: transparent;
        transition: background-color 0.3s ease;
    }

    .corner-grid .grid-cell.white {
        background-color: rgba(255, 255, 255, 1);
    }

    .top-left {
        top: 100px;
        left: 0;
    }

    .top-right {
        top: 100px;
        right: 0;
    }

    .bottom-left {
        bottom: 0;
        left: 0;
    }

    .bottom-right {
        bottom: 0;
        right: 0;
    }
}
