:root {
    --accent-color: #9b6dff;
    --accent-gradient: linear-gradient(135deg, #9b6dff, #4a9eff);
    --accent-hover: #8a5ff0;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #303030;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --transition-default: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, var(--bg-primary), var(--accent-color) 400%);
    --gradient-secondary: linear-gradient(135deg, var(--bg-secondary), var(--accent-color) 400%);
    --section-spacing: 6rem;
}

[data-theme="light"] {
    --bg-primary: #f8f8fa;
    --bg-secondary: #f0f0f3;
    --bg-tertiary: #e4e4e9;
    --text-primary: #181818;
    --text-secondary: #333;
    --accent-color: #4a9eff;
    --accent-hover: #3a7ad9;
    --accent-gradient: linear-gradient(135deg, #4a9eff, #9b6dff);
    --gradient-primary: linear-gradient(135deg, var(--bg-primary), var(--accent-color) 400%);
    --gradient-secondary: linear-gradient(135deg, var(--bg-secondary), var(--accent-color) 400%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 2;
    letter-spacing: 0.3px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    opacity: 0;
    animation: fadeIn 0.8s ease-in-out forwards;
    transition: background 0.3s, color 0.3s;
}

/* Light/Dark Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-secondary);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 2000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.13);
    transition: background 0.3s, color 0.3s, border 0.3s, transform 0.2s;
}
.theme-toggle:hover, .theme-toggle:focus {
    background: var(--accent-color);
    color: var(--bg-primary);
    border-color: var(--accent-hover);
    outline: none;
    transform: scale(1.08);
}

h1, h2, h3 {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.7px;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 3rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    line-height: 1.9;
    font-size: 1.05rem;
}

/* Neural Background */
.neural-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.8;
    pointer-events: none;
}

/* Navigation Styles */
.navbar {
    position: static;
    width: 100%;
    background-color: var(--navbar-bg, rgba(18, 18, 18, 0.95));
    color: var(--text-primary);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px var(--navbar-shadow, rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}
[data-theme="light"] .navbar {
    --navbar-bg: rgba(250, 250, 255, 0.99);
    border-bottom: 1px solid #e4e4e9;
}


.homepage .navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: var(--navbar-bg-home, rgba(18, 18, 18, 0.98));
}
[data-theme="light"] .homepage .navbar {
    --navbar-bg-home: rgba(250, 250, 255, 0.99);
    border-bottom: 1px solid #e4e4e9;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    /* Mobile */
    @media (max-width: 768px) {
        flex-direction: column;
        gap: 1rem;
        display: none; /* Hide nav by default on mobile */
        position: absolute;
        top: 60px; /* Adjust based on navbar height */
        left: 0;
        width: 100%;
        background-color: rgba(18, 18, 18, 0.98); /* Slightly more opaque for overlay */
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(12px); /* Slightly more blur */
    }
}

.navbar a {
    color: var(--text-secondary); /* Use secondary text color for subtle look */
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-default);
    position: relative; /* For underline effect */
    padding-bottom: 5px; /* Space for underline */
}

.navbar a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0); /* Start hidden */
    transition: transform 0.3s ease-out;
}

.navbar a:hover::after,
.navbar a.active::after {
    transform: scaleX(1); /* Grow on hover/active */
}

.navbar a:hover {
    color: var(--accent-color); /* Highlight color on hover */
}

.navbar a.active {
    color: var(--accent-color); /* Highlight color for active */
}

/* Header Styles */
.header {
    background: var(--gradient-primary);
    color: var(--text-primary);
    text-align: center;
    padding: 4rem 1rem;
    position: relative;
}

.header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.header p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-secondary);
}

