:root {
    --bg-color: #0a0a0a;
    --card-bg: #171717;
    --text-color: #e5e5e5;
    --text-muted: #a3a3a3;
    --accent-color: #6366f1; /* Indigo 500 */
    --accent-hover: #4f46e5; /* Indigo 600 */
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --nav-height: 80px;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

body.light-mode {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --accent-color: #4f46e5;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Light Mode Specific Overrides */
body.light-mode h1, 
body.light-mode h2, 
body.light-mode h3, 
body.light-mode h4, 
body.light-mode h5, 
body.light-mode h6 {
    color: #0f172a;
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .nav-links a {
    color: #475569;
}

body.light-mode .nav-links a:hover, 
body.light-mode .nav-links a.active {
    color: var(--accent-color);
}

body.light-mode .about-content,
body.light-mode .skill-category,
body.light-mode .project-card,
body.light-mode .service-card,
body.light-mode .contact-wrapper {
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px var(--shadow-color);
}

body.light-mode .skill-tags span {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

body.light-mode .project-card:hover {
    box-shadow: 0 20px 25px -5px var(--shadow-color);
}

body.light-mode .timeline::before {
    background: #e2e8f0;
}

body.light-mode .contact-form input, 
body.light-mode .contact-form textarea {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: var(--text-color);
}

body.light-mode .contact-form input:focus, 
body.light-mode .contact-form textarea:focus {
    background: #fff;
    border-color: var(--accent-color);
}

body.light-mode footer {
    border-top-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .hamburger .bar {
    background-color: #0f172a;
}

/* Theme Toggle Button */
#theme-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 20px;
    transition: var(--transition);
}

#theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

body.light-mode #theme-toggle {
    border-color: rgba(0, 0, 0, 0.1);
    color: #475569;
}

body.light-mode #theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--accent-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo .dot {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
}

.nav-links .btn-primary {
    padding: 10px 24px;
    color: #fff;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: var(--transition);
}

/* Buttons */
.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    background: url('../assets/hero_bg.png') no-repeat center center/cover;
}

body.light-mode #hero {
    /* Use the SVG background we just created */
    background: url('../assets/hero_bg_light.svg') no-repeat center center/cover;
}

body.light-mode #hero h1 {
    background: linear-gradient(to right, #1e293b, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.7); /* Dark overlay */
    z-index: 1;
}

body.light-mode #hero::before {
    background: rgba(255, 255, 255, 0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.subtitle {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#hero h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #a3a3a3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero h2 {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 400;
}

#hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.cta-group {
    display: flex;
    gap: 20px;
}

/* Sections General */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    display: block;
    width: fit-content;
    margin: 0 auto 60px auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

/* About Section */
.about-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.skill-category h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags span {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.competency-list li {
    margin-bottom: 10px;
    color: var(--text-muted);
    position: relative;
    padding-left: 20px;
}

.competency-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    height: 60px; /* limit height for uniformity */
    overflow: hidden;
}

.tech-stack {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-stack span {
    font-size: 0.8rem;
    color: var(--accent-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.btn-link {
    color: #fff;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-link:hover {
    color: var(--accent-color);
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    padding-left: 40px;
    margin-bottom: 50px;
    position: relative;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.timeline-content ul {
    list-style: disc;
    padding-left: 20px;
}

.timeline-content li {
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--card-bg);
    padding: 40px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.1rem;
}

/* Objective Section */
.objective-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    padding: 60px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.objective-box h2 {
    margin-bottom: 20px;
}

.objective-box p {
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--card-bg);
    padding: 50px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-3px);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(10, 10, 10, 0.8);
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-to-top {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-to-top:hover {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    #hero h1 {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 40px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        height: calc(100vh - var(--nav-height));
        overflow-y: auto;
    }
    
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        padding: 15px 0;
    }

    .hamburger {
        display: block;
    }

    #hero {
        text-align: center;
        justify-content: center;
    }

    .hero-content {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    #hero h1 {
        font-size: 2.8rem;
    }
    
    #hero h2 {
        font-size: 1.5rem;
    }

    .cta-group {
        justify-content: center;
    }

    .section {
        padding: 60px 0;
    }

    /* Fix Section Title Centering on Mobile */
    .section-title {
        left: auto;
        transform: none;
        display: block;
        margin: 0 auto 50px auto;
        width: fit-content;
        max-width: 100%;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-item::after {
        left: 16px;
    }

    footer .container {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2.2rem;
    }
    
    #hero h2 {
        font-size: 1.2rem;
    }
    
    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    /* Force grids to be 1 column on small screens */
    .skills-grid, .projects-grid, .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content, .contact-wrapper {
        padding: 20px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .timeline::before {
        left: 0;
    }
    
    .timeline-item {
        padding-left: 25px;
        margin-left: 10px;
        border-left: 2px solid rgba(255, 255, 255, 0.1);
    }
    
    .timeline-item::after {
        left: -6px;
    }
    
    /* Hide the main timeline line since we are using border-left on items */
    .timeline::before {
        display: none;
    }
}

/* Scroll Reveal Animation */
.section-title, .about-content, .skill-category, .project-card, .timeline-item, .service-card, .contact-wrapper {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu Toggle Animation */
.hamburger.toggle .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.toggle .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.toggle .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}
