/* Modern CSS Reset and Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px; /* Account for sticky header */
}

:root {
  /* Modern Color Palette - Dark Teal/Cyan Theme */
  --primary-color: #0F766E;
  --primary-dark: #134E4A;
  --primary-light: #0891B2;
  --secondary-color: #64748b;
  --accent-color: #0D9488;
  --success-color: #10b981;
  --gradient-primary: linear-gradient(135deg, #0F766E, #134E4A);
  --gradient-accent: linear-gradient(135deg, #0F766E, #0D9488);
  --gradient-rainbow: linear-gradient(90deg, #0F766E, #0D9488, #0891B2);
  
  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Dashboard theme colors */
  --dashboard-primary: #0F766E;
  --dashboard-secondary: #0891B2;
  --dashboard-accent: #0D9488;
  --dashboard-dark: #134E4A;
  --dashboard-text: #ffffff;
  --dashboard-bg: #1a1a1a;
  --dashboard-grid: rgba(255, 255, 255, 0.07);
  --dashboard-card-bg: rgba(15, 118, 110, 0.15);
  --dashboard-gradient: linear-gradient(135deg, #0F766E, #0D9488);
  
  /* Animation speeds */
  --animation-slow: 1.5s;
  --animation-medium: 0.8s;
  --animation-fast: 0.4s;
}

/* Modern Fluent 2 Base Styles */

* {
  box-sizing: border-box;
}

/* Modern Fluent 2 Base Styles */
.modern-portfolio {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.chat-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #f1f5f9 100%);
  overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: float 20s infinite ease-in-out;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: var(--gradient-primary);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--gradient-accent);
  top: 60%;
  right: 10%;
  animation-delay: -7s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
  top: 10%;
  right: 30%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) translateX(0px) scale(1); }
  25% { transform: translateY(-30px) translateX(20px) scale(1.1); }
  50% { transform: translateY(-60px) translateX(-20px) scale(0.9); }
  75% { transform: translateY(-30px) translateX(30px) scale(1.05); }
}

/* Glass Morphism */
.glass-morphism {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.glass-card {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Gradient Text - Enhanced for better visibility */
.gradient-text {
  background: var(--gradient-accent) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  font-weight: 700 !important;
}

.gradient-title {
  background: var(--gradient-accent) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  font-weight: 800 !important;
  font-size: 2rem !important;
  margin: 0 !important;
}

.name-gradient {
  background: var(--gradient-accent) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  font-weight: 800 !important;
}

/* Modern Header - Ultra Slim Design */
/* Modern Header - Single Row Layout */
.modern-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.15); /* More transparent for glass effect */
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  backdrop-filter: blur(25px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Modern Main Container */
.modern-main {
  padding: 0 var(--space-4);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

/* Brand Section */
.header-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
}

.portfolio-title {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}

.name-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portfolio-subtitle {
  color: var(--gray-500);
  font-size: 0.8125rem;
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Navigation Section - Hidden by default on mobile, shown on desktop */
.modern-nav {
  display: none; /* Hidden by default - shown via media query on desktop */
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.modern-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-lg);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
}

.modern-nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  border-radius: 2px;
  transition: transform 0.3s ease;
}

.modern-nav-item:hover,
.modern-nav-item.active {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(13, 148, 136, 0.08));
  color: var(--primary-color);
  transform: translateY(-1px);
}

.modern-nav-item.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-icon {
  font-size: 1.125rem;
  line-height: 1;
}

.nav-text {
  font-weight: 600;
}

/* Actions Section */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Action Buttons */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.action-btn:hover::before {
  transform: translateX(100%);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.125rem;
  line-height: 1;
}

.btn-text {
  font-weight: 600;
}

.spotlight-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
}

.spotlight-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.spotlight-btn.active {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
}

.chat-btn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.chat-btn:hover {
  background: linear-gradient(135deg, #e081e9 0%, #e3455a 100%);
}

/* Mobile Navigation Toggle - Shown by default, hidden on desktop */
.nav-toggle {
  display: flex;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-toggle:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: scale(1.05);
}

/* Force nav to be visible on desktop (above 1185px) */
@media (min-width: 1186px) {
  .modern-nav {
    display: flex !important;
    position: static !important;
    flex-direction: row !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
  }
  
  /* Override aria-hidden on desktop - always show nav */
  .modern-nav[aria-hidden="true"] {
    display: flex !important;
  }
  
  .nav-toggle {
    display: none !important;
  }
}

.hamburger {
  display: block;
  width: 18px;
  height: 2px;
  background: #333333;
  border-radius: 2px;
  position: relative;
  transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background: #333333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* 
.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
} 
*/

/* Mobile Responsive - 1185px and below */
@media (max-width: 1185px) {
  .modern-header {
    padding: 0.75rem 1rem;
  }

  .header-container {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .header-brand {
    min-width: 150px;
  }

  .portfolio-title {
    font-size: 1.25rem;
  }

  .portfolio-subtitle {
    font-size: 0.75rem;
  }

  /* Header actions container with flexbox ordering */
  .header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  /* Order: Spotlight (1), Chat (2), Hamburger (3) - left to right */
  .header-actions .spotlight-btn {
    order: 1;
  }
  
  .header-actions .chat-btn {
    order: 2;
  }
  
  .header-actions .nav-toggle {
    order: 3;
    display: flex !important;
    background: var(--gray-100);
    padding: 0.5rem;
    border-radius: var(--radius-md);
  }

  /* Hide horizontal nav by default, show dropdown when toggled */
  .modern-nav {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(15, 118, 110, 0.1);
    border-radius: 0 0 16px 16px;
    z-index: 1000;
  }

  /* Only show nav when aria-hidden is false (toggled open) */
  .modern-nav[aria-hidden="false"] {
    display: flex !important;
    animation: slideDown 0.3s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .modern-nav-item {
    width: 100%;
    padding: 0.75rem 1rem;
    justify-content: flex-start;
  }

  .action-btn .btn-text {
    display: none;
  }

  .action-btn {
    padding: 0.625rem;
    min-width: 40px;
  }
}

/* Mobile - 640px and below */
@media (max-width: 640px) {
  .modern-header {
    padding: 0.625rem 0.75rem;
  }
  
  .header-container {
    gap: 0.75rem;
  }
  
  .header-brand {
    min-width: 120px;
  }
  
  .portfolio-title {
    font-size: 1.125rem;
  }
  
  .portfolio-subtitle {
    font-size: 0.6875rem;
  }
  
  .header-actions {
    gap: 0.375rem;
  }

  .action-btn {
    padding: 0.5rem;
    min-width: 36px;
  }

  .btn-icon {
    font-size: 1rem;
  }
}

/* Extra Small Mobile - 480px and below */
@media (max-width: 480px) {
  .modern-header {
    padding: 0.5rem;
  }
  
  .header-container {
    gap: 0.5rem;
  }
  
  .portfolio-title {
    font-size: 1rem;
  }
  
  .portfolio-subtitle {
    font-size: 0.625rem;
  }

  .header-actions {
    gap: 0.25rem;
  }

  .action-btn {
    padding: 0.5rem;
    min-width: 34px;
  }
}
    display: none;
  }
  
  .name-short {
    display: inline;
  }
  
  .portfolio-subtitle {
    font-size: 0.6rem;
    line-height: 1.2;
  }
}

@media (max-width: 360px) {
  .portfolio-title {
    font-size: 0.85rem;
  }
  
  .portfolio-subtitle {
    font-size: 0.55rem;
  }
}

/* Enhanced glass morphism effect - subtle */
.header-container:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Modern Navigation */
.modern-nav {
  display: flex;
  gap: var(--space-2);
}

.modern-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.modern-nav-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.nav-icon {
  font-size: 1.1em;
}

/* Modern Portfolio Body Override */
body.modern-portfolio {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%) !important;
  margin: 0;
  padding: 0 !important;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Hero Section */
.hero-section {
  padding: var(--space-16) var(--space-4);
  max-width: 1400px;
  margin: 0 auto;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1.3fr; /* Slightly reduce from 1.5fr to 1.3fr */
  gap: var(--space-16);
  align-items: center;
}

.hero-content {
  animation: fadeInUp 1s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-color);
  margin-bottom: var(--space-6);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 var(--space-6) 0;
  color: var(--gray-900);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-button.primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.cta-button.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.3);
}

