* {
    margin: 0;
    box-sizing: border-box;
    font-family: 'Merriweather', serif;
--text: #121409;
--background: #fafbf5;
--primary: #a0b855;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Layout */

.header {
    position: sticky;
    top: 0;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--background);
    background-color: var(--primary);
}

.main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer {
    padding: 1rem;
    color: var(--background);
    background-color: color-mix(in oklch, var(--text), transparent 25%);
}

/* Pages */

.page-container {
    min-height: calc(100vh - 6rem);
    max-width: 700px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cover-image {
    width: 100%;
    max-height: 80vh;
}

.blogs {
    max-width: 100%;
}

.contact {
    align-items: flex-start;
}

/* Blogs */

.blog-container {
    display: flex;
    flex-direction: row-reverse;
    gap: 4rem;
    max-width: 1100px;
}

.blog-content {
    align-items: flex-start;
    text-align: justify;
    gap: 2rem;
    flex: 3;
    min-width: 0; /*prevents flex items from breaking layout */
}

.blog-section {
    scroll-margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Components */

.nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav__link {
    color: var(--background);
    position: relative;
}

.nav__link::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
  	width: 0;
  	height: 2px;
  	background: var(--background);
  	transition: width 0.2s;
    border-radius: 0.5rem;
}

.nav__link:hover::after {
    width: 100%;
}

.nav__link:focus-visible {
    outline: 1px dashed var(--background);
    outline-offset: 8px;
}

.nav__link:active {
    opacity: 0.6;
}

.toc {
    position: sticky;
    top: 5rem;
    align-self: flex-start;
    border-left: 2px solid var(--primary);
    padding: 1rem;
}

.toc__list {
    display: flex;
    flex-direction: column;
    padding: 1rem 0 1rem 0.5rem;
    gap: 1rem;
}

.toc__link {
    color: var(--text);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.toc__link:hover {
    color: var(--primary);
}

.toc__link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.toc__link:active {
    opacity: 0.6;
}

.meta-data {
    font-size: 0.9rem;
}

.list-item::before {
    content: "⨳";
    margin-right: 0.5rem;
}

.form {
    background-color: color-mix(in oklch, var(--primary), transparent);
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-radius: 0.5rem;
    gap: 1rem;
}

.form__element {
    padding: 0.5rem;
}

.form__element:hover, .form__element:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: -2px;
    border-radius: 0.25rem;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.card {
    max-width: 30rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 0.5rem;
    color: var(--background);
    background-color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
       		    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  	border: 1px solid #f0f0f0;
}

.card__image {
    border-radius: 0.5rem 0.5rem 0 0;
    aspect-ratio: 16/9;
}

.card__content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card__link {
    display: block;
    padding: 0.5rem 2rem;
    border-radius: 0.5rem;
    color: var(--primary);
    align-self: center;
    background-color: var(--background);
    transition: 
        color 0.2s ease-in-out, 
        transform 0.1s ease;
}

.card__link:hover {
    color: color-mix(in oklch, var(--primary), rgb(0, 0, 0) 20%);
    transform: translateY(-1px);
}

.card__link:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: -2px;
}

.card__link:active {
    transform: translateY(0) scale(0.98);
    color: color-mix(in oklch, var(--primary), rgb(0, 0, 0) 20%);
    transition: none;
}

.button {
    font-size: 1rem;
    padding: 0.5rem 2rem;
    border-radius: 0.5rem;
    border: none;
    transition: 
        background-color 0.2s ease-in-out, 
        transform 0.1s ease;
}

.button--primary {
    color: var(--background);
    background-color: var(--primary);
}

.button--primary:hover {
    background-color: color-mix(in oklch, var(--primary), rgb(0, 0, 0) 20%);
    transform: translateY(-1px);
}

.button--primary:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: -2px;
}

.button--primary:active {
    transform: translateY(0) scale(0.98);
    background-color: color-mix(in oklch, var(--primary), rgb(0, 0, 0) 20%);
    transition: none;
}

/* Utilities */

.center {
    align-self: center;
}