:root {
    --color-ivory: #F9F9ED;
    --color-green: #1E3C2D;
    --color-light-green: #7C9F72;
    --color-yellow-green: #DBF4A7;
    --color-brown: #1F1300;
    --color-gray: #9E9B9D;
    --color-red: #FAA300;
    --font-title: 'Bebas Neue', 'Quicksand', helvetica;
    --font-body: 'Quicksand', helvetica;
}

html {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Manrope', sans-serif;
}

a:visited {
    text-decoration: none;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Manrope', sans-serif;
    text-decoration: none;
}

body {
    background-color: var(--color-green);
    height: 200vh;
}

p {
    font-size: min(max(3vw, 14px), 18px);
}

.content {
    align-items: center;
    margin: auto;
    width: min(max(80vw, 200px), 800px);
    background-color: transparent;
}

.subt {
    font-size: min(max(5vw, 26px), 32px);

    margin-bottom: 3vh;
    color: var(--color-ivory);

    display: flex;
    align-items: center;
    width: 100%;

    align-self: flex-start;
}

.subt::after {
    content: '';
    height: 1px;
    flex: 1 1;
    background: var(--color-red);
    margin-left: 10px;
    display: block;
    position: relative;
    box-sizing: border-box;
}

.contact_sidelink {
    height: 40%;
    writing-mode: vertical-rl;

    position: fixed;
    right: 4vw;
    bottom: 0;

    display: flex;
    align-items: center;

    z-index: 0;

    text-decoration: none;
    color: var(--color-yellow-green);
}

.contact_sidelink::after {
    content: '';
    background: var(--color-ivory);

    width: 1px;
    flex: 1 1;

    display: block;
    position: relative;
    margin-top: 10px;
}

/* Navigation Section*/

.sidenav-header {
    height: 15vh;
    max-height: 120px;
    min-height: 75px;
    padding: 5vh 5vw;
    margin-top: max(2vh, 8px);
    margin-bottom: max(3vh, 10px);
}

.sidenav {
    height: 100%;
    width: 0%;
    position: fixed;
    z-index: 2;
    top: 0;
    right: 0;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: min(10vh, 20px);
    background-color: var(--color-light-green);
}

.menu-btn {
    position: absolute;
    z-index: 4;
    right: 4vw;
    top: 4vw;
    cursor: pointer;
    transition: all 0.5s ease-out;
}

.menu-btn .btn-line {
    width: 7vw;
    height: 0.5vw;
    margin: 0 0 2.5vw 0;
    transition: all 0.5s ease-out;
    background-color: var(--color-yellow-green);
    border-radius: 4500px;
}

.menu-btn.close {
    transform: rotate(180deg);
}

.menu-btn.close .btn-line:nth-child(1) {
    transform: rotate(45deg) translate(4vw, 4vw);
}

.menu-btn.close .btn-line:nth-child(2) {
    opacity: 0;
}

.menu-btn.close .btn-line:nth-child(3) {
    transform: rotate(-45deg) translate(0.2vw, -0.2vw);
}

.sidenav a {
    padding: 3vh;
    text-decoration: none;
    font-size: 5vw;
    display: block;
    transition: 0.3s;
    color: var(--color-yellow-green);
    text-align: center;
}

.sidenav p:hover {
    color: var(--color-red);
}

.sidenav p {
    padding: 0;
    margin: 0;
    color: white;

    font-size: 24px;
}

#CV_button {
    color: var(--color-red);
}

.overlay {
    background-color: rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: 1;
    transition: background-color 0.5s, transform 0.3s;
    overflow: hidden;
}

.noscroll {
    height: 100vh;
    overflow: hidden;
}

/* Hero Section */
.hero__section {
    height: 85vh;
    min-height: 400px;
    background-color: transparent;
    padding: 0;
    color: var(--color-ivory);
}

.hero__wrapper {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
}

.column__left {
    padding-top: 10vh;
    padding-bottom: 10vh;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: flex-start;
}

.column__left h1 {
    font-size: min(max(11vw, 30px), 75px);
    padding: 20px 0;
}


.column__left p {
    font-size: min(6vw, 25px);
    line-height: 3vh;
    color: var(--color-yellow-green);
}

