@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;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

html,
body {
    overflow-x: hidden;
}

/* Basic Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: 'Poppins';
    background-color: #121212;
    color: #E6DDC4;
    line-height: 1.6;
    padding-top: 66px;
}

/* Navbar */
.navbar {
    display: flex;
    height: 66px;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #121212;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-weight: normal;
    font-size: 1.5rem;
    padding-right: 4px;
}

.logo span {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar nav a {
    font-weight: normal;
    margin-left: 20px;
    text-decoration: none;
    color: #E6DDC4;
}

/* Hero Section  */
.intro {
    padding: 40px;
    height: 40vh;
    text-align: center;
    display: flex;
    background-image: linear-gradient(to bottom, #202020, #121212);
    color: #E6DDC4;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.intro h1 {
    font-weight: bolder;
    font-size: 4vw;
}

.intro p {
    font-size: 1.4vw;
    color: #ffffff;
    width: 50vw;
    margin-top: 10px;
}

/* About Section */
.left-sec {
    margin-left: 0;
}

.outerdiv {
    margin: 60px auto;
    width: 80vw;

}

.about {
    /* width: 70vw; */
    padding: 40px;
    margin-bottom: 20px;
}

.about h1 {
    font-weight: bolder;
    font-size: 3rem;
    /* Adjusted for responsiveness */
    text-align: center;
    margin-top: -30px;
    padding-bottom: 30px;
}

/* Grid Layout for About Content */
.about-content {
    display: grid;
    /* width: 70vw; */
    /* justify-content: center;
    align-items: center; */
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.about-content p {
    padding: 20px;
    text-align: justify;
    font-size: 1rem;
    line-height: 1.5;
}

.knowme {
    padding-left: 20px;
}

.skills-column {
    margin-bottom: 10px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.button {
    padding: 10px 20px;
    font-size: 14px;
    color: rgb(255, 255, 255);
    border: 1px solid #bfbfbf;
    border-radius: 120px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    margin: 0px;
}

.button:hover {
    background-color: #efefef;
    color: black;
}

.libutton {
    margin-left: 20px;
    display: inline-flex;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 450;
    color: #000000d4;
    align-items: center;
    justify-content: center;
    background-color: #bfbfbf1f;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.libutton svg {
    height: 0.8rem;
    width: 0.8rem;
    margin-left: 0.6rem;
    transition: fill 0.3s ease;
}

.libutton:hover svg path {
    fill: #ffffffd2;
    transition: 0.3s ease-in-out;
}

.libutton:hover {
    box-shadow: 0px 0px 15px 3px #0000005d;
    background-color: #e6ddc452;
    color: #ffffffd2;
    transition: 0.3s ease-in-out;
}

/* Education Background Section */
.edbk {
    padding: 60px;
    background-image: linear-gradient(to bottom, #202020, #121212, #121212);
}

.edbk h1 {
    font-weight: bolder;
    font-size: 2.8rem;
    /* Adjusted for responsiveness */
    text-align: center;
    margin-top: -20px;
    padding-bottom: 30px;
}

.edgrid {
    margin: 30px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btech {
    display: flex;
    flex-direction: column;
    margin-left: 60px;
}

#degtime {
    font-weight: 400;
    font-size: 1rem;
}

#degname {
    font-weight: 600;
    font-size: 1.5rem;
}

#instiname {
    font-weight: 400;
    font-size: 1rem;
}

.gndulogo {
    max-width: 100px;
    height: auto;
}

/* Projects */
.projects {
    padding: 60px;
    background-image: linear-gradient(to bottom, #121212, #222432);
}

.projects h2 {
    font-weight: bolder;
    font-size: 2.5rem;
    text-align: center;
    margin-top: -30px;
    padding-bottom: 30px;
}

.project-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
    /* Ensure proper positioning for child elements */
    overflow: hidden;
    /* Hide elements that go outside the project-item container */
    /* cursor: pointer; Indicate interactivity */
}

.project-item img {
    max-width: 150px;
    height: auto;
}

.project-details {
    display: flex;
    width: 500px;
    flex-direction: column;
    margin-left: 60px;
}

.projectname {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
    text-align: left;
    color: #E6DDC4;
    transition: color 0.3s ease;
    /* Transition effect for text color change */
    position: relative;
    /* Ensure it's placed above pseudo-element */
    z-index: 1;
    /* Higher z-index to appear above the button's pseudo-element */
}

.projectpage {
    display: flex;
    align-items: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 4px;
    padding-left: 4px;
    width: fit-content;
    padding-right: 10px;
    background-color: transparent;
    color: #E6DDC4;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

/* The pseudo-element to create the left-to-right fill animation */
.projectpage::before {
    content: '';
    /* Empty content */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #980d00;
    /* Color of the fill */
    transform: scaleX(0);
    /* Initially, scale the fill to 0 (invisible) */
    transform-origin: left;
    /* Start the transformation from the left */
    transition: transform 0.4s ease;
    /*Smooth transition for the fill*/
    z-index: 0;
    /* Lower z-index to be behind the text */
}

.project-item .projectpage svg {
    fill: #E6DDC4;
    scale: 0.8;
    opacity: 0;
    /* Start with the SVG hidden */
    transform: translateX(-10px);
    /* Position the SVG slightly to the left */
    transition: opacity 0.4s ease, transform 0.4s ease;
    /* Smooth transition for the SVG */
}

.project-item:hover .projectpage svg {
    fill: #E6DDC4;
    opacity: 1;
    transform: translateX(5px);
    /* Move the SVG to the right slightly */
}

.project-item:hover .projectpage {
    background-color: #980d00;
    border-radius: 6px;
    transform: scale(1.05);
    /* Slightly scale up the button */
}

/* On hover, trigger the left-to-right fill animation */
.project-item:hover .projectpage::before {
    transform: scaleX(1);
    /* Expand the fill to 100% width */
}

/* Project Github buttons */
.project-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
    align-items: center;
}

.project-links .libutton {
    font-size: 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: #000000;
}

.project-links .libutton:hover {
    transition: 0.3s ease-in;
    color: #ffffffd2;
}

.project-links svg {
    margin-left: 5px;
    transition: fill 0.3s ease-in-out;
}

.project-links .libutton:hover svg {
    transition: 0.3s ease-in-out;
}

/* Contact */
.contact {
    padding: 60px;
    background-color: #121212;
}

.contgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.contgrid p {
    text-decoration: none;
}

.noclick {
    /* pointer-events: none; */
    margin: auto;
}

.social {
    margin: auto;
}

.contgrid a {
    text-decoration: none;
    color: #E6DDC4;
}

.contact h2 {
    font-weight: bolder;
    font-size: 2.5rem;
    text-align: center;
    margin-top: -30px;
    padding-bottom: 30px;
}

.svg-inline--fa {
    padding-top: 0.2rem;
    margin-right: 0.2rem;
    height: 1rem;
    width: 1rem;
}

.hidden-project {
    display: none;
}

/* Media Queries for Smaller Screens */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding-left: 10px;
        padding-right: 10px;
        height: 90px;
        font-size: 0.8rem;
    }

    #aman {
        font-size: 1.2rem;
    }

    #verma {
        font-size: 1.2rem;
    }

    .about {
        padding-left: 10px;
        padding-right: 10px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .intro h1 {
        font-size: 6vw;
    }

    .intro p {
        font-size: 3.5vw;
        width: 80vw;
    }

    .left-sec p {
        padding-top: 20px;
        padding-bottom: 0px;
        font-size: 0.8rem;
    }

    .about h1 {
        font-size: 1.5rem;
    }

    .button {
        font-size: 12px;
    }

    .libutton {
        font-size: 14px;
        margin-top: 10px;
    }

    .edbk {
        padding-left: 10px;
        padding-right: 10px;
    }

    .btech {
        margin-left: 30px;
        justify-content: center;
    }

    .gndulogo {
        margin-left: 10px;
    }

    #degtime {
        font-size: 0.8rem;
    }

    #degname {
        font-size: 1rem;
    }

    #instiename {
        font-size: 0.8rem;
    }

    .edbk h1 {
        font-size: 1.5rem;
    }

    .projects h2 {
        font-size: 1.5rem;
    }

    .project-item img {
        scale: 0.8;
    }

    .project-details {
        margin: 4px 0;
    }

    .project-item .project-details .projectpage .projectname {
        font-size: 1.4rem;
    }

    #aboutproject {
        font-size: 0.85rem;
    }

    #techused {
        font-size: 0.85rem;
    }

    .project-links .libutton {
        font-size: 14px;
    }

    /* Contact  */
    .contact {
        padding-left: 10px;
        padding-right: 10px;
    }

    .contgrid {
        display: inline-flex;
        padding: 10px;
        padding-top: 0px;
        font-size: 0.8rem;
        grid-template-columns: 1fr;
        gap: 0px;
    }
}

