/* ======== Global Styles & Variables ======== */
:root {
    --primary-color: #00aaff; /* A vibrant blue */
    --secondary-color: #0077b6;
    --bg-color: #0f172a; /* Dark blue/slate */
    --surface-color: #1e293b;
    --text-color: #e2e8f0; /* Light gray/slate */
    --text-muted-color: #94a3b8;
    --font-family: 'Poppins', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky navbar */
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* ======== Fade-in Animation on Scroll ======== */
.content-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ======== Header / Navbar ======== */
#header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#header.scrolled {
    background-color: rgba(30, 41, 59, 0.85); /* surface-color with transparency */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 2rem;
}

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

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

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

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

/* ======== Hero Section ======== */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('https://images.pexels.com/photos/957024/berchtesgaden-alpine-watzmann-berchtesgaden-national-park-957024.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1') no-repeat center center/cover;
    padding: 0 2rem;
}

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

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-muted-color);
}

.hero-subtitle .typing-text {
    color: var(--primary-color);
    font-weight: 600;
}

.hero-bio {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-socials a {
    color: var(--text-color);
    font-size: 2rem;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.hero-socials a:hover {
    color: var(--primary-color);
}

.hero-content .btn {
    margin-top: 2rem;
}
.leetcode-icon{
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1); /* white icon for dark theme */
    transition: 0.3s ease;
    
}

.leetcode-icon:hover{
    
    filter: brightness(0) saturate(100%) invert(62%) sepia(99%) saturate(1635%) hue-rotate(167deg) brightness(100%) contrast(101%);
}
/* ======== About Section ======== */
.about-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-image {
    flex: 1;
    max-width: 400px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-text {
    flex: 1.5;
}

.about-text h2 {
    text-align: left;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-muted-color);
}

/* ======== Skills Section ======== */
.skills-section {
    padding: 6rem 0;
    background-color: var(--surface-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 170, 255, 0.2);
}

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

.skill-card span {
    font-size: 1rem;
    font-weight: 500;
}

/* ======== Projects Section ======== */
.projects-section {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

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

.project-card {
    background-color: var(--surface-color);
    width: 40%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-description {
    color: var(--text-muted-color);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.project-tech {
    margin-bottom: 1.5rem;
}

.project-tech span {
    background-color: #2c3e50;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

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

.project-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.project-link i {
    margin-right: 0.5rem;
}

/* ======== Footer / Contact Section ======== */
.footer {
    background-color: var(--surface-color);
    padding: 4rem 0 2rem;
    text-align: center;
}

.contact-info {
    margin: 2rem 0;
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-info a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--primary-color);
}

.footer-socials a {
    color: var(--text-color);
    font-size: 1.8rem;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.footer-socials a:hover {
    color: var(--primary-color);
}

.copyright {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-muted-color);
}


/* ======== Responsive Design ======== */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    .about-image {
        max-width: 100%;
    }
    .about-text h2 {
        text-align: center;
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px; /* Adjust for smaller navbar */
    }
    
    .navbar {
        height: 70px;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--surface-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        padding: 1rem 0;
    }

    .hamburger {
        display: block;
    }
    
    .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);
    }

    .project-card {
        width: 100%;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}