.column-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.column__left span {
    color: black;
    font-family: monospace;
}

/* About Me Section */
.about-me {
    height: 100vh;
    min-height: 750px;
    padding: 0;

    text-align: left;
    color: var(--color-ivory);

    display: flex;
    align-items: center;
}

.about-me p {
    margin-top: 1vh;
}

.skills {
    font-size: min(max(4vh, 22px), 13px);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 2vh;
    margin-left: 30px;
    color: var(--color-yellow-green);
}

.picture-section {
    display: block;
    margin: auto;
    text-align: center;
    padding-top: 0vh;
}

.picture-container {
    display: inline-block;
    position: relative;
    z-index: 0;
    margin-top: 1vh;
}

.picture-container::after {
    content: '';
    position: absolute;
    border: solid 2px var(--color-yellow-green);
    box-sizing: border-box;
    width: max(min(20vw, 300px), 180px);
    height: max(min(20vw, 300px), 180px);
    border-radius: 4px;
    display: block;
    transition: all 0.3s ease-in;

    left: 10%;
    top: 10%;
    z-index: -1;
}

.picture-container:hover::after {
    transform: translate(-5%, -5%);
    transition: all 0.3s ease-in;
}

.portrait {
    width: max(min(20vw, 300px), 180px);
    height: auto;
    display: block;
    margin: auto;
    z-index: 1;

    filter: grayscale(100%);
    border-radius: 4px;
    border: solid 2px var(--color-light-green);
}



/* Project Section */

.project_section {
    height: 100vh;
    min-height: 500px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: var(--color-ivory);
}

.carousel_container {
    background-color: transparent;

    height: 50%;
    min-height: 360px;
    width: 100%;

    box-sizing: border-box;
}

.carousel {
    background-color: transparent;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    scroll-snap-type: x mandatory;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.item.active {
    overflow-y: scroll;
    scroll-behavior: smooth;
}

.item.text_color p {
    color: var(--color-ivory);
}

.item {
    background-color: var(--color-light-green);
    width: 95%;
    max-width: 265px;
    box-sizing: border-box;
    margin-right: 2%;
    margin-top: 20px;
    margin-bottom: 50px;
    padding: 0 5%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
    flex-shrink: 0;
    scroll-snap-align: start;
    overflow-y: hidden;
    transition: all 0.1s ease-in;
}

.item:hover {
    transform: translate(0, -5px);
    cursor: pointer;
}

.item_title {
    background-color: var(--color-light-green);
    width: 100%;
    height: 15%;
    min-height: 60px;
    overflow-y: hidden;
    padding-top: 5%;

    position: -webkit-sticky;
    position: sticky;
    box-sizing: border-box;
    top: 0;

    font-size: min(3vw, 14px);

    color: var(--color-yellow-green);

}

.item_content {
    height: 85%;
}

.project_skills {
    background-color: transparent;
    height: 100%;
}

.project_skills ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-left: 0px;
    margin-top: 0;
    color: var(--color-yellow-green);
    list-style: none;
}

.project_skills ul img {
    width: 75px;
    height: 50px;
    margin-bottom: 10px;
}

.project_skills h3 {
    margin-top: 0;
    padding-bottom: 2vh;
    color: #DBF4A7;
}

.item p {
    margin-top: 0;
    color: transparent;
    font-size: 14px;
}

/* Contact Section */
*,
*:before,
*:after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.contact_section {
    height: 100vh;
    min-height: 700px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 25%;
}

.contact_container {
    width: 100%;
    box-sizing: border-box;
}

.screen {
    position: relative;
    background: var(--color-light-green);
}

.screen:after {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    bottom: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
    z-index: -1;
}

.screen-body {
    display: flex;
}

.screen-body-item {
    flex: 1;
    padding: 50px;
}

.screen-body-item.left {
    display: flex;
    flex-direction: column;
    flex: 0.4 1;
}

.socials {
    padding-top: 10px;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.socials svg:hover {
    color: var(--color-yellow-green);
}

.socials a,
svg {
    color: var(--color-brown);
    text-decoration: none;
}

.socials a {
    padding-top: 10px;
}

.app-title {
    display: flex;
    flex-direction: column;
    position: relative;
    color: var(--color-yellow-green);
    font-size: 26px;
    margin-bottom: 20px;
}

.app-title:after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 25px;
    height: 4px;
    background: var(--color-red);
}



