@import url('https://fonts.googleapis.com/css2?family=Playwrite+IT+Moderna:wght@100..400&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Playwrite IT Moderna", cursive;
    box-sizing: border-box;
}

.hamburger {
    display: none;
}

.header {
    width: 100%;
    height: fit-content;
    margin-top: 0.4rem;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 10;
}

.navbar {
    width: 85vw;
    height: 100%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0.3rem;
    padding: 0.5rem 1rem;

    background: rgba(255, 255, 255, 0.1);
    /* Transparent initially */
    transition: backdrop-filter 0.3s ease, background 0.3s ease;
}

.scrolled {
    backdrop-filter: blur(10px);
    /* Blur effect */
    background: rgba(255, 255, 255, 0.3);
    /* Light background */
    /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
    /* Subtle shadow */
}

.menu {
    display: flex;
    list-style: none;
    gap: 2rem;

    & li a {
        text-decoration: none;
        color: #000;
    }
}

.contact-btn {
    border: none;
    outline: none;
    background-color: white;
    color: black;
    font-family: "Playwrite IT Moderna", cursive;
}

.container {
    width: 85vw;
    min-height: 80vh;
    margin: auto;
    display: flex;
}

.seperator {
    border: 1px solid rgb(216, 216, 216);
    width: 85vw;
    margin: auto;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    background: white;
    padding: 4rem 3rem;
    border-radius: 10px;

    & .hero-content {
        padding: 1rem;
        flex: 1;

        & h2 {
            font-size: 1.1rem;
            /* font-size: 24px; */
            color: #555;
        }

        & h1 {
            font-size: 36px;
            margin: 5px 0;
            color: #222;
            font-weight: bold;
        }

        & p {
            margin-top: 1rem;
        }


    }

    & .hero-right {
        position: relative;
        margin: 3rem;
    }

    & .profleImg-container {
        width: 20rem;
        height: 20rem;
        border-radius: 40rem;
        overflow: hidden;
        box-shadow: 2px 1px 20px 1px rgb(64 64 64 / 20%);
        /* animation: float 3s ease-in-out infinite; */

        & img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

}


.floating-icon {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

.react {
    top: 4rem;
    right: -3rem;
    width: 3rem;
    height: 3rem;

    & .icon {
        width: 2rem;
        height: 2rem;
    }
}

.nodejs {
    top: -2rem;
    right: 1rem;
    width: 2.8rem;
    height: 2.8rem;

    & .icon {
        width: 2.1rem;
        height: 2.1rem;
    }

}

.express {
    top: 15rem;
    right: 19.5rem;
    width: 2.5rem;
    height: 2.5rem;

    & .icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

.mongodb {
    top: 0rem;
    right: 19.5rem;
    width: 3rem;
    height: 3rem;

    & .icon {
        width: 2rem;
        height: 2rem;
    }
}

.github {
    top: 16rem;
    right: 0.5rem;
    width: 3rem;
    height: 3rem;

    & .icon {
        width: 2rem;
        height: 2rem;
    }
}


/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.aboutme-container {
    display: flex;
    padding: 4rem;
    gap: 4rem;
}

.about-right {
    & h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    & p {
        margin-bottom: 1rem;
    }

    & .info {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
        align-items: center;
        place-items: center;
        margin-top: 3rem;
        gap: 1rem;
    }
}

.info-box {
    text-align: center;
    padding: 1rem;
    border-radius: 0.2rem;
    & h4,
    & p {
        font-weight: bold;
        padding: 0;
        margin: 0;
    }
}



.aboutme-img {
    width: 23rem;
    height: 23rem;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.aboutme-img img {
    overflow: hidden;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.education-timeline {
    width: 100%;
    position: relative;
    padding: 4rem 0rem;
}

/* Header */
.timeline-header {
    text-align: center;
    margin-bottom: 4rem;
}

.timeline-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

.timeline-header p {
    color: #6b7280;
}

/* Vertical Line */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: #d1d5db;
    transform: translateX(-50%);
}

/* Timeline Item */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 1.5rem 2rem;
    box-sizing: border-box;
}

.timeline-item::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: #171717;
    border-radius: 50%;
    top: 20px;
    z-index: 1;
}

/* Left-aligned items */
.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.left::after {
    right: -9px;
}

/* Right-aligned items */
.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-item.right::after {
    left: -9px;
}

/* Card Content */
.content {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    position: relative;
    z-index: 2;
    transition: 0.3s ease;
    box-shadow: 7px 7px 8px rgba(3, 7, 18, 0.06), 7px 6px 33px rgba(3, 7, 18, 0.04), 20px 20px 74px rgba(3, 7, 18, 0.02);

}

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

.content h3 {
    font-size: 1.3rem;
    color: #1f2937;
    margin-bottom: 0.3rem;
}

.institution {
    font-weight: 500;
    color: #374151;
}

.location {
    color: #6b7280;
    font-size: 0.95rem;
}

.note {
    font-size: 0.95rem;
    color: #10b981;
    font-weight: 500;
    margin-top: 0.3rem;
}

.details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #4b5563;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    padding-top: 0.5rem;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 4rem;
        padding-right: 1rem;
    }

    .timeline-item.right,
    .timeline-item.left {
        left: 0;
        text-align: left;
    }

    .timeline-item::after {
        left: 12px !important;
        right: auto;
    }
}


