/* ==========================================================================
   CSS Variables & Custom Properties
   ========================================================================== */
:root {
    --heading-gradient: linear-gradient(135deg, #F8FAFC 0%, var(--accent-blue) 100%);
    --text-accent-gradient: linear-gradient(135deg, #F8FAFC 0%, var(--text-secondary) 100%);
    /* Color Palette - Premium Glassmorphism */
    --bg-primary: #020617;     /* Very deep navy/black */
    --bg-secondary: rgba(15, 23, 42, 0.4); /* Transparent slate */
    --bg-card: rgba(255, 255, 255, 0.03);  /* Glass card bg */
    --border-color: var(--text-primary); /* Glass border */
    --glass-highlight: rgba(255, 255, 255, 0.05); /* Inner border highlight */
    
    --bg-gradient-1: rgba(30, 58, 138, 0.15);
    --bg-gradient-2: rgba(139, 92, 246, 0.1);

    --accent-blue: #3B82F6;    
    --accent-blue-hover: #60A5FA;
    --accent-violet: #8B5CF6;  
    --accent-cyan: #06B6D4;
    
    --text-primary: #F8FAFC;   
    --text-secondary: #94A3B8; 
    --text-muted: #64748B;     
    
    --success: #10B981;
    --error: #EF4444;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Layout */
    --container-max-width: 1200px;
    --border-radius: 16px;     /* Softer corners for glass */
    --border-radius-sm: 8px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows & Glows */
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-hover: 0 12px 40px 0 rgba(59, 130, 246, 0.15);
    --glow-primary: 0 0 20px rgba(59, 130, 246, 0.4);
}

/* Light Mode Variables */
[data-theme="light"] {
    --heading-gradient: linear-gradient(135deg, #1E40AF 0%, #3B82F6 50%, #6D28D9 100%);
    --text-accent-gradient: linear-gradient(135deg, #1E40AF 0%, #6D28D9 100%);
    --bg-primary: #F8FAFC;
    --bg-secondary: rgba(255, 255, 255, 0.6);
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: rgba(148, 163, 184, 0.2);
    --glass-highlight: rgba(255, 255, 255, 1);
    
    --bg-gradient-1: rgba(59, 130, 246, 0.1);
    --bg-gradient-2: rgba(6, 182, 212, 0.08);
    
    --text-primary: #09090B;
    --text-secondary: #3F3F46;
    --text-muted: #52525B;
    
    --shadow-card: 0 8px 30px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 12px 40px rgba(59, 130, 246, 0.12);
}

/* Global Theme Transitions */
body, .glass-card, .nav-container, .contact-wrapper, .faq-item, .footer {
    transition: background-color var(--transition-slow), border-color var(--transition-base), box-shadow var(--transition-base);
}
h1, h2, h3, h4, h5, h6, p, a, span:not(.badge):not(.nav-logo span), button, i {
    transition: color var(--transition-base);
}


/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; 
}

img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}
html, body {
    min-height: 100vh;
}

body {
    font-family: var(--font-sans);
    background: radial-gradient(circle at top right, var(--bg-gradient-1), transparent 40%),
                radial-gradient(circle at bottom left, var(--bg-gradient-2), transparent 40%),
                var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    width: 100%;
    overflow-x: clip;
}

#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-primary);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   Layout & Utility Classes
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-2xl) 0;
}

.bg-alt {
    background-color: var(--bg-secondary);
}

.highlight {
    color: var(--accent-blue);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.01em;
    background: var(--heading-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.header-desc {
    max-width: 600px;
    margin: 0 auto var(--space-md);
    color: var(--text-secondary);
}

.section-header .line {
    height: 3px;
    width: 40px;
    background: var(--accent-blue);
    margin: 0 auto;
    border-radius: 2px;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background-color var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--glass-highlight);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.3);
    background-color: var(--bg-card);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.1), 0 4px 15px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover::after {
    left: 150%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: inset 0 0 15px rgba(59, 130, 246, 0.2), 0 6px 20px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    background-color: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.1), 0 4px 15px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.btn-tertiary {
    background-color: transparent;
    color: var(--text-secondary);
}

.btn-tertiary:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.btn-group {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 1px solid var(--border-color);
}

.btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--bg-secondary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
    background-color: var(--bg-secondary);
    box-shadow: var(--card-shadow);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.logo .dot {
    color: var(--accent-blue);
}

.nav-links {
    display: none;
    align-items: center;
    gap: var(--space-md);
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1002;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto; /* Fix for very small screens */
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.mobile-nav-link {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; 
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-greeting {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: var(--space-xs);
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: var(--space-xs);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--space-md);
    position: relative;
    display: inline-block;
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--accent-blue);
    width: 0;
    animation: typing 3s steps(40, end) forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-blue) }
}

.text-gradient {
    background: var(--heading-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.125rem;
    max-width: 540px;
    margin-bottom: var(--space-lg);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

/* Dashboard Visual (Restrained, Professional) */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
    margin-top: var(--space-lg);
}

/* Hero Profile Image Update */
.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.pulse-ring {
    position: absolute;
    will-change: transform, opacity;
    inset: -20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    z-index: -2;
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.hero-profile-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid rgba(59, 130, 246, 0.4);
    background-color: var(--bg-card);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.25), inset 0 0 20px rgba(59, 130, 246, 0.15);
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.hero-profile-img:hover {
    transform: scale(1.03);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.4), inset 0 0 30px rgba(59, 130, 246, 0.2);
}

