/* Custom Portfolio Styles with Dark/Light Theme Support */
:root {
  /* Light Theme Colors - Professional & High Contrast */
  --primary-color: #1a365d;
  --secondary-color: #2d3748;
  --accent-color: #3182ce;
  --success-color: #38a169;
  --danger-color: #e53e3e;
  --warning-color: #d69e2e;
  --info-color: #3182ce;
  
  /* Light Theme Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --bg-tertiary: #edf2f7;
  --bg-hero: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  --bg-card: #ffffff;
  --bg-navbar: rgba(255, 255, 255, 0.98);
  
  /* Light Theme Text - High Contrast */
  --text-primary: #1a202c;
  --text-secondary: #2d3748;
  --text-tertiary: #4a5568;
  --text-light: #ffffff;
  --text-on-primary: #ffffff;
  
  /* Light Theme Borders & Shadows */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

/* Dark Theme Colors - Professional & High Contrast */
[data-theme="dark"] {
  /* Dark Theme Colors */
  --primary-color: #4299e1;
  --secondary-color: #a0aec0;
  --accent-color: #63b3ed;
  --success-color: #68d391;
  --danger-color: #fc8181;
  --warning-color: #f6e05e;
  --info-color: #63b3ed;
  
  /* Dark Theme Backgrounds */
  --bg-primary: #1a202c;
  --bg-secondary: #2d3748;
  --bg-tertiary: #4a5568;
  --bg-hero: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
  --bg-card: #2d3748;
  --bg-navbar: rgba(26, 32, 44, 0.98);
  
  /* Dark Theme Text - High Contrast */
  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-tertiary: #cbd5e0;
  --text-light: #ffffff;
  --text-on-primary: #ffffff;
  
  /* Dark Theme Borders & Shadows */
  --border-color: #4a5568;
  --border-light: #718096;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  
  /* Dark Gradients */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  --gradient-hero: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  --gradient-card: linear-gradient(145deg, #1e293b 0%, #334155 100%);
}

/* Auto-detect system theme preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    /* Dark Theme Colors */
    --primary-color: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #60a5fa;
    --success-color: #34d399;
    --danger-color: #f87171;
    --warning-color: #fbbf24;
    --info-color: #22d3ee;
    
    /* Dark Theme Backgrounds */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hero: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --bg-card: #1e293b;
    --bg-navbar: rgba(15, 23, 42, 0.95);
    
    /* Dark Theme Text */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-light: #ffffff;
    --text-on-primary: #ffffff;
    
    /* Dark Theme Borders & Shadows */
    --border-color: #334155;
    --border-light: #475569;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    
    /* Dark Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    --gradient-hero: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --gradient-card: linear-gradient(145deg, #1e293b 0%, #334155 100%);
  }
}

/* Global Styles */
html {
  scroll-behavior: smooth;
  transition: color-scheme 0.3s ease;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.min-vh-100 {
  min-height: 100vh;
}

/* Navigation Styles */
.navbar {
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  background-color: var(--bg-navbar) !important;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color) !important;
  text-decoration: none;
}

/* Navbar toggler fixes for light mode */
.navbar-toggler {
  border: 2px solid var(--text-primary) !important;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  background: transparent;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
  outline: none;
}

/* Hide default Bootstrap icon */
.navbar-toggler-icon {
  display: none !important;
}

/* Show hamburger fallback by default */
.navbar-toggler .hamburger-fallback {
  display: block;
  font-size: 20px;
  line-height: 1;
  color: var(--text-primary);
  font-weight: bold;
  text-align: center;
}

/* Alternative CSS-based hamburger (if needed) */
.navbar-toggler.has-custom-icon .hamburger-fallback {
  display: none;
}

.navbar-toggler.has-custom-icon::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background-color: var(--text-primary);
  box-shadow: 
    0 -6px 0 var(--text-primary),
    0 6px 0 var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s ease;
}

/* Dark mode navbar toggler */
[data-theme="dark"] .navbar-toggler {
  border-color: #ffffff !important;
}

[data-theme="dark"] .hamburger-fallback {
  color: #ffffff !important;
}

[data-theme="dark"] .navbar-toggler.has-custom-icon::before {
  background-color: #ffffff;
  box-shadow: 
    0 -6px 0 #ffffff,
    0 6px 0 #ffffff;
}

/* Hover effects */
.navbar-toggler:hover {
  background-color: rgba(var(--text-primary), 0.1);
}

[data-theme="dark"] .navbar-toggler:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link {
  position: relative;
  transition: all 0.3s ease;
  margin: 0 0.5rem;
  color: var(--text-primary) !important;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1rem !important;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--primary-color) !important;
  background-color: var(--bg-secondary);
  transform: translateY(-2px);
}