.cta-button.secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
}

.cta-button.secondary:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.metric-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 
    0 4px 20px rgba(15, 118, 110, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  transition: all 0.3s ease;
  position: relative;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.metric-item:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(15, 118, 110, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  color: #1a202c; /* Dark navy for better readability */
  margin-bottom: var(--space-1);
}

.metric-label {
  font-size: 0.9rem;
  color: #2d3748 !important;
  font-weight: 600;
  text-align: center;
  margin-top: 0.5rem;
}

/* Enhanced visibility for dashboard mode */
body.dashboard-mode .hero-metrics .metric-item {
  background: rgba(0, 0, 0, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
}

body.dashboard-mode .hero-metrics .metric-item:hover {
  background: rgba(0, 0, 0, 0.9) !important;
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
}

body.dashboard-mode .hero-metrics .metric-value {
  color: var(--dashboard-accent) !important;
}

body.dashboard-mode .hero-metrics .metric-label {
  color: #ffffff !important;
  font-weight: 600;
}

/* Hero Testimonial Styles */
.hero-testimonial {
  margin-top: var(--space-12);
  animation: fadeInUp 1s ease-out 0.6s both;
}

.testimonial-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: 
    0 20px 60px rgba(15, 118, 110, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonial-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.05), rgba(72, 209, 204, 0.05));
  z-index: -1;
}

.quote-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-3);
  opacity: 0.7;
  color: var(--primary-color);
}

.ceo-quote {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-700);
  font-style: italic;
  margin-bottom: var(--space-4);
  position: relative;
  padding: 0 2rem;
}

.ceo-quote p {
  margin: 0;
  position: relative;
}

.ceo-quote p::before {
  content: '"';
  font-size: 3rem;
  color: var(--primary-color);
  position: absolute;
  left: -1.8rem;
  top: -0.5rem;
  font-family: Georgia, serif;
  opacity: 0.6;
  font-weight: bold;
}

.ceo-quote p::after {
  content: '"';
  font-size: 3rem;
  color: var(--primary-color);
  position: absolute;
  right: -1.8rem;
  bottom: -1.2rem;
  font-family: Georgia, serif;
  opacity: 0.6;
  font-weight: bold;
}

.testimonial-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-style: normal;
  margin-top: var(--space-2);
}

.author-info strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: var(--space-1);
  letter-spacing: 0.3px;
}

.author-info span {
  display: block;
  font-size: 0.95rem;
  color: var(--gray-600);
  font-weight: 500;
}

.view-full-letter {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(15, 118, 110, 0.2);
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0.3px;
}

.view-full-letter::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.4s;
}

.view-full-letter:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 118, 110, 0.3);
  background: var(--gradient-accent);
}

.view-full-letter:hover::before {
  left: 100%;
}

.view-full-letter:active {
  transform: translateY(-1px);
}

/* Dashboard mode testimonial styles */
body.dashboard-mode .testimonial-content {
  background: rgba(0, 0, 0, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
}

body.dashboard-mode .ceo-quote {
  color: #ffffff !important;
}

body.dashboard-mode .ceo-quote p {
  color: #ffffff !important;
}

body.dashboard-mode .testimonial-author {
  color: #ffffff !important;
}

body.dashboard-mode .author-info strong {
  color: #ffffff !important;
}

body.dashboard-mode .author-info span {
  color: #e5e5e5 !important;
}

body.dashboard-mode .quote-icon {
  color: var(--primary-color) !important;
}

/* Responsive testimonial styles */
@media (max-width: 768px) {
  .hero-testimonial {
    margin-top: var(--space-8);
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }
  
  .testimonial-content {
    padding: var(--space-4);
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .quote-icon {
    font-size: 2rem;
    margin-bottom: var(--space-2);
  }
  
  .ceo-quote {
    font-size: 0.95rem;
    padding: 0 0.5rem;
    line-height: 1.6;
  }
  
  .ceo-quote p::before,
  .ceo-quote p::after {
    display: none; /* Hide decorative quotes on mobile */
  }
  
  .testimonial-author {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
  }
  
  .view-full-letter {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .hero-testimonial {
    margin-top: var(--space-6);
  }
  
  .testimonial-content {
    padding: var(--space-4);
    margin: 0 var(--space-2);
    border-radius: var(--radius-lg);
  }
  
  .quote-icon {
    font-size: 1.8rem;
  }
  
  .ceo-quote {
    font-size: 1rem;
    padding: 0 1rem;
    line-height: 1.6;
  }
  
  .ceo-quote p::before,
  .ceo-quote p::after {
    font-size: 2rem;
  }
  
  .ceo-quote p::before {
    left: -1rem;
    top: -0.3rem;
  }
  
  .ceo-quote p::after {
    right: -1rem;
    bottom: -1rem;
  }
  
  .author-info strong {
    font-size: 1rem;
  }
  
  .author-info span {
    font-size: 0.9rem;
  }
  
  .view-full-letter {
    font-size: 0.9rem;
    padding: var(--space-2) var(--space-4);
    width: 100%;
    max-width: 250px;
  }
}

@media (max-width: 360px) {
  .testimonial-content {
    padding: var(--space-3);
    margin: 0 var(--space-1);
  }
  
  .ceo-quote {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }
  
  .ceo-quote p::before,
  .ceo-quote p::after {
    font-size: 1.8rem;
  }
  
  .ceo-quote p::before {
    left: -0.8rem;
  }
  
  .ceo-quote p::after {
    right: -0.8rem;
  }
}

body.dashboard-mode .author-info strong {
  color: var(--dashboard-accent) !important;
}

body.dashboard-mode .author-info span {
  color: #e0e0e0 !important;
}

/* Letter of Recommendation Modal Styles */
#letter-of-recommendation {
  display: none;
}

.letter-content {
  max-width: 700px;
  margin: 0 auto;
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  font-family: 'Times New Roman', serif;
  line-height: 1.6;
}

.letter-header {
  text-align: center;
  margin-bottom: var(--space-8);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: var(--space-4);
}

.mgp-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
}

.logo-text {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.letter-header h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: 1.5rem;
  font-weight: 600;
}

.letter-body p {
  margin-bottom: var(--space-4);
  color: var(--gray-700);
  font-size: 1rem;
  text-align: justify;
}

.signature-section {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
}

.signature {
  margin: var(--space-4) 0;
}

.signature img {
  max-width: 200px;
  height: auto;
}

.author-details {
  font-style: normal;
  color: var(--gray-800);
}

.author-details strong {
  font-size: 1.1rem;
  display: block;
  margin-bottom: var(--space-1);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-container {
  position: relative;
  animation: fadeInRight 1s ease-out 0.3s both;
}

.hero-image {
  width: 100%;
  max-width: 900px; /* Increased from 750px to match elm-transition-container */
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

.hero-image.floating {
  animation: heroFloat 6s infinite ease-in-out;
}

/* ELM Transition Container */
.elm-transition-container {
  position: relative;
  width: 100%;
  max-width: none; /* Remove max-width constraint to let it grow */
  min-width: 700px; /* Reduced from 900px to 700px for better balance */
  /* Set explicit height to prevent overlap */
  aspect-ratio: 16/9; /* Changed from 16/10 to give more height */
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 8px 25px rgba(0, 0, 0, 0.08);
}

.elm-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.05) translateY(10px);
  filter: blur(2px);
}

.elm-image.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0);
}

