@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,700&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    list-style: none;
}

html {
    scroll-behavior: smooth;
}


.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 12px;
    background: #303030;
    background-color: #303030;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between; /* Ensure space between logo and button */
    align-items: center; /* Center both items vertically */
    z-index:10;
}

.logo {
    font-size: 25px;
    color: white;
    font-weight: 600;
    transition: 0.3s ease;
    text-align: left; /* Align logo to the left */
}

.dark-mode {
    display: none;
}

.logo:hover {
    color: #5f9ea0;
    text-shadow: 0 0 25px #5f9ea0, 0 0 25px #5f9ea0;
    transform: scale(1.1);
}

span {
    color: #5f9ea0;
}

.navbar a {
    font-size: 18px;
    color: white;
    font-weight: 500;
    margin: 0 20px;
    border-bottom: 3px solid transparent;
    transition: 0.3s ease;
}

nav.navbar {
    margin-left: -3.6%;
}

/*.navbar a.active,*/
.navbar a:hover {
    color: #5f9ea0;
    border-bottom: 3px solid #5f9ea0;
}

/* Adjustments for the reused .contact button as the light mode button */
.contact {
    padding: 8px 16px; /* Smaller button size */
    background-color: white;
    color: black;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 14px; /* Smaller text size */
    font-weight: 600;
    letter-spacing: 1px;
    transition: 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center; /* Vertically center the button */
}

.contact:hover {
    background-color: #5f9ea0;
    box-shadow: 0 0 25px #5f9ea0;
    color: white;
}

.home {
    width: 100%;
    min-height: 100vh;
    background: #202324;
    display: flex;
    align-items: center;
    gap: 7em;
    padding: 30px 12% 0;
}

.home-content {
    max-width: 800px;
    color: white;
}

.home-content h3 {
    font-size: 42px;
}

.home-content h1 {
    font-size: 62px;
    line-height: 1.2;
}

.home-content p {
    font-size: 18px;
    margin: 25px 0 30px;
}

.btn-box {
    width: 345px;
    display: flex;
    gap: 2em;
}

.btn-1 {
    padding: 15px 28px;
    background-color: black;
    color: white;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: 600;
    transform: 0.3 ease;
    cursor: pointer;
}

.btn-1:hover {
    background-color: white;
    color: black;
    border: 2px solid black;
    box-shadow: 0 0 25px rgb(0, 0, 0);
}

.btn-2 {
    padding: 15px 28px;
    background-color: #5f9ea0;
    color: white;
    border: 3px solid #3f6c6d;
    border-radius: 8px;
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: 600;
    transform: 0.3 ease;
    cursor: pointer;
}

.btn-2:hover {
    background-color: white;
    color: #5f9ea0;    
    box-shadow: 0 0 25px #5f9ea0;
}

/* Padding added to prevent image from sticking to the navbar */
.img-box {
    padding-top: 80px; /* Adjust this value if needed */
}

.img-box img {
    border-radius: 8px;
    width: clamp(230px, 100%, 350px);
    height: auto;
    display: block;
    margin: 0 auto;
}
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 10;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Poppins",Arial, sans-serif;
}

.projects-section {
    width: 100%;
    min-height: 82vh;
    display: flex;
    align-items: center;
    gap: 7em;
    padding: 30px 12% 0;
    
    
    padding: 50px 20px;
    padding-top: 40px;
    color: #303030;
    background: linear-gradient(135deg, #09252d, #00516a); /* Gradient background */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 36px;
    margin-bottom: 40px;
    color: #fff;
    font-weight: bold;
}

/* Project Grid */
.projects-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    align-items: stretch; /* Ensures all items are of equal height */
}

.project-card {
    background-color: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.1);
    width: calc(50% - 20px); /* Adjust to 50% width for larger screens */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border: #fff 3px solid;
    display: flex;
    flex-direction: row;
    text-align: center;
    height: clamp(200px, 15vw,250px);
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
}

.project-image {
    width: 70%; /* Adjust image width */
    height: 100%;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    width: 40%;
}

.project-title {
    font-size: 24px;
    margin-bottom: 5px;
    color: #303030;
    line-height:1em;
}

.project-description {
    font-size: clamp(0.5vw, 0.8vw, 16px);
    color: #555;
    margin-bottom: 20px;
}

.project-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #303030;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    width: fit-content;
    margin: 0 auto;
}

.project-link:hover {
    background-color: #555;
}