.nav-link.active {
  color: var(--primary-color) !important;
  background-color: var(--bg-secondary);
}

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

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

/* Theme Toggle Button - Enhanced Professional Design */
.theme-toggle {
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  padding: 0.75rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
  margin-left: 1rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
  border-color: var(--accent-color);
  color: var(--text-light);
  background: var(--accent-color);
  transform: scale(1.1) rotate(15deg);
  box-shadow: var(--shadow-lg);
}

.theme-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.3);
}

/* Responsive navbar theme toggle */
@media (max-width: 991.98px) {
  .theme-toggle {
    margin: 0.5rem 0;
    margin-left: 0;
  }
  
  .navbar-nav.ms-auto {
    margin-top: 1rem;
    align-items: flex-start;
  }
}

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

/* Hero Section - Redesigned for Maximum Impact */
.hero-section {
  background: var(--bg-hero);
  color: var(--text-light);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
  pointer-events: none; /* Allow clicks to pass through */
}

.hero-content {
  position: relative;
  z-index: 10; /* Increased z-index to ensure buttons are clickable */
}

.hero-section h1 {
  color: #ffffff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  font-weight: 800;
  font-size: 4rem;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-section h2 {
  color: #ffffff !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  opacity: 1;
}

.hero-section p {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Ensure all text in hero section is white */
.hero-section .text-muted,
.hero-section .text-secondary,
.hero-section .lead {
  color: #ffffff !important;
  opacity: 0.9;
}

.hero-buttons {
  position: relative;
  z-index: 15; /* Ensure buttons container is above other elements */
  pointer-events: auto; /* Explicitly enable pointer events */
}

.hero-buttons .btn {
  margin-bottom: 1rem;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-shadow: none;
  text-transform: none;
  position: relative;
  z-index: 15; /* Ensure buttons are above all other elements */
  pointer-events: auto; /* Explicitly enable pointer events */
  cursor: pointer; /* Show pointer cursor */
}

.hero-buttons .btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.hero-buttons .btn-primary:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-buttons .btn-outline-primary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.1);
}

.hero-buttons .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.profile-container {
  position: relative;
  text-align: center;
}

.profile-image-placeholder {
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

.profile-circle {
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: 3px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
  transition: all 0.3s ease;
}

.profile-circle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

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

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5; /* Lower z-index than hero content */
}

.scroll-link {
  color: white;
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Section Styles */
section {
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.bg-light {
  background-color: var(--bg-secondary) !important;
}

/* Section Titles */
.section-title {
  margin-bottom: 4rem;
}

.section-title h2 {
  position: relative;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.title-underline {
  width: 80px;
  height: 3px;
  background: var(--gradient-primary);
  margin: 0 auto;
  border-radius: 2px;
}

/* Skills Section */
.skill-item {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-color);
}

.skill-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.skill-header {
  color: var(--text-primary);
}

.skill-name {
  font-weight: 600;
  color: var(--text-primary) !important;
}

.skill-percentage {
  color: var(--text-secondary) !important;
}

/* Skills section specific styling */
#skills {
  background-color: var(--bg-primary);
}

#skills .section-title h2 {
  color: var(--text-primary) !important;
}

#skills .skill-item h5,
#skills .skill-item .skill-name {
  color: var(--text-primary) !important;
}

#skills .skill-item .skill-percentage,
#skills .skill-item small {
  color: var(--text-secondary) !important;
}

/* Dark theme overrides for Skills section */
[data-theme="dark"] #skills .skill-item h5,
[data-theme="dark"] #skills .skill-item .skill-name,
[data-theme="dark"] #skills .skill-item .skill-name span,
[data-theme="dark"] #skills .section-title h2 {
  color: #ffffff !important;
}

[data-theme="dark"] #skills .skill-item .skill-percentage,
[data-theme="dark"] #skills .skill-item small,
[data-theme="dark"] #skills .skill-item .skill-description,
[data-theme="dark"] #skills .skill-item .text-muted {
  color: #e2e8f0 !important;
}

