/* Root variables for consistent theming */
:root {
    --primary-bg: #0a192f;
    --secondary-bg: #112240;
    --accent-color: #3b82f6;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --text-muted: #495670;
    --hover-bg: rgba(59, 130, 246, 0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
    font-family: 'SF Mono', 'Fira Code', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #0f1419 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Typography utilities */
.font-mono {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
}

.text-green-neon {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Base style for navigation links (except resume button) */
.nav-link-mono {
    padding: 0.75rem 0.5rem; /* Reduced horizontal padding for tighter spacing */
    font-size: 0.875rem;
    font-weight: 500; /* Default: not bold */
    color: var(--text-secondary); /* Default: secondary text color */
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-block;
    border: none; /* Ensure no border */
    background-color: transparent; /* Ensure no background */
    margin-right: 1.5rem; /* Spacing between nav links */
}

/* Adjust margin for the last nav link before the resume button */
.nav-link-mono:last-of-type {
    margin-right: 3rem; /* Space before the resume button */
}

/* Hover effect for navigation links */
.nav-link-mono:hover {
    font-weight: 700; /* Bold on hover */
    color: var(--accent-color); /* Accent color on hover */
    transform: none; /* No movement on hover */
    background-color: transparent; /* No background on hover */
    border-color: transparent; /* No border on hover */
    box-shadow: none; /* No shadow on hover */
}

/* Styles for active navigation link (applied by script.js) */
.text-blue-600 { /* This class is added by script.js for the active link */
    color: var(--accent-color) !important; /* Force accent color for active link */
}

.font-semibold { /* This class is added by script.js for the active link */
    font-weight: 700 !important; /* Force bold for active link */
}


/* Button styles with premium hover effects */
.resume-button {
    position: relative;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-smooth);
    overflow: hidden;
    background: transparent;
    cursor: pointer;
}

.resume-button::before {
    display: none;
}

/* Updated hover style for dark mode to match light mode */
.resume-button:hover {
    color: white; /* Text color changes to white on hover */
    background-color: var(--accent-color); /* Background fills with accent color */
    transform: translateY(-3px) scale(1.02);
    box-shadow: none; /* Ensuring no specific box-shadow for dark mode hover */
}

.resume-button:hover::before {
    left: -100%;
}

.cta-button {
    position: relative;
    margin-top: 2rem;
    padding: 1rem 2rem;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-bounce);
    background: linear-gradient(135deg, transparent 0%, rgba(100, 255, 218, 0.05) 100%);
    overflow: hidden;
    cursor: pointer;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    transition: var(--transition-smooth);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.cta-button:hover {
    color: var(--primary-bg);
    background: var(--accent-color);
    transform: translateY(-5px) scale(1.05);
}

.cta-button:hover::after {
    width: 300px;
    height: 300px;
}

/* Social icons with floating animation */
.social-icon {
    position: relative;
    padding: 0.75rem;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: rgba(17, 34, 64, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.social-icon:hover {
    color: var(--accent-color);
    background: var(--hover-bg);
    transform: translateY(-8px) rotate(5deg);
    box-shadow:
        var(--shadow-glow),
        0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.social-icon:hover::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-color), transparent, var(--accent-color));
    border-radius: 0.5rem;
    z-index: -1;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card hover effects */
.card {
    position: relative;
    background: rgba(17, 34, 64, 0.4);
    border: 1px solid rgba(100, 255, 218, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    transform: translateX(-100%);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(17, 34, 64, 0.8);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(100, 255, 218, 0.2),
        inset 0 1px 0 rgba(100, 255, 218, 0.1);
}

.card:hover::before {
    transform: translateX(100%);
}

/* Custom scrollbar with glow effect */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-color) 0%, rgba(100, 255, 218, 0.5) 100%);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.5);
}

/* Responsive design with enhanced mobile experience */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 4rem;
    }

    .fixed-sidebar {
        display: none;
    }

    /* Mobile nav links - Ensure they have spacing */
    .nav-link-mono {
        padding: 0.5rem 0; /* Adjust padding for mobile as needed */
        margin-right: 0; /* Remove horizontal margin for vertical stack */
        margin-bottom: 1rem; /* Add vertical spacing between mobile links */
        font-size: 0.9rem;
    }

    .resume-button, .cta-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .social-icon {
        padding: 0.5rem;
    }

    /* Reduce animation intensity on mobile for performance */
    .card:hover {
        transform: translateY(-2px) scale(1.01);
    }

    .cta-button:hover {
        transform: translateY(-3px) scale(1.02);
    }

    .social-icon:hover {
        transform: translateY(-4px) rotate(2deg);
    }
}

/* Additional utility classes for enhanced interactions */
.glow-on-hover {
    transition: var(--transition-smooth);
}

.glow-on-hover:hover {
    filter: drop-shadow(0 0 20px rgba(100, 255, 218, 0.6));
}