/* Enhanced floating animation for ELM images */
.elm-image.floating {
  animation: heroFloat 8s infinite ease-in-out;
}

/* Improved floating animation */
@keyframes heroFloat {
  0%, 100% { 
    transform: translateY(0) scale(1) rotateY(0deg);
    filter: blur(0);
  }
  25% { 
    transform: translateY(-8px) scale(1.02) rotateY(1deg);
    filter: blur(0);
  }
  50% { 
    transform: translateY(-15px) scale(1.03) rotateY(0deg);
    filter: blur(0);
  }
  75% { 
    transform: translateY(-8px) scale(1.02) rotateY(-1deg);
    filter: blur(0);
  }
}

/* ELM Title Container - Fluent Design */
.elm-title-container {
  margin-top: var(--space-6);
  text-align: center;
  animation: fadeInUp 1s ease-out 1s both;
}

.elm-title-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5)); /* More transparent */
  backdrop-filter: blur(15px); /* Slightly less blur for more transparency */
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(15, 118, 110, 0.15); /* More transparent border */
  border-radius: 50px;
  padding: var(--space-2) var(--space-4);
  box-shadow: 
    0 8px 32px rgba(15, 118, 110, 0.1), /* More transparent shadow */
    0 0 0 1px rgba(255, 255, 255, 0.4) inset; /* More transparent inset */
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.elm-title-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.05), rgba(72, 209, 204, 0.03));
  z-index: -1;
}

.elm-title-badge:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(15, 118, 110, 0.15), /* More transparent hover shadow */
    0 0 0 1px rgba(255, 255, 255, 0.5) inset; /* More transparent hover inset */
}

.award-icon {
  font-size: 1.2rem;
  filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.3));
  animation: awardPulse 2s infinite ease-in-out;
}

