/* ===================================
CSS RESET & NORMALIZE
=================================== */

* {
    box-sizing: border-box;
    font-size: 1rem;
}

body, h1, h2, h3, h4, h5, h6, p {
    margin: 0;
    padding: 0;
}

/* ===================================
VARIABLES
=================================== */

:root {
    --primary-white: #d9d9d9;
    --primary-black: #21262c;
    --accent-red: #b30000;
    --accent-grey: #576575;
}

/* ===================================
BASE STYLES
=================================== */

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    background-color: var(--accent-grey);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

a {
    text-decoration: none;
}

/* ===================================
LAYOUT COPMONENTS
=================================== */

.container {
    background-color: var(--primary-black);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* ===================================
NAVIGATION
=================================== */

#navbar {
    background-color: var(--accent-red);
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    min-height: 3rem;
    display: flex;
    justify-content: end;
    padding: 0 1rem;
    align-items: center;
    border-radius: 3px;
}

#nav-menu {
    display: none; /*Hidden by default*/
    flex-direction: column;
}

#nav-menu.active {
    display: flex;
}

#dropbtn {
    display: block;
}

.nav-link {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-white);
    border-bottom: 2px solid var(--primary-black);
    transition: all 0.2s ease;
}

.nav-link:visited {
    color: var(--primary-white);
}

/* ===================================
HERO SECTION
=================================== */

#welcome-section {
    padding: 4rem 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
}


.bio-section {
    text-align: center;
    max-width: 40vw;
    
}

.name {
    font-size: 2.1rem;
    color: var(--primary-white);
    margin: .8rem auto;
}

.bio {
    font-size: 1.2rem;
    color: var(--accent-grey);
    margin: .8rem auto;
}

#selfie {
    max-width: 40vw;
    max-height: 450px;
    border: 3px solid var(--accent-grey);
    border-radius: 5px;
}


/* ===================================
PROJECTS SECTION
=================================== */

#projects {
    background-color: var(--accent-grey);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 5rem 2rem;
}

.project-section-header {
    font-size: 2.3rem;
    max-width: 650px;
    color: var(--primary-white);
    border-bottom: 2px solid var(--accent-red);
    margin-bottom: 3rem;
    justify-self: center;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.project-img {
    height: calc(100% - 4rem);
    width: 100%;
    
}

.project-title {
    background-color: var(--primary-black);
    color: var(--primary-white);
    font-size: 1.6rem;
    padding: 1rem 0.5rem;
}

.project:hover {
    color: var(--accent-grey);
}


/* ===================================
CONTACT SECTION
=================================== */

#contact {
    display: flex;
    flex-direction: column;
    height: 75vh;
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
}

.contect-heading, h2 {
    font-size: 2.3rem;
    color: var(--primary-white);
}

.contect-heading, p {
    font-style: italic;
    font-size: 1.2rem;
    color: var(--accent-grey);
}

.contact-links {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.btn {
    color: var(--primary-white);
    font-size: 1.4rem;
    padding: 1rem 2rem;
    transition: transform 0.3s ease-out;
}

.btn:hover {
    transform: translateY(5px);
}


/* ===================================
FOOTER
=================================== */

footer {
    text-align: center;
    font-weight: 400;
    padding: 2rem;
    border-top: 2px solid var(--accent-red);
}

/* ===================================
MEDIA QUERIES
=================================== */

/*Desktop:Horizontal bar*/
@media (min-width: 768px) {
    #navbar {
        top: 0;
        min-height: 4rem;
    }

    #nav-menu {
        display: flex !important; /*Always vissible*/
        flex-direction: row; /*Side by side*/
        
    }

    #dropbtn {
        display: none; /*Hide drop button*/
    }

    .nav-item {
        margin-left: 2em;
    }

    .nav-link {
        border-bottom: none;
    }

    .nav-link:hover {
        border-bottom: 2px solid var(--primary-black);
        transition: all 0.2s ease;
    }

    #welcome-section {
        padding-top: 6rem;
    }

    .name {
        font-size: 3rem;
    }

    .bio {
        font-size: 1.8rem;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 2rem;
    }
}