.float-on-hover {
    transition: var(--transition-smooth);
}

.float-on-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.scale-on-hover {
    transition: var(--transition-bounce);
}

.scale-on-hover:hover {
    transform: scale(1.05);
}

/* Loading animation for dynamic elements */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

#menu-overlay {
/* Initially hidden by default, shown when 'active' class is added */
     display: none;
}

#menu-overlay.active {
    display: block; /* Make overlay visible when active */
}

#mobile-menu {
/* Initially off-screen to the right by default, slides in when 'active' */
    transform: translateX(100%); /* Start completely off-screen */
}

#mobile-menu.active {
     transform: translateX(0); /* Slide into view when active */
}


/* Light Mode Variables - Replace the existing light mode section */
body[data-theme='light'] {
    --primary-bg: #f8faff; /* Very light blue background */
    --secondary-bg: #ffffff; /* White for cards/sections */
    --accent-color: #0066cc; /* Slightly darker blue for better contrast */
    --text-primary: #2c3e50; /* Darker text for better readability */
    --text-secondary: #4a5568; /* Medium gray text */
    --text-muted: #718096; /* Lighter gray for subtle text */
    --hover-bg: rgba(0, 102, 204, 0.08); /* Light blue hover effect */
    --shadow-glow: 0 0 20px rgba(0, 102, 204, 0.25);

    /* Fix the background gradient */
    background: linear-gradient(135deg, var(--primary-bg) 0%, #e6f0ff 100%) !important;
}

/* Adjust header background for light mode */
body[data-theme='light'] header {
    background-color: rgba(255, 255, 255, 0.95) !important; /* Ensure header background is light */
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
}

/* Adjust social icons and cards for light mode */
body[data-theme='light'] .social-icon,
body[data-theme='light'] .card {
    background-color: #ffffff !important; /* Force white background for cards in light mode */
    color: var(--text-primary) !important; /* Set text color to primary text for readability */
    border: 1px solid rgba(0, 102, 204, 0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body[data-theme='light'] .card:hover {
    background-color: rgba(0, 102, 204, 0.08) !important; /* Force light hover background for cards */
    box-shadow:
        0 12px 25px rgba(0,0,0,0.1),
        0 0 20px rgba(0, 102, 204, 0.15);
}

/* Tech stack pills */
body[data-theme='light'] .bg-slate-700 {
    background-color: #e2e8f0;
    color: var(--text-secondary);
}

/* Scrollbar for light mode */
body[data-theme='light']::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-color) 0%, rgba(0, 102, 204, 0.6) 100%);
    box-shadow: 0 0 8px rgba(0, 102, 204, 0.3);
}

body[data-theme='light']::-webkit-scrollbar-track {
    background: #f1f5f9;
}

/* Text color fixes */
body[data-theme='light'] .text-slate-100 {
    color: var(--text-primary) !important;
}

body[data-theme='light'] .text-slate-400 {
    color: var(--text-secondary) !important;
}

body[data-theme='light'] .text-green-neon {
    color: var(--accent-color) !important;
    text-shadow: none;
}

/* Navigation fixes */
body[data-theme='light'] .nav-link {
    color: var(--text-secondary) !important;
}

body[data-theme='light'] .nav-link:hover {
    color: var(--accent-color) !important;
}

/* Adjusted for light mode as well */
body[data-theme='light'] .nav-link-mono {
    color: var(--text-secondary) !important; /* Default secondary text color in light mode */
    font-weight: 500 !important; /* Default not bold in light mode */
    background-color: transparent !important;
    border-color: transparent !important;
}

/* Hover state for light mode nav links */
body[data-theme='light'] .nav-link-mono:hover {
    color: var(--accent-color) !important; /* Accent color on hover in light mode */
    font-weight: 700 !important; /* Bold on hover in light mode */
    background-color: transparent !important;
    border-color: transparent !important;
}

/* Active state for light mode nav links (applied by script.js) */
body[data-theme='light'] .text-blue-600 {
    color: var(--accent-color) !important;
}

body[data-theme='light'] .font-semibold {
    font-weight: 700 !important; /* Making it truly bold for consistency */
}


/* Resume button fix */
body[data-theme='light'] .resume-button {
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

body[data-theme='light'] .resume-button:hover {
    color: white;
    background-color: var(--accent-color);
}

/* CTA button fix */
body[data-theme='light'] .cta-button {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

body[data-theme='light'] .cta-button:hover {
    color: white;
    background: var(--accent-color);
}

/* Sidebar fixes */
body[data-theme='light'] .fixed-sidebar .h-24.w-px.bg-slate-600 {
    background-color: #cbd5e0;
}

/* Mobile menu fixes */
body[data-theme='light'] .mobile-menu-link {
    color: var(--text-primary);
}

body[data-theme='light'] #mobile-menu {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}
