* {
    margin: 0px;
    padding: 0px;
}

html {
    scroll-behavior: smooth;
}

nav {
    position: sticky;
    z-index: 1;
    top: 0px;
    height: 80px;
    background: linear-gradient(to right, #34CB88 0%, rgb(211, 247, 249, 0.7) 50%, rgb(211, 247, 249, 0.6) 60%, rgb(253, 196, 53, 0.85) 70%, rgba(253, 196, 53, 1) 100%);
}


a {
    text-decoration: none;
    -webkit-text-stroke: .4px #000;
}

a:link {
    color: #2BB8B3;
}

a:visited {
    color: #2BB8B3;
}

a:hover {
    color: red;
}

a:active {
    color: yellow;
}

nav>ul {
    margin-right: 30px;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 30px;
}

nav>ul>li:nth-child(2)>a,
nav>ul>li:nth-child(3),
nav>ul>li:nth-child(4)>a {
    position: relative;
}

nav>ul>li:nth-child(2)>a::before,
nav>ul>li:nth-child(3)::before,
nav>ul>li:nth-child(4)>a::before {
    display: block;
    content: "";
    position: absolute;
    width: 0%;
    height: 3px;
    bottom: 10px;
    left: 13px;
    background: linear-gradient(to right, #b92d2a, #8191d9);
    transition: width 0.3s ease;
}

nav>ul>li:nth-child(2)>a:hover::before,
nav>ul>li:nth-child(3):hover::before,
nav>ul>li:nth-child(4)>a:hover::before {
    width: 75%;
}

nav>ul>li:first-child {
    justify-self: left;
    margin-top: 16px;
    margin-left: 45px;
    margin-right: auto;
    font-family: "Poppins", sans-serif;
    color: #1e6d4b;
    background-color: transparent;
    font-size: 2.3rem;
    font-weight: 700;
    cursor: default;
}

nav>ul>li:first-child:hover {
    transform: none;
    box-shadow: none;
}

nav>ul>li:nth-child(3) {
    padding: 15px 20px;
    margin: 10px;
    border-radius: 15px;
    background-color: #fdc435;
    transition: transform 0.2s, box-shadow 0.2s;
}

nav>ul>li:nth-child(3):hover {
    transform: translateY(-1px) scale(1.005);
    box-shadow: 1px 1px 3px;
}

nav>ul>li {
    font-family: "Poppins", sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 15px;
    background-color: transparent;
    cursor: pointer;
}

nav>ul>li:not(:first-child)>a {
    display: inline-block;
    padding: 15px 20px;
    margin: 10px;
    border-radius: 15px;
    background-color: #fdc435;
    transition: transform 0.2s, box-shadow 0.2s;
}

nav>ul>li:not(:first-child)>a:hover {
    transform: translateY(-1px) scale(1.005);
    box-shadow: 1px 1px 3px;
}

.dropdown {
    display: none;
    position: absolute;
    list-style: none;
    top: 100%;
    left: 0;
    z-index: 10;
    min-width: 100%;
}

.dropdown li {
    margin: 0px;
    padding: 8px;
    border-radius: 0px;
    background-color: #9BCD56;
    white-space: nowrap;
}

.dropdown li a {
    color: #5b5b5b;
}

.dropdown li:hover {
    transform: translateY(-1px) scale(1.005);
    box-shadow: 1px 1px 3px;
}

#project_nav {
    position: relative;
    color: #2BB8B3;
    -webkit-text-stroke: .4px #000;
}

#project_nav:hover {
    color: red;
}

#project_nav:hover .dropdown {
    display: block;
}

.menu-toggle {
    display: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #1e6d4b;
    cursor: pointer;
    z-index: 100;
}

.top-div {
    margin-top: -80px;
    padding-top: 80px;
    height: 100vh;
    display: grid;
    grid-template-columns: 5fr 5fr;
    background-color: #0e312e;
    background-image: url(images/yellow-bg.png);
    background-repeat: no-repeat;
    background-position: right top;
}

.pic img {
    position: absolute;
    top: 120px;
    right: 140px;
    height: 50%;
    animation: heroAnimation 15s ease-in-out 1s infinite alternate;
}

