:root {
    --primary-blue: #007bff;
    --dark-blue: #0056b3;
    --text-color: #333;
    --white-color: #ffffff;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --dark-bg: #1a1a1a;
    --light-text: #f1f1f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--white-color);
    color: var(--text-color);
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden; /* Prevent scrolling of the page when menu is open */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

section:nth-of-type(odd) {
    background-color: var(--dark-bg);
    color: var(--light-text);
}

section:nth-of-type(odd) h2,
section:nth-of-type(odd) h3 {
    color: var(--white-color);
}

section:nth-of-type(odd) .project-card {
    background-color: #2c2c2c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

h1, h2, h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    margin-bottom: 0;
    transition: color 0.3s ease;
}

.section-header h2:hover {
    color: var(--primary-blue);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-blue);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 8px 22px;
    background-color: transparent;
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid var(--primary-blue);
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
}

.btn:hover {
    background-color: var(--primary-blue);
    color: var(--white-color);
    transform: translateY(-2px);
}

.project-links a.btn {
    padding: 6px 16px;
    font-size: 0.9rem;
}

.contact-btn {
    font-size: 1.1rem;
    padding: 12px 28px;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, border-bottom 0.4s ease;
}

header.scrolled {
    background-color: var(--white-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #eee;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    z-index: 101;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--white-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

header.scrolled nav ul li a {
     color: var(--text-color);
}

nav ul li a:not(.active):hover {
    color: var(--primary-blue);
}

nav ul li a.active {
    color: var(--primary-blue) !important;
    font-weight: 700;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--white-color);
    cursor: pointer;
    z-index: 101;
}

header.scrolled .hamburger {
    color: var(--text-color);
}

.hero {
    padding-top: 70px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--dark-bg);
}

.hero-text h1, .hero-text p {
    color: var(--white-color);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

.name-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.name-link:hover {
    color: var(--primary-blue);
}

.hero-text p {
    font-size: 1.2rem;
    margin-top: 1rem;
}

.hero-icon {
    width: 300px;
    height: 300px;
    background-color: transparent;
    color: var(--white-color);
    border: 5px solid var(--white-color);
    border-radius: 50%;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 90px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.hero-icon:hover {
    background-color: var(--primary-blue);
    color: var(--white-color);
    transform: scale(1.05);
    border-color: var(--primary-blue);
}

#about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    text-align: center;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.skill-item i {
    font-size: 3.5rem;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.skill-item:hover i {
    transform: scale(1.1);
}

.skill-item p {
    font-weight: 600;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.project-card h3 {
    transition: color 0.3s ease;
}

.project-card:hover h3 {
    color: var(--primary-blue);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.project-desc {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.project-skills {
    margin-bottom: 1.5rem;
}

.project-skills span {
    background-color: #eaf2ff;
    color: var(--primary-blue);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 5px;
    display: inline-block;
    margin-top: 5px;
    transition: all 0.3s ease;
    cursor: default;
}

.project-skills span:hover {
    background-color: var(--primary-blue);
    color: var(--white-color);
    transform: translateY(-2px);
}

.project-links {
    display: flex;
    gap: 10px;
}

.project-links a {
    flex-grow: 1;
    margin-right: 0;
}

#contact {
    text-align: center;
}

#contact p {
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

footer {
    background-color: var(--dark-blue);
    color: var(--white-color);
    text-align: center;
    padding: 1.5rem 0;
}

.project-card, .skill-item, #about p, .section-header {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.project-card.visible, .skill-item.visible, #about p.visible, .section-header.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- MOBILE STYLES START HERE --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    section {
        padding: 4rem 0;
    }
    h2 {
        font-size: 2rem;
    }

    /* --- IMPROVED MOBILE NAVIGATION MENU --- */
    nav ul {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        /* Use a light, solid background inspired by your image */
        background-color: var(--light-text);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem; /* Increased gap for better spacing */
        transition: left 0.4s ease-in-out;
        z-index: 100; /* Ensure it's on top of content, but below logo/hamburger */
    }

    nav ul.open {
        left: 0;
    }

    nav ul li a {
        font-size: 2rem; /* Larger font size */
        font-weight: 700; /* Bolder text */
        color: var(--text-color); /* All links are dark by default in the menu */
    }

    .hamburger {
        display: block;
    }
    
    /* This rule is CRITICAL: It makes the 'X' icon dark when the menu is open */
    header.menu-open .hamburger {
        color: var(--text-color) !important;
    }

    .hero {
        padding-top: 5rem;
        min-height: auto;
    }
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 4rem;
    }
    .hero-text h1 {
        font-size: 2.8rem;
    }
    .hero-icon {
        width: 220px;
        height: 220px;
        font-size: 70px;
        margin-bottom: 2rem;
    }
    .project-grid {
        grid-template-columns: 1fr;
    }
}