/* CSS VARIABLES FOR THEMING */
:root {
    --bg-color: #ffffff;
    --text-color: #777777;
    --heading-color: #000000;
    --sidebar-bg: #f2f3f7;
    --sidebar-border: #e6e6e6;
    --card-bg: #f9f9f9;
    --section-border: #f2f3f7;
    --accent-color: #2c98f0;
    --tag-bg: #e6e6e6;
    --tag-text: #555;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #b0b0b0;
    --heading-color: #ffffff;
    --sidebar-bg: #121212;
    --sidebar-border: #333333;
    --card-bg: #242424;
    --section-border: #2a2a2a;
    --accent-color: #4db5ff;
    --tag-bg: #333;
    --tag-text: #ddd;
}

/* General Reset & Typography */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Quicksand', sans-serif; }
body { 
    display: flex; 
    line-height: 1.8; 
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden; /* Prevent horizontal scroll */
}
html { scroll-behavior: smooth; }

/* Sidebar Navigation (Desktop Default) */
#sidebar {
    width: 300px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--sidebar-bg);
    padding: 60px 30px;
    text-align: center;
    border-right: 1px solid var(--sidebar-border);
    overflow-y: auto;
    transition: transform 0.3s ease-in-out, background 0.3s;
    z-index: 1000;
}

#sidebar .profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 30px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 5px solid var(--bg-color);
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

#sidebar h1 { font-size: 24px; color: var(--heading-color); margin-bottom: 10px; font-weight: 700; }
#sidebar .role { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; color: var(--accent-color); line-height: 1.5; }
#home .role { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; color: var(--accent-color); line-height: 1.5; }

/* Dark Mode Button */
.theme-btn {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 30px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.theme-btn:hover { background: var(--accent-color); color: var(--bg-color); }

#main-menu ul { list-style: none; }
#main-menu ul li { margin-bottom: 15px; }
#main-menu ul li a { 
    text-decoration: none; 
    color: var(--text-color); 
    text-transform: uppercase; 
    font-size: 12px; 
    font-weight: 500; 
    letter-spacing: 1px;
    transition: 0.3s;
    display: block;
    padding-bottom: 5px;
}
#main-menu ul li a:hover { color: var(--accent-color); transform: translateX(5px); }

.footer { margin-top: 50px; font-size: 12px; color: #999; }

/* Main Content Area */
#main-content {
    margin-left: 300px;
    width: calc(100% - 300px);
    padding: 0;
    transition: margin-left 0.3s ease-in-out;
}

section { padding: 80px 8%; border-bottom: 1px solid var(--section-border); }

.heading-meta {
    margin-bottom: 10px;
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    font-weight: 500;
    letter-spacing: 5px;
}

.title {
    font-size: 30px;
    margin-bottom: 40px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--heading-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: url('assets/bg1.png') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.92);
}
[data-theme="dark"] .hero-overlay { background: rgba(0, 0, 0, 0.85); }

.hero-text { position: relative; z-index: 1; max-width: 700px; }
.hero-text h1 { font-size: 60px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; color: var(--heading-color); }
.hero-text p { margin-bottom: 30px; font-size: 18px; color: var(--text-color); }

/* About Section */
.about-container { display: flex; gap: 50px; align-items: flex-start; }
.about-img { flex-shrink: 0; width: 300px; }
.about-img img { 
    width: 100%; border-radius: 4px; 
    box-shadow: 0 15px 40px -10px rgba(0,0,0,0.2); 
    filter: grayscale(100%); transition: 0.5s; cursor: pointer;
}
.about-img img:hover { filter: grayscale(0%); }
.about-text { flex: 1; }

