@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Nunito', sans-serif;
}

:root {
    --bg-color: #191f36; /* Background color */
    --snd-bg-color: #262B40; /* Secondary background color */
    --text-color: #fff; /* Text color */
    --main-color: #59B2F4; /* Main color */
    --highlight-color: #00bcd4; /* Highlight color */
    --accent-color: #0073e6; /* Accent color */
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

section {
    min-height: 100vh;
    padding: 12rem 9% 2rem; /* Increased top padding to account for fixed header */
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
    cursor: default;
}

.navbar {
    display: flex;
    margin-left: auto;
}

.navbar a {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-left: 2rem;
    font-weight: 700;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

#Menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

.home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8rem 9%;
}

.home-content {
    max-width: 55%;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 0;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

span {
    color: var(--main-color);
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0.5rem 0;
}

.home-content p {
    font-size: 1.6rem;
    margin-top: 1rem;
    max-width: 60%;
}

.home-content .social-links a {
    color: var(--main-color);
    font-size: 2rem;
    margin-right: 1.5rem;
}

.home-img {
    position: relative;
    width: 35%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: floatImage 3s ease-in-out infinite; /* Increased speed */
}

.home-img img {
    width: 100%;
    height: auto; /* Ensures the aspect ratio is maintained */
    border-radius: 50%;
    border: 5px solid var(--main-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@keyframes floatImage {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px); /* Increased height */
    }
}

/* Custom Styles */
header {
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    padding: 2rem 9%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

header .logo {
    font-size: 2.5rem;
    color: var(--text-color);
}

header .navbar {
    display: flex;
}

header .navbar a {
    color: var(--text-color);
    font-size: 1.6rem;
    margin: 0 1rem;
}

header .navbar a:hover {
    color: var(--main-color);
}

.home .content {
    max-width: 55%;
}

.home .content h3 {
    color: var(--main-color);
    font-size: 3.2rem;
    margin-bottom: 0; /* Removed margin */
}

.home .content h1 {
    color: var(--text-color);
    font-size: 5.6rem;
    margin: 0.5rem 0; /* Reduced margin */
}

.home .content p {
    color: var(--text-color);
    font-size: 1.6rem;
    margin-bottom: 2rem;
}

.home .content .social-links a {
    font-size: 2.5rem;
    color: var(--main-color);
    margin-right: 2rem;
}

.home .image {
    width: 40%;
}

.home .image img {
    width: 100%;
    height: auto; /* Ensures the aspect ratio is maintained */
    border-radius: 50%;
    border: 5px solid var(--main-color);
}

.home-content p {
    font-size: 1.6rem;
}
    
.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
}

.btn:hover {
    box-shadow: none;
}

.btn:active {
    box-shadow: 0 0 2rem var(--main-color);
    transform: translateY(2px); /* Optional: adds a slight press-down effect */
}

/* About page styles */
.about {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    background-color: #0b1121; /* Background color from the image */
}

.about-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 50px;
}

.about-img img {
    border: 5px solid var(--main-color); /* Outline color */
    border-radius: 10px;
    max-width: 70%; /* Further reduced size */
    height: auto;
}

.about-content {
    flex: 2;
    text-align: left;
}

.about-content .heading {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--text-color); /* Heading color */
}

.about-content .heading span {
    color: var(--highlight-color); /* Different color for emphasis */
}

.about-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-color); /* Subheading color */
}

.about-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.about-content .btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--main-color);
    border: none;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.about-content .btn:hover {
    background-color: var(--accent-color);
}

/* Services */
.services h2 {
    margin-bottom: 5rem;
    font-size: 3rem; /* Increased font size */
}

.services-container {
    display: flex;
    justify-content: center;
    align-items: stretch; /* Ensures all boxes are the same height */
    flex-wrap: wrap;
    gap: 2rem;
}

.services-container .services-box {
    flex: 1 1 30rem;
    background: var(--snd-bg-color);
    padding: 3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--bg-color);
    transition: .5s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensures the content is spaced evenly */
}
.services-container .services-box:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
}

.services-box i {
    font-size: 7rem;
    color: var(--main-color);
}
    
.services-box h3 {
    font-size: 2.6rem;
}
    
.services-box p {
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
}


/* PORTFOLIO SECTION DESIGN */
.portfolio {
    padding: 50px 0;
    background: #1b1b32;
}

.portfolio .heading {
    font-size: 36px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
}

.portfolio .heading span {
    color: #4caf50;
}

