* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Updated color palette for a vibrant, modern look */
:root {
    --primary-color: #2c2c2c; /* Dark gray for headings and main text */
    --secondary-color: #555; /* Lighter gray for secondary text */
    --light-bg: #ffffff; /* Off-white for light backgrounds */
    --dark-bg: #f9f9f9; /* Light gray for sections */
    --text-dark: #2c2c2c;
    --text-light: #6a737d;
    --card-bg: #ffffff;
    --link-color: #0078d4; /* Microsoft blue for links */
    --accent-gradient: linear-gradient(128.87deg, rgb(81, 43, 212) 14.05%, rgb(214, 0, 170) 89.3%);
    --new-color: rgb(81, 43, 212);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

nav.scrolled {
    box-shadow: 0 2px 20px rgba(11, 26, 47, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    background-image: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;  /* ← ADDED */
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;  /* ← ADDED */
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 3rem;
    background-image: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-button {

    display: inline-block;
    background: transparent;
    color: var(--new-color);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--new-color);
}

.cta-button:hover {
    color: white;
    background: var(--new-color);
    transform: translateY(-3px);
}

.hero-image {
    position: relative;
    animation: fadeInRight 1s ease;
}

.profile-image {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--card-bg);
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

/* Services Section */
.services {
    padding: 6rem 2rem;
    background: var(--card-bg);
    margin-bottom: 6rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--light-bg);
    padding: 2.5rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(11, 26, 47, 0.1);
}

.service-icon {
    width: 85px;
    height: 85px;
    background-color: white;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px rgb(116, 192, 252, 0.3);
}

.service-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* Projects Section */
.projects {
    padding: 6rem 2rem;
    background: var(--dark-bg);
}

.project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
    align-items: center;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(11, 26, 47, 0.1);
    padding: 2rem;
}

.project-item:nth-child(even) .project-content {
    order: 2;
}

.project-item:nth-child(even) .project-carousel {
    order: 1;
}

.project-carousel {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(11, 26, 47, 0.1);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(63, 60, 60, 0.661);
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: rgb(92, 155, 255);
}

.project-content {
    padding: 2rem;
}

.project-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.tech-tag {
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link.primary {
    background: var(--accent-gradient);
    color: white;
}

.project-link.secondary {
    background: transparent;
    color: var(--link-color);
    border: 2px solid var(--link-color);
}

.project-link:hover {
    transform: translateY(-2px);
}

/* Contact Section */
.contact {
    padding: 6rem 2rem;
    background: var(--card-bg);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-form {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.form-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.form-input {
    padding: 1.2rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    font-size: 1rem;
    background: var(--light-bg);
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #512bd4;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.contact-item {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.241);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(81, 43, 212, 0.2);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
}

.social-links {
    display: flex;
    justify-content: flex-start;
    gap: 2.58rem;
    margin-top: 2.5rem;
}

.social-link:hover {
    background: rgb(79, 158, 255);
    transform: translateY(-2px);
}

.project-link.secondary {
    border-color: var(--link-color);
    color: var(--link-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }

    /* Add these styles for the mobile menu overlay */
    .nav-links.active {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        display: flex;
    }

    .nav-links.active li {
        margin: 1rem 0;
    }

    .nav-links.active a {
        font-size: 1.5rem;
        font-weight: 600;
    }

    .mobile-menu.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .mobile-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .profile-image {
        width: 250px;
        height: 250px;
    }

    .project-item {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-item {
        padding: 1rem;
    }

    .project-item:nth-child(even) .project-content {
        order: unset;
    }

    .project-item:nth-child(even) .project-carousel {
        order: unset;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .social-links{
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle{
        font-size: 2rem;
    }

    .profile-image {
        width: 250px;
        height: 250px;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .hero, .services, .projects, .contact {
        padding: 4rem 1rem;
    }
}