@keyframes awardPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.elm-title-text {
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.elm-subtitle {
  margin: var(--space-2) 0 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  opacity: 0.9;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for ELM section */
@media (max-width: 768px) {
  .elm-transition-container {
    min-width: 600px; /* Use min-width for tablets */
    max-width: 600px; /* But cap it for smaller screens */
    aspect-ratio: 16/9;
  }
  
  .elm-title-badge {
    padding: var(--space-2) var(--space-3);
    gap: var(--space-1);
  }
  
  .award-icon {
    font-size: 1rem;
  }
  
  .elm-title-text {
    font-size: 0.9rem;
  }
  
  .elm-subtitle {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .elm-transition-container {
    min-width: 420px; /* Use min-width for mobile */
    max-width: 420px; /* But cap it for very small screens */
  }
  
  .elm-title-container {
    margin-top: var(--space-4);
  }
}

/* Enhanced floating animation with smoother transitions */
@keyframes heroFloat {
  0%, 100% { 
    transform: translateY(0px) scale(1); 
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
  }
  50% { 
    transform: translateY(-15px) scale(1.01); 
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
  }
}

.image-glow {
  position: absolute;
  inset: -20px;
  background: var(--gradient-accent);
  border-radius: var(--radius-2xl);
  filter: blur(30px);
  opacity: 0.3;
  z-index: -1;
  animation: pulseGlow 4s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.05); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Section Headers */
.portfolio-section {
  padding: var(--space-16) var(--space-4);
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.8;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 var(--space-3) 0;
}

.section-description {
  font-size: 1.1rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

/* Chat Styling */
.chat-header-main {
  padding: var(--space-6) var(--space-4);
}

.header-text {
  flex: 1;
}

.header-subtitle {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin: 0.5rem 0 0 0;
}

.ai-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--gradient-accent);
  border-radius: 50%;
  margin-right: var(--space-4);
}

.ai-icon {
  font-size: 1.8rem;
  z-index: 2;
}

.pulse-ring {
  position: absolute;
  inset: -8px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  opacity: 0.6;
  animation: pulseRing 2s infinite ease-out;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  color: var(--gray-700);
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.back-button:hover {
  background: var(--gray-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.chat-main {
  padding: var(--space-6);
  max-width: 900px;
  margin: 0 auto;
}

.chat-container {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.chat-header {
  background: var(--gradient-accent);
  color: var(--white);
  padding: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.ai-avatar.floating {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: avatarFloat 3s infinite ease-in-out;
}

@keyframes avatarFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.avatar-emoji {
  font-size: 1.5rem;
  z-index: 2;
}

.avatar-glow {
  position: absolute;
  inset: -4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  filter: blur(8px);
  animation: avatarGlow 2s infinite ease-in-out;
}

@keyframes avatarGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.assistant-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.assistant-desc {
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

.status-indicator.pulsing {
  animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.chat-messages {
  padding: var(--space-6);
  min-height: 300px;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

.message.animate-in {
  animation: messageSlideIn 0.5s ease-out;
}

@keyframes messageSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.highlight {
  background: var(--gradient-accent);
  color: var(--white);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9em;
}

.suggested-questions {
  padding: var(--space-4);
  border-top: 1px solid var(--gray-200);
}

.suggestions-title {
  font-weight: 600;
  color: var(--gray-700);
  margin: 0;
}

.modern-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-color);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-weight: 500;
  margin: var(--space-2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.modern-chip:hover {
  background: rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.chip-icon {
  font-size: 1.1em;
}

.chat-input-container {
  padding: var(--space-4);
  border-top: 1px solid var(--gray-200);
}

.modern-input {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.modern-input-field {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
}

.modern-input-field:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modern-send {
  position: relative;
  background: var(--gradient-accent);
  color: var(--white);
  border: none;
  padding: var(--space-3);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.modern-send:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.button-ripple {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.3s ease;
}

.modern-send:active .button-ripple {
  transform: scale(1);
}

.footer-text {
  color: var(--gray-500);
  font-size: 0.85rem;
  text-align: center;
  margin-top: var(--space-3);
}

.powered-by {
  font-weight: 600;
  color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-metrics {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-top: var(--space-6);
  }
  
  .elm-title-container {
    margin-top: var(--space-4);
  }
  
  .elm-title-badge {
    padding: var(--space-2) var(--space-3);
    gap: var(--space-1);
  }
  
  .elm-title-text {
    font-size: 0.9rem;
  }
  
  .elm-subtitle {
    font-size: 0.8rem;
  }
  
  .metric-item {
    padding: var(--space-4);
    margin: 0 auto;
    max-width: 280px;
  }
  
  .modern-nav {
    display: none;
  }
  
  .header-actions {
    gap: var(--space-2);
    flex-wrap: wrap;
  }
  
  .chat-main {
    padding: var(--space-4);
  }
  
  .hero-section {
    padding: var(--space-8) var(--space-4);
  }

  .hero-image {
    max-width: 600px; /* Increased from 520px to match responsive elm-transition-container */
  }

  /* Mobile header improvements */
  .modern-header {
    padding: var(--space-3) var(--space-4);
  }

  .header-container {
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
    text-align: center;
  }

  .portfolio-title {
    font-size: 1.5rem;
  }

  .portfolio-subtitle {
    font-size: 0.8rem;
    margin-top: var(--space-1);
  }

  .header-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .modern-button {
    padding: var(--space-2) var(--space-3);
    font-size: 0.8rem;
    min-width: auto;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-metrics {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  .metric-value {
    font-size: 1.75rem;
  }
  
  .metric-label {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
  
  .cta-button {
    padding: var(--space-3) var(--space-4);
    font-size: 0.9rem;
  }
  
  .hero-image {
    max-width: 420px; /* Increased from 380px to match responsive elm-transition-container */
  }

  /* Very small screen adjustments */
  .portfolio-title {
    font-size: 1.3rem;
  }

  .portfolio-subtitle {
    font-size: 0.75rem;
  }

  .modern-button {
    padding: var(--space-2);
    font-size: 0.7rem;
  }

  .toggle-text, .chat-text {
    display: none;
  }

  .toggle-icon, .chat-emoji {
    font-size: 1.2rem;
  }
}
  
/* Modern Header Override - Fix conflicting styles */
.modern-portfolio .header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-2xl);
  max-width: 1400px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85) !important; /* Keep pill background */
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.3s ease;
}

.modern-portfolio .header-container h1,
.modern-portfolio .portfolio-title {
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  color: var(--gray-900) !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

/* Fix old header styles that conflict */
.modern-portfolio .header-container:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

/* Override old button styles for modern navigation */
.modern-portfolio .modern-button,
.modern-portfolio .ai-button,
.modern-portfolio .chat-toggle-btn {
  display: inline-flex !important;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) !important;
  border: none !important;
  border-radius: var(--radius-lg) !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
  background: var(--gradient-primary) !important;
  color: var(--white) !important;
  box-shadow: var(--shadow-md) !important;
  margin: var(--space-1) !important;
}

.modern-portfolio .ai-button {
  background: var(--gradient-accent) !important;
  animation: glow 2s infinite alternate;
}

.modern-portfolio .modern-button:hover,
.modern-portfolio .ai-button:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-lg) !important;
}
  
  .custom-button {
    padding: var(--space-2) var(--space-4);
    margin: var(--space-1);
    border: none;
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .custom-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-accent);
  }
  
  .custom-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
  }
  
  .navigation a:hover {
    color: var(--white);
    background: var(--gradient-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }

  
/* Modern Grid Container - Fixed 2 rows x 4 columns */
.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: var(--space-8); /* Increased gap between grid items */
  max-width: 1200px;
  margin: var(--space-8) auto;
  padding: 0 var(--space-4);
  align-items: stretch;
  justify-content: center;
}

/* Enhanced Portfolio Cards */
.link-container, .image-container, .custom-button {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.link-container:hover, .image-container:hover, .custom-button:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.link-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  margin-bottom: var(--space-6);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  height: 280px; /* Fixed height for uniform containers */
  min-height: 280px;
  justify-content: space-between; /* Distribute content evenly */
}

.link-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s ease;
}

.link-container:hover::before {
  left: 100%;
}

.link-container:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

/* Make entire link container clickable */
.link-container.modal-trigger {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Add a subtle active state for touch feedback */
.link-container.modal-trigger:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-md);
}

/* Optional: Add a clearer visual indication that the whole card is clickable */
.link-container.modal-trigger::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(100, 116, 139, 0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 15l-5-5 5-5'/%3E%3C/svg%3E");
  background-size: contain;
  transform: rotate(-45deg);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.link-container.modal-trigger:hover::after {
  opacity: 1;
}

.image-container {
  width: 100%;
  height: 160px; /* Fixed height for consistent image display */
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  flex-shrink: 0; /* Prevent image from shrinking */
}

/* Text content in portfolio cards */
.link-container p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800) !important;
  line-height: 1.4;
  text-align: center;
  padding: 0 var(--space-2);
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-container:hover::after {
  opacity: 1;
}

.image-container:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg);
}
    
      
      a {
        color: #0c0d0e;
        text-decoration: none;
      }
      
      a:hover {
        color: #0056b3;
        text-decoration: underline;
      }
      
      .navigation button, .custom-button {
        padding: 10px;
        margin: 5px;
        border: none;
        background-color: #25282b;
        color: #fffcfc;
        cursor: pointer;
        text-decoration: none; /* For custom-button */
        display: inline-block; /* For custom-button */
      }

/* ... Rest of the original CSS ... */

.top-button {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    background-color: #6b6969;
    color: #030303;
    border: none;
    cursor: pointer;
    border-radius: 50%;
}

.top-button.show {
    display: block;
}

@media screen and (max-width: 768px) {
    h2 {
        font-size: 22px;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

section {
    padding: 1px;
    margin-bottom: 1px;
    
    
}

header, footer {
    text-align: center;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: auto;
  margin-right: auto; 
  width: 100%;
  max-width: 1100px;
  padding: 20px 40px; /* Increase the left and right padding */
  background: #353740;
  border-radius: 15px;
  box-shadow: 0px 0px 15px rgba(0,0,0,0.1);
}

.header-container h1 {
  padding-left: 0;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}



header {
    margin-bottom: 30px;
}

footer {
    padding: 10px 0;
    bottom: 0;
    width: 100%;
}

/* Modern Typography */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-4) 0;
  letter-spacing: -0.025em;
}

h1 {
  color: var(--white);
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--white), var(--gray-200));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: var(--space-8) auto var(--space-6);
  text-align: center;
  max-width: 1200px;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

h3 {
  font-size: 1.5rem;
  color: var(--gray-800);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-4);
  color: var(--gray-600);
  line-height: 1.7;
}

li {
  margin-bottom: var(--space-2);
  font-weight: 500;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Modern Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply animations to elements */
.header-container {
  animation: fadeInScale 0.6s ease-out;
}

.link-container {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.link-container:nth-child(1) { animation-delay: 0.1s; }
.link-container:nth-child(2) { animation-delay: 0.2s; }
.link-container:nth-child(3) { animation-delay: 0.3s; }
.link-container:nth-child(4) { animation-delay: 0.4s; }
.link-container:nth-child(5) { animation-delay: 0.5s; }
.link-container:nth-child(6) { animation-delay: 0.6s; }
.link-container:nth-child(7) { animation-delay: 0.7s; }
.link-container:nth-child(8) { animation-delay: 0.8s; }

h2 {
  animation: slideInRight 0.8s ease-out;
}
section {
  margin: var(--space-12) auto;
  max-width: 1200px;
  padding: 0 var(--space-4);
}

.certification-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  padding: var(--space-8);
  width: 100%;
  max-width: 1200px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  margin: var(--space-8) auto;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.certification-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-rainbow);
}

.certification-container:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.certification-container ul {
  display: contents; /* Inherit grid properties */
  padding: 0;
  list-style: none;
}

.certification-container li {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0; /* Remove extra bottom margin */
  padding: 10px 20px;
  text-align: left;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.03);
  transition: all 0.3s;
}

.certification-container li:hover {
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.certification-item {
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 5px;
  border-radius: 3px;
}

.certification-item:hover {
  color: #0056b3;
  background: rgba(0, 86, 179, 0.05);
}


  .header-container {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 1200px;
    padding: 10px;
}

.headshot img {
    width: 100px;
    border-radius: 50%;
    margin-right: 20px;
    padding: 5px;
}

.divider {
    width: 1px;
    background-color: #000;
    height: 60px;
    margin: 0 20px;
    
}

.navigation button {
    padding: 10px;
    margin: 5px;
    border: none;
    background-color: #25282b;
    color: #fff;
    cursor: pointer;
}

.top-button {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    background: #fff; /* White background */
    border-radius: 15px; /* Rounded corners */
    box-shadow: 0px 0px 15px rgba(0,0,0,0.1); /* Optional shadow effect */
    border: none;
    cursor: pointer;
}

.custom-button {
    padding: 10px;
    margin: 5px;
    border: none;
    background: #4c4c4c; /* White background */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0px 0px 15px rgba(0,0,0,0.1); /* Optional shadow effect */
    cursor: pointer;
    text-decoration: none; /* This will remove the underline typically applied to anchor links */
    display: inline-block; /* This allows you to apply padding and other block styles to an inline element */
  }
  
  .tooltip {
    position: absolute;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 500px;
    height: 250px;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10; /* Make sure the tooltip is above other elements */
  }
  
  .tooltip.show {
    opacity: 1;
  }

/* Modern Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 90%;
  max-height: 85vh;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: modalFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

.close-modal:hover,
.close-modal:focus {
  color: #333;
}

#modal-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #333;
  max-width: 500px;
}

#modal-image {
  max-width: 100%;
  max-height: 250px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
  object-fit: contain;
}

#modal-video {
  width: 100%;
  max-width: 800px;
  height: 250px;
  max-height: 300px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
}

.modal-image-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Modern Slideshow Controls */
.slideshow-controls {
  display: none;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  margin-bottom: var(--space-3);
}

.slide-btn {
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.slide-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.slide-btn:hover::before {
  left: 100%;
}

.slide-btn:hover {
  background: var(--gradient-accent);
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

#slide-counter {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  padding: var(--space-2) var(--space-4);
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  min-width: 60px;
  text-align: center;
  border: 1px solid var(--gray-200);
}

/* Updated Modal Buttons - Single button centered */
.modal-buttons {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
  width: 100%;
}

.modal-btn {
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
  min-width: 180px; /* Set a minimum width for better appearance */
}

.modal-btn::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.6s ease;
}

.modal-btn:hover::before {
  left: 100%;
}

.modal-btn:hover {
  background: var(--gradient-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.modal-btn.secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.modal-btn.secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Modern Section Styling */
section {
  margin: var(--space-12) auto;
  max-width: 1200px;
  padding: 0 var(--space-4);
}

/* Make image containers clickable cursor */
.modal-trigger {
  cursor: pointer;
}

/* Modern Responsive Design */
@media screen and (max-width: 768px) {
  .header-container {
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    height: 56px;
  }
  
  .header-container h1 {
    font-size: 1.5rem;
  }
  
  .custom-button {
    padding: var(--space-1) var(--space-3);
    font-size: 12px;
  }
  
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: var(--space-4);
    padding: 0 var(--space-2);
  }
  
  .link-container {
    height: 240px;
    padding: var(--space-4);
  }
  
  .image-container {
    height: 120px;
  }
  
  .modal-content {
    padding: var(--space-6);
    max-width: 98%;
  }
  
  #modal-title {
    font-size: 1.5rem;
  }
  
  #modal-image {
    max-height: 250px;
  }
  
  #modal-video {
    width: 100%;
    height: 200px;
    max-height: 200px;
  }
  
  .modal-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .modal-btn {
    width: 100%;
  }
  
  .slide-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, 1fr);
    gap: var(--space-4);
  }
  
  .link-container {
    height: 220px;
    padding: var(--space-3);
  }
  
  .image-container {
    height: 100px;
  }
  
  .link-container p {
    font-size: 13px;
  }
}