.services-grid { display: flex; gap: 20px; margin-top: 30px; }
.service-box {
    flex: 1;
    padding: 25px 15px;
    color: white;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.service-box:hover { transform: translateY(-5px); }
.service-box h3 { font-size: 13px; margin-top: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #fff; }
.service-box i { font-size: 28px; }
.blue { background: #2c98f0; }
.red { background: #ec5453; }
.yellow { background: #f9bf3f; }

/* Skills & Tags */
.tech-stack { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.tag { background: var(--tag-bg); color: var(--tag-text); padding: 5px 15px; border-radius: 20px; font-size: 12px; font-weight: 600; transition: 0.3s; }
.skill-item { margin-bottom: 25px; }
.skill-item span { font-weight: 600; color: var(--heading-color); display: block; margin-bottom: 8px; }
.progress-bar { background: var(--sidebar-border); height: 8px; border-radius: 4px; overflow: hidden; }
.progress { background: var(--accent-color); height: 100%; border-radius: 4px; }

/* Experience, Education & Project Cards */
.timeline-item, .project-card {
    background: var(--card-bg);
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 4px;
    transition: 0.3s;
}
.timeline-item { border-left: 4px solid var(--accent-color); border-radius: 0 4px 4px 0; }
.project-card { border: 1px solid var(--sidebar-border); }

.timeline-item h3, .project-card h3 { font-size: 20px; margin-bottom: 5px; color: var(--heading-color); }
.timeline-item .date, .project-card .date { color: var(--accent-color); font-weight: 700; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; display: block; }
.project-card .role { display: block; color: var(--accent-color); font-weight: 600; margin-bottom: 5px; }
.timeline-item .company { display: block; margin-bottom: 15px; font-weight: 600; color: var(--text-color); opacity: 0.8; }
.timeline-item ul { list-style-position: inside; margin-left: 10px; }

.btn-small { background: #333; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; margin-top: 15px; font-size: 12px; }
[data-theme="dark"] .btn-small { background: var(--accent-color); color: var(--bg-color); font-weight: bold; }

/* Contact Links */
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-box { display: flex; align-items: center; gap: 20px; }
.contact-box i { width: 40px; height: 40px; background: var(--sidebar-bg); color: var(--accent-color); display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.contact-box p { color: var(--heading-color); font-weight: 500; }
.contact-box a { color: inherit; text-decoration: none; transition: 0.3s; }
.contact-box a:hover { color: var(--accent-color); }

.btn { background: var(--accent-color); color: #fff; padding: 15px 30px; border: none; cursor: pointer; font-weight: 700; border-radius: 30px; margin-top: 20px; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
[data-theme="dark"] .btn { color: var(--bg-color); }
.btn:hover { transform: translateY(-2px); opacity: 0.9; }


/* RESPONSIVE & MOBILE NAVIGATION */

/* 1. Default: Hide Toggle Button on Desktop */
#mobile-nav-toggle {
    display: none;
}

/* 2. Tablet & Mobile View (Max Width 992px) */
@media (max-width: 992px) {
    
    /* Show the hamburger button */
    #mobile-nav-toggle {
        display: flex; /* Centers the icon */
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 9999; /* Higher than sidebar */
        background: var(--accent-color);
        color: #fff;
        border: none;
        width: 45px;
        height: 45px;
        border-radius: 50%;
        font-size: 20px;
        cursor: pointer;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        transition: transform 0.3s;
    }
    #mobile-nav-toggle:hover {
        transform: scale(1.1);
    }

    /* Hide Sidebar by pushing it off-screen to the left */
    #sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        width: 270px; /* Slightly narrower on mobile */
    }

    /* Expand main content to full width */
    #main-content {
        margin-left: 0;
        width: 100%;
    }

    /* Adjust Layouts for smaller screens */
    section { padding: 60px 5%; }
    .about-container { flex-direction: column; }
    .about-img { width: 100%; max-width: 250px; margin: 0 auto 30px; }
    .contact-info { gap: 15px; }
    .hero-text h1 { font-size: 40px; }

    /* ACTIVE STATE (When Menu is Open)*/
    /* When body has class 'mobile-nav-active', slide sidebar back */
    body.mobile-nav-active #sidebar {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0,0,0,0.5);
    }
}

/* 3. Small Phones (Max Width 576px) */
@media (max-width: 576px) {
    .hero-text h1 { font-size: 32px; }
    .hero-text p { font-size: 16px; }
    .title { font-size: 24px; }
    .services-grid { flex-direction: column; }
}