:root {
    /* Python & Django Brand Colors - Enhanced Backend Focus */
    --py-blue: #3776ab;
    --py-blue-glow: rgba(55, 118, 171, 0.6);
    --py-yellow: #ffd343;
    --py-yellow-glow: rgba(255, 211, 67, 0.6);
    --django-green: #092e20;
    --django-light: #44b78b;
    --django-dark: #0a2e1f;

    /* Unique Backend-Themed Colors */
    --backend-purple: #6f42c1;
    --backend-purple-glow: rgba(111, 66, 193, 0.4);
    --code-gray: #2d3748;
    --terminal-green: #48bb78;
    --accent-orange: #ed8936;

    /* Backgrounds inspired by VS Code Dark with Backend Theme */
    --bg-primary: #0a0e14;
    --bg-secondary: #1a1d23;
    --bg-tertiary: #21262d;
    --bg-code: #011627;

    /* Glassmorphism Refined for Backend */
    --glass-bg: rgba(26, 29, 35, 0.95);
    --glass-border: rgba(68, 183, 139, 0.3);
    --glass-blur: 20px;

    /* Text Colors - Backend Focused */
    --text-main: #f7fafc;
    --text-secondary: #a0aec0;
    --text-muted: #718096;

    /* Syntax Highlighting (Pythonic Enhanced) */
    --keyword: #e53e3e;
    --function: #d53f8c;
    --string: #38a169;
    --comment: #a0aec0;
    --constant: #3182ce;

    /* Shadows & Glows - Backend Emphasis */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
    --glow-blue: 0 0 20px var(--py-blue-glow);
    --glow-green: 0 0 20px rgba(68, 183, 139, 0.4);
    --glow-purple: 0 0 20px var(--backend-purple-glow);

    /* Fonts - Monospace Emphasis for Code */
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', monospace;
    --font-sans: 'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif;
}

/* General Reset & Base */
body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-mono);
    font-weight: 700;
}