/* Projects Page Header */
.projects-header {
    max-width: 900px;
    margin: 2.8rem auto 2.2rem auto;
    padding: 2.5rem 2.2rem 2.2rem 2.2rem;
    background: var(--gradient-secondary);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    text-align: center;
    position: relative;
    border: 1px solid rgba(155, 109, 255, 0.08);
}
[data-theme="light"] .projects-header {
    background: linear-gradient(135deg, #f8f8fa 70%, #e4e4e9 100%);
    box-shadow: 0 4px 16px rgba(80, 80, 120, 0.06);
    border: 1px solid #e4e4e9;
}
.projects-header h1 {
    font-size: 2.6rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.1rem;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.15;
}
.projects-header p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 1.1rem;
    max-width: 670px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.projects-header .quicknav-tip {
    font-size: 0.98rem;
    color: var(--accent-color);
    background: rgba(155,109,255,0.09);
    border-radius: 8px;
    padding: 0.6rem 1.1rem;
    margin: 0.4rem auto 0 auto;
    display: inline-block;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(155,109,255,0.04);
    letter-spacing: 0.01em;
}
@media (max-width: 600px) {
    .projects-header {
        padding: 1.2rem 0.5rem 1.5rem 0.5rem;
        margin: 1.3rem 0 1.2rem 0;
    }
    .projects-header h1 {
        font-size: 1.5rem;
    }
    .projects-header p {
        font-size: 0.98rem;
    }
}

/* Section Styles */
.section {
    margin: 2rem auto;
    padding: var(--section-spacing) 1rem;
    max-width: 1200px;
    position: relative;
    background: var(--gradient-secondary);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    animation: sectionFadeIn 0.8s ease forwards;
}

/* Footer Styles */
footer {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    margin-top: 2rem;
}

footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Quick Navigation */
.quick-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--quicknav-bg, rgba(42, 42, 42, 0.95));
    box-shadow: 0 4px 6px var(--quicknav-shadow, rgba(0, 0, 0, 0.1));
    backdrop-filter: blur(10px);
    transition: padding 0.3s ease, background 0.3s;
}
[data-theme="light"] .quick-nav {
    --quicknav-bg: rgba(245, 245, 255, 0.94);
    --quicknav-shadow: rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid #e4e4e9;
}
@media (max-width: 768px) {
    .quick-nav {
        position: static;
        flex-direction: column;
    }
}

.quick-nav.scrolled {
    padding: 0.5rem;
}

.quick-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: bold;
    transition: var(--transition-default);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent; /* Add border for hover effect */
}

.quick-nav a:hover {
    color: var(--accent-color);
    background-color: rgba(155, 109, 255, 0.1); /* Subtle background on hover */
    border-color: var(--accent-color); /* Highlight border on hover */
    transform: translateY(-2px); /* Subtle lift */
}

.quick-nav a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: 0.5s; /* Add a slight delay to match card effect */
}

.quick-nav a:hover::after {
    left: 100%;
}

/* Section Base Styles (Add section separator) */
.section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
}

.section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 2.5rem;
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
}

/* Skill Badges */
.skill-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.skill-badge {
    background: rgba(155, 109, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid rgba(155, 109, 255, 0.2);
}

/* Project Grid Styles */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Make featured project grid on homepage single column */
#featured-projects .projects-grid {
    grid-template-columns: 1fr;
}

/* Hide all project cards in the featured section by default */
#featured-projects .projects-grid .project-card {
    display: none;
}

/* Optional: Adjust card width if needed */
.project-card {
    width: 100%;
}

/* Mobile responsiveness - switch to 1 column on smaller screens */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Project Cards */
.project-card {
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                        box-shadow 0.4s ease;
    border: 1px solid rgba(155, 109, 255, 0.1);
    height: 100%;
    position: relative;
}

/* Ensure consistent height for project cards on the projects page */
/* This excludes the featured project card on the homepage */
body:not(.homepage) .projects-grid .project-card {
    min-height: 600px; /* Increased min-height */
    height: auto; /* Override the height: 100% to allow min-height to work */
}

.project-card:hover,
.project-card:focus-within {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(155, 109, 255, 0.25);
    background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-secondary));
    border-color: var(--accent-hover);
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transition: 0.6s;
}

.project-card:hover::before {
    left: 100%;
}

.project-card-image {
    width: 100%;
    height: auto; /* Changed from fixed height */
    object-fit: contain; /* Changed from cover */
    filter: grayscale(20%) brightness(90%);
    border-radius: 10px 10px 0 0;
    transition: filter 0.3s ease;
}

