@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #00aaff;
    --primary-glow: rgba(0, 170, 255, 0.4);
    --background-color: #121212;
    --card-color: #1e1e1e;
    --text-color: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    background-color: var(--background-color);
    color: var(--text-color);
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* Header & Navbar */
.navbar {
    display: flex;
    align-items: center;
    padding: 0.8rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-right: auto; /* Pushes everything else to the right */
}

.logo i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.nav-menu {
    display: flex;
    gap: 1.8rem;
    margin: 0 2rem; /* Add some space around the centered menu */
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto; /* Pushes itself to the far right */
}

.profile-pic {
    width: 42px;  /* Increased size by 20% from 35px */
    height: 42px; /* Increased size by 20% from 35px */
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-color);
}

/* Hero Section */
#hero {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 85vh;
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://picsum.photos/id/947/1600/900?blur=2');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 0 2rem;
}

.hero-content {
    max-width: 700px;
}

.hero-content h1 {
    font-size: 2.8rem;
}

.hero-content p {
    font-size: 1rem;
    max-width: 550px;
    margin: 1rem auto 1.5rem;
    color: var(--text-secondary);
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.6rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: #00bfff;
    transform: translateY(-3px);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Sections */
section {
    padding: 3.5rem 2rem;
}

#about {
    max-width: 750px;
    margin: -50px auto 0 auto;
    text-align: center;
    background-color: var(--card-color);
    padding: 2.5rem;
    border-radius: 10px;
    position: relative;
    z-index: 10;
}


/* Skills Section */
#skills {
    background-color: var(--background-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    max-width: 1200px;
    margin: auto;
}

.skill-card {
    background: var(--card-color);
    padding: 1.5rem;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--primary-glow);
}

.skill-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.skill-card h3 {
    font-size: 1rem;
    color: var(--text-color);
}

/* Projects Section */
#projects {
    background-color: var(--card-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: auto;
}

.project-card {
    background: var(--background-color);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.project-link {
    display: block;
    color: var(--text-color);
}

.project-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.project-card:hover img {
    opacity: 1;
}

.project-info {
    padding: 1rem;
}

.project-info h3 {
    font-size: 1.05rem;
}

/* Contact Section */
.contact-grid {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: auto;
}

.contact-card {
    background: var(--card-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s, color 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--primary-glow);
    color: var(--primary-color);
}

.contact-card i {
    font-size: 1.1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--background-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        justify-content: space-between;
    }

    .logo {
        margin-right: 0; /* Reset margin */
    }

    .nav-right {
        margin-left: 0; /* Reset margin */
    }

    .nav-menu {
        display: none; /* Hide the main menu */
        position: fixed;
        left: -100%;
        top: 59px; /* Adjusted for navbar height */
        flex-direction: column;
        background-color: #1e1e1e;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.2);
        gap: 0;
        margin: 0;
    }

    .nav-menu.active {
        display: flex;
        left: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-menu li:last-child {
        border-bottom: none;
    }

    .hamburger {
        display: block; /* Show the hamburger */
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .profile-pic {
        display: none; /* Hide profile pic on mobile to save space */
    }

    h2 {
        font-size: 1.8rem;
    }

    #hero {
        height: 80vh;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    section {
        padding: 2.5rem 1rem;
    }

    #about {
        margin-top: -40px;
        padding: 2rem;
    }

    .projects-grid, .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 80%;
        justify-content: center;
    }
}