/* Force all text in skills section to be visible in dark mode */
[data-theme="dark"] #skills .skill-item p,
[data-theme="dark"] #skills .skill-item span,
[data-theme="dark"] #skills .skill-item div {
  color: #ffffff !important;
}

[data-theme="dark"] #skills .skill-item .small,
[data-theme="dark"] #skills .skill-item p.small {
  color: #cbd5e0 !important;
}

/* Universal text fix for skills section in dark mode */
[data-theme="dark"] #skills * {
  color: #ffffff !important;
}

[data-theme="dark"] #skills .text-muted,
[data-theme="dark"] #skills .small,
[data-theme="dark"] #skills p.small,
[data-theme="dark"] #skills .skill-description {
  color: #cbd5e0 !important;
}

.progress {
  border-radius: 50px;
  overflow: hidden;
  background-color: var(--bg-tertiary);
  height: 6px;
}

.progress-bar {
  background: var(--gradient-primary);
  transition: width 1.5s ease-in-out;
  border-radius: 50px;
}

.skill-description {
  color: var(--text-tertiary);
}

/* Project Cards */
.project-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.project-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.project-image-placeholder {
  height: 200px;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.project-card:hover .project-image-placeholder {
  background: var(--gradient-secondary);
}

.project-card .card-body {
  background: var(--bg-card);
  color: var(--text-primary);
}

.project-card .card-title {
  color: var(--text-primary);
  font-weight: 600;
}

.project-card .card-text {
  color: var(--text-secondary);
}

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

.technology-tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  width: 50%;
  padding: 0 2rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-icon {
  position: absolute;
  top: 0;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1rem;
  z-index: 2;
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.timeline-item:nth-child(odd) .timeline-icon {
  right: -22px;
}

.timeline-item:nth-child(even) .timeline-icon {
  left: -22px;
}

.timeline-content {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.timeline-content:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.timeline-content h4 {
  color: var(--text-primary);
  font-weight: 600;
}

.timeline-content h5 {
  color: var(--primary-color);
  font-weight: 500;
}

.timeline-content p {
  color: var(--text-secondary);
}

.timeline-date {
  background: var(--primary-color);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-block;
  margin-top: 1rem;
}

/* Contact Section */
.contact-form {
  background: var(--bg-card);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.form-control {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

.form-label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.contact-card {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.contact-card h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-card p {
  color: var(--text-secondary);
  word-break: break-word;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.contact-card .btn {
  width: 100%;
  margin-top: auto;
}

.contact-icon {
  width: 70px;
  height: 70px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  margin: 0 auto;
  font-size: 1.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.contact-icon:hover {
  background: var(--accent-color);
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

/* About Section - FORCED Text Visibility Fix */
.about-image-placeholder {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
  color: var(--primary-color);
}

/* Profile Image Styling */
.profile-image-container {
  text-align: center;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--primary-color);
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.profile-image-container:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.profile-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 15px;
  object-fit: cover;
  transition: all 0.3s ease;
}

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

/* Responsive profile image */
@media (max-width: 768px) {
  .profile-image {
    max-width: 300px;
  }
  
  .profile-image-container {
    margin-bottom: 1rem;
  }
}

/* Hero Profile Image */
.hero-profile-container {
  position: relative;
  display: inline-block;
  padding: 1rem;
}

.hero-profile-image {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

.hero-profile-image:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Floating animation for hero image */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Responsive hero image */
@media (max-width: 768px) {
  .hero-profile-image {
    width: 280px;
    height: 280px;
  }
}

@media (max-width: 576px) {
  .hero-profile-image {
    width: 220px;
    height: 220px;
  }
}

/* About section text styling - STRONG OVERRIDES */
#about {
  background-color: #ffffff !important;
}

#about .about-content h3 {
  color: #1a202c !important;
  font-weight: 600 !important;
}

#about .about-content p,
#about .about-content .lead {
  color: #1a202c !important;
  font-size: 1.1rem !important;
  line-height: 1.7 !important;
  font-weight: 400 !important;
}

#about .section-title h2 {
  color: #1a202c !important;
  font-weight: 700 !important;
}

/* Dark theme overrides for About section */
[data-theme="dark"] #about {
  background-color: #2d3748 !important;
}

[data-theme="dark"] #about .about-content h3,
[data-theme="dark"] #about .about-content p,
[data-theme="dark"] #about .about-content .lead,
[data-theme="dark"] #about .section-title h2 {
  color: #ffffff !important;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  color: #1a202c !important;
  font-weight: 500;
}

.contact-item i {
  color: var(--primary-color) !important;
  font-size: 1.2rem;
}

.contact-item span {
  color: #1a202c !important;
  font-weight: 500;
}

/* Dark theme contact items */
[data-theme="dark"] .contact-item {
  color: #ffffff !important;
}

[data-theme="dark"] .contact-item span {
  color: #ffffff !important;
}

/* Back to Top Button */
#btn-back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  border: none;
  color: white;
  font-size: 1.2rem;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

#btn-back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--accent-color);
}

/* Footer */
footer {
  background: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
  border-top: 1px solid var(--border-color);
}

.social-links a {
  transition: all 0.3s ease;
  display: inline-block;
  color: var(--text-secondary);
}

.social-links a:hover {
  transform: translateY(-2px);
  color: var(--primary-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    text-align: center;
    padding: 4rem 0;
    min-height: auto;
  }
  
  .hero-section h1 {
    font-size: 2.5rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero-section h2 {
    font-size: 1.5rem !important;
  }
  
  .hero-section p {
    font-size: 1rem !important;
  }
  
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.75rem 1.5rem;
  }
  
  .hero-buttons .btn:last-child {
    margin-bottom: 0;
  }
  
  .profile-circle {
    width: 150px;
    height: 150px;
  }
  
  .profile-circle i {
    font-size: 3rem;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    width: 100% !important;
    left: 0 !important;
    text-align: left !important;
    padding-left: 4rem;
    padding-right: 1rem;
    margin-bottom: 2rem;
  }
  
  .timeline-icon {
    left: -5px !important;
    right: auto !important;
  }
  
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  /* Mobile navbar improvements */
  .navbar-collapse {
    background: var(--bg-navbar);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
  }
  
  .navbar-nav {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-link {
    margin: 0.25rem 0;
    padding: 0.75rem 1rem !important;
    border-radius: 6px;
    text-align: center;
  }
  
  .theme-toggle {
    margin: 1rem auto 0 auto;
    display: block;
  }
  
  /* Hero section mobile layout */
  .hero-content {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .hero-profile-container {
    order: -1;
    margin-bottom: 2rem;
  }
  
  .hero-profile-image {
    width: 200px;
    height: 200px;
  }
  
  /* Skills and projects mobile improvements */
  .skill-item {
    margin-bottom: 1.5rem;
  }
  
  .project-card {
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 6rem 0 4rem;
    min-height: auto;
  }
  
  .hero-section h1 {
    font-size: 2rem !important;
  }
  
  .hero-section h2 {
    font-size: 1.25rem !important;
  }
  
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    padding: 0.6rem 1.25rem;
  }
  
  .profile-circle {
    width: 120px;
    height: 120px;
  }
  
  .profile-circle i {
    font-size: 2.5rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .timeline-content {
    padding: 1.5rem;
  }
  
  .timeline-item {
    padding-left: 3rem;
  }
  
  .skill-item {
    padding: 1rem;
  }
  
  .section-title h2 {
    font-size: 1.75rem !important;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Smaller hero image on very small screens */
  .hero-profile-image {
    width: 150px;
    height: 150px;
  }
  
  /* Adjust navbar brand size */
  .navbar-brand {
    font-size: 1.5rem;
  }
  
  /* Contact cards stack better */
  .contact-card {
    margin-bottom: 1.5rem;
  }
}

/* Loading Animation */
.loading {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.loading.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Additional fixes for button clickability */
.hero-section .container {
  position: relative;
  z-index: 10;
}

.hero-section .row {
  position: relative;
  z-index: 10;
}

.hero-section .col-lg-6 {
  position: relative;
  z-index: 10;
}

/* Ensure no other elements are interfering */
.hero-section * {
  pointer-events: auto;
}

.hero-section .hero-content * {
  pointer-events: auto;
}

/* Specific button hover and active states */
.hero-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  pointer-events: auto !important;
}

.hero-buttons .btn:active {
  transform: translateY(0);
  pointer-events: auto !important;
}

.hero-buttons .btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
  pointer-events: auto !important;
}

/* Utility Classes */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: var(--gradient-primary);
}

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

.bg-gradient-dark {
  background: var(--gradient-dark);
}

/* Enhanced Button Styles */
.btn-primary {
  background: var(--primary-color);
  border: 2px solid var(--primary-color);
  color: var(--text-light);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  background: transparent;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Success button to match primary button styling */
.btn-success {
  background: var(--success-color);
  border: 2px solid var(--success-color);
  color: var(--text-light);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.btn-success:hover {
  background: #38a169;
  border-color: #38a169;
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ========================================
   COMPREHENSIVE DARK MODE TEXT FIXES
   ======================================== */

/* Bootstrap text-muted override for dark mode */
[data-theme="dark"] .text-muted {
  color: #cbd5e0 !important;
}

/* Projects section dark mode text fixes */
[data-theme="dark"] #projects .project-card .card-text,
[data-theme="dark"] #projects .project-card .technologies small,
[data-theme="dark"] #projects .technologies .text-muted,
[data-theme="dark"] #projects small.text-muted,
[data-theme="dark"] #projects .project-card small {
  color: #e2e8f0 !important;
}

/* Experience section dark mode text fixes */
[data-theme="dark"] #experience .timeline-content p,
[data-theme="dark"] #experience .timeline-content small,
[data-theme="dark"] #experience .text-muted {
  color: #e2e8f0 !important;
}

/* Education section dark mode text fixes */
[data-theme="dark"] #education .timeline-content p,
[data-theme="dark"] #education .timeline-content small,
[data-theme="dark"] #education .text-muted {
  color: #e2e8f0 !important;
}

/* About section contact info dark mode fixes */
[data-theme="dark"] #about .contact-item,
[data-theme="dark"] #about .contact-item span {
  color: #ffffff !important;
}

/* Contact section dark mode text fixes */
[data-theme="dark"] #contact .contact-card p,
[data-theme="dark"] #contact .contact-card h5,
[data-theme="dark"] #contact .section-title p {
  color: #e2e8f0 !important;
}

/* Universal dark mode text fixes for any missed elements */
[data-theme="dark"] .small,
[data-theme="dark"] small {
  color: #cbd5e0 !important;
}

/* Ensure all section text is visible in dark mode */
[data-theme="dark"] section p,
[data-theme="dark"] section span,
[data-theme="dark"] section div {
  color: #e2e8f0;
}

/* Override for headings to ensure they remain white */
[data-theme="dark"] section h1,
[data-theme="dark"] section h2,
[data-theme="dark"] section h3,
[data-theme="dark"] section h4,
[data-theme="dark"] section h5,
[data-theme="dark"] section h6 {
  color: #ffffff !important;
}

/* Technology tags in projects */
[data-theme="dark"] .technology-tag {
  background: var(--bg-tertiary);
  color: #ffffff !important;
  border-color: var(--border-color);
}

/* Timeline content text */
[data-theme="dark"] .timeline-content h4,
[data-theme="dark"] .timeline-content h5 {
  color: #ffffff !important;
}

/* Skill descriptions */
[data-theme="dark"] .skill-description {
  color: #cbd5e0 !important;
}

/* Alert messages dark mode fixes */
[data-theme="dark"] .alert {
  color: #ffffff !important;
}

[data-theme="dark"] .alert-success {
  background-color: rgba(72, 211, 145, 0.2) !important;
  border-color: rgba(72, 211, 145, 0.3) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .alert-danger {
  background-color: rgba(252, 129, 129, 0.2) !important;
  border-color: rgba(252, 129, 129, 0.3) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .alert-warning {
  background-color: rgba(246, 224, 94, 0.2) !important;
  border-color: rgba(246, 224, 94, 0.3) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .alert-info {
  background-color: rgba(99, 179, 237, 0.2) !important;
  border-color: rgba(99, 179, 237, 0.3) !important;
  color: #ffffff !important;
}

/* Ensure alert icons are visible */
[data-theme="dark"] .alert i {
  color: #ffffff !important;
}

/* Force all text inside alerts to be white in dark mode */
[data-theme="dark"] .alert * {
  color: #ffffff !important;
}

/* Typewriter Animation */
.typewriter-text {
  display: inline-block;
  min-height: 1.2em;
  font-weight: 600;
  color: #ffffff !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

.typewriter-cursor {
  display: inline-block;
  color: #ffffff !important;
  font-weight: 600;
  animation: blink 1s infinite;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Ensure typewriter text is visible in both themes */
[data-theme="dark"] .typewriter-text,
[data-theme="dark"] .typewriter-cursor {
  color: #ffffff !important;
}

.hero-section .typewriter-text,
.hero-section .typewriter-cursor {
  color: #ffffff !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}