@keyframes heroAnimation {
    0% {}

    20% {
        transform: translateX(1%) scale(1.02);
    }

    50% {
        transform: translateX(1%) translateY(1%);
    }

    80% {
        transform: rotate(1deg) translateX(-1%) translateY(-1%);
    }

    100% {
        transform: rotate(-1deg) translateX(1%) translateY(1%);
    }
}

.intro {
    padding: 120px 10px 0px 80px;
}

.intro h1 {
    font-family: "Inter", sans-serif;
    color: white;
    font-size: 5em;
    font-weight: 700;
}

.intro p {
    font-family: "Poppins", sans-serif;
    color: gray;
    font-size: 1.2rem;
    padding: 20px 0;
}

#github-btn {
    padding: 10px;
    border-radius: 10px;
    color: black;
    background-color: #e4b438;
    font-size: large;
    font-weight: 600;
    border: none;
    margin: 35px 15px 0px 10px;
    cursor: pointer;
}

#github-btn:hover {
    background-color: #d9b760;
    transform: translateY(1px) scale(1.005);
    box-shadow: 1px 1px 3px;
}

#linkedin-btn {
    padding: 10px;
    border-radius: 10px;
    color: white;
    background-color: transparent;
    font-size: large;
    font-weight: 600;
    border: none;
    margin: 35px 0px 0px 15px;
    border: 2px solid #e4b438;
    cursor: pointer;
}

#linkedin-btn:hover {
    background-color: #1b5c3f;
    transform: translateY(1px) scale(1.005);
    box-shadow: 1px 1px 3px;
}