/* Optional: Adjust for mobile if needed */
@media (max-width: 768px) {
    .project-card-image {
        height: 250px; /* Slightly smaller on mobile */
    }
}

.project-card:hover .project-card-image {
    filter: grayscale(0%) brightness(100%);
}

.project-card-content {
    padding: 1.5rem;
}

.project-card-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-card-content p {
    color: var(--text-secondary);
}

.project-card-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

/* Enhanced Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition-default), transform 0.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    border-color: var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: 0.5s;
}

.btn:hover::after {
    left: 100%;
}

.btn:active,
.btn:focus {
    transform: scale(0.95);
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(155, 109, 255, 0.1);
    z-index: 1001;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #7a3a7a);
    width: 0%;
    transition: width 0.2s ease;
}

/* Contact Section Styles */
.contact {
    text-align: center;
    padding: 4rem 1rem; /* Keep existing padding */
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-icon {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease, transform 0.2s ease;
    position: relative;
    padding: 10px;
    border-radius: 50%;
}

.social-icon:hover {
    color: var(--accent-color);
    transform: translateY(-5px) scale(1.1);
    background: rgba(155,109,255,0.1);
    box-shadow: 0 0 15px rgba(155,109,255,0.2);
}

/* Tech Stack Styles */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tech-group {
    background: rgba(155, 109, 255, 0.05);
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid rgba(155, 109, 255, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.tech-group:hover {
    transform: translateY(-5px);
    background: linear-gradient(45deg, rgba(155,109,255,0.1), transparent);
    border-color: var(--accent-color);
}

.tech-group strong {
    display: block;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    text-align: center;
}

.tech-group span {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tech-group i {
    margin-right: 6px;
    color: var(--accent-color);
}

/* Responsive adjustments for tech stack */
@media (max-width: 768px) {
    .tech-stack {
        grid-template-columns: 1fr;
    }
}

/* Project Details */
.project-details {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(155, 109, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(155, 109, 255, 0.1);
}

.project-details h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.project-details ul {
    list-style: none;
    padding: 0;
}

.project-details ul li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* NEW: Introduction Styles */
.introduction {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideUp 0.8s 0.4s forwards;
}

@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quick Links Styles (for homepage) */
.quick-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.quick-links .btn {
    min-width: 200px; /* Give buttons a minimum width */
    text-align: center;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .navbar ul.active {
        display: flex; /* Show nav when active */
    }

    .mobile-menu-btn {
        display: block; /* Show button on mobile */
        position: absolute;
        top: 1rem;
        right: 1rem;
        color: var(--text-primary);
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 1001;
    }

    /* Adjust navbar padding when button is present */
    .navbar {
        padding-right: 3rem; /* Make space for the button */
    }

    .quick-nav {
        /* Existing quick-nav mobile styles */
        position: static; /* Quick nav should not be fixed/sticky on mobile when main nav is toggled */
        flex-direction: column;
    }
}

/* Hide mobile menu button by default on larger screens */
.mobile-menu-btn {
    display: none;
}

/* Resume Item Styles */
.resume-item {
    background: rgba(155, 109, 255, 0.05);
    border: 1px solid rgba(155, 109, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem; /* Increased padding */
    margin-bottom: 1.5rem; /* Increased margin */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden; /* Ensure content stays within bounds */
}

.resume-item::before {
    /* Remove default bullet */
    content: none;
}

.resume-item:hover {
    background: rgba(155, 109, 255, 0.1);
    border-color: var(--accent-color);
}

.resume-item strong {
    color: var(--accent-color);
    font-size: 1.2rem; /* Slightly larger font for title */
    display: inline-block; /* Allow date to be on the same line */
    margin-bottom: 0.5rem;
    margin-right: 1rem; /* Space between title and date/icon */
}

.resume-item .resume-icon {
    margin-right: 0.5rem;
    color: var(--text-secondary); /* Icon color */
}

.resume-item .resume-date {
    color: var(--text-secondary); /* Style for date */
    font-size: 0.9rem;
    font-weight: normal;
}

.resume-item ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.75rem; /* Space between title/date and bullet points */
}

.resume-item ul li {
    margin-bottom: 0.5rem;
    line-height: 1.8; /* Increased line height for readability */
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem; /* Space for custom bullet */
}

.resume-item ul li::before {
    content: '•'; /* Custom bullet point */
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.resume-item ul li a {
    color: var(--accent-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.resume-item ul li a:hover {
    color: var(--accent-hover);
}

/* Print Optimization */
@media print {
    .neural-background,
    .scroll-progress,
    .mobile-menu-btn {
        display: none !important;
    }
    
    .navbar,
    .quick-nav,
    footer .contact-links {
        display: none !important;
    }

    body {
        background-color: #fff !important;
        color: #000 !important;
        animation: none !important;
        opacity: 1 !important;
    }

    h1, h2, h3, p, strong {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
        background: none !important;
    }

    .section {
        background: none !important;
        box-shadow: none !important;
        border: 1px solid #ccc;
        margin: 1rem 0 !important;
        padding: 1rem !important;
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .section::after {
        display: none !important;
    }

    .resume-item,
    .project-card,
    .tech-group {
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        margin-bottom: 1rem !important;
        padding: 1rem !important;
    }

    .resume-item strong {
        color: #000 !important;
    }
    
    .resume-item ul {
        list-style: disc !important;
        padding-left: 1.5rem !important;
    }

    .resume-item ul li {
        color: #000 !important;
        margin-bottom: 0.25rem !important;
        padding-left: 0 !important;
    }
    
    .resume-item ul li::before {
        display: none !important;
    }

    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .project-card-image {
        max-width: 100% !important;
        height: auto !important;
        filter: none !important;
    }

    .project-card-actions {
        display: none !important;
    }

    .skill-badge {
        border: 1px solid #ccc !important;
        background: #fff !important;
        color: #000 !important;
        padding: 0.1rem 0.5rem !important;
        margin-right: 0.5rem !important;
        display: inline-block !important;
    }

    .tech-stack {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    .tech-group strong,
    .tech-group span {
        color: #000 !important;
    }

    a {
        color: #000 !important;
        text-decoration: underline !important;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* Focus States Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

/* Project Filter Styles */
.project-filter {
    margin: 2rem auto;
    text-align: center;
    max-width: 300px;
    position: relative;
}

.category-select {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.category-select:hover {
    border-color: var(--accent-color-hover);
    box-shadow: 0 0 0 2px rgba(155, 109, 255, 0.2);
}

.category-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(155, 109, 255, 0.3);
}

/* Project Card Transition */
.project-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Specific rule to show the selected project card, overridden by JS */
#featured-projects .projects-grid .project-card[style*="display: block"] {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Accordion Styles for Resume Explorer */
.accordion-item {
    margin-bottom: 1rem;
    border: 1px solid var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-secondary);
    transition: border-color 0.3s ease;
}

.accordion-item:hover {
    border-color: var(--accent-color);
}

.accordion-header {
    background-color: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header {
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}
.accordion-header:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
.accordion-header:hover {
    background-color: #3a3a3a;
}
[data-theme="light"] .accordion-header:hover {
    background-color: #e4e4e9;
}

.accordion-item.active .accordion-header {
    background: var(--accent-gradient);
    color: var(--text-primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-item.active .accordion-content {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-header::after {
    content: '▼'; /* Down arrow */
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header::after {
    content: '▲'; /* Up arrow when active */
    transform: rotate(180deg); /* Optional: Animate rotation */
}

.accordion-content {
    padding: 0; /* Removed default padding */
    background-color: var(--bg-secondary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out; /* Added padding to transition */
}

.accordion-item.active .accordion-content {
    padding: 0 1.5rem 1.5rem; /* Added padding when active */
    max-height: 2000px; /* Increased from 1000px */
    /* A large value works, or calculate dynamically with JS */
}

.accordion-content > *:last-child {
    margin-bottom: 0; /* Remove bottom margin from the last element inside accordion content */
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition-default);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .navbar {
        justify-content: flex-start;
        padding: 1rem;
    }

    .navbar ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(18, 18, 18, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        z-index: 1000;
    }

    .navbar ul.active {
        display: flex;
    }

    /* Hamburger menu animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}