/* Professional Portfolio CSS - Frieze Kere Wandabwa */
:root {
    --primary-color: #1a365d;
    --secondary-color: #2d3748;
    --accent-color: #3182ce;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-dark: #1a202c;
    --border-color: #e2e8f0;
    --success-color: #38a169;
    --warning-color: #d69e2e;
}

[data-theme="dark"] {
    --primary-color: #90cdf4;
    --secondary-color: #4a5568;
    --accent-color: #63b3ed;
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-light: #cbd5e0;
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-dark: #171923;
    --border-color: #4a5568;
    --success-color: #68d391;
    --warning-color: #f6e05e;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] .header {
    background: rgba(26, 32, 44, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link:focus, .nav-link.active {
    color: var(--primary-color);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero.section-with-bg {
    color: white;
}

.hero.section-with-bg .hero-text h1 {
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    background: none;
    -webkit-text-fill-color: white;
    font-weight: 800 !important;
}

[data-theme="dark"] .hero.section-with-bg .hero-text h1 {
    color: var(--text-primary) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.hero.section-with-bg .hero-subtitle,
.hero.section-with-bg .hero-description {
    color: rgba(255, 255, 255, 0.98) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 600 !important;
}

[data-theme="dark"] .hero.section-with-bg .hero-subtitle,
[data-theme="dark"] .hero.section-with-bg .hero-description {
    color: var(--text-secondary) !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(49, 130, 206, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.hero-image {
    text-align: center;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid var(--bg-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

/* Stats Section */
.stats {
    padding: 4rem 0;
    background: var(--primary-color);
    color: white;
}

.stats.section-with-bg {
    color: white;
}

.stats.section-with-bg .stat-item h3,
.stats.section-with-bg .stat-item p {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    color: white !important;
    font-weight: 800 !important;
}

[data-theme="dark"] .stats.section-with-bg .stat-item h3,
[data-theme="dark"] .stats.section-with-bg .stat-item p {
    color: var(--text-primary) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Section Styles */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-primary);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

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

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 1rem;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 1rem;
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
    will-change: transform, opacity;
}

/* AI Chatbox */
.ai-chatbox {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: all 0.3s ease;
    transform: translateY(100%);
    opacity: 0;
}

.ai-chatbox.show {
    transform: translateY(0);
    opacity: 1;
}

.ai-chatbox.hide {
    transform: translateY(100%);
    opacity: 0;
}

.ai-chatbox.minimized {
    display: none;
}

.chatbox-minimized {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: all 0.3s ease;
}

.chatbox-minimized:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.chatbox-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbox-title {
    font-weight: 600;
    font-size: 1rem;
}

.chatbox-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.chatbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbox-messages {
    height: 300px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message {
    max-width: 80%;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.ai {
    background: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbox-input {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chatbox-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.chatbox-input input:focus {
    border-color: var(--primary-color);
}

.chatbox-send {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.chatbox-send:hover {
    background: var(--accent-color);
}

.chatbox-send:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.read-more-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.read-more-btn:hover {
    background: var(--primary-color);
}

.experience-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.experience-details h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.website-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Enhanced Visual Elements */
.hero-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin: 2rem 0;
    max-width: 280px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 130px;
    height: 130px;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

[data-theme="dark"] .gallery-item {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .gallery-item:hover {
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.15);
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.section-bg-pattern {
    position: relative;
    overflow: hidden;
}

.section-bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="%23667eea" opacity="0.1"/></svg>') repeat;
    background-size: 50px 50px;
    pointer-events: none;
}

[data-theme="dark"] .section-bg-pattern::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="%2390cdf4" opacity="0.1"/></svg>') repeat;
    background-size: 50px 50px;
}

.parallax-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, var(--primary-color) 0%, transparent 50%, var(--accent-color) 100%);
    opacity: 0.05;
    animation: parallax 20s linear infinite;
    pointer-events: none;
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: slideInUp 0.8s ease-out forwards;
}

.animate-left {
    opacity: 0;
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-right {
    opacity: 0;
    animation: slideInRight 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* Background image cards */
.card-with-bg {
    background-blend-mode: overlay;
    transition: transform 0.3s ease;
    will-change: transform;
}

[data-theme="dark"] .card-with-bg {
    background: linear-gradient(rgba(26, 32, 44, 0.95), rgba(26, 32, 44, 0.95)), var(--bg-image) !important;
}

.card-with-bg:hover {
    background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), var(--bg-image) !important;
}

[data-theme="dark"] .card-with-bg:hover {
    background: linear-gradient(rgba(26, 32, 44, 0.9), rgba(26, 32, 44, 0.9)), var(--bg-image) !important;
}

/* Dark mode text visibility fixes */
[data-theme="dark"] .card {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .card h3,
[data-theme="dark"] .card h4,
[data-theme="dark"] .card h5 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .card p,
[data-theme="dark"] .card li {
    color: var(--text-secondary) !important;
}

/* Force card backgrounds in dark mode */
[data-theme="dark"] .card:not(.card-with-bg) {
    background: var(--bg-secondary) !important;
}

/* Ensure gradient cards maintain readability */
[data-theme="dark"] .card[style*="linear-gradient"] {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .card[style*="linear-gradient"] h3,
[data-theme="dark"] .card[style*="linear-gradient"] p {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .timeline-title {
    color: var(--primary-color);
}

[data-theme="dark"] .timeline-company {
    color: var(--accent-color);
}

[data-theme="dark"] .experience-details h5 {
    color: var(--primary-color);
}

/* Enhanced background image visibility and text contrast */
.card-with-bg {
    background-color: rgba(255, 255, 255, 0.9);
    background-blend-mode: normal;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .card-with-bg {
    background-color: rgba(26, 32, 44, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] .card-with-bg:hover {
    background-color: rgba(26, 32, 44, 0.6) !important;
}

/* Make timeline cards more transparent in dark mode */
[data-theme="dark"] .timeline-item.card-with-bg {
    background-color: rgba(26, 32, 44, 0.3) !important;
    backdrop-filter: none !important;
}

[data-theme="dark"] .timeline-item.card-with-bg:hover {
    background-color: rgba(26, 32, 44, 0.4) !important;
}

/* Force background images to show through in dark mode */
[data-theme="dark"] .timeline-item.card-with-bg[style*="background-image"] {
    background-blend-mode: normal !important;
    background-color: rgba(26, 32, 44, 0.3) !important;
}

/* Override any conflicting styles for timeline cards */
[data-theme="dark"] .timeline-item[style*="linear-gradient"] {
    background-color: transparent !important;
}

[data-theme="dark"] .card[style*="linear-gradient"] {
    background-color: transparent !important;
}

.card-with-bg h3,
.card-with-bg h4,
.card-with-bg h5,
.card-with-bg p,
.card-with-bg li {
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .card-with-bg h3,
[data-theme="dark"] .card-with-bg h4,
[data-theme="dark"] .card-with-bg h5,
[data-theme="dark"] .card-with-bg p,
[data-theme="dark"] .card-with-bg li {
    color: var(--text-primary) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 700 !important;
}

.card-with-bg:hover {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

[data-theme="dark"] .card-with-bg:hover {
    background-color: rgba(26, 32, 44, 0.95);
}

/* Section with background images */
.section-with-bg {
    position: relative;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    will-change: transform;
}

/* Dark mode section backgrounds - more specific selectors */
[data-theme="dark"] .section-with-bg {
    background-color: var(--bg-primary) !important;
}

[data-theme="dark"] .section-with-bg[style*="rgba(255,255,255"] {
    background-image: linear-gradient(rgba(26, 32, 44, 0.9), rgba(26, 32, 44, 0.9)), var(--bg-image) !important;
}

[data-theme="dark"] .section-with-bg[style*="rgba(247,250,252"] {
    background-image: linear-gradient(rgba(26, 32, 44, 0.9), rgba(26, 32, 44, 0.9)), var(--bg-image) !important;
}

[data-theme="dark"] .section-with-bg[style*="rgba(26,54,93"] {
    background-image: linear-gradient(rgba(26, 32, 44, 0.95), rgba(26, 32, 44, 0.95)), var(--bg-image) !important;
}

/* Force dark mode colors for all sections */
[data-theme="dark"] .section {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .section-bg-pattern {
    background-color: var(--bg-secondary) !important;
}

/* Force all sections without background images to use dark theme */
[data-theme="dark"] .section:not(.section-with-bg) {
    background: var(--bg-primary) !important;
}

[data-theme="dark"] .section:not(.section-with-bg).section-bg-pattern {
    background: var(--bg-secondary) !important;
}

/* Override any inline styles that might prevent dark mode */
[data-theme="dark"] section[style*="background:"] {
    background: var(--bg-primary) !important;
}

[data-theme="dark"] section[style*="background-color:"] {
    background-color: var(--bg-primary) !important;
}

/* Ensure footer follows dark theme */
[data-theme="dark"] .footer {
    background: var(--bg-dark) !important;
    color: var(--text-primary) !important;
}

/* Dark mode background override */
[data-theme="dark"] .card-with-bg[style*="linear-gradient(rgba(255,255,255"] {
    background: linear-gradient(rgba(26, 32, 44, 0.85), rgba(26, 32, 44, 0.85)), var(--bg-image) !important;
}

/* Enhanced text visibility on background images */
.section-with-bg .section-title,
.section-with-bg .section-subtitle,
.section-with-bg h1,
.section-with-bg h2,
.section-with-bg h3,
.section-with-bg h4,
.section-with-bg p,
.section-with-bg li {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: var(--text-primary) !important;
    font-weight: 600;
}

[data-theme="dark"] .section-with-bg .section-title,
[data-theme="dark"] .section-with-bg .section-subtitle,
[data-theme="dark"] .section-with-bg h1,
[data-theme="dark"] .section-with-bg h2,
[data-theme="dark"] .section-with-bg h3,
[data-theme="dark"] .section-with-bg h4,
[data-theme="dark"] .section-with-bg p,
[data-theme="dark"] .section-with-bg li {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    color: var(--text-primary) !important;
    font-weight: 600;
}

/* Ensure all text elements follow theme colors */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] span {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .hero-subtitle,
[data-theme="dark"] .hero-description {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .section-subtitle {
    color: var(--text-light) !important;
}

/* Additional dark mode fixes */
[data-theme="dark"] .footer-section h3 {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .footer-section p,
[data-theme="dark"] .footer-section li {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .footer-bottom {
    color: var(--text-light) !important;
}

/* Ensure buttons maintain proper colors */
[data-theme="dark"] .btn-primary {
    background: var(--primary-color) !important;
    color: var(--bg-primary) !important;
}

[data-theme="dark"] .btn-secondary {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--primary-color) !important;
    color: var(--bg-primary) !important;
}

/* Mobile optimization for background images */
@media (max-width: 768px) {
    .section-with-bg {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center !important;
        will-change: auto;
    }
    
    .hero.section-with-bg {
        min-height: 60vh;
        padding: 2rem 0;
    }
    
    .hero.section-with-bg .hero-text h1 {
        font-size: 2rem;
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
    }
    
    .hero.section-with-bg .hero-subtitle,
    .hero.section-with-bg .hero-description {
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    }
    
    .card-with-bg {
        background-color: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(3px);
    }
    
    [data-theme="dark"] .card-with-bg {
        background-color: rgba(26, 32, 44, 0.95) !important;
    }
    
    .section-with-bg .section-title,
    .section-with-bg .section-subtitle {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    
    [data-theme="dark"] .section-with-bg .section-title,
    [data-theme="dark"] .section-with-bg .section-subtitle {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    }
}

/* Blog specific styles */
.blog-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.blog-category {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
        text-align: center;
    }
    
    .theme-toggle {
        background: var(--primary-color) !important;
        color: white !important;
        border: none;
        padding: 0.8rem 1.5rem;
        border-radius: 25px;
        font-size: 1rem;
        margin: 1rem auto;
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        width: auto;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .blog-card h4 {
        font-size: 1rem;
    }
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .hero-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        max-width: 240px;
    }
    
    .gallery-item {
        width: 110px;
        height: 110px;
    }
    
    .floating-circle {
        display: none;
    }
}

@media (max-width: 768px) {
    .ai-chatbox {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
    
    .service-tags {
        justify-content: center;
    }
}

/* Toast Messages */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Social Media Links */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(49, 130, 206, 0.4);
}

.social-links a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* LinkedIn specific styling */
.social-links a[href*="linkedin"]:hover {
    background: #0077b5;
}

/* GitHub specific styling */
.social-links a[href*="github"]:hover {
    background: #333;
}

/* Email specific styling */
.social-links a[href^="mailto"]:hover {
    background: #ea4335;
}

/* Phone specific styling */
.social-links a[href^="tel"]:hover {
    background: #34a853;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }