@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;600;800;900&family=Poppins:wght@300;400;500;600&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #2a2a2a;
    --second-bg-color: #202020;
    --text-color: #fff;
    --second-color: #ccc;
    --main-color: #85059e;
    --big-font: 5rem;
    --h2-font: 3rem;
    --p-font: 1.1rem;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Header Section */
header {
    position: fixed;
    width: 100%;
    top: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    padding: 22px 15%;
    border-bottom: 1px solid transparent;
    transition: all .45s ease;
}

.logo {
    color: var(--text-color);
    font-size: 35px;
    font-weight: 700;
    letter-spacing: 1px;
}

span {
    color: var(--main-color);
}

.dp {
    color: yellow;
}

.navlist {
    display: flex;
}

.navlist a {
    color: var(--second-color);
    font-size: 17px;
    font-weight: 500;
    margin: 0 25px;
    transition: all .45s ease;
}

.navlist.active {
    display: block;
}

.navlist a:hover {
    color: var(--main-color);
}

#menu-icon {
    font-size: 35px;
    color: var(--text-color);
    z-index: 1000;
    cursor: pointer;
    margin-left: 25px;
    display: none;
}

/* Home Section */
section {
    padding: 160px 15% 120px;
}

.home {
    position: relative;
    height: 100vh;
    width: 100%;
    background-image: url("../img/bg/background.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.slide {
    margin-bottom: 20px;
}

.one {
    display: inline-block;
    margin-right: 15px;
    padding: 0 15px;
    line-height: 32px;
    font-size: 20px;
    font-weight: 500;
    border-radius: 5px;
    background: var(--main-color);
    color: var(--text-color);
}

.two {
    display: inline-block;
    color: var(--second-color);
    font-size: 20px;
    font-weight: 500;
}

.home-text h1 {
    font-size: var(--big-font);
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.1;
    margin: 0 0 8px;
}

.home-text h3 {
    color: var(--text-color);
    margin: 0 0 35px;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
}

.home-text p {
    color: var(--second-color);
    font-size: var(--p-font);
    line-height: 1.8;
    margin-bottom: 40px;
}

.button {
    display: inline-block;
    align-items: center;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 12px;
    background: var(--main-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
    letter-spacing: 1px;
    font-weight: 500;
    transition: all .45s ease;
}

.btn:hover {
    transform: scale(0.9);
}

/* Projects Section */
.projects {
    background: var(--bg-color);
}
.projects-container {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%); 
    margin: 0;
    padding: 0 40px;
    margin-bottom: 40px;
}

.projects-subheading {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 40px 0 20px 0;
    text-align: center;
}

.projects-content {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    gap: 1rem;
    padding: 20px calc((100vw - min(1200px, 98vw)) / 2);
    width: 100%;
    transition: scroll-left 0.5s ease;
}

.row {
    position: relative;
    min-width: calc(50% - 1rem);
    width: calc(50% - 1.25rem);
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.row img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    transition: transform 0.5s;
    max-height: 300px;
}

.layer {
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1), #36deed);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}



.layer h5 {
    color: black;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.layer p {
    color: black;
    font-size: 13px;
    line-height: 1.8;
    font-weight: bold;
    text-align: center;
}

.layer i {
    color: var(--main-color);
    margin-top: 20px;
    font-size: 20px;
    background: var(--text-color);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.row:hover img {
    transform: scale(1.1);
}

.row:hover .layer {
    opacity: 1;
    transform: translateY(0);
}

.scroll-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}


.scroll-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: var(--main-color);
    pointer-events: none;
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.left-btn {
    left: 25px;
}

.right-btn {
    right: 25px;
}

.scroll-btn i {
    font-size: 28px;
    pointer-events: auto;
    color: white;
}

/* Skills Section */
.skills {
    background: var(--second-bg-color);
}

.main-text {
    text-align: center;
}

.main-text p {
    color: var(--second-color);
    font-size: 15px;
    margin-bottom: 15px;
}

.main-text h2 {
    font-size: var(--h2-font);
    line-height: 1;
}

.skills-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, auto));
    align-items: center;
    gap: 2.5rem;
    margin-top: 5rem;
}

.box {
    background: var(--bg-color);
    padding: 35px 45px;
    border-radius: 8px;
    transition: all .45s ease;
}

.s-icons i {
    font-size: 32px;
    margin-bottom: 20px;
}

.box h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

.box p {
    color: var(--second-color);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.box:hover {
    transform: translateY(-8px);
}

/* About Section */
.about h2 {
    font-size: var(--h2-font);
    text-align: center;
    line-height: 1;
    margin-bottom: 50px;
}

.about-me {
    color: var(--second-color);
    font-size: var(--p-font);
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
    overflow: hidden;
    text-overflow: ellipsis;
}

.about {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Contact Section */
.contact {
    background: var(--second-bg-color);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 2.5rem;
}

.contact-text h4 {
    color: var(--text-color);
    margin: 18px 0;
    font-size: 20px;
    font-weight: 600;
}

.contact-text h2 {
    font-size: var(--h2-font);
    line-height: 1;
}

.contact-text p {
    color: var(--second-color);
    font-size: var(--p-font);
    line-height: 1.8;
    margin-bottom: 30px;
}

.list {
    margin-bottom: 2.8rem;
}

.list li {
    margin-bottom: 12px;
}

.list li a {
    display: block;
    color: var(--main-color);
    font-size: 14px;
    transition: all .45s ease;
}

.list li a:hover {
    color: var(--second-color);
}

.contact-form {
    position: relative;
    width: 100%;
}

form input,
form textarea {
    width: 100%;
    color: var(--text-color);
    background: var(--bg-color);
    outline: none;
    border: none;
    font-size: 1rem;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}

form textarea {
    resize: none;
    height: 230px;
}

form button {
    display: inline-block;
    background: var(--second-color);
    color: var(--text-color);
    padding: 13px 50px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: 8px;
    transition: all .45 ease;
}

form button:hover {
    transform: scale(0.9);
}

/* Footer Section */
.footer {
    padding: 10px 10%;
    text-align: center;
    background: var(--second-bg-color);
}

.footer p {
    font-size: 14px;
    color: var(--second-color);
    margin: 0;
}

.footer span {
    color: var(--main-color);
}

.social-icons {
    display: flex;
    margin: 5px 0;
}

.social-icons a {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    background: var(--main-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 8px;
    transition: all .45s ease;
}

.social-icons a:hover {
    transform: scale(0.9);
    color: var(--main-color);
}

.social-icons a i {
    color: var(--text-color);
    font-size: 24px;
}

.top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
}

.top a {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--main-color);
    color: var(--text-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: all .45s ease;
}

.top a:hover {
    transform: scale(1.1);
}

.top a i {
    font-size: 24px;
}

/* Responsive Design */
@media (max-width: 1000px) {
    .projects-content {
        gap: 1.5rem;
        padding: 20px calc((100vw - min(800px, 90vw)) / 2);
    }

    .row {
        min-width: calc(50% - 0.8rem);
        height: 280px;
    }

    .row img {
        max-height: 280px;
    }
    
    header {
        padding: 22px 5%;
    }
}

@media (max-width: 768px) {
    .navlist {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--second-bg-color);
        flex-direction: column;
        text-align: center;
        transition: all .65s ease;
    }

    .navlist a {
        margin: 15px 0;
        font-size: 1.6rem;
    }

    .navlist.active {
        right: 0;
    }

    #menu-icon {
        display: block;
    }

    section {
        padding: 100px 7% 100px;
    }

    .projects-content {
        width: 100%;
        gap: 0;
        scroll-snap-type: x mandatory;
        padding: 40px 10px;
    }

    .row {
        min-width: 94%;
        width: 94%;
        height: 52vw;
        max-height: 260px;
        margin: 0 3% 15px 3%;
        scroll-snap-align: center;
        overflow: hidden;
        border-radius: 10px;
    }

    .row img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 30%;
    }

    .layer {
        width: calc(100% - 2px);
        height: calc(100% - 2px);
        left: 2px;
        top: 2px;
    }

    .row:hover img {
        transform: scale(1.04);
    }

    .scroll-btn {
        width: 42px;
        height: 42px;
        top: calc(52vw / 2);
    }
    .scroll-btn i {
        font-size: 1.4rem;
    }

    .layer h5 {
        font-size: 1rem;
        margin-bottom: 8px;
        padding: 0 10px;
    }
    .layer p {
        font-size: 0.5rem;
        line-height: 1.4;
        margin-bottom: 12px;
        padding: 0 10px;
    }

    .layer i {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Mobile Responsive CSS (600px and below)*/
@media (max-width: 600px) {
    .home {
        background-image: url("../img/bg/mobile_bg.jpg");
    }
    .projects-subheading {
        font-size: 1.5rem;
        left: -10px;
        padding-left: 20px;
        padding-bottom: 3px;
    }
    
    .projects-content {
        width: 100%;
        gap: 0;
        scroll-snap-type: x mandatory;
        padding: 40px 10px;
    }

    .row {
        min-width: 94%;
        width: 94%;
        height: 52vw;
        max-height: 260px;
        margin: 0 3% 15px 3%;
        scroll-snap-align: center;
        overflow: hidden;
        border-radius: 10px;
    }

    .row img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 30%;
    }

    .layer {
        width: calc(100% - 2px);
        height: calc(100% - 2px);
        left: 2px;
        top: 2px;
    }

    .row:hover img {
        transform: scale(1.04);
    }

    .scroll-btn {
        width: 42px;
        height: 42px;
        top: calc(52vw / 2);
    }
    .scroll-btn i {
        font-size: 1.4rem;
    }

    .layer h5 {
        font-size: 1rem;
        margin-bottom: 8px;
        padding: 0 10px;
    }
    .layer p {
        font-size: 0.5rem;
        line-height: 1.4;
        margin-bottom: 12px;
        padding: 0 10px;
    }

    .layer i {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}




@media (max-width: 480px) {
    .home-text h1 {
        font-size: 2.5rem;
    }

    .home-text h3 {
        font-size: 1.3rem;
    }
}