:root {
    --navbar-height-lg: 44px;
    --navbar-height-md: 48px;
    --header-background: rgba(19, 19, 19, 0.774);
    --text-color: #bebebe;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#language-container {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: #282829;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#language-content {
    width: 100%;
    max-width: 1024px;
    height: 70px;
    padding: 0 22px;
    justify-content: space-between !important;
}

#language-content p {
    color: white;
    font-size: 14px;
    flex: 1;
}

#language-actions {
    gap: 13px;
    flex: 1;
}

#language-select,
#language-button {
    height: 36px;
    border: none;
    border-radius: 10px;
    outline: none;
} 

#language-select {
    padding: 0 14px;
    font-size: 1rem;
    color: white;
    background-color: #3b3b3c;
    flex: 1;
}

#language-button {
    padding: 8px 15px;
    font-size: 14px;
    margin-left: 5px;
}

main {
    position: relative;
    top: 70px;
}


/***************************************** header *************************************/
#language-content,
#language-actions,
#header,
#navbar,
#navbar-list,
.navbar-list-el,
#navbar-logo  {
    display: flex;
    justify-content: center;
    align-items: center;
}

#header {
    position: fixed;
    width: 100%;
    height: var(--navbar-height-lg);
    padding: 0 10vh;
    gap: 16px;
    /* blurred background */
    background: var(--header-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#navbar {
    height: var(--navbar-height);
}

#navbar-list {
    list-style: none;
    gap: 16px;
}

.navbar-list-el {
    padding: 0 8px;
}

.navbar-list-el-link {
    font-size: 13px;
    color: var(--text-color);
    text-decoration: none;
    transition: .3s
}

#navbar-logo img {
    width: 15px;
}

.hamburger {
    display: none;
    z-index: 1001;
    padding: 0 10px;
}

#under-header {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height-lg);
    background-color: black;
}

/***************************************** general for sections *************************************/
.section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 76dvh;
    padding-top: 60px;
    margin-bottom: 12px;
    justify-content: space-between;
}

.section .hero-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.section h1 {
    font-size: 3.5rem;
    font-weight: 600;
}

.section h2 {
    width: 500px;
    font-size: 1.7rem;
    font-weight: 400;
    text-align: center;
    line-height: 1.7rem;
}

.button-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.hero-button {
    padding: 11px 21px;
    border-radius: 99px;
    text-decoration: none;
    font-size: 17px;
}

.button-normal {
    border: none;
    color: white;
    background-color: rgb(40, 126, 212);
}

.button-outline {
    border: solid 1px rgb(40, 126, 212);
    color: rgb(40, 126, 212);
    transition: .2s;
}

/***************************************** home *************************************/
#home {
    background-color: black;
}

#home h1, #home h2 {
    color: white;
}

#home img {
    width: 35dvh;
}

/***************************************** about *************************************/
#about {
    background-color: #f5f5f7;
}

#about h2 {
    font-weight: 400;
}

#about img {
    
    width: 45dvh;
}

/***************************************** projects *************************************/
#projects {
    padding: 0 12px;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(1, 1fr);
    grid-column-gap: 12px;
    grid-row-gap: 12px;
}

.project-box {
    padding: 40px 0 20px 0;
    background-color: #f5f5f7;
    height: 580px;
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.project-box .hero-container h1 {
    font-size: 2.5rem;
}

.project-box .hero-container h2 {
    font-size: 1.2rem;
    line-height: 1.4rem;
    font-weight: 500;
    width: 350px;
}

.project-box .hero-container .button-container {
    margin-top: 15px;
}

#iof-image {
    height: 50%;
}

#arduino-image {
    height: 50%;
}

@media screen and (max-width: 1069px) {
    .section {
        height: 71dvh;
    }

    .section h1 {
        font-size: 3rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    #home img {
        width: 28dvh;
    }

    #about img {
        width: 40dvh;
    }

    .project-box {
        height: 490px;
    }

    .project-box .hero-container h1 {
        font-size: 2rem;
    }

    .project-box .hero-container h2 {
        font-size: 1.2rem;
        font-weight: 400;
        width: 300px;
    }

    .project-box .hero-container .button-container {
        margin-top: 15px;
    }
}

@media screen and (max-width: 834px) {

    #language-container {
        height: 135px;
    }

    #language-content {
        flex-direction: column;
        align-items: start;
    }
    
    #language-content p,
    #language-actions {
        justify-content: start;
        width: 100%;
    }

    #language-select {
        max-width: 412px;
    }

    #language-close {
        position: absolute;
        right: 22px;
        top: 24px;
    }

    main {
        top: 135px;
    }

    /***************************************** header *************************************/
    #header {
        padding: 0;
        justify-content: space-between;
        height: var(--navbar-height-md);
    }

    #navbar {
        position: absolute;
        top: calc(-100dvh - 135px);
        left: 0;
        width: 100%;
        height: 100dvh;
        padding: 50px 48px 0;
        transition: .5s;
        background: rgba(19, 19, 19, 1);
        justify-content: start;
        align-items: flex-start;
        z-index: 999;
    }

    #navbar-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar-list-el-link {
        font-size: 1.8rem;
        font-weight: 600;
        color: white;
    }

    #navbar.active {
        top: 0;
        left: 0;
        transition: .5s;
    }

    #hamburger-open {
        display: block;
    }

    #under-header {
        height: var(--navbar-height-md);
    }
}

@media screen and (max-width: 768px) {
    .hero-button {
        padding: 7px 15px;
    }

    .section {
        padding-top: 40px;
        height: 55dvh;
    }

    .section h1 {
        font-size: 2rem;
    }

    .section h2 {
        font-size: 1rem;
        width: 300px;
    }
    
    #home img {
        width: 25dvh;
    }

    #about img {
        width: 30dvh;
    }

    .hero-button {
        font-size: 14px;
    }

    #projects {
        padding: 0;
        grid-template-columns: repeat(1, 1fr);
        grid-template-rows: repeat(4, 1fr);
        grid-column-gap: 12px;
        grid-row-gap: 12px;
    }

    .project-box {
        height: 500px;
    }
}

@media screen and (max-width: 320px) {
    .button-container {
        margin-top: 10px;
    }

    .hero-button {
        padding: 5px 10px;
        font-size: .9rem;
    }

    .section {
        padding-top: 20px;
    }

    .section  h1 {
        font-size: 1.7rem;
    }

    .section  h2 {
        font-size: 1rem;
    }

    #home img {
        width: 25dvh;
    }
}

@media (hover: hover) {

    #language-button:hover,
    #language-close:hover,
    .hamburger {
        
        cursor: pointer;
    }

    .navbar-list-el-link:hover {
        color: white;
        transition: .3s
    }

    .button-outline:hover {
        background-color: rgb(40, 126, 212);
        transition: .2s;
        color: white;
    }
}