/* Transitions */
* {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Layout Components --- */

.section {
    padding: 100px 0;
    position: relative;
}

.container {
    max-width: 1200px;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
}

.glass-card:hover {
    border-color: var(--py-blue);
    box-shadow: var(--shadow-md), var(--glow-blue);
    transform: translateY(-5px);
}

/* --- Navigation --- */
.terminal-nav {
    background: rgba(13, 17, 23, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover, .nav-link.active {
    color: var(--py-yellow) !important;
}

.terminal-brand {
    color: var(--py-blue) !important;
    font-size: 1.2rem;
}

/* --- Hero Section --- */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 80% 20%, rgba(55, 118, 171, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(255, 211, 67, 0.05) 0%, transparent 40%);
}

.gradient-text {
    background: linear-gradient(135deg, var(--py-blue) 0%, var(--py-yellow) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Interactive Terminal REPL */
.terminal-window {
    background: #010409;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.terminal-header {
    background: #161b22;
    padding: 8px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.prompt { color: var(--py-yellow); margin-right: 10px; }
.keyword { color: var(--keyword); }
.function { color: var(--function); }
.string { color: var(--string); }

/* --- Unified Tech Stack & Capabilities --- */
.skills-engine {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.skill-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.skill-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 30px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
}

.skill-tab.active {
    background: var(--py-blue);
    color: white;
    border-color: var(--py-blue);
    box-shadow: var(--glow-blue);
}

.skill-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--py-blue);
}

.skill-card.service::after { background: var(--py-yellow); }
.skill-card.tool::after { background: var(--django-light); }

/* --- About Pythonic Layout --- */
.about-class {
    font-family: var(--font-mono);
}

.docstring {
    color: var(--comment);
    font-style: italic;
}

/* --- Buttons --- */
.btn-py {
    background: var(--py-blue);
    color: white;
    font-family: var(--font-mono);
    padding: 12px 28px;
    border-radius: 6px;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-py:hover {
    background: #2b5b84;
    box-shadow: var(--glow-blue);
    transform: translateY(-2px);
    color: white;
}

.btn-dj {
    background: var(--django-green);
    color: white;
    font-family: var(--font-mono);
    padding: 12px 28px;
    border-radius: 6px;
    border: 1px solid var(--django-light);
}

.btn-dj:hover {
    background: #0c4b34;
    color: white;
    transform: translateY(-2px);
}

/* --- Experience Timeline --- */
.timeline-item {
    padding-left: 30px;
    border-left: 2px solid var(--glass-border);
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px; top: 0;
    width: 12px; height: 12px;
    background: var(--py-blue);
    border-radius: 50%;
}

/* --- Projects --- */
.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.project-tags span {
    background: var(--bg-tertiary);
    color: var(--py-yellow);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Animations */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.cursor {
    display: inline-block;
    width: 8px; height: 18px;
    background: var(--py-yellow);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

/* --- Contact Section --- */
.contact-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(68, 183, 139, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(55, 118, 171, 0.1) 0%, transparent 50%);
    animation: contact-bg-pulse 8s ease-in-out infinite;
}

@keyframes contact-bg-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.contact-form-container {
    position: relative;
    z-index: 2;
}

.contact-form .form-control {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--django-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(68, 183, 139, 0.25) !important;
    background: rgba(26, 29, 35, 0.9) !important;
}

.contact-form .form-label {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.contact-form .form-control:focus + .form-label,
.contact-form .form-control:not(:placeholder-shown) + .form-label {
    color: var(--django-light);
}

.btn-py:hover {
    animation: btn-glow 0.6s ease-in-out infinite alternate;
}

@keyframes btn-glow {
    from { box-shadow: var(--shadow-sm), var(--glow-blue); }
    to { box-shadow: var(--shadow-md), 0 0 25px var(--py-blue-glow); }
}

/* --- Enhanced Animations for Eye-Catching Effects --- */

/* Floating Animation for Cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.glass-card:hover {
    animation: float 3s ease-in-out infinite;
}

/* Typing Animation for Terminal */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.terminal-body p {
    overflow: hidden;
    border-right: 2px solid var(--py-yellow);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--py-yellow); }
}

/* Gradient Text Animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Skill Card Hover Effects */
.skill-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skill-card:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: var(--shadow-md), var(--glow-green);
}

.skill-card:hover .progress-bar {
    animation: progress-fill 1s ease-out;
}

@keyframes progress-fill {
    0% { width: 0%; }
    100% { width: var(--proficiency); }
}

/* Project Card Slide-in Animation */
@keyframes slide-in-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: slide-in-up 0.8s ease-out;
    animation-fill-mode: both;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

/* Timeline Animation */
.timeline-item {
    opacity: 0;
    animation: fade-in-left 0.8s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }

@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Navigation Hover Effects */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, var(--py-blue), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

/* Scroll-triggered Animations */
@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.section {
    animation: fade-in-scale 1s ease-out;
    animation-fill-mode: both;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.3s; }
.section:nth-child(3) { animation-delay: 0.5s; }
.section:nth-child(4) { animation-delay: 0.7s; }
.section:nth-child(5) { animation-delay: 0.9s; }
.section:nth-child(6) { animation-delay: 1.1s; }

/* Particle Effect for Background */
@keyframes particle-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.particle {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--py-blue);
    border-radius: 50%;
    animation: particle-float 6s ease-in-out infinite;
}

.particle:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 20%; left: 80%; animation-delay: 1s; }
.particle:nth-child(3) { top: 70%; left: 20%; animation-delay: 2s; }
.particle:nth-child(4) { top: 80%; left: 90%; animation-delay: 3s; }
.particle:nth-child(5) { top: 40%; left: 50%; animation-delay: 4s; }

/* --- Education Section Text Visibility --- */
#education .glass-card h3,
#education .glass-card p {
    color: white !important;
}

/* --- Enhanced Eye-Catching Effects --- */

/* Gradient Background Animation */
@keyframes gradient-bg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background: linear-gradient(-45deg, #0a0e14, #1a1d23, #0d1117, #161b22);
    background-size: 400% 400%;
    animation: gradient-bg 15s ease infinite;
}

/* Enhanced Glass Cards */
.glass-card {
    background: rgba(26, 29, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(68, 183, 139, 0.3);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(68, 183, 139, 0.1), transparent);
    transition: left 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(68, 183, 139, 0.2);
    border-color: rgba(68, 183, 139, 0.5);
}

/* Enhanced Buttons */
.btn-py, .btn-dj {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-py::before, .btn-dj::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-py:hover::before, .btn-dj:hover::before {
    left: 100%;
}

/* Enhanced Terminal */
.terminal-window {
    background: linear-gradient(135deg, #010409 0%, #161b22 100%);
    border: 2px solid rgba(68, 183, 139, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: terminal-glow 2s ease-in-out infinite alternate;
}

@keyframes terminal-glow {
    from { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
    to { box-shadow: 0 10px 30px rgba(68, 183, 139, 0.2); }
}

/* Enhanced Skill Cards */
.skill-card {
    background: linear-gradient(135deg, rgba(26, 29, 35, 0.9) 0%, rgba(33, 37, 45, 0.9) 100%);
    border: 1px solid rgba(68, 183, 139, 0.2);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--py-blue), var(--py-yellow));
    transition: width 0.3s ease;
}

.skill-card:hover::after {
    width: 6px;
}

.skill-card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 25px rgba(68, 183, 139, 0.1);
}

/* Enhanced Progress Bars */
.progress {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--py-blue), var(--py-yellow)) !important;
    transition: width 1s ease-in-out;
}