/* Old mobile hamburger styles removed - using styles at line 402 instead */

/* Override conflicting styles for mobile nav */
@media screen and (max-width: 768px) {
  /* Show hamburger */
  .nav-toggle {
    display: block;
  }
  
  /* Ensure header stays above other content */
  .header-container {
    height: auto;
    min-height: 56px;
    padding: 10px 15px;
    position: relative;
    z-index: 100;
  }
  
  /* Navigation styling */
  .navigation.open {
    display: flex !important; /* Important to override any other display styles */
  }
  
  /* Fixed positioning for the dropdown */
  #primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(53, 55, 64, 0.98);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 12px 12px;
    padding: 15px;
    flex-direction: column;
    gap: 10px;
    z-index: 90;
  }
  
  /* Full width buttons for better mobile tap targets */
  #primary-nav .custom-button {
    width: 100%;
    text-align: center;
    padding: 12px 15px;
    margin: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
  }
  
  #primary-nav .custom-button:hover,
  #primary-nav .custom-button:active {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
  }
  
  /* Smooth animation for menu appearance */
  @keyframes fadeInDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  #primary-nav.open {
    animation: fadeInDown 0.3s ease forwards;
  }
}

/* mobile specific layout */
@media screen and (max-width: 768px) {
  /* show hamburger */
  .nav-toggle { display: block; }

  /* make header compact */
  .header-container {
    padding: 12px;
    gap: 8px;
    align-items: center;
    position: relative;
  }
  .header-container h1 { font-size: 1.05rem; margin: 0; color: var(--white); }

  /* hide the nav by default on mobile; open by adding .open */
  #primary-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    left: 12px;
    background: linear-gradient(180deg, rgba(53,55,64,0.98), rgba(45,47,52,0.98));
    padding: 12px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    gap: 8px;
    z-index: 120;
  }
  #primary-nav.open { display: flex; animation: navIn 160ms ease-out; }

  /* nav buttons become full-width stacked items */
  #primary-nav .custom-button {
    width: 100%;
    background: transparent;
    color: var(--white);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: none;
    text-align: center;
    font-size: 14px;
  }

  @keyframes navIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* reduce heavy hover transforms on mobile */
  .link-container, .image-container, .custom-button {
    transition: transform 0.12s ease, box-shadow 0.12s ease;
  }
  .link-container:hover, .image-container:hover, .custom-button:hover {
    transform: none;
    box-shadow: var(--shadow-md);
  }
}