.skills {
    width: 100%;
    padding: 3.5rem;

    & .cards {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        flex-wrap: wrap;
        gap: 1.5rem;
        margin-bottom: 4rem;

        & .card {
            border-radius: 0.3rem;
            background-color: #fdfdfd;
            padding: 0.5rem 1rem;
            flex: 1;
            display: flex;
            align-items: center;
            gap: 1rem;
            text-align: start;
            box-shadow: 7px 7px 8px rgba(3, 7, 18, 0.06), 7px 6px 33px rgba(3, 7, 18, 0.04), 20px 20px 74px rgba(3, 7, 18, 0.02);


            & h3 {
                font-size: 0.9rem;
            }


            & p {
                font-size: 0.54rem;
            }

            & .imageContainer {
                width: 2rem;
                height: 2rem;
                display: flex;
                align-items: center;
                justify-content: center;

                & img {
                    max-width: 100%;
                    max-height: 100%;
                    object-fit: contain;
                }
            }
        }
    }

}



.skills-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;

    & h2 {
        font-size: 1.8rem;
        margin-bottom: 0.1rem;
    }


    & p {
        font-weight: 500;
        margin-bottom: 0.5rem;
        color: #6b7280;
    }

}


.projects {
    width: 100%;
    height: 100%;
    padding: 3.5rem;

    & .project-title {
        & h2 {
            font-size: 1.8rem;
            margin-bottom: 0.1rem;
        }

        & p {
            margin-bottom: 2rem;
            font-weight: 500;
            color: #6b7280;
        }
    }
}

.project-cards {
    padding: 0.2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;

    & .project-card {
        display: flex;
        align-items: center;
        height: fit-content;
        border-radius: 10px;
        overflow: hidden;
        width: 100%;
        padding: 0.5rem;
    }

    & .project-image-container {
        flex: 0 0 40%;
        height: 13rem;
        overflow: hidden;
    }

    & .project-image-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 10px;
    }

    & .project-content {
        flex: 1;
        padding: 1.5rem;
    }

    & .project-content h3 {
        font-size: 1.1rem;
        color: #333;
        margin-bottom: 0.5rem;
    }

    & .project-content p {
        font-size: 1rem;
        color: #555;
        line-height: 1.6;
    }

    & .capsules {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        margin: 1.5rem 0rem 1rem 0rem;

        & span {
            box-shadow: 22px 22px 66px rgba(3, 7, 18, 0.06);
            font-size: 0.7rem;
            padding: 0.1rem 0.4rem;
            border-radius: 4rem;
            background-color: #efefef;
        }
    }

    .links {
        display: flex;
        gap: 1rem;
        /* Space between buttons */
        margin-top: 1rem;
    }

    .links a {
        text-decoration: none;
        padding: 0.4rem 1rem;
        background-color: #f1f1f1;
        color: #000000;
        border-radius: 0.4rem;
        font-size: 0.7rem;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
        transition: background 0.3s ease, transform 0.2s ease;

        &:hover {
            transform: translateY(-2px);
        }

        &:active {
            transform: scale(1);
            /* Click effect */
        }

        & img {
            filter: invert(1);
            width: 1rem;
            /* Adjust icon size */
            height: 1rem;
        }
    }
}



.github-button {
    background-color: #f2f2f2;
    color: #000;
    border-radius: 1.5rem;
    text-align: center;
    display: flex;
    justify-content: center;

    & a {
        text-decoration: none;
        padding: 0.6rem 1.5rem;
        background-color: #f1f1f1;
        color: #000000;
        border-radius: 0.4rem;
        font-size: 1rem;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;


        &:hover {
            background-color: #d9d9d9;
            transform: translateY(-2px);
        }

        &:active {
            transform: scale(0.96);
            /* Click effect */
        }

        & img {
            filter: invert(1);
            width: 1.4rem;
            /* Adjust icon size */
            height: 1.4rem;
        }
    }
}

.connect {
    width: 100%;
    min-height: 100%;
    padding: 4rem;


    & .connect-title {
        & h2 {
            font-size: 1.8rem;
        }

        & p {
            margin-bottom: 2rem;
            font-weight: 500;
            color: #6b7280;
        }
    }
}