/* Enhanced Project Cards */
.project-card {
    background: linear-gradient(135deg, rgba(26, 29, 35, 0.95) 0%, rgba(33, 37, 45, 0.95) 100%);
    border: 1px solid rgba(68, 183, 139, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(68, 183, 139, 0.1);
    border-color: rgba(68, 183, 139, 0.4);
}

/* Enhanced Timeline */
.timeline-item::before {
    background: linear-gradient(135deg, var(--py-blue), var(--py-yellow));
    box-shadow: 0 0 10px rgba(55, 118, 171, 0.5);
}

/* Enhanced Navigation */
.terminal-nav {
    background: rgba(13, 17, 23, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(68, 183, 139, 0.3);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Enhanced Contact Form */
.contact-form .form-control {
    background: rgba(26, 29, 35, 0.95) !important;
    border: 2px solid rgba(68, 183, 139, 0.2) !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--django-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(68, 183, 139, 0.25) !important;
    background: rgba(26, 29, 35, 0.98) !important;
    transform: translateY(-2px);
}

/* Enhanced Particles */
.particle {
    background: linear-gradient(45deg, var(--py-blue), var(--py-yellow));
    box-shadow: 0 0 10px var(--py-blue);
    animation: particle-float 8s ease-in-out infinite, particle-glow 2s ease-in-out infinite alternate;
}

@keyframes particle-glow {
    from { box-shadow: 0 0 10px var(--py-blue); }
    to { box-shadow: 0 0 20px var(--py-yellow); }
}

/* Enhanced Section Headers */
.section h2 {
    background: linear-gradient(135deg, var(--py-blue), var(--py-yellow));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--py-blue), var(--py-yellow));
    border-radius: 2px;
}

/* Enhanced Education Cards */
#education .glass-card {
    border-left: 4px solid var(--py-yellow);
    background: linear-gradient(135deg, rgba(26, 29, 35, 0.95) 0%, rgba(33, 37, 45, 0.95) 100%);
}

#education .glass-card:hover {
    border-left-color: var(--py-blue);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 25px rgba(255, 211, 67, 0.2);
}

/* Enhanced About Section */
.about-class {
    background: rgba(26, 29, 35, 0.9);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(68, 183, 139, 0.2);
}

/* Enhanced Skill Tabs */
.skill-tab {
    background: linear-gradient(135deg, rgba(26, 29, 35, 0.8) 0%, rgba(33, 37, 45, 0.8) 100%);
    border: 1px solid rgba(68, 183, 139, 0.3);
    transition: all 0.3s ease;
}

.skill-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.skill-tab.active {
    background: linear-gradient(135deg, var(--py-blue), var(--django-light));
    box-shadow: 0 0 20px rgba(55, 118, 171, 0.3);
}

/* Enhanced Hero Section */
.hero {
    background: radial-gradient(circle at 80% 20%, rgba(55, 118, 171, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(255, 211, 67, 0.1) 0%, transparent 40%),
                linear-gradient(135deg, #0a0e14 0%, #1a1d23 100%);
}

/* Enhanced Contact Section */
.contact-section {
    background: linear-gradient(135deg, #0a0e14 0%, #1a1d23 50%, #0d1117 100%);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    background: radial-gradient(circle at 20% 80%, rgba(68, 183, 139, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(55, 118, 171, 0.15) 0%, transparent 50%);
}

/* Enhanced Scrollbar */
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--py-blue), var(--py-yellow));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--django-light), var(--py-blue));
}

/* --- Contact Form Placeholder Text Visibility --- */
.contact-form .form-control::placeholder {
    color: white !important;
    opacity: 0.8 !important;
}

.contact-form .form-control {
    color: white !important;
}

/* --- Fix All Text Visibility Issues --- */
/* Override Bootstrap text classes for dark theme visibility */
.text-secondary {
    color: #a0aec0 !important; /* Light gray for secondary text */
}

.text-muted {
    color: #718096 !important; /* Medium gray for muted text */
}

.text-light {
    color: #f7fafc !important; /* White for light text */
}

/* Additional text visibility fixes */
small.text-muted,
p.text-muted,
span.text-muted {
    color: #a0aec0 !important;
}

.text-secondary.small,
.text-secondary.mb-3,
.text-secondary.mb-2,
.text-secondary.mb-0 {
    color: #a0aec0 !important;
}

/* Fix project description text */
.small.text-secondary {
    color: #a0aec0 !important;
}

/* Fix education section text */
p.text-muted.small {
    color: #a0aec0 !important;
}

/* Fix experience section text */
.text-light.small {
    color: #f7fafc !important;
}

/* Fix form labels */
.form-label {
    color: #a0aec0 !important;
}

/* Fix any remaining invisible text */
.glass-card p,
.glass-card span,
.glass-card div {
    color: #f7fafc !important;
}