.projects-div {
    padding: 80px 0px;
    background: linear-gradient(170deg, #0e312e, #488c82);
}

.heading {
    position: relative;
}

.heading>p {
    font-family: "Poppins", sans-serif;
    color: #C1996C;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0px 0px 0px 40%;
}

.heading>p::after {
    content: "";
    background-color: #19291A;
    position: absolute;
    bottom: 0px;
    left: 40.5%;
    width: 11.6rem;
    height: 3px;
}

.button-div {
    margin-top: 10px;
    padding-left: 70px;
}

.project-btn {
    padding: 10px 25px;
    border-radius: 18px;
    color: white;
    background-color: #2c333a;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    margin: 30px 5px 20px 5px;
    cursor: pointer;
}

.project-btn.active {
    background-color: red !important;
}

.project-btn:hover {
    background-color: #52adde;
    transform: translateY(1px) scale(1.005);
    box-shadow: 1px 1px 3px black;
}

.tiles-div {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 20px;
    padding: 10px;
    margin: 10px 0px;
    scroll-snap-type: x mandatory;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 350px;
    width: 300px;
    padding: 10px;
    background: linear-gradient(45deg, #9BCD56, #BFB220);
    border: 3px solid #438983;
    border-radius: 10px;
    scroll-snap-align: start;
}

.tile img {
    height: 80%;
    width: auto;
    border-radius: 10px;
}

.tile>p {
    font-family: "Poppins", sans-serif;
    color: #1A4C41;
    font-size: 22px;
    font-weight: 600;
    padding: 8px 0px;
}

.tile a {
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    padding: 3px 0px;
    color: rgb(85, 47, 255);

}

.tile a:hover {
    color: red;
}

footer {
    background: linear-gradient(55deg, #E6DC68, #438983);
    padding-top: 20px;
}

#contact {
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.social-btn {
    padding: 5px;
    background-color: #393e46;
    color: white;
    border-radius: 25%;
    border: none;
    font-size: 1.5rem;
    height: fit-content;
    cursor: pointer;
}

.social-btn:hover {
    transform: translateY(1px) scale(1.005);
    box-shadow: 1px 1px 3px;
}

#contact a {
    color: white;
}

.hidden {
    display: none;
}

.text {
    font-family: "Roboto", sans-serif;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 500;
}

@media only screen and (max-width: 600px) {
    .hidden {
        display: none;
    }

    nav {
        height: 60px;
        background: linear-gradient(to right, #34CB88 0%, rgb(211, 247, 249, 0.6) 70%, rgb(253, 196, 53, 0.7) 80%, rgba(253, 196, 53, 1) 100%);
    }

    a:link {
        color: white;
    }

    a:visited {
        color: white;
    }

    a:hover {
        color: white;
    }

    a:active {
        color: white;
    }

    #project_nav:hover {
        color: white;
    }

    .menu-toggle {
        display: block;
    }

    nav>ul {
        position: relative;
        margin-right: 0px;
        display: flex;
        flex-direction: column;
        margin-left: 75px;
        align-items: center;
        gap: 0px;
    }

    nav>ul>li:first-child {
        position: relative;
        left: -45px;
        justify-self: left;
        margin-top: 15px;
        margin-left: 0px;
        margin-right: auto;
        background-color: transparent;
        font-size: 1.4rem;
        font-weight: 700;
        cursor: default;
    }

    nav>ul>li:nth-child(2) {
        margin-top: 11px;
    }

    nav>ul>li:nth-child(2),
    nav>ul>li:nth-child(3),
    nav>ul>li:nth-child(4) {
        display: none;
    }

    nav>ul.menu-open>li:nth-child(2),
    nav>ul.menu-open>li:nth-child(3),
    nav>ul.menu-open>li:nth-child(4) {
        opacity: .92;
        ;
        display: block;
        text-align: center;
        width: 85%;
    }

    nav>ul>li:nth-child(2)>a,
    nav>ul>li:nth-child(3),
    nav>ul>li:nth-child(4)>a {
        font-size: 1.2rem;
    }

    nav>ul>li:nth-child(2)>a::before,
    nav>ul>li:nth-child(3)::before,
    nav>ul>li:nth-child(4)>a::before {
        background: none;
        transition: none;
    }

    nav>ul>li:nth-child(3) {
        padding: 5px 10px;
        margin: 0px;
        border-radius: 0%;
        background-color: #7ac28a;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    #project_nav {
        position: relative;
        right: -10px;
        color: #ffffff;
        -webkit-text-stroke: .4px #000;
    }

    nav>ul>li {
        font-family: "Poppins", sans-serif;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 15px;
        background-color: transparent;
        cursor: pointer;
    }

    nav>ul>li:not(:first-child)>a {
        display: inline-block;
        width: 100%;
        padding: 5px 10px;
        margin: 0px;
        border-radius: 0px;
        background-color: #7ac28a;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .dropdown {
        display: none;
        position: relative;
        list-style: none;
        top: 100%;
        left: 0;
        z-index: 10;
        min-width: 100%;
    }

    .dropdown li {
        margin: 0px;
        padding: 10px;
        border-radius: 0px;
        background-color: #9BCD56;
        white-space: nowrap;
    }

    .top-div {
        margin-top: 0;
        padding-top: 20px;
        height: auto;
        min-height: 90vh;
        display: flex;
        flex-direction: column;
        background-color: #0e312e;
        background-image: url(images/yellow-bg.png);
        background-repeat: no-repeat;
        background-position: right top;
        background-size: contain;
    }

    .intro {
        padding: 65px 20px;
        order: 2;
    }

    .intro h1 {
        font-size: 2.6em;
    }

    .intro p {
        font-size: 1rem;
    }

    .pic {
        order: 1;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
    }

    .pic img {
        position: relative;
        top: -10px;
        right: -40px;
        height: auto;
        max-width: auto;
        max-height: 240px;
    }

    #github-btn,
    #linkedin-btn {
        margin: 15px 10px;
        font-size: medium;
        padding: 8px 15px;
    }

    .projects-div {
        padding: 40px 0px;
        background: linear-gradient(170deg, #0e312e, #488c82);
    }

    .heading>p {
        font-family: "Poppins", sans-serif;
        color: #C1996C;
        font-size: 2.5rem;
        font-weight: 700;
        margin: 0px 0px 0px 25%;
    }

    .heading>p::after {
        content: "";
        background-color: #19291A;
        position: absolute;
        bottom: 0px;
        left: 26.7%;
        width: 11.6rem;
        height: 3px;
    }

    .button-div {
        margin-top: 20px !important;
        padding-left: 0px !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }

    .project-btn {
        padding: 8px 15px !important;
        font-size: 0.85rem !important;
        margin: 5px 10px !important;
    }

    .tile a:hover {
        color: white;
    }
}

@media only screen and (max-width: 926px) and (max-height: 520px) and (orientation: landscape) {
    body {
        overflow: hidden;
    }

    body::before {
        content: "Please rotate your device to portrait mode";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #0e312e;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-family: "Poppins", sans-serif;
        font-size: 1.5rem;
        padding: 20px;
        z-index: 9999;
    }

    main,
    nav,
    footer {
        display: none !important;
    }
}