/* 1. Reset & Core Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #081b29;
    --second-bg-color: #112e42;
    --text-color: #ededed;
    --main-color: #00abf0;
}
.heading {
    text-align: center;
    font-size: 4.5rem;
}
html {
    font-size: 62.5%; /* This makes 1rem = 10px for easier math */
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

/* 2. Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: .3s;
}

.header.sticky {
    background: var(--bg-color);
    border-bottom: .1rem solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.logo span {
    color: var(--main-color);
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    font-weight: 500;
    margin-left: 3.5rem;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

/* 3. Home Section */
.home {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Spreads text and image apart */
    min-height: 100vh;
    padding: 0 10%;
    gap: 10rem;
}

.home-content {
    max-width: 60rem;
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content h3 {
    display: inline-block; /* Helps the width animation stay precise */
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--main-color);
    overflow: hidden; 
    border-right: .3rem solid var(--main-color); 
    white-space: nowrap; 
    width: 0; 
    animation: typing 3s steps(30, end) forwards, blink .75s step-end infinite;
}

.home-content p {
    font-size: 1.6rem;
    margin: 2rem 0 4rem;
}

/* 4. THE IMAGE FIX */
/* This forces the home image to be a square/circle */
/* THE IMAGE: This handles the shape and glow */
/* 1. The Container (Centered and spacious) */
.home-img {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    /* We remove overflow: hidden here so the glow can "bleed" out */
}
.home-img img {
    /* Copy the exact width/height from your .about-img img */
    width: 30vw;  
    height: 30vw;
    min-width: 300px;
    min-height: 300px;
    
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    
    /* Keep your special Home glow */
    border: .4rem solid var(--main-color);
    box-shadow: 0 0 2.5rem var(--main-color);
    
    transition: .5s ease;
}
/* 3. The "Pop" on Hover */
.home-img img:hover {
    transform: scale(1.05); /* Makes it slightly bigger when touched */
    box-shadow: 0 0 30px var(--main-color), 
                0 0 90px var(--main-color) !important;
}
/* This forces the about image to be a square/circle */
#about .about-img img {
    width: 350px !important;
    height: 350px !important;
    min-width: 350px !important;
    border-radius: 50% !important;
    object-fit: cover;
    border: 2px solid var(--text-color);
}

/* Ensure the containers don't squish them */
.home-img, .about-img {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1; /* Gives the image its own space */
}

/* 5. Buttons & Icons */
.social-icons 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-icons a:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
    transform: translateY(-5px); /* Small pop-up effect */
    box-shadow: 0 0 25px var(--main-color);

}


.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--second-bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
}

.btn:hover {
    box-shadow: none;
}
.about{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10rem;
    background-color: var(--second-bg-color);
}
.about-content .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;
    text-decoration: none;
    margin-top: 2rem;
}

.about-content .btn:hover {
    box-shadow: none;
    transform: scale(1.05);
}
.about-img img {
    width: 30vw;
    height: 30vw; /* Height must match Width to make a square */
    object-fit: cover; /* This is the secret! It crops the image instead of squishing it */
    object-position: top;
    border-radius: 50%;
    border: .2rem solid var(--main-color);
    filter: grayscale(20%); /* Makes it look distinct from the home photo */
    transition: 0.4s ease-in-out;
}
.about-img img:hover{
    box-shadow: 0 0 5rem var(--main-color);
    transform: scale(1.02);
}
/* Fixed Selectors */
.about-content h2 {
    font-size: 6rem; /* Slightly smaller to fit mobile better */
    line-height: 1.2;
}

.about-content p { /* Added the dash and fixed the space */
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
    line-height: 1.6;
}
.services {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.services h2 {
    margin-bottom: 5rem;
    text-align: center;
}

.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allows cards to wrap on smaller screens */
    gap: 2rem;
}

.services-container .services-box {
    flex: 1 1 30rem; /* Grow, shrink, and basis of 30rem */
    background: var(--second-bg-color);
    padding: 3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--bg-color);
    transition: .5s ease;
}

.services-container .services-box:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
}

.services-box i {
    font-size: 7rem;
    color: var(--main-color);
    animation: fadeInUp 1s ease forwards;
}

.services-box h3 {
    font-size: 2.6rem;
    animation: fadeInUp 1s ease forwards;
}

.services-box p {
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
    animation: fadeInUp 1s ease forwards;
}

/* Ensure the About section behaves on mobile */
@media (max-width: 768px) {
    .about {
        flex-direction: column;
        text-align: center;
        padding: 5rem 9%;
        gap: 3rem;
    }
    
    .about-img img {
        width: 60vw;
        height: 60vw;
    }
}
 
/* 6. Mobile Menu Icon */
#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    cursor: pointer;
    display: none;
}

/* 7. Responsive Design */
@media (max-width: 991px) {
    .header {
        padding: 2rem 4%;
    }
    
    section {
        padding: 10rem 4% 2rem;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }
}

   .home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5rem;
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.home-content {
    flex: 1; /* Takes up half the space */
}

.home-img {
    flex: 1; /* Takes up the other half */
    display: flex;
    justify-content: flex-end;
}
.contact {
 display: block; /* Forces it to start on a new line */
    background: var(--second-bg-color);
    padding: 10rem 9%;
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.contact form {
    max-width: 70rem;
    margin: 5rem auto;
    text-align: center;
}

.contact .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.contact .input-box input, 
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.8rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: 1rem;
    border: .2rem solid var(--main-color);
    margin: 1rem 0;
}

.contact .input-box input {
    flex: 1 1 30rem; /* This keeps them side-by-side on desktop */
}

.contact textarea {
    resize: none;
}

.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 4rem 9%;
    background: var(--bg-color);
    width: 100%;
}

.footer .list {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 2rem 0;
}



.footer .list a {
    font-size: 1.7rem;
    color: var(--text-color);
}

.footer .copyright {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-top: 2rem;
    opacity: 0.6;
}
/* --- THE MOBILE MASTER FIX (Put at the end of CSS) --- */
@media (max-width: 768px) {
    .contact .input-box {
        flex-direction: column;
    }
}
    
    .contact .input-box input {
        width: 100% !important;
    }

    .footer .list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.footer .list li a {
    font-size: 1.8rem;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.footer .list li a:hover {
    color: #0ef;
    text-decoration: underline;
}

.copyright {
    margin-top: 1rem;
    font-size: 1.6rem;
    color: #fff;
    text-align: center;
}

/* =========================================
   2. ANIMATIONS (GLOBAL)
   ========================================= */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--main-color) }
}

/* =========================================
   3. THE MASTER MOBILE FIX (768px)
   KEEP ALL MOBILE RULES INSIDE THIS ONE BLOCK
   ========================================= */
@media (max-width: 768px) {
    /* Fixes the Home section shifting */
    .home {
        flex-direction: column-reverse; /* Image top, text bottom on mobile */
        text-align: center;
    }

    .home-img img {
        width: 70vw;
        height: 70vw;
    }

    /* Fixes the Contact Form */
    .contact .input-box {
        flex-direction: column;
    }

    .contact .input-box input {
        width: 100% !important;
    }

    /* Fixes the Footer */
    .footer .list {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    /* Fixes the Navbar */
    .navbar {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        padding: 1rem 4%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0,0,0,.2);
        transition: .25s ease;
    }

    .navbar.active {
        left: 0;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--main-color) }
}
/* MOBILE FIX */
@media (max-width: 768px) {
    .contact .contact-inputs {
        flex-direction: column; /* Stacks inputs on phone */
        gap: 0;
    }
    }