* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #6C7476;
    background: radial-gradient(circle,rgba(108, 116, 118, 1) 31%, rgba(82, 92, 91, 1) 60%, rgba(107, 125, 133, 1) 100%);
    overflow-x: hidden; /* Stops the whole webpage from scrolling sideways */
}

:root {
    --section-font: 18px;
    --section-color: rgba(255, 252, 252, 0.601);
    --heading-font: 36px;
    --margin-bottom: 8px;
    --mp-margin: 20px;
    --mp-padding: 10px 20px 60px 20px;
}

.para {
    font-size: var(--section-font);
    color: var(--section-color);
}

.heading {
    font-size: var(--heading-font);
    color: var(--section-color);
    margin-bottom: var(--margin-bottom);
}

.mp {
    padding: var(--mp-padding);
    margin: var(--mp-margin);
}

.poppins-light {
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.poppins-regular {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.container {
    width: 100vw;
    max-width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    height: 140px;
}

.navlist {
    list-style: none;
    display: flex;
    gap: 30px;
}

.navlist a {
    text-decoration: none;
    color: rgb(200, 200, 200);
    font-size: 18px;
    margin-left: 20px;
    font-family: 'Poppins', sans-serif;
}

.logo img {
    width: 250px;
    cursor: pointer;
}

#Home {
    text-align: center;
    margin: 160px;
}

#Home h1 {
    font-size: 60px;
    margin-top: 10px;
    margin-bottom: 20px;
    color: #f6f6f692;
}

#heading {
    font-family: "Lexend Zetta", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
}

#hemant {
    font-family: "Allura", cursive;
    font-weight: 400;
    font-style: normal;
}

#Home p {
    font-size: 24px;
}

#About {
    margin-top: 190px;
}

#cv a {
    color: #c3c3c3;
    font-size: 18px;
}

#Contact {
    margin-top: 80px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-direction: column;
    border-top: 1px dotted #e0e0e0bb;
    background-color: rgba(98, 98, 99, 0.322);
    color: rgba(255, 252, 252, 0.601);
    height: 31vh;
}

#Contact ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

#Contact ul li img {
    width: 40px;
    cursor: pointer;
}

#Contact a {
    color: rgba(255, 252, 252, 0.601);
}

.projects-flex {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 0;
    list-style: none;
}

/* Fix: Only target the main project cards, not the image lists inside them */
.projects-flex > li {
    background: rgba(255, 255, 255, 0.722);
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(161, 161, 161, 0.75);
    color: black;
}

.project-container {
    transition: transform 0.3s ease-in-out;
}

.project-container:hover {
    transform: scale(1.02);
}

/* =========================================
   UNIVERSAL HORIZONTAL SCROLLING FOR APPS
   ========================================= */

.project-img, 
.project-img1 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* FORCES horizontal layout */
    overflow-x: auto !important; /* FORCES the scrollbar/swipe */
    gap: 15px;
    padding: 10px 0 20px 0;
    margin: 0;
    width: 100%;
    -webkit-overflow-scrolling: touch; /* Smooth swiping on iOS */
    scrollbar-width: thin; /* Shows a minimal scrollbar */
}

/* Hide the ugly default scrollbar on Chrome/Safari but keep it functional */
.project-img::-webkit-scrollbar,
.project-img1::-webkit-scrollbar {
    height: 6px;
}
.project-img::-webkit-scrollbar-thumb,
.project-img1::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

/* The wrappers holding the images */
.project-img li, 
.project-img1 li {
    flex: 0 0 auto !important; /* CRITICAL: Absolutely refuses to squish */
    width: 200px !important; 
    background: transparent;
    list-style: none;
    padding: 0;
    box-shadow: none;
}

/* The actual mobile app screenshots */
.project-img img, 
.project-img1 img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    object-position: top;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0;
}

.contact li img {
    width: 40px;
    transition: transform 0.3s ease;
}

.contact li img:hover {
    transform: scale(1.1);
    cursor: pointer;
}

/* =========================================
   MEDIA QUERIES (Mobile Adjustments)
   ========================================= */

@media (max-width: 768px) {
    nav {
        height: 100px;
        padding: 0 15px;
        flex-direction: row; /* This forces the logo and links to stay side-by-side */
        justify-content: space-between;
        align-items: center;
    }

    .logo img {
        width: 180px; /* Scaled down so the nav links have room */
    }

    .navlist {
        flex-direction: row;
        flex-wrap: nowrap; /* Prevents links from dropping to the next line */
        gap: 15px;
    }

    .navlist a {
        font-size: 14px; /* Slightly smaller font to fit the screen */
        margin-left: 0;
    }

    #Home {
        margin: 60px 20px;
    }

    #Home h1 {
        font-size: 36px;
    }

    #Home p {
        font-size: 18px;
    }

    #About {
        margin-top: 60px;
    }

    #Contact {
        height: auto;
        padding: 30px 10px;
    }
}

@media (max-width: 480px) {
    .logo img {
        width: 130px; /* Much smaller logo for narrow phone screens */
    }

    .navlist {
        gap: 8px; /* Tighter spacing between links */
    }

    .navlist a {
        font-size: 12px; /* Very small text for tight phone screens */
    }

    .navlist svg {
        width: 12px; /* Scales down your SVG icons slightly */
        height: 12px;
    }

    #Home h1 {
        font-size: 28px;
    }

    /* Keep gallery images slightly smaller on tiny phone screens so they still look good */
    .project-img li, 
    .project-img1 li {
        width: 180px !important;
    }
}