@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');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
}

:root {
    --bg-color: #1f242d;
    --second-bg-color: #323946;
    --text-color: #fff;
    --main-color: #0ef;
}

body {
    background: #1f242d;
    color: #fff;
}

section {
    min-height: 100vh;
    padding: 4rem 9% 4rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.8rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header.sticky {
    border-bottom: 0.1 rem solid rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 25px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    cursor: default;
    opacity: 0;
    animation: slideRight 1s ease forwards;
}

.navbar a {
    font-size: 18px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin-left: 35px;
}

.navbar a:hover,
.navbar a.active {
    color: #0ef;
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

.home {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 70px 10% 0;
}

.home-content {
    max-width: 600px;
}

.home-img img {
    max-width: 450px;
    margin-right: -20px;
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2.4rem);
    }

    100% {
        transform: translateY(0);
    }
}

.home-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2.5px;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 30px;
}

.home-content h3 span {
    font-size: 2rem;
    margin-left: 5px;
    color: #0ef;
}

.home-content p {
    font-size: 1.2rem;
}

.home-content h1 {
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin: -3px 0;
    margin-bottom: 2.5px;
}

.social-media a {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: 0.2rem solid #0ef;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #0ef;
    text-decoration: none;
    margin: 3rem 1.5rem 3rem 0;
}

.social-media a:hover {
    background: #0ef;
    color: #1f242d;
    transition: 0.5s ease;
    box-shadow: 0 0 20px #0ef;
}

.hire-btn {
    margin-left: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #0ef;
    border-radius: 40px;
    box-shadow: 0 0 10px #0ef;
    font-size: 20px;
    color: #1f242d;
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
}


/* KEYFRAME ANIMATIONS */
@keyframes slideRight {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 100%;
    }
}


/* ABOUT SECTION */

.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6rem;
    background: var(--second-bg-color);
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
}

.about-content h3:nth-of-type(2) {
    margin-bottom: 30px;
}

.about-content span {
    color: #0ef;
}

.about-content p {
    font-size: 1.2rem;
    margin: 1rem 0 3rem;
}

.about-content h1 {
    font-size: 56px;
    font-weight: 700;
    margin: -3px 0;
}

.about-img img {
    width: 35vw;
}

.heading {
    text-align: center;
    font-size: 3.5rem;
}

/* Skills Section */
.tech-logo {
    width: 70px;
    /* or any desired uniform size */
    height: 70px;
    object-fit: contain;
}


/* SERVICES SECTION */
span {
    color: var(--main-color);
}

.services h2 {
    margin-bottom: 2rem;
}

.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.services-container .services-box {
    flex: 1 1 25rem;
    background: var(--second-bg-color);
    padding: 1rem 1rem 1rem;
    border-radius: 2rem;
    text-align: center;
    border: 0.2rem solid var(--bg-color);
    transition: 0.5s ease;
}

.services-container .services-box:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
}

.services-box i {
    font-size: 4rem;
    color: var(--main-color);
}

.services-box h3 {
    font-size: 1.6rem;
}

.services-box p {
    font-size: 1.2rem;
    margin: 1rem 0 3rem;
}

.services-btn {
    margin-bottom: 1rem;
}

/* PROJECTS SECTION */
.portfolio {
    background: var(--second-bg-color);
}

.portfolio h2 {
    margin-bottom: 4rem;
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Reduces to 2 columns to increase width */
    gap: 3rem;
    /* Space between cards remains consistent */
    width: 100%;
    /* Ensures the grid spans the full width */
    max-width: 1200px;
    /* Restricts overall width for proper layout */
    margin: 0 auto;
    /* Centers the grid */
}

.portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 300px;
    /* Maintains consistent height */
    max-width: 500px;
    /* Increases individual card width */
    width: 100%;
    /* Allows responsiveness */
    margin: 0 auto;
    /* Centers the cards within their grid cells */
}

.portfolio-container .portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    overflow: hidden;
    display: flex;
    width: 100%;
    /* Ensures consistent width for all items */
    max-width: 100%;
    /* Prevents overflow issues */
}

.portfolio-box img {
    width: 100%;
    height: auto;
    /* Maintains aspect ratio */
    transition: 0.5s ease;
}

.portfolio-box:hover img {
    transform: scale(1.2);
}

.portfolio-box .portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    padding: 0 2rem;
    transform: translateY(100%);
    transition: 0.5s ease;
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 2rem;
    color: black;
}

.portfolio-layer p {
    color: black;
}

.portfolio-box a {
    border: solid white;
    border-radius: 100%;
    background: white;
    margin-top: 5px;
    padding: 5px;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    text-decoration: none;
}

.project-img {
    width: 900px;
    height: 250px;
}

/* Comment: Added "width: 100%" to .portfolio-container and .portfolio-box to ensure uniform widths across all rows. Centered the grid with "margin: 0 auto". */

.tech-stack h4 {
    text-align: left;


}

/* CONTACT SECTION */

.contact h2 {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    font-weight: lighter;
}

.contact form {
    max-width: 70rem;
    margin: auto;
    text-align: center;
    margin-bottom: 2rem;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: 0.8rem;
    margin: 0.7rem 0;
}

.contact form .input-box input {
    width: 49%;
}

.contact form textarea {
    resize: none;
}

.contact form .btn {
    margin-top: 3rem;
    cursor: pointer;
}

/* FOOTER SECTION */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.5rem 2% 0.5% 5%;
    background: var(--second-bg-color);
}

.footer-text p {
    font-size: 1.4rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    background: var(--main-color);
    border-radius: 0.8rem;
    transition: 0.5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}


/* BREAKPOINTS */
@media(max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media(max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }

    .footer {
        padding: 2rem 3%;
    }

    .contact {
        min-height: auto;
    }
}

@media(max-width: 768px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: 0.1rem solid rgba(0, 0, 0, 0.2);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-img {
        width: 70vw;
        margin-top: 4rem;
    }

    .about {
        flex-direction: column-reverse;
    }

    .about-img {
        width: 70vw;
        margin-top: 4rem;
    }

    .services h2 {
        margin-bottom: 3rem;
    }

    .services {
        padding-bottom: 7rem;
    }

    .portfolio {
        padding-bottom: 7rem;
    }

    .portfolio h2 {
        margin-bottom: 3rem;
    }

    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 617px) {
    .portfolio-container {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 617px) {
    html {
        font-size: 50%;
    }

    .contact form .input-box input {
        width: 100%;
    }
}

@media(max-width: 365px) {
    .home-img {
        width: 90vw;
    }

    .about-img {
        width: 90vw;
    }

    .footer {
        flex-direction: column-reverse;
    }

    .footer p {
        text-align: center;
        margin-top: 2rem;
    }
}


/* BROWSER SETTINGS */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}