/* Ensure all headings are visible */
.glass-card h1,
.glass-card h2,
.glass-card h3,
.glass-card h4,
.glass-card h5,
.glass-card h6 {
    color: #f7fafc !important;
}

/* Fix terminal text */
.terminal-body p {
    color: #f7fafc !important;
}

/* Fix skill card text */
.skill-card h4,
.skill-card p,
.skill-card span {
    color: #f7fafc !important;
}

/* Fix project card text */
.project-card h3,
.project-card p,
.project-card span {
    color: #f7fafc !important;
}

/* Fix about section text */
.about-class p,
.about-class span {
    color: #f7fafc !important;
}

/* Fix timeline text */
.timeline-item h3,
.timeline-item p,
.timeline-item div {
    color: #f7fafc !important;
}

/* Fix footer text visibility */
.footer p,
.footer a,
.footer h5,
.footer span {
    color: #a0aec0 !important;
}

.footer a:hover {
    color: var(--py-yellow) !important;
}

/* Fix any remaining text in all templates */
body * {
    color: #f7fafc;
}

/* Ensure all text has proper contrast */
h1, h2, h3, h4, h5, h6,
p, span, div, li, a,
small, strong, em {
    color: #f7fafc !important;
}

/* Override any dark text that might be invisible */
.text-dark,
.text-black {
    color: #f7fafc !important;
}

/* Fix any Bootstrap default colors that might be too dark */
.text-body,
.text-primary {
    color: #f7fafc !important;
}

/* Ensure all card content is visible */
.card,
.card-body,
.card-title,
.card-text {
    color: #f7fafc !important;
}

/* Fix any remaining invisible elements */
* {
    color: #f7fafc;
}

/* Add missing text classes used in templates */
.text-code-green {
    color: var(--terminal-green) !important;
}

.text-code-purple {
    color: var(--backend-purple) !important;
}

/* Fix blog page text visibility - Dark theme cards */
.blog .card {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
}

.blog .card-body {
    color: var(--text-main) !important;
}

.blog .card-title {
    color: var(--text-main) !important;
}

.blog .card-text {
    color: var(--text-secondary) !important;
}

.blog .text-muted {
    color: var(--text-muted) !important;
}

.blog .btn-primary {
    background: var(--py-blue) !important;
    border-color: var(--py-blue) !important;
    color: white !important;
}

.blog .btn-primary:hover {
    background: #2b5b84 !important;
    border-color: #2b5b84 !important;
}

/* Fix pagination text visibility */
.blog .pagination .page-link {
    background: var(--bg-secondary) !important;
    border-color: var(--glass-border) !important;
    color: var(--text-secondary) !important;
}

.blog .pagination .page-link:hover {
    background: var(--py-blue) !important;
    border-color: var(--py-blue) !important;
    color: white !important;
}

.blog .pagination .page-item.active .page-link {
    background: var(--py-blue) !important;
    border-color: var(--py-blue) !important;
    color: white !important;
}

/* Light theme sections (if any) - ensure black text on white backgrounds */
.light-theme,
.light-theme * {
    color: #000000 !important;
}

.light-theme .card {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
}

.light-theme .btn-primary {
    background: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

/* Fix contact page text visibility */
.contact .card {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
}

.contact .card-body {
    color: var(--text-main) !important;
}

.contact .form-label {
    color: var(--text-secondary) !important;
}

.contact .form-control {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
}

.contact .form-control:focus {
    border-color: var(--django-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(68, 183, 139, 0.25) !important;
    background: var(--bg-secondary) !important;
}

.contact .form-control::placeholder {
    color: var(--text-muted) !important;
}

.contact .btn-primary {
    background: var(--py-blue) !important;
    border-color: var(--py-blue) !important;
    color: white !important;
}

.contact .btn-primary:hover {
    background: #2b5b84 !important;
    border-color: #2b5b84 !important;
}

.contact .alert {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
}

.contact .alert-danger {
    border-color: #e53e3e !important;
    color: #e53e3e !important;
}

.contact .text-danger {
    color: #e53e3e !important;
}

/* Fix capabilities section animations */
.skill-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1;
    transform: scale(1);
}

.skill-card.fade-out {
    opacity: 0;
    transform: scale(0.8);
}

.skill-card.fade-in {
    opacity: 1;
    transform: scale(1);
    animation: skill-appear 0.4s ease-out;
}

@keyframes skill-appear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Ensure skill cards are properly animated during filtering */
.tech-item {
    transition: all 0.4s ease;
}

.tech-item[style*="display: none"] {
    opacity: 0;
    transform: scale(0.8);
}

.tech-item[style*="display: block"] {
    opacity: 1;
    transform: scale(1);
    animation: skill-appear 0.4s ease-out;
}