.portfolio .portfolio-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.portfolio .portfolio-box {
    position: relative;
    width: calc(33.333% - 20px);
    background: #2b2b47;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
    height: 250px; /* Fixed height for uniformity */
}

.portfolio .portfolio-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the entire box */
    display: block;
    transition: transform 0.3s;
}

.portfolio .portfolio-box:hover img {
    transform: scale(1.1);
}

.portfolio .portfolio-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.portfolio .portfolio-layer h4 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 10px;
}

.portfolio .portfolio-layer p {
    font-size: 16px;
    color: #ccc;
}

.portfolio .portfolio-layer i {
    font-size: 24px;
    color: #4caf50;
    margin-top: 10px;
}

.portfolio .portfolio-box:hover .portfolio-layer {
    opacity: 1;
}

@media (max-width: 768px) {
    .portfolio .portfolio-box {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .portfolio .portfolio-box {
        width: 100%;
    }
}

/* CONTACT ME SECTION */
.contact {
    padding: 50px 0;
    background: #111323;
}

.contact .heading {
    font-size: 36px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
}

.contact .heading span {
    color: #00aaff;  /* Color matching the send button */
}

.contact form {
    max-width: 800px;  /* Increased max-width for form */
    margin: 0 auto;
    background: #1c1f2e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.contact .input-box {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.contact .input-box input,
.contact textarea {
    width: 48%;
    padding: 15px;  /* Reduced padding for smaller height */
    border: none;
    border-radius: 5px;
    background: #24263b;
    color: #fff;
    outline: none;
    font-size: 16px;
}

.contact .input-box input {
    width: calc(50% - 10px);  /* Increased width for rectangular shape */
}

.contact textarea {
    width: 100%;
    resize: none;
    height: 150px;  /* Reduced height */
}

.contact .btn {
    display: block;
    width: 200px;  /* Reduced width */
    padding: 10px;  /* Reduced padding for smaller height */
    margin: 0 auto;  /* Center the button */
    border: none;
    border-radius: 5px;
    background: #00aaff;  /* Updated color to match "Me" */
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s;
}

.contact .btn:hover {
    background: #0088cc;
}

@media (max-width: 768px) {
    .contact .input-box {
        flex-direction: column;
    }

    .contact .input-box input {
        width: 100%;
        margin-bottom: 10px;
    }
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--snd-bg-color);
}
    
.footer-text {
    font-size: 1.6rem;
}
    
.footer-iconTop {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem 1rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
} 
    
.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--snd-bg-color);
}

/* Media Queries for Responsive Design */

/* For screens less than 1200px */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

/* For screens less than 991px */
@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }
    .section {
        padding: 10rem 3%;
    }
    .services {
        padding: 7rem;
    }
    .portfolio {
        padding-bottom: 7rem;
    }
    .contact {
        min-height: auto;
    }
    .footer {
        padding: 2rem 3%;
    }
}

/* For screens less than 768px */
/* Base styles */
#Menu-icon {
    display: none;
}

/* Mobile view adjustments */
@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: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0.5rem 1rem rgba(0, 0, 0, .2);
        display: none; /* Hide by default */
    }

    .navbar.active {
        display: block; /* Show when active */
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0; /* Adjusts the vertical spacing between menu items */
        padding: 0.8rem 0; /* Adjusts the padding around each menu item */
        
    }
    

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-img img {
        width: 90vw;
        margin-top: 4rem;
    }

    .about {
        flex-direction: column;
    }

    .about-img img {
        width: 90vw;
        margin-top: 4rem;
    }

    .services h2 {
        margin-bottom: 3rem;
    }

    .portfolio h2 {
        margin-bottom: 3rem;
    }

    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .input-box input,
    .input-box textarea {
        width: 100%;
        margin-bottom: 1rem;
    }

    .contact .input-box {
        flex-direction: column;
    }

    .btn {
        width: auto;
    }
}


/* For screens less than 480px */
@media (max-width: 480px) {
    .home-content h1 {
        font-size: 4rem;
    }
    .portfolio-container {
        grid-template-columns: 1fr;
    }
    .about-img img,
    .home-img img {
        width: 100%;
    }
}

@media (max-width: 617px) {
    .portfolio-container {
        grid-template-columns: 1fr;
    }
    .home-img img {
        width: 80vw;
        margin-top: 8rem;
    }
    .about-img img {
        width: 100vw;
        margin-top: 4rem;
    }
}

@media (max-width:450px){
    html {
        font-size: 50%;
    }
    .contact form input-box input {
        width: 100%;
    }
}