/* Media query upto 500px */
@media (max-width: 500px) {

    .projects {
        padding: 16px;
        text-align: center;
    }

    .project-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;

    }

    .project-item {
        background-image: linear-gradient(30deg, rgba(88, 88, 88, 0.10), rgba(88, 88, 88, 0.15), rgba(88, 88, 88, 0.20));
        backdrop-filter: blur(12px);
        border: 2px dotted #E6DDC4;
        border-radius: 16px;
        overflow: hidden;
        padding: 6px;
        padding-bottom: 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        /* transition  */
        transition-property: scale;
        transition-duration: 600ms;
        transition-delay: 50ms;
        transition-timing-function: ease-in-out;
    }

    .project-item img {
        max-width: 100%;
        height: auto;
    }

    .projectpage::before {
        display: none;
    }

    .project-item .projectpage svg {
        display: none;
    }

    .project-item:hover .projectpage svg {
        display: none;
    }

    .project-item:hover .projectpage {
        background-color: transparent;
        border-radius: 0px;
        transform: scale(1);
    }

    .project-item:hover .projectpage::before {
        display: none;
    }

    .project-details {
        margin: 4px 0;
        width: auto;
    }

    #aboutproject {
        display: none;
    }

    #techused {
        margin-top: 8px;
        padding: 0px 8px 0px 8px;
        font-size: 0.7rem;
        text-align: justify;
    }

    #projectlinkbutton {
        margin-left: 0;
    }

    .hidden-project {
        display: none;
    }
}