@font-face {
    font-family: "Fredoka";
    src: url("../fonts/Fredoka-Regular.woff2") format("woff2");
}

*,
*::after,
*::before {
    box-sizing: border-box;
}

:root {
    font-family: "Fredoka", sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    --bg: oklch(0.99 0.003 325);
    --primary: oklch(0.25 0.01 325);
    background-color: var(--bg);
    color: var(--primary);
}

body {
    margin: 0;
}

.container {
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin-inline-start: -2rem;
}

header {
    background-color: var(--primary);
    color: var(--bg);
}

nav a {
    display: inline-block;
    padding-block: 1rem;
    padding-inline: 2rem;
    color: inherit;
    text-decoration: none;
}

.row {
    display: flex;
    gap: 2rem;

    &>div {
        border: 1px dashed oklch(0.3 0.05 250);
        padding: 1rem;
    }

    &>div:first-child {
        flex: 2;
    }

    &>div:last-child {
        flex: 1;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.excercise-nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin-inline-start: -2rem;
}

.excercise-nav ul li:first-child {
    margin-right: auto;
}

.exercise-nav a {
    display: inline-block;
    padding-block: 1rem;
    padding-inline: 2rem;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
}



.exercise-nav a:hover,
.exercise-nav a:focus-visible {
    background-color: var(--bg);
    color: oklch(0.45 0.15 30);
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}


.cards>li {
    flex: 1 1 18rem;
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    border-radius: 0.5rem;
    box-shadow:
        0 0 .2rem oklch(0 0 0 / .2),
        0 0 2rem oklch(0 0 0 / .1);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cards>li:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px .4rem oklch(0 0 0 / .25),
        0 12px 2.4rem oklch(0 0 0 / .12);
}


.cards img {
    width: 100%;
    height: auto;
    display: block;
}



.cards .content {
    padding: 1rem;
    display: grid;
    gap: 0.5rem;
}


.cards .content a:not(.overlay-link) {
    color: var(--primary);
    text-decoration: underline;
    transition: color .2s ease;

}

.cards .content a:not(.overlay-link):hover,
.cards .content a:not(.overlay-link):focus-visible {
    color: oklch(0.35 0.06 325);
    outline: none;
}

.cards .overlay-link {
    position: absolute;
    inset: 0;
    color: transparent;
    background: transparent;
    border: 0;
    text-indent: -9999px;
}


.cards .overlay-link:focus-visible {
    outline: 4px dotted var(--primary);
    outline-offset: 4px;
}