
html {
    font-family: "Nunito", sans-serif;
}
body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
}
a {
    text-decoration: none;
}
ul {
    padding: 0;
    margin: 0;
}
li {
    list-style: none;
    margin: 0;
}
li, h1, h2, h3, h4, p {
    margin: 0;
}
header {
    position: fixed;
    top: 0;
    transition: top 0.3s;
    z-index: 2;
    background-color: white;
    width: 100%;
    border-bottom: 2px solid rgb(242, 242, 242);
}
.desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 100px 20px 100px;
}
.mobile-header {
    display: none;
}
.header-hidden {
    top: -92px; 
}
.logo, .logo img{
    width: 50px;
    height: 50px;
}
.desktop-menu {
    display: flex;
}
.desktop-menu li {
    padding-left: 20px;
}
.desktop-menu li a {
    color: black;
    font-size: 18px;
    font-weight: 300;
}
#active {
    border-bottom: 1px solid black;
    font-weight: bold;
}
main {
    flex: 1;
}
.works {
    padding-top: 100px;
}
.work {
    padding: 50px 100px 0 100px;
    display: flex;
}
.image-wrapper {
    overflow: clip;
    width: 600px;
    height: 500px;
}
.image-wrapper img {
    width: 600px;
    height: 500px;
    transition: transform 0.3s ease;
}
.image-wrapper:hover img {
    transform: scale(1.06);
}
.work section {
    margin-top: -9px;
    height: 500px;
    padding-left: 60px;
}
.work-name {
    font-size: 32px;
}
.work-description {
    padding-top: 20px;
    font-size: 18px;
}
.work-details {
    padding-top: 60px;
}
.work-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.work-detail p {
    font-size: 18px;
    padding-left: 4px;
}
button {
    font-size: 18px;
    width: 300px;
    height: 50px;
    background-color: white;
    font-weight: 800;
    font-family: "Nunito", sans-serif;
    border-radius: 25px;
    margin-top: 34px;
    cursor: pointer;
}
.work-color-4 {
    color: rgb(64, 144, 117)
}
.neurophysiologicalsignals-button {
    border: 2px solid rgb(64, 144, 117);
    color: rgb(64, 144, 117);
    transition: background-color 0.3s ease, color 0.3s ease;
}
.neurophysiologicalsignals-button:hover {
    background-color: rgb(64, 144, 117);
    color: white;
}
footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin: 50px 100px 0 100px;
    border-top: 2px solid rgb(240, 240, 240);
    padding: 20px 0 12px 0;
    color: rgb(110, 110, 110);
    font-size: 12px;
    position: relative;
}
.footer-designer-part {
    position: absolute;
    left: 0;
}
.footer-my-name {
    padding-left: 3px;
    color: black;
}

@media (max-width: 1200px) {
    .work {
        flex-direction: column;
        align-items: center;
        padding-top: 0;
    }
    .image-wrapper, .image-wrapper img {
        width: calc(100vw - 200px);
        height: auto;
    }
    .work section {
        margin-top: 40px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-left: 0;
    }
    .work section a {
        align-self: center;
    }
    footer {
        margin-top: 0;
    }
    body {
        overflow-x: hidden;
        width: 100%;
    }
}

@media (max-width: 720px) {
    .body-hidden {
        overflow-y: hidden;
    }
    .desktop-header {
        display: none;
    }

    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: calc(100vw - 40px);
        z-index: 3; /* Ensure header is above nav */
    }

    .mobile-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        background-color: white;
        z-index: 2;
        padding: 20px 0;
        position: relative; /* Anchor for absolute nav */
    }

    .mobile-header nav {
        position: absolute;
        top: 70px; /* Place below header content */
        left: 0;
        right: 0;
        background-color: white;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transform: scaleY(0);
        transform-origin: top;
        transition: opacity 0.3s ease, max-height 0.3s ease, transform 0.3s ease;
        z-index: 1;
    }

    .mobile-header nav.hidden {
        opacity: 1;
        max-height: calc(100vh - 70px);
        transform: scaleY(1);
    }

    .header-content a {
        cursor: pointer;
        height: 50px;
    }

    label {
        position: relative;
    }

    input[type="checkbox"] {
        position: absolute;
        right: -2px;
        z-index: 4; /* Ensure checkbox is clickable */
        width: 30px;
        height: 30px;
        top: -18px;
        cursor: pointer;
        opacity: 0;
    }

    .bar {
        position: absolute;
        cursor: pointer;
        display: flex;
        justify-content: center;
        top: 20px;
        right: 0;
    }

    .bar .middle, .bar .top, .bar .bottom {
        height: 3px;
        width: 28px;
        border-radius: 50px;
        position: absolute;
        transition: 0.3s ease;
        background-color: black;
    }

    .bar .middle {
        top: -20px;
        right: 2px;
    }

    .bar .top {
        bottom: 30px;
        right: 2px;
    }

    .bar .bottom {
        top: -8px;
        right: 2px;
    }

    input[type="checkbox"]:checked ~ .bar .top {
        transform: rotate(-45deg);
        width: 40px;
        transform-origin: middle;
        top: -22px;
        right: -4px;
    }

    input[type="checkbox"]:checked ~ .bar .bottom {
        width: 40px;
        transform: rotate(45deg);
        transform-origin: middle;
        top: -22px;
        right: -4px;
    }

    input[type="checkbox"]:checked ~ .bar .middle {
        opacity: 0;
    }

    .mobile-menu-list {
        margin: 0;
        padding: 0;
        width: 100vw;
        height: calc(100vh - 70px);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .mobile-menu-list-item {
        text-align: center;
        padding: 20px;
    }

    .mobile-menu-list-item a {
        font-size: 18px;
        font-weight: 300;
        width: calc(100vw - 40px);
        color: black;
    }

    .image-wrapper {
        display: flex;
        justify-content: center;
        width: calc(100vw - 40px);
    }

    .image-wrapper img {
        width: calc(100vw - 40px);
        height: auto;
    }
    .work {
        padding: 20px;
    }

    .work section {
        padding-left: 0;
    }
    .neurophysiologicalsignals-image {
        content: url(../images/neurophysiologicalsignals-small.webp);
    }
    footer {
        flex-direction: column;
        padding-top: 10px;
        margin: 0 20px;
    }

    .footer-designer-part {
        position: relative;
    }

    .copy-right {
        padding-top: 10px;
    }

    body {
        overflow-x: hidden;
        width: 100%;
    }
}