/* Modal description styling */
.modal-description {
  display: none; /* Hide the old description style */
}

/* Adjust for smaller screens */
@media screen and (max-width: 768px) {
  .modal-description {
    font-size: 14px;
    padding: var(--space-3);
    margin: var(--space-3) 0;
  }
}

/* Styled caption box for slideshows */
.modal-caption {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-4);
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  text-align: left;
  max-width: 800px;
  width: 100%;
}

.caption-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--gray-800);
  margin: 0 0 var(--space-2) 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.caption-title .emoji {
  font-size: 22px;
  line-height: 1;
}

.caption-content {
  color: var(--gray-700);
  line-height: 1.6;
  font-size: 15px;
  margin: 0;
}

/* Responsive adjustments for captions */
@media screen and (max-width: 768px) {
  .modal-caption {
    padding: var(--space-3);
    margin-top: var(--space-3);
  }
  
  .caption-title {
    font-size: 16px;
  }
  
  .caption-content {
    font-size: 14px;
  }
}

/* ...existing mobile styles... */

/* Dashboard Mode Styles */
.dashboard-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.dashboard-toggle::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.6s ease;
}

.dashboard-toggle:hover::before {
  left: 100%;
}

.dashboard-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--primary-dark), var(--accent-color));
}

.toggle-icon {
  margin-right: 6px;
  font-size: 14px;
}

/* Active Dashboard Mode */
.dashboard-toggle.active {
  background: linear-gradient(135deg, var(--dashboard-primary), var(--dashboard-accent));
  box-shadow: 0 0 15px rgba(0, 183, 195, 0.5);
}

body.dashboard-mode {
  background: var(--dashboard-bg);
  color: var(--dashboard-text);
  transition: background 0.5s ease;
}

/* Career Metrics Panel */
.career-metrics {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 2rem;
  background: var(--dashboard-card-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: none;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  text-align: center;     /* center align */
  position: relative;  
}

.dashboard-mode .career-metrics {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.metric-card {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.metric-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dashboard-secondary);
}

.metric-label {
  font-size: 0.9rem;
  color: #ffffff !important;
  font-weight: 700;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 1);
  background: rgba(0, 0, 0, 0.8);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin-top: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced Career Metrics Panel */
.career-metrics h3 {
  color: var(--dashboard-secondary);
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
  text-align: center;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.impact-grid {
  grid-template-columns: repeat(5, 1fr);
}

.metric-highlight {
  background: rgba(0, 120, 212, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin: 2rem 0;
  border: 1px solid rgba(80, 230, 255, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-highlight:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
  background: rgba(0, 120, 212, 0.25);
}

.metric-highlight .metric-value {
  font-size: 3rem;
  font-weight: 700;
  color: #1a202c; /* Dark navy for better readability */
  margin: 0.5rem 0;
}

.metric-highlight .metric-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.metric-highlight.total {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.3), rgba(0, 183, 195, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.metric-highlight.total .metric-value {
  font-size: 3.5rem;
  color: #1a202c; /* Dark navy for better readability */
  font-weight: 800;
}

.financial .metric-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dashboard-secondary);
  margin-bottom: 0.5rem;
}

.financial .metric-value {
  font-size: 1.8rem;
}

/* Responsive adjustments for financial metrics */
@media screen and (max-width: 1200px) {
  .impact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .metric-highlight .metric-value {
    font-size: 2.5rem;
  }
  
  .metric-highlight.total .metric-value {
    font-size: 3rem;
  }
}

@media screen and (max-width: 480px) {
  .metrics-grid, .impact-grid {
    grid-template-columns: 1fr;
  }
  
  .metric-highlight {
    padding: 1rem;
  }
}

/* Dashboard Background */
.dashboard-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
  overflow: hidden;
}

.dashboard-mode .dashboard-background {
  opacity: 1;
}

.grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, var(--dashboard-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--dashboard-grid) 1px, transparent 1px);
  animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

.data-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* KPI Indicators - Only visible in dashboard mode */
.kpi-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000; /* Very high z-index to ensure it's above everything else */
  display: none; /* Hidden by default, only shown in dashboard mode */

  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95),     /* Almost black background for maximum contrast */
    rgba(0, 0, 0, 0.85)      /* Slightly transparent for visibility */
  );
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  
  border-top: 1px solid rgba(100, 200, 255, 0.3); /* Add a subtle border for definition */
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);   /* Strong shadow to help it stand out */

  padding: 14px 18px;
  display: flex;
  flex-direction: column; /* stack "value row" above title */
  pointer-events: none; /* Prevent capturing clicks from parent */
  align-items: center;
  text-align: center;
  gap: 6px;

  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  opacity: 0;
  transform: translateY(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-top: 1px solid rgba(255,255,255,0.08); /* subtle edge */
  box-shadow: 0 -2px 12px rgba(0,0,0,0.45);
}

/* Mobile-specific KPI indicator animations */
@media screen and (max-width: 768px) {
  .dashboard-mode .kpi-indicator {
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    transform: translateY(100%);
  }
}

/* Default state - KPI indicators are only visible in dashboard mode */
.dashboard-mode .kpi-indicator {
  display: block; /* Make visible in dashboard mode */
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
  box-shadow: 0 -2px 15px rgba(0, 120, 255, 0.25);
  pointer-events: none; /* Prevent capturing mouse events */
}

/* Pure CSS Hover for KPI indicators - EXACTLY like normal mode hover behavior */
.dashboard-mode .link-container:hover .kpi-indicator {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}

/* Ensure no JavaScript can override this behavior */
.dashboard-mode .link-container .kpi-indicator {
  pointer-events: none !important;
}

/* Hide KPI indicators when not in dashboard mode */
body:not(.dashboard-mode) .kpi-indicator {
  display: none !important;
  opacity: 0 !important;
}

/* Prevent KPI indicators from interfering with slideshow selection */
.modal-content .kpi-indicator,
.mySlides .kpi-indicator {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Both mobile and desktop now use Intersection Observer to show KPIs */
@media screen and (min-width: 769px) {
  /* KPI indicators appear when cards are centered in the viewport */
  .dashboard-mode .kpi-indicator {
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none; /* Ensure indicators don't interfere with hover events */
    z-index: 50; /* Ensure it appears above other elements */
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile animation for temporary display */
@keyframes tempShow {
  0%, 100% {
    opacity: 0;
    transform: translateY(100%);
  }
  10%, 90% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grid layout spacing adjustments */
/* Desktop view - use same spacing as normal mode */
@media screen and (min-width: 769px) {
  .dashboard-mode .grid-container {
    gap: var(--space-8); /* Same as normal mode: 2rem */
  }
}

/* Mobile styles - use same spacing as normal mode */
@media screen and (max-width: 768px) {
  /* Use same spacing as normal mode */
  .dashboard-mode .grid-container {
    gap: var(--space-8); /* Same as normal mode: 2rem */
  }
  
  /* Ensure cards have consistent spacing like normal mode */
  .dashboard-mode .link-container {
    margin-bottom: var(--space-6); /* Same as normal mode */
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
  }
  
  .dashboard-mode .kpi-indicator.temp-visible {
    animation: tempShow 3s forwards;
  }
}

/* KPI Indicator Elements */
.kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.kpi-icon {
  font-size: 1.5rem;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(100, 200, 255, 0.7);
}

.kpi-title {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.dashboard-mode .kpi-value {
  background: linear-gradient(45deg, #ffffff, #88ccff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Dashboard visualizations */
.dashboard-viz {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 5;
}

.dashboard-mode .dashboard-viz {
  opacity: 1;
}

.viz-svg {
  width: 100%;
  height: 100%;
}

/* Dashboard mode adjustments for existing elements */
.dashboard-mode h2 {
  color: var(--dashboard-secondary);
}

.dashboard-mode h2::after {
  background: linear-gradient(135deg, var(--dashboard-primary), var(--dashboard-accent));
}

.dashboard-mode .link-container {
  background: var(--dashboard-card-bg);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden !important; /* Contain hover effects within bounds */
}

.dashboard-mode .link-container:hover {
  border-color: var(--primary-color); /* Same as normal mode */
  /* Ensure hover stays within exact bounds */
  transform: translateY(-8px) scale(1.02); /* Same as normal mode */
  box-shadow: var(--shadow-xl); /* Same as normal mode */
}

/* Disable the highlight sweep effect in dashboard mode to prevent extended hover areas */
.dashboard-mode .link-container::before {
  display: none; /* Remove highlight effect that extends hover area */
}

/* Also disable the clickable indicator to avoid any hover area extension */
.dashboard-mode .link-container.modal-trigger::after {
  display: none; /* Remove any additional hover indicators */
}

/* KPI Indicators - Clean implementation for dashboard mode */
.kpi-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.7)
  );
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  
  padding: 12px 16px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  
  display: none; /* Hidden by default */
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  
  pointer-events: none; /* Don't interfere with hover detection */
  z-index: 10;
}

/* Show KPI indicators only in dashboard mode */
.dashboard-mode .kpi-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

/* Clean hover effect for KPI indicators in dashboard mode */
.dashboard-mode .link-container:hover .kpi-indicator {
  opacity: 1;
  transform: translateY(0);
}

/* KPI content styling */
.kpi-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.kpi-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.kpi-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #50e6ff;
  text-shadow: 0 0 8px rgba(80, 230, 255, 0.5);
  line-height: 1;
}

.kpi-title {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  line-height: 1.2;
}

/* Hide KPI indicators when not in dashboard mode */
body:not(.dashboard-mode) .kpi-indicator {
  display: none !important;
}

/* Override any conflicting styles */
.dashboard-mode .link-container .image-container {
  overflow: hidden !important; /* Keep effects contained */
  position: relative;
}

/* Fix for nested elements potentially causing z-index issues */
.dashboard-mode .link-container * {
  z-index: auto;
}

.dashboard-mode .link-container p {
  color: var(--dashboard-text);
}

.dashboard-mode .header-container {
  background: rgba(26, 26, 26, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

.dashboard-mode .custom-button {
  background: linear-gradient(135deg, var(--dashboard-primary), var(--dashboard-dark));
}

.dashboard-mode .custom-button:hover {
  background: linear-gradient(135deg, var(--dashboard-primary), var(--dashboard-accent));
}

/* Responsive adjustments for dashboard mode */
@media screen and (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .dashboard-toggle {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  
  .toggle-text {
    display: none;
  }
  
  .toggle-icon {
    margin-right: 0;
  }
}

@media screen and (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* Updated Header Styles */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: auto;
  margin-right: auto; 
  width: 100%;
  max-width: 1200px;
  padding: 15px 25px;
  background: #353740;
  border-radius: 15px;
  box-shadow: 0px 0px 15px rgba(0,0,0,0.1);
  flex-wrap: wrap;
  gap: 20px;
}

.header-container h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--white), var(--gray-200));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex: 1;
  min-width: 250px;
}

/* Enhanced Dashboard Toggle */
.dashboard-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 15px;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  position: relative;
  overflow: hidden;
  z-index: 10;
  order: 2;
}

.dashboard-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.dashboard-toggle:hover::before {
  left: 100%;
}

.dashboard-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.7);
}

.toggle-icon {
  margin-right: 6px;
  font-size: 14px;
}

/* Navigation updates */
.navigation {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 2;
  order: 3;
}

.navigation .custom-button {
  padding: 8px 16px;
  margin: 0;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 14px;
  border-radius: 20px;
  transition: all 0.3s ease;
  box-shadow: none;
  text-align: center;
}

.navigation .custom-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Mobile navigation updates */
@media screen and (max-width: 768px) {
  .header-container {
    padding: 12px 15px;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .header-container h1 {
    font-size: 1.1rem;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
  }
  
  .dashboard-toggle {
    order: 2;
    margin: 0;
    margin-right: 10px;
    padding: 6px 12px;
  }
  
  .nav-toggle {
    display: block;
    order: 3;
  }

  .nav-toggle .hamburger,
  .nav-toggle .hamburger::before,
  .nav-toggle .hamburger::after {
    background: #333; /* Ensure visible on white header */
  }
  
  #primary-nav {
    display: none;
    position: absolute;
    top: 100%; /* Attach directly to bottom of header */
    left: 0;
    right: 0;
    background: #2d2f36; /* Slightly darker than header for contrast */
    padding: 15px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Separator line */
    flex-direction: column;
    order: 4;
    width: 100%;
    z-index: 100;
  }

  #primary-nav[aria-hidden="false"] {
    display: flex;
  }
  
  #primary-nav.open {
    display: flex;
    animation: navIn 0.3s ease-out;
  }
  
  #primary-nav .custom-button {
    width: 100%;
    text-align: center;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.15); /* More visible button background */
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  #primary-nav .custom-button:hover {
    background: var(--primary-color);
    border-color: transparent;
  }
  
  @keyframes navIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Header Refinements */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  flex-wrap: nowrap; /* Prevent wrapping */
  gap: 15px;
}

.header-container h1 {
  font-size: 1.35rem;
  white-space: normal; /* Allow wrapping */
  line-height: 1.2;
  margin: 0;
  padding: 0;
  min-width: 0;
  flex: 1;
}

/* Improved Dashboard Toggle Button */
.dashboard-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: #4F46E5;
  border-radius: 30px;
  color: white;
  border: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
}

.dashboard-toggle:hover {
  background: #4338CA;
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.6);
}

.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  font-size: 14px;
  line-height: 1;
}

/* Make nav links more compact */
.navigation .custom-button {
  padding: 6px 12px;
  margin: 0 3px;
  font-size: 13px;
}

/* Mobile refinements */
@media screen and (max-width: 768px) {
  /* Removed conflicting header styles to prevent double rows */
  
  .dashboard-toggle {
    padding: 6px 8px;
    margin-left: auto; /* Push to right side */
    margin-right: 10px;
  }
  
  .toggle-text {
    display: none; /* Hide text on smallest screens */
  }
  
  .toggle-icon {
    margin-right: 0; /* Remove margin when text is hidden */
  }
}

/* Time savings metrics styling */
.time-savings .metric-value {
  color: #1a202c; /* Dark navy for better readability */
}

/* Highlights container for multiple totals */
.metrics-highlights-container {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

.metrics-highlights-container .metric-highlight {
  flex: 1;
}

.metric-highlight.time {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.3), rgba(100, 100, 255, 0.3));
}

.metric-highlight.time .metric-value {
  background: linear-gradient(135deg, #ffffff, #50e6ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Impact Metrics Categories */
.metric-category {
  color: var(--dashboard-secondary);
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Enhanced Impact Metrics Highlights Container */
.impact-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}

/* Category-specific grid styling */
.funds-grid .metric-card {
  border-left: 3px solid rgba(0, 183, 195, 0.7);
}

.time-grid .metric-card {
  border-left: 3px solid rgba(80, 230, 255, 0.7);
}

.efficiency-grid .metric-card {
  border-left: 3px solid rgba(80, 230, 255, 0.7);
}

/* Highlight variations for different metric types */
.metric-highlight.funds {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.3), rgba(0, 183, 195, 0.3));
}

.metric-highlight.time {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.3), rgba(80, 230, 255, 0.3));
}

.metric-highlight.efficiency {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.3), rgba(80, 230, 255, 0.3));
  border: 1px solid rgba(32, 60, 201, 0.3);
}

.metric-highlight.efficiency .metric-value {
  background: linear-gradient(135deg, #ffffff, #20b0c9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Efficiency metric card styling */
.efficiency .metric-value {
  color: rgba(80, 230, 255, 0.9);
}

/* Responsive adjustments for impact highlights */
@media screen and (max-width: 768px) {
  .impact-highlights {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .metric-category {
    font-size: 1rem;
  }
}
.metric-highlight.time {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.3), rgba(80, 230, 255, 0.3));
}

.metric-highlight.efficiency {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.3), rgba(80, 230, 255, 0.3));
  border: 1px solid rgba(32, 60, 201, 0.3);
}

.metric-highlight.efficiency .metric-value {
  background: linear-gradient(135deg, #ffffff, #20b0c9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Efficiency metric card styling */
.efficiency .metric-value {
  color: rgba(80, 230, 255, 0.9);
}

/* Responsive adjustments for impact highlights */
@media screen and (max-width: 768px) {
  .impact-highlights {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .metric-category {
    font-size: 1rem;
  }
}

/* Override all metric values with darker gradients for better readability */
.metric-value {
  color: #1a202c !important; /* Dark navy base for simple values */
}

.metric-highlight .metric-value {
  background: linear-gradient(135deg, #1a202c, #2d3748) !important; /* Dark navy to darker gray */
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.metric-highlight.total .metric-value {
  background: linear-gradient(135deg, #1a202c, #134e4a) !important; /* Dark navy to dark teal */
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.metric-highlight.efficiency .metric-value {
  background: linear-gradient(135deg, #1a202c, #0f766e) !important; /* Dark navy to darker teal */
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.time-savings .metric-value {
  background: linear-gradient(135deg, #1a202c, #2563eb) !important; /* Dark navy to darker blue */
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Mobile KPI auto-show functionality */
@media (max-width: 768px) {
  .kpi-indicator.mobile-auto-show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
  }
  
  /* Ensure KPIs are hidden by default on mobile */
  .kpi-indicator {
    opacity: 0;
    visibility: hidden;
    transform: translateY(0);
    transition: all 0.3s ease;
  }
  
  /* Still allow hover on mobile for user interaction */
  .link-container:hover .kpi-indicator {
    opacity: 1;
    visibility: visible;
    transform: translateY(-10px);
  }
}

/* Mobile Menu Fixes */
@media screen and (max-width: 768px) {
  #primary-nav .modern-nav-item {
    color: #e2e8f0 !important; /* Light text for dark background */
    width: 100%;
    justify-content: flex-start;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
  }
  
  #primary-nav .modern-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    transform: none;
  }
  
  #primary-nav .modern-nav-item.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981 !important;
  }
  
  /* Remove the underline on mobile */
  #primary-nav .modern-nav-item::after {
    display: none !important;
  }
  
  /* Ensure icons are visible */
  #primary-nav .nav-icon {
    margin-right: 10px;
  }
}


/* Scroll margin removed - using scroll-padding-top on html instead */



/* Mobile Header Improvements */
@media screen and (max-width: 768px) {
  .modern-header {
    padding: 0.5rem 0.75rem;
  }
  
  .header-container.glass-morphism {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 15px;
    gap: 8px;
  }
  
  .header-brand {
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
  }
  
  .portfolio-title {
    font-size: 1.75rem !important;
    white-space: nowrap;
  }
  
  .portfolio-title .name-gradient {
    font-size: 1.75rem !important;
  }
  
  .portfolio-subtitle {
    font-size: 0.85rem !important;
    opacity: 0.8;
    letter-spacing: 0.5px;
  }
  
  .header-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }
  
  .action-btn {
    padding: 8px 12px !important;
  }
  
  .action-btn .btn-text {
    display: none;
  }
  
  .nav-toggle {
    position: static !important;
  }
}

/* ==========================================================================
   FINAL OVERRIDE - Navigation Visibility Rules (placed at end for priority)
   ========================================================================== */

/* Desktop: 1186px and above - Show nav links, hide hamburger */
@media (min-width: 1186px) {
  #primary-nav.modern-nav,
  .navigation.modern-nav {
    display: flex !important;
    position: static !important;
    flex-direction: row !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
    align-items: center;
    gap: 0.25rem;
  }
  
  .nav-toggle {
    display: none !important;
  }
}

/* Mobile/Tablet: 1185px and below - Hide nav (until toggled), show hamburger */
@media (max-width: 1185px) {
  #primary-nav.modern-nav,
  .navigation.modern-nav {
    display: none !important;
  }
  
  #primary-nav.modern-nav[aria-hidden="false"],
  .navigation.modern-nav[aria-hidden="false"] {
    display: flex !important;
  }
  
  .nav-toggle {
    display: flex !important;
  }
}
