*, *::before, *::after {
    box-sizing: border-box;
}

html, 
body {
    color: #090909;
    font-family: 'Source Sans Pro', sans-serif;
    background-color: #F9FAFB;
    margin: 0;
    padding: 0;
    user-select: none;
}

/* body {
    color: whitesmoke;
    background-color: #1F2937;
} */

/* Typography and icons */

.logo-container a {
    /* color: whitesmoke; */
    font-size: 1.25rem;
}

nav {
    font-weight: 900;
}

i {
    cursor: pointer;
}

.post-title {
    font-size: 2.25rem;
}

.about-me-title {
    font-size: 2rem;
}

.about-me-subtitle:last-of-type {
    margin-top: 2rem;
}

.post-preview,
.about-me-preview {
    font-size: 1.25rem;
    margin-top: 0;
}

.featured-post-main .post-preview {
    margin-bottom: 2rem;
}

.main-post-subtitle {
    margin-bottom: 0.7rem;
}

.recent-posts-heading {
    font-size: 1.7rem;
    margin-bottom: 1rem;
}

.recent-post-title {
    font-size: 1.5rem;
}

footer h4 {
    font-size: 1.125rem;
    font-weight: 700;
}

footer h6 {
    font-size: 1rem;
    font-weight: 400;
    margin-top: 0;
}

/* Layout */

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

header {
    display: flex;
    background-color: #F9FAFB;
    /* background-color: #374151; */
    width: 100%;
    justify-content: space-between;
    align-items: center;
    position: fixed;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

nav {
    display: flex;
    gap: 1rem;
}

.mobile-nav {
    display: flex;
}

main {
    padding-top: 10.625rem;
}

header,
.recent-posts,
.featured-post-main,
.about-me,
.recent-posts-more {
    padding: 2.5rem 1.25rem;
}

.featured-post {
    color: whitesmoke;
    display: grid;
    grid-template-columns: 1.25rem auto 1.25rem;
    margin-bottom: 1.875rem;
}

.featured-post-image {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.featured-post-text {
    grid-column: 2 / -2;
    grid-row: 2 / -1;
    padding: 3rem 1rem;
}

.featured-post-main {
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

.recent-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 2rem;
    width: 100%;
    margin: 0 auto;
    padding-top: 1rem;
    padding-bottom: 0;
}

.recent-posts-more {
    display: none; /* grid when displayed */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 2rem;
    width: 100%;
    margin: 0 auto;
    padding-bottom: 0;
}

.more-feed {
    display: none; /* block when displayed */
}

.recent-posts-heading {
    grid-column: 1 / -1;
    text-align: center;
}

.recent-post {
    border-radius: 10px;
}

.recent-post-image:hover,
.recent-post-title:hover {
    cursor: pointer;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.about-me {
    padding-bottom: 0;
}

.about-me-top {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.about-me-top-text {
    display: flex;
    flex-direction: column;
}

.link-to-posts {
    display: flex;
    justify-content: center;
}

.mobile-menu-container {
    display: none; /* flex when displayed  */
   background-color: pink;
   background-color: #090909;
   position: absolute;
   top: 2.5rem;
   right: 0;
   padding: 1.5rem;
   border-radius: 10px;
}

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

li:last-of-type {
    margin-top: 1rem;
}

li:hover {
    background-color: #374151;
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: whitesmoke;
    background-color: #202020;
    padding: 2rem;
    width: 100%;
    margin-top: 3rem;
}

/* Buttons */

button {
    font-weight: 600;
}

.view-more-button {
    color: whitesmoke;
    background-color: #6989FA;
    padding: 1rem 2rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

/* Images */

.recent-post-image {
    width: 100%;
    border-radius: 10px;
}

.avatar-image {
    width: 100%;
    border-radius: 50%;
}

.featured-post-main-image {
    width: 100%;
    border-radius: 10px;
    margin: 0.5rem auto 1.5rem auto;
}

/* Links */

h1 a {
    color: #090909;
    text-decoration: none;

}

nav a {
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
}

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

.mobile-menu-container a {
    color: whitesmoke;
}

.desktop-nav a {
    color: #090909;
}

.link-to-posts a {
    color: whitesmoke;
    font-weight: 600;
    background-color: #6989FA;
    border-radius: 10px;
    padding: 1rem 2rem;
    margin-top: 2rem;
    cursor: pointer;
    text-decoration: none;
}

.mobile-menu-container a {
    font-size: 0.9rem;
}

/* Media queries */

/* @media (width <= 599px) */
@media (max-width: 599px) {
    .recent-posts-heading {
        font-size: 1.7rem;
        margin-bottom: 0.5rem;
    }
    
    .desktop-nav {
        display: none;
    }
}

/* @media (width >= 600px) */
@media (min-width: 600px) {
    /* Typography */

    .logo-container a {
        font-size: 1.375rem;
    }
    
    .post-title,
    .about-me-title {
        font-size: 2.5rem;
    }

    .post-preview,
    .about-me-preview {
        font-size: 1.5rem;
    }

    p {
        font-size: 1.125rem;
    }

    footer h4 {
        font-size: 1.25rem;
    }
    
    footer h6 {
        font-size: 1.125rem;
    }
    
    /* Layout */

    .mobile-nav {
        display: none;
    }

    header,
    .recent-posts,
    .featured-post-main,
    .about-me,
    .recent-posts-more {
    padding: 2.5rem 3.125rem;
}

    .featured-post-main,
    .about-me {
        padding-bottom: 0;
    }

    .featured-post {
        max-height: 40%;
        grid-template-columns: 3.125rem auto 3.125rem;
        grid-template-rows: 1fr 1fr 1fr;
        margin-bottom: 2rem;
    }

    .featured-post-text {
        grid-row: -2 / -1;
    }

    .recent-posts,
    .recent-posts-more {
        grid-template-columns: repeat(3, minmax(200px, 1fr));
        column-gap: 1rem;
    }

    .recent-posts-more {
        padding-top: 0;
        padding-bottom: 0;
    }

    .about-me-top {
        flex-direction: row;
    }

    .about-me-top,
    .about-me-body {
        width: 90%;
        margin: 0 auto;
    }

    .about-me-body {
        padding-top: 1.5rem;
        padding-left: 3rem;
    }

    .button-container,
    .link-to-posts a {
        margin-top: 3rem;
    }

    footer {
        margin-top: 4rem;
    }


    /* Images */

    .avatar-image {
        width: 20%;
    }

    .featured-post-main-image {
        width: 60%;
        margin: 1rem auto 1.5rem auto;
    }

    .recent-post-image {
        height: 266px;
    }

}
