/* ==========================================================================
   Dashboard Design System - Raisul.ai
   ========================================================================== */

:root {
    /* Semantic Tokens - Modern Green Theme */
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary: #064e3b;
    --accent-yellow: #f59e0b;
    --accent-orange: #f97316;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;
    --red: #ff0000;

    /* Sidebar Gradient - Requested Blue Theme */
    --sidebar-gradient: linear-gradient(180deg, #1A05A2 10%, #4C8CE4 90%);

    /* Hero Gradient */
    --hero-gradient: linear-gradient(145deg, #e6f4ff 0%, #fdf4e8 100%);

    /* Light Mode Tokens - Green Surface */
    --bg-main: #22946e;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);

    /* Common */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --sidebar-width: 260px;
    --main-padding: 2rem;
    --transition: none;
    --font-sans: 'Roboto', system-ui, -apple-system, sans-serif;
}

[data-theme='dark'] {
    --bg-main: #050816;
    --bg-card: #0b1220;
    --bg-sidebar: #050816;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.75);
    --border-color: rgba(255, 255, 255, 0.12);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.7);
    --primary: #3b82f6;
    --sidebar-gradient: linear-gradient(180deg, #07152a 0%, #050816 100%);
    --hero-gradient: var(--bg-card);
}

/* Dark mode layout tweaks */
[data-theme='dark'] .main-content {
    background: var(--bg-main);
}

[data-theme='dark'] .theme-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--text-main);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    position: relative;
    max-width: 100vw;
    font-family: var(--font-sans);
    overflow-x: clip;
}

a {
    transition: none;
    text-decoration: none;
    color: inherit;
}

/* Ensure all text elements adapt to dark mode */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
}

p, span, div {
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

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

/* ==========================================================================
   Layout - Dashboard Structure
   ========================================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    max-width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-gradient);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem;
    color: white;
    z-index: 1000;
    transition: none;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-weight: 800;
    font-size: 1.5rem;
}

.desktop-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.footer-logo h2 {
    font-size: 2.25rem;
    margin: 0;
    letter-spacing: -0.5px;
}

.sidebar-logo h2 {
    color: white;
}

.sidebar-logo h2 span {
    color: white;
}

.sidebar-logo img {
    max-width: 160px;
    height: auto;
    display: block;
}

.nav-menu {
    flex: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none; /* Relocated toggle to header */
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: none;
    margin-bottom: 0.5rem;
    position: relative;
    font-weight: 600;
}

.nav-item:hover {
    /* background: rgba(255, 255, 255, 0.1); */
    opacity: 1;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

/* Main Content Styling */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0 2rem;
    max-width: 1600px;
    margin-right: auto;
    min-width: 0; /* Important for flex-shrink */
    width: 100%;
}

/* Header Area (Search / Actions) */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    margin-top: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.sticky-header {
    position: sticky;
    top: 1rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    box-shadow: var(--shadow-soft);
    padding: 0.75rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

[data-theme='dark'] .sticky-header {
    background: rgba(11, 18, 32, 0.9);
}

.search-bar {
    background: var(--bg-card);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    color: var(--text-main);
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: none;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.theme-toggle i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme='light'] .theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Location Card Styling */
.location-card {
    background: #064e3b;
}

[data-theme='dark'] .location-card {
    background: var(--bg-card);
}

.action-btn:hover {
    /* color: var(--primary); */
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: 50px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    padding-right: 0.5rem;
}

/* ==========================================================================
   Dashboard Components (Cards)
   ========================================================================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: none;
    position: relative;
    overflow: hidden;
}

.card:hover {
    /* transform: translateY(-5px); */
}

/* Hero Card - Special Styling */
.hero-card {
    background: var(--hero-gradient);
    color: var(--text-main);
    grid-column: span 2;
    padding: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    border: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.hero-card::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle at 80% 50%, rgba(255,255,255,0.4) 0%, transparent 80%);
    z-index: -1;
}

.hero-text h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.25em;
    padding-left: 1rem;
}

.hero-text h1 .highlight {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 4px solid var(--primary); /* Blinking cursor bar */
    background: linear-gradient(to right, #1aae9f, #2b8ede, #5878d6, #8a7c9f, #c4765d, #ef7a22);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: normal;
    animation: typing-name-anim 5s steps(30, end) infinite, blink-cursor 0.75s step-end infinite;
}

@keyframes typing-name-anim {
    0%, 15% { width: 0; }
    70%, 85% { width: 100%; }
    95%, 100% { width: 0; }
}

@keyframes blink-cursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary); }
}

