/* =========================
   GLOBAL STYLES
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; 
}

body {
    background-color: rgb(0,0,33);
    color: white;
    line-height: 1.6;
}

/* =========================
   NAVBAR
========================= */
nav {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 0 5%;
    height: 80px;
    background-color: rgb(32,32,87);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    transition: 0.3s;
    font-size: 0.95rem;
}

nav ul li a:hover {
    color: rgb(153,153,226);
}

/* =========================
   HERO SECTION
========================= */
.first-sect {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 100px 10%;
    gap: 50px;
}

.left-sect {
    flex: 1;
    font-size: clamp(1.5rem, 5vw, 2.5rem); 
}

.left-heading {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 15px;
}

.right-sect {
    flex: 1;
    display: flex;
    justify-content: center;
}

.right-sect img {
    max-width: 100%;
    height: auto;
    width: 450px;
}

.Purple, #element {
    color: rgb(170,107,228);
}

/* =========================
   GLOBAL HR & TITLES
========================= */
hr {
    width: 90%;
    max-width: 1100px;
    margin: 100px auto;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(170,107,228), transparent);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 5px;
}

.section-subtitle {
    color: gray;
    margin-bottom: 30px;
    display: block;
}

/* Specialized HR for under headings */
.title-hr {
    width: 100px;
    height: 4px;
    background-color: rgb(170,107,228);
    margin: 10px 0 30px 0;
    border: none;
}

/* =========================
   CONTAINERS (About, Services, Projects, Contact)
========================= */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 80px auto;
}

/* =========================
   SERVICES (Flex to Stack)
========================= */
.service-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgb(18,18,62);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: 0.3s;
    gap: 20px;
}

.service-card:hover { transform: translateY(-5px); }

/* =========================
   GRID LAYOUTS (Languages, Projects, Contact)
========================= */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.card-common {
    background-color: rgb(18,18,62);
    padding: 25px;
    border-radius: 10px;
    transition: 0.3s;
}

.card-common:hover { transform: translateY(-5px); }

/* =========================
   FOOTER
========================= */
footer {
    padding: 50px 20px;
    background-color: rgb(18,18,62);
    text-align: center;
}

/* =========================
   RESPONSIVE MEDIA QUERIES
========================= */

/* Tablets and Mobile */
@media (max-width: 992px) {
    .first-sect {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px;
    }
    
    .right-sect img {
        width: 300px;
    }

    .service-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Small Mobile Devices */
@media (max-width: 600px) {
    nav {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    nav ul {
        margin-top: 10px;
    }

    nav ul li {
        margin: 0 10px;
    }

    .container {
        width: 95%;
    }

    .grid-container {
        grid-template-columns: 1fr; 
    }
}