*, *::before, *::after {
    box-sizing: border-box;
}

@font-face {
    font-display: swap;
    font-family: 'Alfa Slab One';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/alfa-slab-one-v21-latin-regular.woff2') format('woff2');
}

:root {
    font-family: Montserrat, sans-serif;
    line-height: 1.5;
    background-color: oklch(0.9973 0.002 61);
}

body {
    margin: 0;
}

.container {
    max-width: 80rem;
    margin-inline-start: auto;
    margin-inline-end: auto;
    padding-inline-start: 1rem;
    padding-inline-end: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container2 {
    max-width: 80rem;
    margin-inline-start: auto;
    margin-inline-end: auto;
    padding-inline-start: 1rem;
    padding-inline-end: 1rem;
}

p, h2, h3, ul {
    margin-top: 2em;
}

header {
    background-color: oklch(0.4882 0.1722 151.41);
    color: oklch(0.9973 0.002 61);
    display: flex;
    justify-content: space-between;

    a {
        padding-bottom: 1rem;
        padding-top: 1rem;
        padding-left: 2rem;
        padding-right: 2rem;
        color: inherit;
        text-decoration: none;
        margin-left: -2rem;
        display: block;
        background-color: inherit;
        transition: transform .2s ease-in-out;
        border: none;

        &:hover {
            transform: translateY(-10px);
        }
    }

    ul {
        display: flex;
    }
}

nav {
    ul {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        list-style: none;
    }
}

.cards {
    display: flex;
    gap: 2rem;
    padding: 0;
    margin: 0;
    list-style: none;
    flex-shrink: unset;
    flex-wrap: wrap;
    min-width: 18rem;
    flex-direction: inherit;
    margin-bottom: auto;
    gap: 1rem;

    li {
        flex-basis: 30%;
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column-reverse;
        box-shadow: 0 0 .2rem oklch(0 0 0 / .2), 0 0 2rem oklch(0 0 0 / .1);
        border-radius: 10px;
        transition: transform 0.2s ease-in-out;
        flex: 0 1 calc(33% - 2rem);
        min-width: 18rem;
        max-width: 20rem;

        &:hover {
            transform: translateY(-10px);
        }
    }
}

.content {
    padding: 10px;

    a.overlay-link {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        text-indent: 100%;
        white-space: nowrap;
        overflow: hidden;
    }
}

footer {
    background-color: oklch(0.4882 0.1722 151.41);
    color: oklch(0.9973 0.002 61);
}

img {
    width: 25rem;
    height: 25rem;
}

p {
    a {
        color: inherit;
        text-decoration: none;
    }
}

.button {
    background-color: oklch(0.4882 0.1722 151.41);
    padding: 0.5em;
    text-decoration: none;
    color: oklch(100% 0.00011 271.152);
    transition: background-color .2s ease-in-out;

    &:hover {
        background-color: inherit;
        color: oklch(0.4882 0.1722 151.41);
    }
}

.aboutme {
    display: flex;
}

input:not([type=submit]),
textarea {
    display: block;
    width: 100%;
    max-width: 40rem;
    padding: .75em;
    border: 1px solid #666;
    border-radius: .3rem;
}

label,
input[type=submit] {
    margin-top: 3rem;
}

input[type=submit] {
    padding: .5em 2em;
}

label {
    display: block;
    margin-bottom: .2em;
    font-weight: bold;
}

.message {
    font-size: 1.4rem;

    &.error {
        color: oklch(0.4979 0.198 29.02);
    }
}

@media screen and (min-width: 320px) {
    main.container {
        flex-direction: column;

        section:nth-child(1) {
            align-self: flex-start;
        }
    }
}