.hero-text h1 .highlight {
    background: linear-gradient(to right, #1aae9f, #2b8ede, #5878d6, #8a7c9f, #c4765d, #ef7a22);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: normal;
}

.hero-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0,0,0,0.05);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.hero-illustration-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 10px;
    background: white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-left: 2rem;
}

.hero-illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 2;
    position: relative;
}

.hero-card .bg-shape {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.3;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Dashboard Grid Layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

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

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Card Background Themes */
.card-purple { background: #f5f3ff; }
.card-green { background: #f0fdf4; }
.card-orange { background: #fff7ed; }
.card-cyan { background: #ecfeff; }
.card-blue { background: #eff6ff; }

/* Dark Mode Overrides */
[data-theme='dark'] .card-purple { background: rgba(139, 92, 246, 0.08); border-color: rgba(139, 92, 246, 0.2); }
[data-theme='dark'] .card-green { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.2); }
[data-theme='dark'] .card-orange { background: rgba(249, 115, 22, 0.08); border-color: rgba(249, 115, 22, 0.2); }
[data-theme='dark'] .card-cyan { background: rgba(6, 182, 212, 0.08); border-color: rgba(6, 182, 212, 0.2); }
[data-theme='dark'] .card-blue { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.2); }

.card-purple:hover { /* background: #ede9fe; border-color: #8b5cf6; */ }
.card-green:hover { /* background: #dcfce7; border-color: #10b981; */ }
.card-orange:hover { /* background: #ffedd5; border-color: #f97316; */ }
.card-cyan:hover { /* background: #cffafe; border-color: #06b6d4; */ }
.card-blue:hover { /* background: #dbeafe; border-color: #3b82f6; */ }

[data-theme='dark'] .card-purple:hover { /* background: rgba(139, 92, 246, 0.15); border-color: #8b5cf6; */ }
[data-theme='dark'] .card-green:hover { /* background: rgba(16, 185, 129, 0.15); border-color: #10b981; */ }
[data-theme='dark'] .card-orange:hover { /* background: rgba(249, 115, 22, 0.15); border-color: #f97316; */ }
[data-theme='dark'] .card-cyan:hover { /* background: rgba(6, 182, 212, 0.15); border-color: #06b6d4; */ }
[data-theme='dark'] .card-blue:hover { /* background: rgba(59, 130, 246, 0.15); border-color: #3b82f6; */ }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: none;
}

.stat-card:hover .stat-icon {
    /* transform: scale(1.1); */
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Color variations for icons */
.bg-purple { background: #8b5cf6; }
.bg-blue { background: #3b82f6; }
.bg-orange { background: #f97316; }
.bg-pink { background: #ec4899; }
.bg-cyan { background: #06b6d4; }

.icon-cyan { background: rgba(6, 182, 212, 0.1); color: #0891b2; }

/* Grid Sections */
.dashboard-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i,
.section-title svg {
    color: #10b981 !important;
}

/* Skills Indicators */
.skill-item {
    margin-bottom: 1rem;
}

/* Skills Indicators */
.skill-item-wrapper {
    margin-bottom: 0.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.skill-icon-box {
    display: none; /* Hide if still in HTML temporarily */
}

/* Color Themes for Icons (Used in Stats) */
.icon-blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.icon-green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.icon-orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.icon-purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.icon-yellow { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.icon-pink { background: rgba(236, 72, 153, 0.1); color: #ec4899; }

.progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

[data-theme='dark'] .progress-bar {
    background: rgba(255, 255, 255, 0.12);
}

[data-theme='dark'] .progress-fill {
    background: var(--primary) !important;
}

.progress-fill {
    height: 50%;
    background: var(--primary);
    border-radius: 2px;
    transition: none;
}

/* Project Cards */
.project-card-mini {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-img-thumb {
    width: 100%;
    height: 140px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-main);
}

.project-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-weight: 600;
}

/* Responsive Overrides */
@media (max-width: 1280px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .hero-card { grid-column: auto; }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 80px;
        --main-padding: 1.5rem;
    }
    .sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
    }
    .sidebar-logo span, .nav-item span {
        display: none;
    }
    .main-content {
        margin-left: 80px;
        padding: 1.5rem;
    }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100%;
        height: 60px;
        flex-direction: row;
        padding: 0;
        justify-content: space-around;
        align-items: center;
        background: var(--bg-card);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid var(--border-color);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    }
    
    [data-theme='dark'] .sidebar {
        background: var(--bg-card);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .sidebar-logo { display: none; }
    .nav-menu {
        display: flex;
        width: 100%;
        justify-content: space-between;
        padding: 0 0.25rem;
    }
    .nav-item {
        margin-bottom: 0;
        padding: 0.4rem 0.2rem;
        flex-direction: column;
        gap: 2px;
        font-size: 0.65rem;
        min-width: 0;
        flex: 1;
        color: var(--text-main);
    }
    .nav-item span {
        display: none;
    }
    .nav-item i {
        width: 24px;
        height: 24px;
    }
    .nav-item:hover {
        transform: none;
        background: transparent;
    }
    :root {
        --sidebar-width: 0px;
        --main-padding: 1rem;
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-bottom: 90px;
    }
    .dashboard-header { 
        flex-direction: row !important; 
        gap: 0.5rem; 
        align-items: center !important; 
    }
    .header-actions {
        gap: 0.5rem;
    }
    
    .skills-header {
        flex-direction: column !important;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    .hero-card { 
        flex-direction: column !important; 
        text-align: center; 
        gap: 1.5rem; 
        padding: 1.5rem 0.75rem;
        overflow: hidden; /* Prevent background shapes from leaking */
    }
    .hero-card::before, .hero-card .bg-shape {
        display: none !important;
    }
    .hero-text h1 {
        font-size: 2rem;
    }
    .hero-text p {
        font-size: 1.1rem !important;
    }
    .hero-illustration-wrapper { 
        width: 160px; 
        height: 160px; 
        margin-left: 0;
        order: -1; /* Move image to top */
    }
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .stat-value {
        font-size: 1.25rem;
    }

    .card {
        padding: 1.25rem !important;
    }
    
    .about-card {
        padding: 1.25rem !important;
    }

    .about-grid, .contact-inputs-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .section-title {
        font-size: 1.35rem;
        margin-bottom: 1.5rem;
    }

    .skill-filters {
        border-radius: 12px !important;
        justify-content: center;
        gap: 0.25rem !important;
    }
    
    .filter-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-highlights-grid {
        grid-template-columns: 1fr !important;
    }
    .hero-card {
        background: var(--bg-card) !important;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.hero-highlights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Chart/Graph Placeholder Styles */
.chart-container {
    height: 200px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding-top: 20px;
}

.chart-bar {
    flex: 1;
    background: var(--primary-light);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    transition: none;
    position: relative;
}

.chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Micro-interactions */
.btn-primary {
    background: var(--primary);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    /* background: var(--primary-light); */
    /* transform: translateY(-2px); */
    /* box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4); */
}

/* Hero Social Links */
.social-links-hero {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: 0.5rem;
}

.social-links-hero a {
    transition: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-links-hero a:hover {
    /* transform: translateY(-3px); */
    opacity: 0.8;
}

.social-links-hero i {
    width: 22px;
    height: 22px;
}

/* Skill Filtering & Category Colors */
.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.filter-btn:hover {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.08);
}

.filter-btn.active {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.skill-item-wrapper {
    position: relative;
    padding: 0.5rem;
    background: rgba(0,0,0,0.02);
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--border-color);
    transition: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

[data-theme='dark'] .skill-item-wrapper {
    background: rgba(0,0,0,0.1);
}

.skill-item-wrapper[data-category="programming"] { border-left-color: var(--accent-blue); }
.skill-item-wrapper[data-category="mathematics"] { border-left-color: var(--accent-yellow); }
.skill-item-wrapper[data-category="ai"] { border-left-color: var(--primary); }
.skill-item-wrapper[data-category="ml"] { border-left-color: var(--accent-pink); }
.skill-item-wrapper[data-category="tools"] { border-left-color: var(--accent-orange); }

/* ==========================================================================
   Photo Gallery - Digital Content
   ========================================================================== */
.gallery-section {
    margin-top: 3rem;
    /* animation: fadeIn 1s ease-out; */
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    grid-auto-rows: 250px;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.gallery-item.large {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 100%;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.gallery-item:hover {
    /* transform: translateY(-10px); */
    /* box-shadow: var(--shadow-card); */
}

.gallery-item:hover img {
    /* transform: scale(1.1); */
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    color: white;
    opacity: 0;
    transition: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    /* transform: translateY(10px); */
    transition: none;
}

.gallery-item:hover .gallery-overlay h4 {
    transform: translateY(0);
}

.gallery-overlay p {
    font-size: 0.85rem;
    opacity: 0.9;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .gallery-item.large {
        grid-column: 1 / 3;
        grid-row: auto;
        aspect-ratio: 2 / 1;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .gallery-item.large {
        grid-column: 1 / 3;
        aspect-ratio: 4 / 3;
    }
}

/* ==========================================================================
   Dark Mode Fixes - Text Visibility
   ========================================================================== */

/* Social Links - Adaptive Colors */
.social-links-hero .social-link-github {
    color: #333;
    transition: none;
}

[data-theme='dark'] .social-links-hero .social-link-github {
    color: #f3f4f6;
}

.social-links-hero .social-link-linkedin {
    color: #0077b5;
    transition: none;
}

[data-theme='dark'] .social-links-hero .social-link-linkedin {
    color: #60a5fa;
}

.social-links-hero .social-link-facebook {
    color: #1877f2;
    transition: none;
}

[data-theme='dark'] .social-links-hero .social-link-facebook {
    color: #93c5fd;
}

.social-links-hero .social-link-youtube {
    color: #ff0000;
    transition: none;
}

[data-theme='dark'] .social-links-hero .social-link-youtube {
    color: #fca5a5;
}

/* NASA Badge - Adaptive Styling */
.nasa-badge {
    font-size: 0.65rem;
    background: rgba(11, 61, 145, 0.1);
    color: #0B3D91;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(11, 61, 145, 0.2);
    transition: none;
}

[data-theme='dark'] .nasa-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* NASA Icon - Adaptive Color */
.nasa-icon {
    width: 14px;
    color: #0B3D91;
    transition: none;
}

[data-theme='dark'] .nasa-icon {
    color: #60a5fa;
}

/* AI Insights Icon - Adaptive Color */
.ai-insights-icon {
    color: #064e3b;
    transition: none;
}

[data-theme='dark'] .ai-insights-icon {
    color: #10b981;
}

/* ==========================================================================
   Comprehensive Dark Mode Text Color Support
   ========================================================================== */

/* Card Content - All text elements */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: var(--text-main);
}

.card p, .card span, .card li, .card strong, .card em {
    color: var(--text-main);
}

/* Section Content */
.dashboard-section h1, .dashboard-section h2, .dashboard-section h3, 
.dashboard-section h4, .dashboard-section h5, .dashboard-section h6 {
    color: var(--text-main);
}

.dashboard-section p, .dashboard-section span, .dashboard-section li {
    color: var(--text-main);
}

/* Project Info */
.project-card-mini h3 {
    color: var(--text-main);
}

.project-card-mini p {
    color: var(--text-muted);
}

/* Skill Info */
.skill-info {
    color: var(--text-main);
}

.skill-info span {
    color: var(--text-main);
}

/* Contact Section */
#contact h1, #contact h2, #contact h3, #contact h4, #contact h5, #contact h6 {
    color: var(--text-main);
}

#contact p, #contact span, #contact label {
    color: var(--text-main);
}

#contact input, #contact textarea, #contact select {
    color: var(--text-main);
}

#contact input::placeholder, #contact textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Footer */
.dashboard-footer-main h1, .dashboard-footer-main h2, .dashboard-footer-main h3, 
.dashboard-footer-main h4, .dashboard-footer-main h5, .dashboard-footer-main h6 {
    color: var(--text-main);
}

.dashboard-footer-main p, .dashboard-footer-main span {
    color: var(--text-main);
}

/* About Section */
.about-card h4 {
    color: var(--text-main);
}

.about-card p {
    color: var(--text-main);
}

/* Ensure all main content text adapts to theme */
.main-content {
    color: var(--text-main);
}

.main-content * {
    color: inherit;
}

/* Override specific overrides for semantic elements */
.main-content h1, .main-content h2, .main-content h3, 
.main-content h4, .main-content h5, .main-content h6 {
    color: var(--text-main);
}

.main-content p, .main-content span, .main-content li, 
.main-content strong, .main-content em {
    color: var(--text-main);
}

/* ==========================================================================
   Sticky Header – complete reset
   ========================================================================== */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    padding: 0.75rem 2.5rem;
    margin-bottom: 0;
    border-radius: 0 0 20px 20px;
}

/* Brand logo: hidden on desktop, visible on mobile */
.top-nav-brand {
    display: none;
    align-items: center;
    margin-right: auto; /* push all other items to the right */
}

.brand-logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

/* Desktop nav links */
.top-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.top-nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    text-decoration: none;
    transition: none;
    white-space: nowrap;
}

.top-nav-links a:hover {
    color: var(--primary);
}

/* Hire Me Button inside nav */
.btn-hire-nav {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    padding: 0.45rem 1.25rem !important;
    border-radius: 50px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: none;
    text-decoration: none !important;
    white-space: nowrap;
}

.btn-hire-nav:hover {
    /* transform: translateY(-2px); */
    /* box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5) !important; */
    /* background: linear-gradient(135deg, #059669, #047857) !important; */
}

/* Hero CTA Row */
.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Hire Me Button – Hero */
.btn-hire-hero {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    padding: 0.85rem 2rem !important;
    border-radius: 50px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45) !important;
    transition: var(--transition) !important;
    text-decoration: none !important;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: none !important;
}

.btn-hire-hero:hover {
    /* transform: translateY(-3px) !important; */
    /* box-shadow: 0 10px 30px rgba(16, 185, 129, 0.55) !important; */
}

/* Outline Download CV Button */
.btn-outline-hero {
    background: transparent;
    color: var(--text-main) !important;
    padding: 0.85rem 1.75rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    transition: none;
    cursor: pointer;
}

.btn-outline-hero:hover {
    /* border-color: var(--primary); */
    /* color: var(--primary) !important; */
    /* transform: translateY(-2px); */
    /* box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2); */
}

/* ==========================================================================
   Mobile Bottom Navigation – 5 items with labels & hover effects
   ========================================================================== */
.mobile-bottom-nav {
    display: none; /* hidden on desktop, shown via media query */
}

@media (max-width: 768px) {
    /* Hide the desktop sidebar nav on mobile */
    .sidebar > .nav-menu {
        display: none !important;
    }

    /* Show the dedicated mobile bottom nav */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 68px;
        z-index: 1100;
        background: var(--bg-card);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -6px 24px rgba(0,0,0,0.12);
        justify-content: space-around;
        align-items: center;
        padding: 0 0.25rem;
    }

    [data-theme='dark'] .mobile-bottom-nav {
        background: rgba(11, 18, 32, 0.97);
        border-top: 1px solid rgba(255,255,255,0.07);
        box-shadow: 0 -6px 30px rgba(0,0,0,0.5);
    }

    .mob-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex: 1;
        padding: 0.4rem 0.2rem 0.6rem;
        color: var(--text-muted);
        text-decoration: none;
        transition: none;
        position: relative;
        min-width: 0;
        border-radius: 14px;
        cursor: pointer;
    }

    .mob-nav-item i {
        width: 22px;
        height: 22px;
        transition: none;
        flex-shrink: 0;
    }

    .mob-nav-item span {
        font-size: 0.62rem;
        font-weight: 600;
        letter-spacing: 0.2px;
        white-space: nowrap;
        transition: none;
        display: block !important;
        color: inherit;
    }

    /* Hover effect – lift + color */
    .mob-nav-item:hover {
        /* color: var(--primary); */
        /* transform: translateY(-5px); */
    }

    .mob-nav-item:hover i {
        /* transform: scale(1.2); */
    }

    /* Active state */
    .mob-nav-item.active {
        color: var(--primary);
    }

    /* Active indicator dot */
    .mob-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: var(--primary);
    }

    /* Hire Me item – accent color */
    .mob-nav-hire {
        color: #10b981 !important;
    }

    .mob-nav-hire i {
        color: #10b981 !important;
    }

    .mob-nav-hire span {
        color: #10b981 !important;
        font-weight: 700;
    }

    .mob-nav-hire:hover {
        /* color: #059669 !important; */
        /* transform: translateY(-6px); */
    }

    /* Hide old sidebar on mobile */
    .sidebar {
        display: none !important;
    }

    /* BUT always show mobile-bottom-nav regardless */
    .mobile-bottom-nav {
        display: flex !important;
    }

    /* Sticky header on mobile: floating curved rectangle */
    .sticky-header {
        position: sticky !important;
        top: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        padding: 0.65rem 1rem !important;
        border-radius: 0 0 20px 20px !important;
        margin-bottom: 0 !important;
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-soft);
        z-index: 9999 !important;
    }

    /* Hide Home/Blog/Tutorials on mobile */
    .top-nav-links {
        display: none !important;
    }

    /* Show brand logo and new inline links on mobile */
    .top-nav-brand {
        display: flex !important;
        align-items: center;
        gap: 0.75rem;
        margin-right: auto;
    }

    .mobile-top-links {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .mobile-top-links a {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-main);
        text-decoration: none;
        transition: none;
    }

    .mobile-top-links a:hover {
        /* color: var(--primary); */
    }

    /* Padding for fixed navbar */
    .main-content {
        padding-bottom: 90px !important;
    }

    /* Hero CTA on mobile */
    .hero-cta-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-hire-hero,
    .btn-outline-hero {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .mob-nav-item span {
        font-size: 0.58rem;
    }

    .mob-nav-item i {
        width: 20px;
        height: 20px;
    }
}

/* Timeline Component 
   ========================================================================== */
.timeline-container {
    position: relative;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent-color, var(--primary));
    z-index: 2;
}

.timeline-item h4 {
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.timeline-item p {
    margin-bottom: 0.15rem;
}