.floating-card {
    position: absolute;
    background: var(--bg-secondary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    width: 18px;
    height: 18px;
    color: var(--accent-blue);
}

.fc-1 {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.fc-2 {
    bottom: 15%;
    right: -10%;
    animation-delay: -3s;
}

.fc-3 {
    top: 70%;
    left: -15%;
    animation-delay: -1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.mockup-header {
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-mockup > .kpi-group,
.dashboard-mockup > .chart-mockup {
    margin: 16px;
}

.kpi-group {
    display: flex;
    gap: var(--space-sm);
}

.kpi-card.mini {
    background: var(--bg-secondary);
    padding: var(--space-sm);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kpi-card.mini span:first-child {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.kpi-card.mini strong {
    font-size: 1.25rem;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 4px 0;
}

.kpi-card.mini .trend {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.positive { color: var(--success); }
.trend.negative { color: var(--error); }
.trend i { width: 14px; height: 14px; }

.chart-mockup {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: var(--space-sm);
    height: 100px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    justify-content: center;
}

.bar-chart .bar {
    width: 15%;
    background-color: var(--border-color);
    border-radius: 2px 2px 0 0;
}

.bar-chart .highlight-bar {
    background-color: var(--accent-blue);
}

.line-chart svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.about-profile {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 300px;
    margin: 0 auto;
}

.profile-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 3px solid rgba(59, 130, 246, 0.4);
    background-color: var(--bg-card);
    overflow: hidden;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.25), inset 0 0 20px rgba(59, 130, 246, 0.15);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.profile-photo:hover {
    transform: scale(1.03);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.4), inset 0 0 30px rgba(59, 130, 246, 0.2);
}

.profile-card {
    padding: var(--space-md);
}

.profile-card ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.profile-card ul li:last-child {
    margin-bottom: 0;
}

.profile-card ul li i {
    width: 16px;
    height: 16px;
    color: var(--accent-cyan);
}

.about-text p {
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.card-icon {
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.card-icon i {
    width: 28px;
    height: 28px;
}

.skill-category h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border-color);
}

.skill-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.skill-list li i {
    color: var(--accent-blue);
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Experience Section (Timeline)
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: var(--space-xl);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 24px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 3px solid var(--accent-blue);
}

.timeline-content {
    padding: var(--space-lg);
}

.timeline-header {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--space-sm);
}

.timeline-header h3 {
    margin-bottom: 4px;
    font-size: 1.125rem;
}

.timeline-header h4 {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.timeline-desc {
    margin-bottom: var(--space-sm);
}

.timeline-achievements {
    margin-bottom: var(--space-md);
    padding-left: 1.25rem;
    list-style: disc;
    color: var(--text-secondary);
}

.timeline-achievements li {
    margin-bottom: 0.25rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-stack span {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: var(--space-xl);
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card.hide {
    display: none;
}

.project-demo-badge {
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    padding: 6px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-info {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.125rem;
}

.project-details {
    background: var(--bg-secondary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-sm);
    margin: var(--space-sm) 0;
    font-size: 0.875rem;
    border-left: 2px solid var(--border-color);
}

.project-details p {
    margin-bottom: 4px;
}

.project-details p:last-child {
    margin-bottom: 0;
}

.project-insights {
    list-style: none;
    margin-bottom: var(--space-md);
    font-size: 0.95rem;
}

.project-insights li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 4px;
}

.project-insights li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
}

.project-info .tech-stack {
    margin-bottom: var(--space-md);
    margin-top: auto; 
}

.project-links {
    display: flex;
    gap: var(--space-sm);
}

/* ==========================================================================
   Power BI Dashboard Showcase Section
   ========================================================================== */
.showcase-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.showcase-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.showcase-img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.showcase-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.showcase-card:hover .showcase-img-wrapper img,
.showcase-card:hover .showcase-img-wrapper div {
    transform: scale(1.05);
}

.showcase-img-wrapper div {
    transition: transform 0.4s ease;
}

.showcase-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.showcase-content h3 {
    margin-bottom: var(--space-xs);
    font-size: 1.125rem;
}

.showcase-domain {
    font-size: 0.875rem;
    color: var(--accent-blue);
    margin-bottom: var(--space-md);
    font-weight: 500;
}


/* ==========================================================================
   Blog Section
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.blog-card {
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: var(--space-sm);
}

.blog-category {
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.blog-date {
    color: var(--text-muted);
}

.blog-card h3 {
    font-size: 1.125rem;
}

.blog-card h3 a {
    color: var(--text-primary);
}

.blog-card h3 a:hover {
    color: var(--accent-blue);
}

.blog-card p {
    margin-bottom: var(--space-md);
    flex: 1;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    font-size: 0.875rem;
}

.read-more i {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.read-more:hover i {
    transform: translateX(4px);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding: var(--space-lg);
}

.contact-info h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: var(--space-sm);
}

.contact-info p {
    margin-bottom: var(--space-lg);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.contact-item:hover {
    color: var(--text-primary);
}

.contact-item i {
    color: var(--text-muted);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.error-msg {
    color: var(--error);
    font-size: 0.75rem;
    display: none;
}

.form-group.invalid input,
.form-group.invalid textarea {
    border-color: var(--error);
}

.form-group.invalid .error-msg {
    display: block;
}

.form-status {
    text-align: center;
    font-size: 0.875rem;
    min-height: 20px;
}

.form-status.success { color: var(--success); }
.form-status.error { color: var(--error); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-secondary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-color);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.footer-brand h3 {
    font-size: 1.125rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.footer-brand p {
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social a {
    color: var(--text-muted);
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    transform: translateX(30px);
}

.reveal-right.active {
    transform: translateX(0);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-right, .card:hover, .btn {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Mobile Phones (xs) - 480px and below */
@media (max-width: 480px) {
    /* Global Typography Fixes */
    h1 {
        font-size: 2.25rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    body {
        font-size: 0.95rem;
    }

    /* Buttons minimum touch target */
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Hero section */
    .hero-actions {
        flex-direction: column;
        gap: var(--space-md);
        width: 100%;
    }
    
    .hero-actions > .btn {
        width: 100%;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Experience Timeline */
    .timeline-item {
        padding-left: 20px;
    }
    
    .timeline-dot {
        left: -5px;
        width: 10px;
        height: 10px;
    }
    
    /* Project Filters */
    .project-filters {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Contact Form Buttons */
    #contact-form button[type="submit"] {
        width: 100%;
    }
}

/* Slightly larger phones (sm) - 481px to 767px */
@media (min-width: 481px) and (max-width: 767px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Devices without hover support (touch screens) */
@media (hover: none) {
    .showcase-card:hover .showcase-img-wrapper img,
    .showcase-card:hover .showcase-img-wrapper div {
        transform: scale(1) !important; /* Disable sticky hover scale on touch */
    }
    
    .card:hover {
        transform: translateY(0) !important; /* Prevent sticky card lift */
        box-shadow: var(--shadow-card) !important;
    }
}

/* Tablet (md) */
@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 400px;
        align-items: center;
    }
    
    .about-content-col {
        order: 1;
    }
    
    .about-image-col {
        order: 2;
    }
    
    .about-profile {
        margin: 0;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
    }
    
    .timeline-date {
        margin-top: 0;
    }
}

/* Laptop (lg) */
@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }

    .nav-links {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr 1fr;
    }

    .hero-content {
        padding-right: var(--space-lg);
    }

    .hero-visual {
        display: block;
    }

    .showcase-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-wrapper {
        grid-template-columns: 1fr 1.5fr;
        padding: var(--space-2xl);
    }

    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ==========================================================================
   RESUME PAGE
   ========================================================================== */
.resume-card {
    padding: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.resume-header-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.resume-header-info h4 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: var(--space-md);
}

.resume-contact {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.resume-contact span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.resume-contact i {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.resume-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    margin: var(--space-xl) 0;
}

.resume-section {
    margin-bottom: var(--space-xl);
}

.resume-section:last-child {
    margin-bottom: 0;
}

.resume-section-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.resume-section-title i {
    color: var(--primary-color);
}

.resume-skills-list {
    list-style: none;
    padding: 0;
}

.resume-skills-list li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.resume-skills-list strong {
    color: var(--text-primary);
    margin-right: 8px;
}

.resume-item {
    margin-bottom: var(--space-lg);
}

.resume-item:last-child {
    margin-bottom: 0;
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.resume-item-header h5 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.resume-date {
    font-size: 0.9rem;
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.resume-company {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.resume-bullets {
    padding-left: 20px;
    color: var(--text-muted);
}

.resume-bullets li {
    margin-bottom: 6px;
}

/
/* ==========================================================================
   Clean Global Responsive & Layout Fixes
   ========================================================================== */
html, body {
    overflow-x: clip;
    width: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img, video, iframe, svg {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: var(--container-max-width, 1200px);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    width: 100%;
    padding: var(--space-2xl) 0;
}

/* Ensure Grids Work Seamlessly */
.projects-grid, .showcase-grid, .skills-grid, .blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    width: 100%;
}

@media (min-width: 768px) {
    .projects-grid, .showcase-grid, .skills-grid, .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid, .showcase-grid, .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .contact-wrapper {
        display: grid;
        grid-template-columns: 1fr 1.5fr;
        gap: var(--space-xl);
    }
}

/* Make cards stretch in grids */
.card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Project / Showcase Card Specifics */
.project-card, .showcase-card {
    padding: 0;
    overflow: hidden;
}

.project-info, .showcase-content {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info .tech-stack {
    margin-top: auto;
}

/* ==========================================================================
   Comprehensive Mobile Responsiveness Fixes (Override)
   ========================================================================== */

/* Global Fixes */
html, body {
    overflow-x: clip !important;
    width: 100% !important;
    max-width: 100vw !important;
}

*, *::before, *::after {
    box-sizing: border-box !important;
}

h1, h2, h3, h4, h5, h6, p, a, span, div {
    overflow-wrap: break-word !important;
}

@media (max-width: 768px) {
    /* Container Limits */
    .container {
        padding: 0 16px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Force grids to single column */
    .projects-grid, .showcase-grid, .blog-grid, .skills-grid, .about-grid, .contact-wrapper {
        grid-template-columns: 1fr !important;
        width: 100% !important;
        gap: var(--space-md) !important;
    }
    
    /* Hero Section Fixes */
    .hero-container {
        grid-template-columns: 1fr !important;
    }
    .hero-actions {
        flex-direction: column !important;
        width: 100% !important;
    }
    .hero-actions > .btn {
        width: 100% !important;
    }
    .hero-actions .btn-group {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .hero-actions .btn-group .btn {
        width: auto !important;
    }
    .hero-actions .btn-group .btn:first-child {
        flex: 1 !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 12px !important;
    }
    .hero-actions .btn-group .btn:last-child {
        flex: 0 0 auto !important;
        padding: 10px 16px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .floating-card {
        transform: scale(0.85) !important;
        white-space: nowrap !important;
        text-align: left !important;
        justify-content: flex-start !important;
        max-width: 85% !important;
        padding: 8px 12px !important;
        z-index: 10 !important;
    }
    .floating-card i, .floating-card img {
        width: 18px !important;
        height: 18px !important;
        margin-right: 4px !important;
    }
    .fc-1 { left: 5% !important; top: 8% !important; right: auto !important; }
    .fc-2 { right: 5% !important; bottom: 12% !important; left: auto !important; }
    .fc-3 { left: 5% !important; bottom: 25% !important; right: auto !important; top: auto !important; }
    
    /* Profile Image (Pop-Out) in About Section */
    .profile-photo-3d {
        width: 100% !important;
        max-width: 100% !important;
    }
    .neon-ring {
        width: 80vw !important;
        height: 80vw !important;
        max-width: 280px !important;
        max-height: 280px !important;
    }
    .profile-photo-3d img.cutout {
        max-width: 100% !important;
    }
    
    /* Text constraints */
    h1 { font-size: clamp(2rem, 8vw, 2.75rem) !important; }
    h2 { font-size: clamp(1.75rem, 6vw, 2.25rem) !important; }
    .hero-subtitle { 
        white-space: normal !important; 
        overflow: visible !important; 
        border-right: none !important; 
        animation: none !important; 
        width: 100% !important; 
    }
    
    /* GWS Card */
    .gws-card {
        padding: var(--space-md) !important;
        margin: 0 0 !important;
        width: 100% !important;
    }
    .expertise-badges {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    /* Ensure no flex items force width */
    .flex, .kpi-group, .dashboard-mockup, .tech-stack {
        flex-wrap: wrap !important;
    }
    
    /* Footer */
    .footer-container {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    /* Inputs */
    input, textarea, button, select {
        max-width: 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    /* Extreme small screen fixes */
    .btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.85rem !important;
    }
    .section {
        padding: var(--space-xl) 0 !important;
    }
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.faq-item.active {
    border-color: rgba(59, 130, 246, 0.5);
    background: var(--bg-secondary);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px 24px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.3s ease;
}

.faq-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--accent-blue);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer p {
    padding: 0 24px 24px 50px;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .faq-question {
        padding: 16px;
        font-size: 1rem;
    }
    .faq-title {
        gap: 8px;
    }
    .faq-answer p {
        padding: 0 16px 16px 16px;
    }
}

.faq-icon { flex-shrink: 0; }
.faq-title i { flex-shrink: 0; }

/* ==========================================================================
   Comprehensive Mobile & Header Fixes (v2)
   ========================================================================== */
html, body {
    max-width: 100vw;
    width: 100%;
    overflow-x: clip !important;
    position: relative;
}

*, *::before, *::after {
    box-sizing: border-box !important;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* Header Alignment */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container-max-width);
}



.theme-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    flex-shrink: 0;
    margin-right: 4px;
}
.theme-btn:hover {
    background-color: var(--bg-secondary);
}

.mobile-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
}

/* Ensure Long text wraps properly */
h1, h2, h3, h4, h5, h6, p, a, span {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none !important;
    }
    .nav-links {
        display: flex !important;
        align-items: center;
        gap: var(--space-md);
    }
    
}

@media (max-width: 767px) {
    .nav-links {
        display: none !important;
    }
    .mobile-menu-btn {
        display: flex !important;
    }
    
    /* Ensure proper container padding on mobile */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: clip;
    }
    
    /* Convert grids to single column gracefully */
    .hero-container, .about-grid, .projects-grid, .showcase-grid, .blog-grid, .skills-grid, .contact-wrapper, .faq-container {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 2rem !important;
    }

    /* Cards should not exceed viewport */
    .glass-card, .service-card, .project-card, .blog-card, .skill-card, .faq-item {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Buttons row wrap */
    .hero-cta {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: flex-start;
    }
    
    .btn {
        max-width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Mobile Menu Overlay fix */
    .mobile-menu-overlay {
        width: 100vw !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        left: 0;
        right: 0;
    }
}


* {
    -webkit-tap-highlight-color: transparent !important;
}


/* ==========================================================================
   MOBILE MENU BUTTON GUARANTEED OVERRIDES
   ========================================================================== */
@media (max-width: 768px) {
    
    .theme-btn {
        margin-right: 0 !important;
    }
    .mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 44px !important;
        height: 44px !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        border: none !important;
        color: var(--text-primary) !important;
        cursor: pointer !important;
        z-index: 9999 !important;
        pointer-events: auto !important;
        position: relative !important;
    }
    .mobile-menu-btn svg, .mobile-menu-btn i {
        display: block !important;
        width: 28px !important;
        height: 28px !important;
        stroke: currentColor !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ==========================================================================
   MOBILE MENU & NAVBAR LAYOUT (FIXED)
   ========================================================================== */
.nav-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

/* Base states */
.mobile-menu-btn {
    display: none !important; /* hidden on desktop */
}

/* Desktop */
@media (min-width: 768px) {
    .nav-links {
        display: flex !important;
        align-items: center !important;
        gap: 32px !important;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .nav-links {
        display: none !important;
    }
    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
        width: 44px !important;
        height: 44px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        z-index: 9999 !important;
        padding: 0 !important;
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    .mobile-menu-btn .bar {
        display: block !important;
        width: 28px !important;
        height: 2px !important;
        background-color: var(--text-primary) !important;
        transition: all 0.3s ease !important;
        border-radius: 4px !important;
        transform-origin: center !important;
    }
    
    /* Hamburger Open State */
    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg) !important;
    }
    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0 !important;
    }
    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg) !important;
    }
}



/* ==========================================================================
   MOBILE HEADER ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
    .mobile-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
    }
    .theme-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        border: none !important;
        padding: 8px !important;
        margin: 0 !important;
        width: 44px !important;
        height: 44px !important;
        color: var(--text-primary) !important;
    }
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        width: 44px !important;
        height: 44px !important;
        color: var(--text-primary) !important;
        background: transparent !important;
        border: none !important;
        padding: 8px !important;
        margin: 0 !important;
    }
}
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    .mobile-theme-btn {
        display: none !important;
    }
    .theme-btn {
        display: flex !important;
    }
}

/* ==========================================================================
   CRITICAL INTERACTION FIXES
   ========================================================================== */

/* 1. Ensure all decorative overlays and particle effects never block clicks */
#tsparticles, 
#tsparticles canvas,
.hero-bg-glow, 
.bg-glow, 
.pulse-ring,
.hero::before,
.hero::after {
    pointer-events: none !important;
}

/* 2. Prevent card pseudo-elements from blocking clicks inside cards */
.glass-card::before, .glass-card::after,
.project-card::before, .project-card::after,
.service-card::before, .service-card::after,
.skill-card::before, .skill-card::after,
.card::before, .card::after {
    pointer-events: none !important;
}

/* 3. The mobile menu overlay must ONLY accept pointer events when active */
.mobile-menu-overlay:not(.active) {
    pointer-events: none !important;
}

/* 4. Ensure critical interactive elements are stacked above everything else */
.btn, .nav-link, .mobile-nav-link, a, button, .project-link, .social-link {
    position: relative;
    z-index: 50; 
}

/* Icons should pass clicks to their parent link/button */
[data-lucide] {
    pointer-events: none;
}

/* But theme toggle and hamburger buttons need to receive clicks */
.theme-btn, .mobile-theme-btn, .mobile-menu-btn {
    pointer-events: auto !important;
    z-index: 1005 !important;
    position: relative;
}

/* Ensure navbar itself stays at the top layer */
.navbar {
    z-index: 1000 !important;
}

/* ==========================================================================
   DASHBOARD MODAL STYLES
   ========================================================================== */
.dashboard-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.dashboard-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.dashboard-modal.show .dashboard-modal-content {
    transform: scale(1);
}

.dashboard-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.dashboard-modal-close:hover,
.dashboard-modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* URGENT 480PX HERO OVERRIDES */
@media (max-width: 480px) {
    .hero-actions .btn-group {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        gap: 8px !important;
    }

    /* 1. View Resume button */
    .hero-actions .btn-group .btn:first-child {
        white-space: nowrap !important;
        width: fit-content !important;
        min-width: 0 !important;
        max-width: 150px !important;
        padding: 9px 14px !important;
        font-size: 14px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
    }
    
    /* 2. Resume download button */
    .hero-actions .btn-group .btn:last-child {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        flex: 0 0 auto !important;
        padding: 10px 16px !important;
    }

    /* 3. Data Insights floating card */
    .floating-card.fc-1 {
        left: 2% !important;
        top: 5% !important;
        right: auto !important;
        bottom: auto !important;
        max-width: 85% !important;
        text-align: left !important;
        justify-content: flex-start !important;
        padding: 6px 10px !important;
        transform: scale(0.85) !important;
    }
    
    /* 4. Web Studio floating card */
    .floating-card.fc-3 {
        left: 2% !important;
        bottom: 20% !important;
        right: auto !important;
        top: auto !important;
        max-width: 85% !important;
        text-align: left !important;
        justify-content: flex-start !important;
        padding: 6px 10px !important;
        transform: scale(0.85) !important;
    }
    
    /* 5. Power BI Expert floating card */
    .floating-card.fc-2 {
        right: 2% !important;
        bottom: 8% !important;
        left: auto !important;
        top: auto !important;
        max-width: 85% !important;
        text-align: left !important;
        justify-content: flex-start !important;
        padding: 6px 10px !important;
        transform: scale(0.85) !important;
    }

    /* G) Feature icons */
    .floating-card i, .floating-card img {
        width: 18px !important;
        height: 18px !important;
        margin-right: 6px !important;
    }
}


/* --- MOBILE SCROLL & VISIBILITY FIXES --- */
.hero-visual, .hero-image-wrapper, .profile-photo-3d, .about-image-col, .neon-ring {
    touch-action: pan-y !important; /* Ensure vertical scrolling works over animations */
    overflow: visible !important; /* Prevent clipping of 3D animations */
}

.profile-photo-3d {
    padding-bottom: 30px !important; /* Extra space for the scaled cutout at the bottom */
}

.container {
    overflow-y: visible !important; /* Prevent the container from implicitly clipping vertical overflow */
}


/* ==========================================================================
   Mobile Header Overlap Fix
   ========================================================================== */
/* Ensure anchor scrolling accounts for the 80px fixed header on desktop */
html {
    scroll-padding-top: 80px !important;
}

.section {
    scroll-margin-top: 80px !important;
}

@media (max-width: 768px) {
    /* Reduce navbar height on mobile by 20px */
    .navbar {
        height: 60px !important;
    }

    /* Adjust anchor scrolling offsets for the new 60px navbar */
    html {
        scroll-padding-top: 60px !important;
    }
    .section {
        scroll-margin-top: 60px !important;
    }

    /* Push the main content down by 60px to clear the fixed navbar.
       We apply this to all pages except the homepage (which has .hero). 
       This ensures the first heading on About, Resume, Skills, etc., is fully visible. */
    body:not(:has(.hero)) main {
        padding-top: 60px !important;
    }
    
    /* Fallback for older mobile browsers that do not support :has() */
    @supports not selector(:has(*)) {
        main {
            padding-top: 60px !important;
        }
        main > .hero {
            margin-top: -60px !important;
            padding-top: 140px !important; /* Original 80px + 60px offset */
        }
    }
}


/* ==========================================================================
   MOBILE MENU DROPDOWN REDESIGN
   ========================================================================== */
@media (max-width: 768px) {
    .mobile-menu-overlay {
        position: fixed;
        top: 70px; /* Just below header */
        right: 15px;
        left: auto;
        width: 250px;
        height: auto;
        max-width: calc(100vw - 30px) !important;
        background: rgba(10, 15, 30, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(0, 240, 255, 0.2);
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.1);
        z-index: 1001;
        display: block; /* Override flex */
        padding: 20px 15px;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0.3s ease;
        overflow-y: visible;
        pointer-events: none; /* Make unclickable when hidden */
    }

    .mobile-menu-overlay.active {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Align left */
        gap: 10px;
    }

    .mobile-nav-link {
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-secondary);
        padding: 10px 15px;
        border-radius: 8px;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 12px;
        transition: background-color 0.2s, color 0.2s;
        text-decoration: none;
    }
    
    .mobile-nav-link i, .mobile-nav-link svg {
        width: 18px;
        height: 18px;
        stroke: var(--accent-color, #00f0ff);
        transition: transform 0.2s;
    }

    .mobile-nav-link:hover, .mobile-nav-link:active {
        color: var(--text-primary);
        background-color: rgba(0, 240, 255, 0.1);
    }
    
    .mobile-nav-link:hover i, .mobile-nav-link:active i {
        transform: scale(1.1);
    }
}
