:root {
    --primary: #3598db;
    --secondary: #505350;
    --text: #373737;
    font-family: 'Ubuntu', sans-serif;
    background: #f9f9f9;
}

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

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--primary);
    text-align: center;
    position: relative;
    z-index: 999;
    width: 100%;
    padding: 1em;
}

.logo {
    color: white;
}

.nav-toggle {
    position: absolute;
    opacity: 0;
    top: 0;
    left: 0;
    margin-left: 1em;
    display: flex;
    align-items: center;
}

.nav-toggle-label {
    position: absolute;
    top: 0;
    left:0;
    margin-left: 1em;
    margin-top: 1em;
    color: white;
    display: flex;
    align-items: center;
}

nav {
    position: absolute;
    text-align: left;
    top: 100%;
    left: 0;
    background: var(--primary);
    width: 100%;
    transform: scale(1, 0);
    transform-origin: top;
    transition: transform 400ms ease-in-out;
}

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

nav li {
    margin-bottom: 1em;
    margin-left: 1em;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 150ms ease-in-out;
}

nav a:hover {
    text-decoration: underline;
}

.nav-toggle:checked ~ nav {
    transform: scale(1,1);
}

.nav-toggle:checked ~ nav a {
    opacity: 1;
    transition: opacity 300ms ease-in-out 250ms;
}

@media screen and (min-width: 800px) {
    .nav-toggle-label {
        display: none;
    }

    header {
        display: grid;
        grid-template-columns: 1fr minmax(300px, 490px) minmax(300px, 490px) 1fr;
    }

    .logo {
        grid-column: 2 / 3;
        text-align: left;
    }

    nav {
        position: relative;
        text-align: left;
        transition: none;
        transform: scale(1,1);
        background: none;
        top: initial;
        left: initial;
        grid-column: 3 / 4;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    nav li {
        margin-left: 3em;
        margin-bottom: 0;
    }

    nav ul {
        display: flex;
        justify-content: flex-end;
    }

    nav a {
        opacity: 1;
    }
}

.cards {
    margin: 0 auto;
    max-width: 1000px;
    padding: 0.75em;
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(250px, 1fr));
    gap: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
    color: var(--text);
    text-decoration: none;
}

.card-image {
    width: 100%;
    display: block;
}

.card-content {
    line-height: 1.5;
    font-size: 0.9rem;
    padding: 0.5em;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.card-info {
    padding: 0.5em;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.card-tag {
    background-color: #ccc;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.page-nav {
    display: flex;
    justify-content: center;
    padding: 1em;
}

.page-nav a{
    color: var(--primary);
    text-decoration: none;
}

.page-nav a:hover {
    text-decoration: underline;
}

.post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0.75rem;
    color: var(--text);
}

.post-title {
    margin-top: 1rem;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.5;
}

.post-container a {
    color: var(--primary);
    text-decoration: none;
}

.post-container a:hover {
    text-decoration: underline;
}

.post-container h2, p, ol, ul {
    margin-bottom: 1.5rem;
}

.post-container h1 {
    font-size: 2rem;
    margin-bottom: 2em;
}

.post-container h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
}

.post-container ol, ul {
    margin-left: 1.5em;
    line-height: 2;
}

.post-container img {
    display: block;
    max-width: 100%;
    border-radius: 5px;
    margin: 2em 0;
}

footer {
    background-color: var(--secondary);
    margin-bottom: 0;
    padding: 1em;
    margin-top: auto;
}

footer ul {
    list-style: none;
    margin: 0;
}

footer a {
    display: flex;
    justify-content: center;
    text-decoration: none;
    color: white;
}

footer a:hover {
    text-decoration: underline;
}