@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

* {
    box-sizing: border-box;
}

:root {
    --bg-color: #FFFFFF;
    --main-txt: #151515;
    --mobile-nav-bg: #202020;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Source Sans 3", sans-serif;
    background-color: var(--bg-color);
    color: var(--main-txt);
    line-height: 1.5;
}

a {
    text-decoration: none;
}

img {
    width: 100%;
    display: block;
    border-radius: 0.4em;
}

h1,
h2 {
    margin: 0;
    line-height: 1.2;
}

/* NAV */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25em 2em;
    position: relative;
    /* Add this */
}

.nav-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--main-txt);
}


#nav-links {
    display: none;
    background-color: var(--mobile-nav-bg);
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    padding: 1em 2em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#nav-links.responsive {
    display: block;
}

#nav-links a {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--bg-color);
    margin-left: 0;
    display: block;
    padding: 0.75em 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#nav-links a:last-child {
    border-bottom: none;
}

#nav-links a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.nav-icon {
    float: right;
    color: var(--main-txt);
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}

.nav-icon:hover {
    opacity: 0.6;
}


/* FEATURED POST */

.featured-post {
    background-image: url(assets/blog0.jpg);
    background-size: cover;
    background-position: center;
    padding: 1.56em;
    min-height: 18.75em;
    display: flex;
    align-items: flex-end;
}

.featured-post-link {
    color: var(--bg-color);
}

.featured-post-link:hover {
    opacity: 0.9;
}

.featured-blog {
    color: var(--bg-color);
    display: flex;
    flex-direction: column;
    background-color: #202020da;
    padding: 1.25em;
    width: 100%;
}

.featured-blog h1 {
    font-size: 2rem;
    margin: 0.25em 0;
}

.featured-blog p {
    margin: 0.5em 0 0;
    line-height: 1.5;
}

.featured-date {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}


/* MAIN CONTENT */

main {
    margin: 2em;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2.5em;
}

.recent-posts a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.recent-posts:hover {
    opacity: 0.9;
}

.recent-posts article {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-header {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding: 0.75em 0 0;
}

.article-header h2 {
    font-size: 1.5rem;
}

.article-header p {
    margin: 0;
    line-height: 1.5;
}

.recent-post-title {
    font-weight: 700;
    text-align: center;
    margin: 1em auto;
    border-top: 2px solid var(--main-txt);
    width: 100px;
    padding-top: 0.25em;
}


/* ABOUT ME */

.about-me-section {
    margin-bottom: 4em;
}

.section-title {
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.user-img {
    border-radius: 50%;
    width: 180px;
    margin-bottom: 2em;
}

/* BLOG POST */

.blog-post-section {
    margin-bottom: 4em;
}

.blog-post-section h1 {
    margin-top: 1rem;
}

.section-title {
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}


/* FOOTER */

footer {
    background-color: #202020;
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.5;
    padding: 2.5em 0;
}

.footer-title {
    color: #ECECEC;
    font-weight: 700;
    margin: 0 0 0.5em;
}

.copyright {
    color: #D7D7D7;
    margin: 0;
}

/* MEDIA QUERIES */

@media (min-width: 768px) {
    nav {
        padding: 1.25em 3em;
    }

    #nav-links {
        display: flex;
        gap: 1.25em;
        position: static;
        background-color: transparent;
        width: auto;
        padding: 0;
        box-shadow: none;
    }

    #nav-links a {
        color: var(--main-txt);
        display: inline;
        padding: 0;
        border-bottom: none;
    }

    .nav-icon {
        display: none;
    }

    main {
        margin: 2em 2em;
    }

    .featured-post {
        min-height: 25em;
        justify-content: center;
    }

    .featured-blog {
        max-width: 700px;
        padding: 1.5em 2em;
    }

    .recent-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    main {
        margin: 2em 3em;
        max-width: 1440px;
    }

    .featured-post {
        min-height: 31.25em;
        padding: 3em;
    }

    .featured-blog {
        max-width: 900px;
    }

    .recent-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .blog-post-section,
    .about-me-section {
        max-width: 900px;
        margin: 4em auto;
    }

    .section-intro {
        display: flex;
        gap: 2em;
    }
}

@media (min-width: 1200px) {
    main {
        margin: 3em auto;
        max-width: 1440px;
        padding: 0 3em;
    }

    .recent-posts-grid {
        gap: 3em;
    }


}




/* github link */
.github-button {
    display: inline-block;
    width: 18px;
    height: 18px;
    color: #D7D7D7;
    margin-top: 1em;
}

.github-button svg {
    fill: currentColor;
    width: 100%;
    height: 100%;
    transition: color 0.3s ease;
}

.github-button:hover {
    color: #0366d6;
}