@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

:root {
    /* --background-color: #fff;
    --background-secondary-color: #eee;
    --text-color: #000; */
    --primary-color: #c0ffee;
    --background-color: #222;
    --background-secondary-color: #333;
    --text-color: #fff;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    width: 100vw;
}

header {
    display: grid;
    padding: 0 1rem 0 1rem;
    /* justify-items: center; */
    align-items: center;
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: "title no image"
        "content content image";
    max-height: 40vh;
}

header h1 {
    grid-area: title;
    font-size: 3rem;
    font-weight: 700;
}

header #portrait {
    grid-area: image;
    justify-self: end;
    margin-top: 2rem;
    max-width: 40vh;
}

header #portrait img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

header .content {
    grid-area: content;
}

article {
    background-color: var(--background-secondary-color);
    display: grid;
    grid-template-areas: "title image"
        "text image";
    border-radius: 1rem;
}

article:nth-child(even) {
    grid-template-areas: "image title"
        "image text";
}

article h3 {
    grid-area: title;
    font-size: 2rem;
    margin: .75rem;
}

article img {
    grid-area: image;
    border-radius: 1rem;
    height: auto;
    width: auto;
}

article .content {
    grid-area: text;
    margin: 1rem;
    min-width: 300px;
    max-width: 700px;
}

main {
    padding: 1rem;
}

#articles {
    margin-top: 1rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
}

a,
a:visited {
    color: var(--text-color);
}

footer {
    margin: auto;
    width: max-content;
}

#words {
    font-size: 5rem;
    color: var(--primary-color);
    font-weight: 900;
    padding: 0;
    display: grid;
    grid-auto-rows: 4rem;
    align-items: center;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
}

#words .dark {
    color: var(--background-secondary-color);
    display: none;
}

#portrait {
    border-radius: 100%;
    height: 100%;
    aspect-ratio: 1/1;
}
#comingsoon {
    align-self: center;
}

@media screen and (min-width: 900px) {
    #words .dark {
        display: inline;
    }
}

@media screen and (max-width: 860px) {
    header {
        grid-template-rows: auto 1fr auto;
        grid-template-columns: auto;
        grid-template-areas: "title"
            "image"
            "content";
        max-height: none;
        width: 100%;
    }

    header #portrait {
        /* justify-self: center; */
        margin: 0;
        justify-self: inherit;
        height: max-content;
    }

    article {
        grid-template-areas: "title"
            "text"
            "image";
        width: 100%;
    }

    article .content {
        grid-area: text;
        margin: 1rem;
        min-width: 0;
    }
}