* {
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    box-sizing: border-box;
    color: white;
    background-color: #4f686d;
    min-height: 100vh;
    block-size: 20%;
}

.navbar {
    display: flex;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    justify-content: space-between;
    padding: 2vh 10vw;
    border-bottom: 1px dotted #c3c3c3;
    font-size: 1rem;

    /* Animation */
    animation: navProgressAnimation 0.5s linear;
    animation-duration: 1ms;
    /* Firefox requires this to apply the animation */
    animation-timeline: scroll(root);
    animation-range: entry 0% entry 40%;
    animation-fill-mode: both;
}

.navbar-links {
    display: flex;
    flex-direction: row;
    gap: 1em;
    list-style: none;
    margin: 0;
    padding: 0;

    & a {
        text-decoration: none;
        color: white;
        transition: all 0.3s linear;
    }

    ;

    & a:hover {
        text-decoration: underline;
        color: #e4e4e4;
    }

    ;
}

@keyframes navProgressAnimation {
    from {
        background-color: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(0);
        padding: 2vh 10vw;
    }

    to {
        backdrop-filter: blur(20px);
        background-color: rgba(79, 104, 109, 0.7);
        padding: 1vh 10vw;
    }
}

posts, post {
    & h1 {
        font-size: 3rem;
        font-weight: normal;
    }
}

posts {
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 2vh 20vw;
    margin-top: 5vh;
    margin-bottom: 15vh;
    scroll-behavior: smooth;
}

post {
    & h2 {
        font-size: 2rem;
        font-weight: normal;
    }

    & img {
        width: 100%;
        border-radius: 10px;
    }

    & a {
        color: white;
        transition: all 0.3s linear;
    }

    & a:hover {
        color: #e4e4e4;
    }
}

.post-image {
    max-width: 50%;
    width: auto;
    height: auto;
    max-height: 50%;
    object-fit: contain;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

post-header {
    /* Stub until needed, yeah I know this is an empty block, the browser still handles it fine */
}

post-footer {
    display: flex;
    width: 100%;
    border-radius: 10px;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.1);
    flex-direction: row;
    justify-content: space-between;
    margin-top: 2rem;

    & p {
        font-size: 1rem;
        font-weight: bold;
        margin: 0;
    }
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2vh 10vw;
    border-top: 1px dotted #c3c3c3;
    font-size: 0.9rem;
    text-align: center;
}

/* Styling for mobile devices */
@media (max-width: 768px) {
    .navbar {
        padding: 1vh 5vw;
        font-size: 0.9rem;
    }

    posts {
        padding: 2vh 10vw;
    }

    post-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    post-footer p:last-of-type {
        text-align: right;
        width: 100%;
    }

    .post-image {
        max-width: 100%;
        max-height: none;
    }
}