/* Media queries */
@media screen and (min-width: 600px) {

    .menu-btn,
    .sidenav,
    .overlay,
    .sidenav-header {
        display: none;
    }

    header {
        /*background-color: yellow;*/
        background-color: rgb(30, 60, 45, 0.9);
        box-sizing: border-box;
        height: 15vh;
        max-height: 120px;
        min-height: 75px;
        padding: 5vh 5vw;
        margin-top: max(2vh, 8px);
        margin-bottom: max(3vh, 10px);
        position: relative;
        z-index: 2;
        top: 0;
        right: 0;
        font-size: min(2vw, 20px);
    }

    .topnav {
        /*background-color: red;*/
        float: right;
        display: flex;
    }

    .topnav ul {
        /*background-color: pink;*/
        margin: 0;
        padding: 0;
    }

    .topnav li {
        /* background-color: green; */
        display: inline-block;
        padding: 14px 16px;
        overflow: hidden;
    }

    .topnav li:hover,
    li:hover a {
        /*background-color: red;*/
        color: var(--color-red);
    }

    .topnav a,
    a:visited {
        text-decoration: none;
        color: var(--color-ivory);
    }


    #cv {
        border-style: solid;
        padding: 12px 14px;
        border-width: 2px;
        border-radius: 30%;
        border-color: var(--color-light-green);
    }

    #cv:hover {
        background-color: rgb(0, 0, 0, 0.1);
    }
}

@media screen and (max-width: 600px) {

    header,
    .contact_sidelink {
        display: none;
    }

    .hero-section {
        height: 100vh
    }

    /* Contact Section */
    .screen-body {
        flex-direction: column;
    }

    .screen-body-item.left {
        margin-bottom: 30px;
        flex-direction: row;
    }

    .socials {
        flex-direction: row;
        flex: 1 1;
        justify-content: flex-end;

        padding-top: 0;
    }

    .socials a {
        padding-left: 10px;
        padding-top: 0;
    }

    .app-title {
        flex-direction: row;
    }

    .app-title span {
        margin-right: 5px;
        white-space: nowrap;
    }

    .app-title:after {
        display: none;
    }

    .screen-body {
        padding: 20px;
    }

    .screen-body-item {
        padding: 0;
    }
}

@media screen and (max-width: 600px) {

    /* Project Section */
    .carousel_container {
        height: auto;
        /* Remove fixed height */
        min-height: auto;
        /* Remove fixed min-height */
    }

    .carousel {
        flex-direction: column;
        /* Stack items vertically */
    }

    .item {
        margin-bottom: 20px;
        /* Add margin between items */
    }

    .project_skills ul {
        grid-template-columns: repeat(2, 1fr);
        /* Adjust grid columns */
        margin-left: 0;
        margin-top: 0;
    }

    .item_content {
        padding: 0;
        /* Remove padding */
    }

    .item_title {
        height: auto;
        /* Remove fixed height */
    }

    .item p {
        margin-top: 10px;
        /* Add spacing between project descriptions */
        color: var(--color-ivory);
        /* Ensure text is visible */
    }

    /* Adjust other sections as needed */
    .about-me,
    .contact_section {
        padding: 20px;
        /* Add padding to sections */
    }

    .hero__section {
        height: auto;
        /* Remove fixed height */
        min-height: auto;
        /* Remove fixed min-height */
        padding: 20px 0;
        /* Add padding */
    }

    .hero__wrapper {
        flex-direction: column;
        /* Stack columns vertically */
        align-items: center;
        /* Center content */
    }

    .column__left {
        padding: 0;
        /* Remove padding */
        text-align: center;
        /* Center text */
    }

    .column__left h1 {
        font-size: 28px;
        /* Adjust font size */
    }

    .column__left p {
        font-size: 16px;
        /* Adjust font size */
        line-height: 1.5;
        /* Adjust line height */
    }

    .picture-container::after {
        width: 100%;
        /* Adjust width */
        height: auto;
        /* Adjust height */
    }

    .portrait {
        width: 100%;
        /* Adjust width */
        max-width: 200px;
        /* Add max-width */
    }
}