/* Responsive adjustments for mobile */
@media (max-width: 1200px) {
    .projects-grid {
        flex-direction: column;
        align-items: center;
    }

    .project-card {
        width: 100%;
        flex-direction: column;
        height: auto;
    }

    .project-image img {
        border-radius: 0;
    }

    .container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    }

    .section-title {
        content: "Projects";
        font-size: 36px;
        margin-bottom: 50px;
        color: #fff;
        font-weight: bold;
    }

    .projects-grid {
        display: flex;
        justify-content: center;
        gap: 30px;
        flex-wrap: wrap; /* Responsive layout */
    }

    .project-card {
        background-color: #ffffff;
        border-radius: 15px; /* Rounded corners */
        overflow: hidden;
        box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow */
        /*width: 300px; /* Card size */
        width: calc(80% - 20px); /* Adjust to 50% width for larger screens */
        max-width: 500px;
        transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    }

    .project-card:hover {
        transform: translateY(-10px); /* Lift on hover */
        box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2); /* Stronger shadow */
    }

    .project-card img {
        width: 143%;
        object-position: center;
        height: 180px; /* Image height */
        object-fit:cover; /* Cover image within container */
    }

    .project-content {
        padding: 0px 20px 20px 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
    }

    .project-title {
        font-size: 22px;
        margin-top: 0px;
        margin-bottom: 0px;
    }

    .project-description {
        font-size: 16px;
        color: #555;
        margin-top: 5px;
        margin-bottom: 20px;
    }

    .project-link {
        display: inline-block;
        padding: 10px 20px;
        background-color: #333;
        color: #fff;
        text-decoration: none;
        border-radius: 5px;
        transition: background-color 0.3s ease;
        margin: 0 auto;
    }

    .project-link:hover {
        background-color: #555;
    }
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: white;
}
.nav-menu {
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 40px; /*DEFAULT IS 60px*/
}

@media (max-width: 768px) {
    .right-side-nav{
        display: flex;
        flex-direction: row; /* Ensure items are next to each other */
        gap: 20px; /* Adjust the gap between items if needed */
        align-items: center; /* Vertically center the items */
    }
    .nav-menu {
        position: fixed;
        top: -400%;
        left: 0;
        gap: 0;
        flex-direction: column;
        background-color: #3b3b3b;
        width: 100%;
        text-align: center;
        /*transition: 0.3s;*/
        display:flex;
        z-index: 10;
    }
    .nav-item {
        margin: 16px 0;
    }
    .nav-item a{
        color: white;
    }
      .nav-item.active {
        margin: 16px 0;
        animation: fadeIn 5s;
    }
    .nav-menu.active {
        left: 0;
        top: 76px;
        /*transition: 0.3s;*/
    }
    .hamburger {
        display: block;
    }
      .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
      .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
      .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .navbar {
        display: none; /* Hide the navbar for smaller screens */
    }

    .header {
        flex-direction: row;
        padding: 10px;
        z-index:10;
    }

    .home {
        flex-direction: column;
        padding: 20px 5%;
        gap: 2em;
    }

    /* Move the image above the headlines */
    .home {
        flex-direction: column-reverse;
    }

    .home-content h1 {
        font-size: 42px;
    }

    .home-content h3 {
        font-size: 32px;
    }

    .home-content p {
        font-size: 16px;
    }

    .btn-box {
        flex-direction: column;
        width: 100%;
        gap: 1em;
    }

    .img-box img {
        width: 100%;
        scale: 1;
    }
    
    .contact img.dark-mode {
        padding: 0;
        margin: 0;
        width: 20px;
        height: 20px;
        display: inline;
        scale:1.8;    
    }
    .contact p{
        display:none;
    }
    .contact{
        scale:0.8;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 15px 10px;
    }

    .logo {
        font-size: 30px;
    }

    .home-content h1 {
        font-size: 32px;
    }

    .home-content h3 {
        font-size: 24px;
    }

    .home-content p {
        font-size: 14px;
    }

    .btn-box {
        width: 100%;
        flex-direction: column;
    }

    .img-box img {
        width: 100%;
        scale: 1;
    }
}

.footer {
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 30px 0;
    background-color: black;
}

.footer .social {
    text-align: center;
    padding-bottom: 25px;
    color: white;
}

.footer .social a {
    font-size: 24px;
    color: white;
    border: 2px solid #5f9ea0;
    width: 40px;
    height: 40px;
    line-height: 38px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin: 0 8px;
    box-shadow: inset 0 0 10px #5f9ea0, 0 0 10px #5f9ea0;
    transition: 0.3s ease;
}

.footer .social a:hover{
    transform: scale(1.2)translateY(-10px);
    color: #5f9ea0;
    border: 2px solid #5f9ea0;
}

.footer ul {
    margin-top: 0;
    padding: 0;
    font: 18px;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
}

.footer ul li a{
    color: white;
    border-bottom: 3px solid transparent;
    transition: 0.3s ease;
}

.footer ul li a:hover{
    border-bottom: 3px solid #5f9ea0;
}

.footer ul li{
    display: inline-block;
    padding: 0 15px;
}
.footer .copyright{
    margin-top: 15px;
    text-align: center;
    font-size: 12px;
    color: white;
}

::-webkit-scrollbar{
    width: 15px;
}

::-webkit-scrollbar-thumb{
    background-color: #5f9ea0;
}

::-webkit-scrollbar-track{
    background-color: rgba(0, 0, 0, 0.6);
}