.connectcards {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1rem;

    & a {
        text-decoration: none;
        color: inherit;
        display: block;
        width: 100%;
    }



    & .card {
        display: flex;
        align-items: center;
        cursor: pointer;
        justify-content: space-between;
        gap: 0.5rem;
        border: 1px solid gray;
        padding: 0.6rem 1rem 0.6rem 0.5rem;
        border-radius: 0.3rem;
        flex: 1;
        min-width: 19rem;
        height: 3rem;
        transition: background 0.3s ease-in-out, transform 0.3s ease-in-out;

        & .cardcontent {
            display: flex;
            align-items: center;
            justify-content: center;

            gap: 1rem;

            & div {
                line-height: 1.1rem;

                & h4 {
                    font-size: 0.9rem;
                }


                & p {
                    font-size: 0.7rem;
                }
            }

            & img {
                width: 1.5rem;
                height: 1.5rem;
                filter: invert();
                background-color: #262626;
                padding: 0.3rem;
                border-radius: 0.4rem;
            }
        }

        & .link {
            filter: invert();
        }

        &:hover {
            transform: translateY(-0.2rem) scale(1.01);
            background: rgba(0, 0, 0, 0.01);
            box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.01);
        }
    }
}

.linksAndFrom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;

    & .formcontainer {
        width: 45%;
        padding: 1rem;

        & h2 {
            margin-bottom: 1rem;
        }

        & form {
            display: flex;
            flex-direction: column;
            gap: 1rem;

            & div {
                display: flex;
                flex-direction: column;
                gap: 0.4rem;
            }

            & input,
            textarea {
                border: none;
                outline: none;
                width: 100%;
                height: 1.9rem;
                background-color: #f6f6f6;
                border-radius: 0.3rem;
                padding: 1.2rem 1rem;
                box-sizing: border-box;
            }

            & textarea {
                min-height: 9rem;
                padding: 1rem 1rem;
            }

            input::placeholder,
            textarea::placeholder {
                font-family: "Playwrite IT Moderna", cursive;
                color: #888;
                opacity: 1;
            }

            & button {
                outline: none;
                border: none;
                padding: 0.8rem 0.9rem;
                width: fit-content;
                border-radius: 0.4rem;
                font-weight: 500;
                font-size: 1rem;
                background-color: #f2f2f2;
                cursor: pointer;
                transition: background 0.3s ease-in-out;

                &:hover {
                    background-color: #e0e0e0;
                }
            }
        }
    }
}

footer {
    & div {
        text-align: center;
        margin: 2rem;
    }
}


@media (max-width: 1768px) {
    html {
        font-size: 0.8rem;
    }
}

.navbar {
    width: 90vw;

}

.dropdown {
    /* width: 100%; */
    width: 93vw;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);

    transition: backdrop-filter 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(10px);
    background: rgba(226, 226, 226, 0.3);

    & ul li {
        list-style: none;
        padding: 1rem 2rem;
    }

    li:hover {
        backdrop-filter: blur(20px);
        background: rgba(226, 226, 226, 0.5);
    }

    & a {
        text-decoration: none;
        color: #555;
        font-weight: bold;
        position: relative;
        display: inline-block;
        transition: color 0.3s ease;
        width: 100%;
        height: 100%;
    }

    & a:focus,
    a:active {
        outline: none;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
    }
}

.visible {
    display: block;
}

@media (max-width: 1050px) {
    .container {
        width: 89vw;
    }

    .header {
        height: 5rem;
    }

    .menu,
    .contact-btn {
        display: none;
    }

    .hero {
        flex-direction: column-reverse;
        padding: 0.8rem;
    }

    .hero-content h1 {
        font-size: 0.2rem;
    }

    .aboutme-container {
        flex-direction: column;
        padding: 6rem 1rem;
    }

    .aboutme-img {
        height: 15rem;
        width: 15rem;
        margin: auto;
    }

    .projects {
        padding: 1rem;
        padding-top: 4rem;
    }

    .project-card {
        flex-direction: column;

        & .project-content {
            padding: 0.8rem 0rem;

            & h3 {
                font-size: 1.5rem;
                margin-bottom: 1.3rem;
            }

            & span {
                font-size: 0.8rem;
                padding: 0.1rem 0.6rem;
            }

            .links a {
                font-size: 0.8rem;
                padding: 0.5rem 1.1rem;
                margin-bottom: 1rem;
            }
        }
    }

    .skills {
        padding: 1rem;
        padding-top: 4rem;

        & .cards {

            & .card {

                img {
                    width: 2.2rem;
                    height: 2.2rem;
                }

                & h3 {
                    font-size: 1rem;
                }

                & p {
                    font-size: 0.75rem;
                }
            }
        }
    }

    .connect {
        padding: 1rem;
        padding-top: 3rem;
    }

    .connect .linksAndFrom {
        flex-direction: column-reverse;
        padding: 1rem;

        & .connectcards {
            width: 100%;
            gap: 1rem;
        }

        & .formcontainer {
            width: 100%;
        }
    }

    .hamburger {
        display: block;
        height: 2rem;
        width: 2rem;
        background-color: #eaeaea;
        padding: 0.4rem;
        border-radius: 0.4rem;
    }

    .skills {
        & .cards {
            display: grid;
            grid-template-columns: 1fr 1fr;
        }
    }
}

@media (max-width: 750px) {
    .hero-content h1 {
        font-size: 1.5rem !important;
    }

    .skills {
        & .cards {
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
        }
    }
}