
/* Remove global anti-flash that hid entire document and caused UI flip */
/* We keep critical elements visible at all times. */

/* Ensure critical elements are always visible */
.navbar {
    visibility: visible !important;
    opacity: 1 !important;
}


/* ROOT CAUSE PREVENTION: Systematic fixes */

/* Prevent layout shifts */
* {
    box-sizing: border-box;
}

/* Prevent flash of unstyled content */
html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

/* Prevent mobile touch issues */
body {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent animation conflicts */
*, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: no-preference) {
    *, *::before, *::after {
        animation-duration: revert !important;
        animation-iteration-count: revert !important;
        transition-duration: revert !important;
        scroll-behavior: revert !important;
    }
}

/* Prevent layout thrashing */
.scroll-reveal,
.apple-fade-up,
.apple-scale-in,
.apple-slide-left,
.apple-slide-right {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Prevent footer duplication */
footer + footer {
    display: none !important;
}

/* Prevent pagination overlap */
.pagination {
    clear: both;
    position: relative;
    z-index: 10;
}

/* Ensure body is visible; rely on progressive enhancement without hiding */
body { visibility: visible; }
body.loaded { visibility: visible; }

/* Immediate visibility for critical elements */
.navbar, .hero-section {
  visibility: visible !important;
}
/* 
  ===== UNIFIED DESIGN SYSTEM =====
  
  A comprehensive design system with standardized tokens for:
  - Colors: Gray scale (g100-g900) + Brand + Status colors
  - Typography: Text scale (xs-6xl) + Weights + Line heights  
  - Spacing: 4px base grid (space-0 to space-32)
  - Radius: Consistent border radius (sm to 3xl)
  - Shadows: Elevation system (xs to 2xl)
  - Animations: Duration + Easing curves
  
  Usage Examples:
  - Colors: var(--g400), var(--accent), var(--fg-muted)
  - Typography: var(--text-lg), var(--font-semibold), var(--leading-relaxed)
  - Spacing: var(--space-4), var(--space-8)
  - Radius: var(--radius-lg), var(--radius-2xl)
  - Shadows: var(--shadow-md), var(--shadow-xl)
  
  Utility Classes Available:
  - .text-lg, .font-bold, .leading-tight
  - .heading-large, .body-medium, .caption
  - .p-4, .m-8, .rounded-xl
  - .shadow-lg, .transition-bounce
*/

/* ===== KEYFRAMES ===== */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== iOS 26 BOUNCY ANIMATIONS ===== */

@keyframes bounceIn {
  0% { 
    opacity: 0; 
    transform: scale(0.3) translateY(30px); 
  }
  50% { 
    opacity: 1; 
    transform: scale(1.05) translateY(-10px); 
  }
  70% { 
    transform: scale(0.97) translateY(5px); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

@keyframes elasticIn {
  0% { 
    opacity: 0; 
    transform: scale(0.1) rotateZ(-10deg); 
  }
  30% { 
    opacity: 1; 
    transform: scale(1.15) rotateZ(3deg); 
  }
  50% { 
    transform: scale(0.95) rotateZ(-1deg); 
  }
  70% { 
    transform: scale(1.02) rotateZ(0.5deg); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1) rotateZ(0deg); 
  }
}

@keyframes springUp {
  0% { 
    opacity: 0; 
    transform: translateY(60px) scale(0.8); 
  }
  40% { 
    opacity: 1; 
    transform: translateY(-15px) scale(1.1); 
  }
  60% { 
    transform: translateY(8px) scale(0.95); 
  }
  80% { 
    transform: translateY(-3px) scale(1.02); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

@keyframes floatBounce {
  0%, 100% { 
    transform: translateY(0) scale(1); 
  }
  25% { 
    transform: translateY(-8px) scale(1.02); 
  }
  50% { 
    transform: translateY(-15px) scale(1.05); 
  }
  75% { 
    transform: translateY(-8px) scale(1.02); 
  }
}

@keyframes pulseElastic {
  0% { 
    transform: scale(1); 
  }
  30% { 
    transform: scale(1.15); 
  }
  50% { 
    transform: scale(0.9); 
  }
  70% { 
    transform: scale(1.05); 
  }
  100% { 
    transform: scale(1); 
  }
}

@keyframes searchModalIn {
  0% { 
    opacity: 0; 
    transform: scale(0.9) translateY(20px); 
    backdrop-filter: blur(0px);
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0px); 
    backdrop-filter: blur(40px);
  }
}

@keyframes searchResultsIn {
  0% { 
    opacity: 0; 
    transform: translateY(20px) scale(0.95); 
    backdrop-filter: blur(0px);
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
    backdrop-filter: blur(10px);
  }
}

:root {
  /* ===== COLOR SYSTEM ===== */
  
  /* Gray Scale (g100-g900) */
  --g100: #FFFFFF;  /* Pure white */
  --g200: #FAFAFA;  /* Subtle background */
  --g300: #F5F5F5;  /* Light background */
  --g400: #E6E6E6;  /* Border default */
  --g500: #CCCCCC;  /* Border strong */
  --g600: #969696;  /* Text muted */
  --g700: #666666;  /* Text secondary */
  --g800: #333333;  /* Text primary */
  --g900: #111111;  /* Text strong */
  
  /* RGB versions for alpha compositing */
  --bg-rgb: 255, 255, 255;
  --g200-rgb: 250, 250, 250;
  
  /* Brand Colors */
  --accent: #0099FF;
  --accent-rgb: 0, 153, 255;
  --accent-hover: #0088E6;
  --accent-light: #E6F4FF;
  --accent-dark: #0066CC;
  
  /* Status Colors */
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --error: #EF4444;
  --error-light: #FEE2E2;
  
  /* Semantic Colors (Light Mode) */
  --bg: var(--g100);
  --bg-subtle: var(--g200);
  --bg-elevated: var(--g300);
  --fg: var(--g900);
  --fg-muted: var(--g600);
  --fg-secondary: var(--g700);
  --border: var(--g400);
  --border-strong: var(--g500);
  --hairline: var(--g400);
  --link: var(--accent);

  /* ===== TYPOGRAPHY SYSTEM ===== */
  
  /* Font Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-geist: 'Geist', var(--font-sans);
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  /* Typography Scale */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-black: 900;
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* ===== SPACING SYSTEM ===== */
  
  /* 4px Base Grid */
  --space-0: 0;
  --space-1: 0.25rem;      /* 4px */
  --space-2: 0.5rem;       /* 8px */
  --space-3: 0.75rem;      /* 12px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.25rem;      /* 20px */
  --space-6: 1.5rem;       /* 24px */
  --space-8: 2rem;         /* 32px */
  --space-10: 2.5rem;      /* 40px */
  --space-12: 3rem;        /* 48px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */
  --space-32: 8rem;        /* 128px */

  /* ===== RADIUS SYSTEM ===== */
  
  --radius-none: 0;
  --radius-sm: 0.375rem;    /* 6px */
  --radius-md: 0.5rem;      /* 8px */
  --radius-lg: 0.75rem;     /* 12px */
  --radius-xl: 1rem;        /* 16px */
  --radius-2xl: 1.5rem;     /* 24px */
  --radius-3xl: 2rem;       /* 32px */
  --radius-full: 9999px;
  
  /* Legacy Support */
  --radius: var(--radius-2xl);

  /* ===== SHADOW SYSTEM ===== */
  
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* ===== ANIMATION SYSTEM ===== */
  
  --duration-fastest: 150ms;
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slowest: 700ms;
  
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Transition Presets */
  --transition-fast: var(--duration-fast) var(--ease-out);
  --transition-normal: var(--duration-normal) var(--ease-out);
  --transition-bounce: var(--duration-normal) var(--ease-bounce);
  --transition-spring: var(--duration-normal) var(--ease-spring);
}

[data-theme="dark"] {
  /* Dark Mode Gray Scale Override */
  --g100: #000000;  /* Pure black */
  --g200: #0A0A0A;  /* Subtle background */
  --g300: #1A1A1A;  /* Light background */
  --g400: #2A2A2A;  /* Border default */
  --g500: #3A3A3A;  /* Border strong */
  --g600: #9B9B9B;  /* Text muted */
  --g700: #CCCCCC;  /* Text secondary */
  --g800: #E6E6E6;  /* Text primary */
  --g900: #FFFFFF;  /* Text strong */
  
  /* Dark Mode RGB versions */
  --bg-rgb: 0, 0, 0;
  --g200-rgb: 10, 10, 10;
  
  /* Dark Mode Semantic Colors */
  --bg: var(--g100);
  --bg-subtle: var(--g200);
  --bg-elevated: var(--g300);
  --fg: var(--g900);
  --fg-muted: var(--g600);
  --fg-secondary: var(--g700);
  --border: var(--g400);
  --border-strong: var(--g500);
  --hairline: var(--g400);
  
  /* Adjusted Brand Colors for Dark Mode */
  --accent: #0099FF;
  --accent-hover: #00AAFF;
  --accent-light: #001A33;
  --accent-dark: #0088E6;
}

/* Respect system theme on first paint when no explicit data-theme is set */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    /* Dark Mode Gray Scale Override */
    --g100: #000000;
    --g200: #0A0A0A;
    --g300: #1A1A1A;
    --g400: #2A2A2A;
    --g500: #3A3A3A;
    --g600: #9B9B9B;
    --g700: #CCCCCC;
    --g800: #E6E6E6;
    --g900: #FFFFFF;

    /* Dark Mode RGB versions */
    --bg-rgb: 0, 0, 0;
    --g200-rgb: 10, 10, 10;

    /* Dark Mode Semantic Colors */
    --bg: var(--g100);
    --bg-subtle: var(--g200);
    --bg-elevated: var(--g300);
    --fg: var(--g900);
    --fg-muted: var(--g600);
    --fg-secondary: var(--g700);
    --border: var(--g400);
    --border-strong: var(--g500);
    --hairline: var(--g400);

    /* Adjusted Brand Colors for Dark Mode */
    --accent: #0099FF;
    --accent-hover: #00AAFF;
    --accent-light: #001A33;
    --accent-dark: #0088E6;
  }
}

/* Remove external font-face to comply with CSP and project rules (use local Inter only) */

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-8);
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  max-width: 100%;
  overflow-x: hidden;
}

/* Ultra-smooth scroll animations - 60fps guaranteed */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translate3d(-30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translate3d(30px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Apple-style scroll reveals with advanced easing */
.scroll-reveal {
  opacity: 0.1;  /* Reduced from 0 to prevent harsh flash */
  transform: translate3d(0, 40px, 0) scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: opacity, transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* iOS 26 Floating Elements */
.hero-badge {
  animation: floatBounce 4s ease-in-out infinite;
  animation-delay: 0.5s;
}

.feature-pill {
  animation: floatBounce 3s ease-in-out infinite;
}

.feature-pill:nth-child(1) { animation-delay: 0.2s; }
.feature-pill:nth-child(2) { animation-delay: 0.4s; }
.feature-pill:nth-child(3) { animation-delay: 0.6s; }

.scroll-reveal.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

/* Apple-style sophisticated animations */
.apple-fade-up {
  opacity: 0;
  transform: translate3d(0, 60px, 0);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-fade-up.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.apple-scale-in {
  opacity: 0;
  transform: scale(0.8) translate3d(0, 20px, 0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-scale-in.revealed {
  opacity: 1;
  transform: scale(1) translate3d(0, 0, 0);
}

.apple-slide-left {
  opacity: 0;
  transform: translate3d(-50px, 0, 0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-slide-left.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.apple-slide-right {
  opacity: 0;
  transform: translate3d(50px, 0, 0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-slide-right.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Optimized staggered animations with Apple timing */
.stagger-animation:nth-child(1) { transition-delay: 0ms; }
.stagger-animation:nth-child(2) { transition-delay: 100ms; }
.stagger-animation:nth-child(3) { transition-delay: 200ms; }
.stagger-animation:nth-child(4) { transition-delay: 300ms; }
.stagger-animation:nth-child(5) { transition-delay: 400ms; }
.stagger-animation:nth-child(6) { transition-delay: 500ms; }

/* Fast micro-interactions */
.scroll-reveal-fast {
  opacity: 0;
  transform: translate3d(0, 15px, 0);
  transition: opacity 0.4s ease-out, 
              transform 0.4s ease-out;
  will-change: opacity, transform;
}

.scroll-reveal-fast.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

/* Performance optimizations for cards */
.work-card, .insight-card, .testimonial-slide {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Fix for insight cards visibility - prevent scroll reveal from hiding them */
.insight-card.scroll-reveal {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
}

.insight-card.scroll-reveal:not(.revealed) {
  opacity: 0.8;
  transform: translate3d(0, 10px, 0);
}

.insight-card.scroll-reveal.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Removed - using individual hover definitions below for better shadow control */

h1, h2, h3 {
  font-family: var(--font-geist);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 { 
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
}
h2 { 
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
}
h3 { 
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 600;
}

p {
  max-width: 65ch;
  color: var(--fg-muted);
  font-size: var(--text-base);
  line-height: 1.6;
  font-weight: 400;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}
a:hover {
  opacity: 0.8;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  width: 100%;
  box-sizing: border-box;
}

/* Key Metrics */
.metrics {
  padding: var(--space-8) 0;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
.metric-card {
  text-align: center;
  padding: var(--space-4);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

[data-theme="dark"] .metric-card {
  background: linear-gradient(135deg, 
    rgba(25, 25, 25, 0.8) 0%, 
    rgba(35, 35, 35, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.metric-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.metric-value {
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--fg);
  margin-bottom: var(--space-1);
  font-family: var(--font-geist);
}
.metric-label {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Work Section */
.work {
  padding: var(--space-10) 0;
  background: linear-gradient(180deg, 
    var(--bg) 0%, 
    var(--bg-subtle) 100%);
  position: relative;
}

.work::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 100%);
}
.work h2 {
  text-align: center;
  margin-bottom: var(--space-6);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  max-width: 1400px;
  margin: 0 auto;
}
.work-card {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 0;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.work-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: var(--space-5);
  border-radius: var(--radius);
  transition: inherit;
  cursor: pointer;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.work-link:hover {
  color: inherit;
  text-decoration: none;
}

/* Debug: Visual feedback for work links */
.work-link:active {
  background: rgba(0, 123, 255, 0.1);
}

[data-theme="dark"] .work-card {
  background: linear-gradient(135deg, 
    rgba(25, 25, 25, 0.8) 0%, 
    rgba(35, 35, 35, 0.6) 100%);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.work-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.work-card:active {
  transform: translateY(-2px) scale(0.99);
  transition: all 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .work-card:hover {
  box-shadow: 0 15px 40px rgba(255,255,255,0.1);
}
.work-content h3 {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--fg);
  line-height: 1.3;
  overflow-wrap: break-word;
}
.work-period {
  font-size: var(--text-sm);
  color: var(--link);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.work-content p {
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  color: var(--fg-muted);
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-impact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.impact-item {
  text-align: center;
  padding: var(--space-3);
  background-color: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.impact-item strong {
  display: block;
  font-size: clamp(1rem, 3vw, 1.125rem);
  font-weight: 600;
  color: var(--fg);
  margin-bottom: var(--space-1);
  overflow-wrap: break-word;
}
.impact-item span {
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  color: var(--fg-muted);
  font-weight: 500;
  overflow-wrap: break-word;
  line-height: 1.3;
}

/* ===== ENHANCED NAVIGATION WITH PREMIUM DESIGN ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08), 
              0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: var(--space-1) 0;
}

.navbar.scrolled {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(255, 255, 255, 0.95) 100%);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 
              0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(60px) saturate(200%);
  -webkit-backdrop-filter: blur(60px) saturate(200%);
}

[data-theme="dark"] .navbar {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.95) 0%, 
    rgba(10, 10, 10, 0.9) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4), 
              0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .navbar.scrolled {
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.98) 0%, 
    rgba(5, 5, 5, 0.95) 100%);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 
              0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: var(--space-16);
  position: relative;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-family: var(--font-geist);
  color: var(--fg);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.nav-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(var(--accent-rgb), 0.1) 50%, 
    transparent 100%);
  transition: left 0.6s ease;
}

.nav-logo:hover {
  transform: translateY(-1px);
  background: rgba(var(--accent-rgb), 0.05);
}

.nav-logo:hover::before {
  left: 100%;
}

.logo-text {
  font-size: var(--text-3xl);
  font-weight: 800;
  font-family: var(--font-geist);
  background: linear-gradient(135deg, var(--fg) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.nav-menu {
  display: none; /* Mobile first - will be enhanced below */
}

/* Enhanced Desktop Navigation */
@media (min-width: 768px) {
  .nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(var(--bg-rgb), 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: var(--space-1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  }
  
  .nav-link {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--fg-secondary);
    padding: var(--space-2) var(--space-4);
    position: relative;
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    overflow: hidden;
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  .nav-link:hover {
    color: var(--fg);
    transform: translateY(-1px);
  }
  
  .nav-link:hover::after {
    width: 80%;
  }
  
  .nav-link.active {
    color: var(--accent);
  }
  
  .nav-link.active::after {
    width: 80%;
  }
  
  .search-toggle {
    background: none;
    border: none;
    color: var(--fg-secondary);
    cursor: pointer;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: var(--space-1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
  }
  
  .search-toggle::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  .search-toggle:hover {
    color: var(--fg);
    transform: translateY(-1px);
  }
  
  .search-toggle:hover::after {
    width: 80%;
  }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Enhanced Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  background: rgba(var(--bg-rgb), 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.theme-toggle::before {
  content: '☀️';
  font-size: var(--text-lg);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-toggle::before {
  content: '🌙';
  transform: rotate(180deg) scale(1.1);
}

.theme-toggle:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: var(--accent);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.2);
}

.theme-toggle:hover::before {
  transform: rotate(15deg) scale(1.2);
}

[data-theme="dark"] .theme-toggle:hover::before {
  transform: rotate(195deg) scale(1.3);
}

/* ===== MOBILE NAVIGATION ===== */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: rgba(var(--bg-rgb), 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.hamburger-line {
  width: 18px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center;
}

.mobile-menu-toggle:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: var(--accent);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.2);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Navigation Menu */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-content {
  position: absolute;
  top: var(--space-20);
  right: var(--space-4);
  background: rgba(var(--bg-rgb), 0.95);
  backdrop-filter: blur(40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  min-width: 280px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transform: translateY(-20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-nav.active .mobile-nav-content {
  transform: translateY(0) scale(1);
}

.mobile-nav-link,
.mobile-search-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: var(--fg);
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: var(--space-2);
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--text-base);
}

.mobile-nav-link:hover,
.mobile-search-toggle:hover {
  background: rgba(var(--accent-rgb), 0.1);
  transform: translateX(4px);
  color: var(--accent);
}

.mobile-nav-icon {
  font-size: var(--text-xl);
  width: 24px;
  text-align: center;
}

.mobile-nav-text {
  font-weight: var(--font-medium);
  font-size: var(--text-base);
}

/* Mobile-specific styling */
@media (max-width: 767px) {
  .nav-container {
    padding: 0 var(--space-4);
    height: var(--space-12);
  }
  
  .nav-menu {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .contact-btn {
    display: none;
  }
  
  .nav-right {
    gap: var(--space-2);
  }
  
  .theme-toggle {
    width: 36px;
    height: 36px;
  }
  
  .logo-text {
    font-size: var(--text-2xl);
  }
}

/* Dark mode mobile navigation */
[data-theme="dark"] .mobile-nav-content {
  background: rgba(var(--g200-rgb), 0.95);
  border-color: var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* iOS 26 Bouncy Button Style */
.btn {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: 9999px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: translateZ(0);
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              height 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn:hover::before {
  width: 200px;
  height: 200px;
}

.btn:active {
  transform: translateY(-1px) scale(1.02);
  transition: all 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-primary {
  background-color: var(--fg);
  color: var(--bg);
}
[data-theme="dark"] .btn-primary {
  background-color: var(--bg);
  color: var(--fg);
}

/* New Hero Section */
/* Enhanced Hero Section */
.hero {
  padding: clamp(40px, 8vh, 80px) 0 clamp(80px, 15vh, 140px);
  background: linear-gradient(180deg, 
    var(--bg) 0%, 
    var(--bg-subtle) 100%);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: var(--space-8);
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.hero-left {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  position: relative;
  width: 100%;
  max-width: 350px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  object-fit: cover;
  aspect-ratio: 1;
  background: transparent !important;
  border: 3px solid transparent;
  /* Optimized for pure PNG transparency */
  image-rendering: auto;
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  transform: scale(1);
  animation: heroImageFloat 6s ease-in-out infinite;
  /* Ensure PNG transparency is preserved */
  mix-blend-mode: normal;
  isolation: isolate;
}

.hero-image img:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

@keyframes heroImageFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(1deg); }
  50% { transform: translateY(0px) rotate(0deg); }
  75% { transform: translateY(-5px) rotate(-0.5deg); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: var(--space-5);
  letter-spacing: 0.02em;
}

[data-theme="dark"] .hero-badge {
  background: linear-gradient(135deg, 
    rgba(25, 25, 25, 0.8) 0%, 
    rgba(35, 35, 35, 0.6) 100%);
  border-color: rgba(255, 255, 255, 0.05);
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 20px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

.feature-pill:hover {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-1px);
}

[data-theme="dark"] .feature-pill {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.15);
}

[data-theme="dark"] .feature-pill:hover {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.25);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 auto var(--space-4);
  max-width: 16ch;
  color: var(--fg);
}

.gradient-text {
  background: linear-gradient(135deg, #0066CC 0%, #0099FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 55ch;
  margin: 0 auto var(--space-8);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

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

.stat-number {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.btn-medium {
  padding: var(--space-2) var(--space-4);
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-large {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
}

@media (max-width: 768px) {
  .hero {
    padding: clamp(30px, 6vh, 60px) 0 clamp(60px, 12vh, 100px);
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    text-align: center;
  }
  
  .hero-left {
    text-align: center;
  }
  
  .hero-right {
    order: -1;
  }
  
  .hero-image {
    max-width: 280px;
    margin: 0 auto;
  }
  
  .hero-badge {
    font-size: 15px;
    padding: var(--space-2) var(--space-4);
    margin-bottom: var(--space-4);
  }
  
  .hero-features {
    gap: var(--space-2);
    margin-bottom: var(--space-5);
    justify-content: center;
  }
  
  .feature-pill {
    font-size: 13px;
    padding: var(--space-1) var(--space-3);
  }
  
  .hero-stats {
    gap: var(--space-6);
    justify-content: center;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-medium,
  .btn-large {
    width: 100%;
    max-width: 280px;
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    text-align: center;
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.25rem);
    text-align: center;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .hero-image {
    max-width: 220px;
  }
  
  .hero-badge {
    font-size: 14px;
    padding: var(--space-1) var(--space-3);
  }
  
  .feature-pill {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
  }
  
  .hero-stat .stat-number {
    font-size: 1.5rem;
  }
  
  .hero-stat .stat-label {
    font-size: 0.8rem;
  }
}

/* New Footer */
.footer {
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.footer-widgets {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

#local-time {
  font-feature-settings: 'tnum';
}

.weather-info {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--fg-muted);
}

.weather-icon {
  font-size: var(--text-base);
}

.weather-text {
  font-feature-settings: 'tnum';
}

/* Work Showcase */
.work-showcase {
  padding: var(--space-8) 0;
  background-color: var(--bg-subtle);
}
.work-card {
  text-decoration: none;
  color: var(--fg);
  background-color: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.work-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.work-card:active {
  transform: translateY(-2px) scale(0.99);
  transition: all 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .work-card:hover {
  box-shadow: 0 15px 40px rgba(255,255,255,0.1);
}
.work-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.work-card-content {
  padding: var(--space-3);
}
.work-card-content h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}
.work-card-content p {
  font-size: var(--text-sm);
}

/* New About Section */
.about-section {
    padding: var(--space-10) 0;
}
.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}
.about-text h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
}
.about-text p {
    margin-bottom: var(--space-4);
}
.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image img {
    width: clamp(300px, 55%, 450px);
    max-width: 450px;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    object-fit: cover;
    aspect-ratio: 1;
    background: transparent !important;
    border: 2px solid transparent;
    /* Optimized for pure PNG transparency */
    image-rendering: auto;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    /* Ensure PNG transparency is preserved */
    mix-blend-mode: normal;
    isolation: isolate;
}

.about-image img:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 50px rgba(0,0,0,0.20);
}

.business-card-accent {
    position: relative;
    margin-top: var(--space-4);
    text-align: center;
}

.business-card-preview {
    width: 60% !important;
    max-width: 200px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.business-card-preview:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

[data-theme="dark"] .business-card-preview {
    background: linear-gradient(135deg, 
        rgba(25, 25, 25, 0.8) 0%, 
        rgba(35, 35, 35, 0.6) 100%);
    border-color: rgba(255, 255, 255, 0.05);
}
.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--fg);
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        text-align: center;
    }
    .about-image {
        order: -1;
    }
    .about-image img {
        width: clamp(250px, 60%, 350px);
        max-width: 350px;
    }
    .about-text {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .about-image img {
        width: clamp(200px, 70%, 280px);
        max-width: 280px;
    }
}

.approach-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
    margin: var(--space-8) 0;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--border-rgb), 0.5);
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.highlight-item:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.08) 0%, 
        rgba(255, 255, 255, 0.04) 100%);
    border-color: rgba(var(--accent-rgb), 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .highlight-item {
    background: linear-gradient(135deg, 
        rgba(25, 25, 25, 0.6) 0%, 
        rgba(35, 35, 35, 0.4) 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .highlight-item:hover {
    background: linear-gradient(135deg, 
        rgba(30, 30, 30, 0.8) 0%, 
        rgba(40, 40, 40, 0.6) 100%);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.highlight-icon {
    font-size: var(--text-2xl);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}

.highlight-content h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--fg);
    margin-bottom: var(--space-1);
}

.highlight-content p {
    font-size: var(--text-sm);
    color: var(--fg-muted);
    margin: 0;
    line-height: 1.5;
}

/* Insights Section */
.insights {
    padding: var(--space-10) 0;
    background-color: var(--bg-subtle);
}
.insights h2 {
    text-align: center;
    margin-bottom: var(--space-2);
}
.insights > .container > p {
    text-align: center;
    margin-bottom: var(--space-6);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}
.insight-card {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    text-decoration: none;
    color: var(--fg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
    display: block;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 1;
    min-height: 120px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.insight-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.insight-card:active {
    transform: translateY(-2px) scale(0.98);
    transition: all 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .insight-card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(255,255,255,0.02);
}

[data-theme="dark"] .insight-card:hover {
    box-shadow: 0 10px 20px rgba(255,255,255,0.05);
    background-color: var(--bg-subtle);
}
.insight-card .date {
    font-size: var(--text-sm);
    color: var(--link);
    font-weight: 600;
    margin-bottom: var(--space-1);
}
.insight-card h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
    color: var(--fg);
}
.insight-card h3 a {
    color: inherit;
    text-decoration: none;
}
.insight-card p {
    font-size: var(--text-sm);
    color: var(--fg-muted);
    line-height: 1.5;
}
.insight-card .read-more {
    font-size: var(--text-xs);
    color: var(--link);
    font-weight: 600;
    margin-top: var(--space-2);
    display: block;
}
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-6);
    width: 100%;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    width: 100%;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px) saturate(180%);
    color: var(--fg);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 100%);
    transform: translateY(-2px);
}

.pagination-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

[data-theme="dark"] .pagination-btn {
    background: linear-gradient(135deg, 
        rgba(25, 25, 25, 0.8) 0%, 
        rgba(35, 35, 35, 0.6) 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

.pagination-dots {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.pagination-dot {
    width: 10px;
    height: 10px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.pagination-dot.active {
    background-color: var(--link);
    border-color: var(--link);
    transform: scale(1.1);
}

.pagination-dot:hover {
    border-color: var(--link);
    background-color: rgba(var(--link-rgb), 0.2);
    transform: scale(1.05);
}

[data-theme="dark"] .pagination-dot {
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .pagination-dot:hover {
    border-color: var(--link);
}

.pagination-info {
    font-size: var(--text-sm);
    color: var(--fg-muted);
    font-feature-settings: 'tnum';
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.no-posts-message {
    text-align: center;
    padding: var(--space-8);
    grid-column: 1 / -1;
}

.no-posts-message h3 {
    margin-bottom: var(--space-2);
    color: var(--fg);
}

.no-posts-message p {
    color: var(--fg-muted);
}

.clickable-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.clickable-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Testimonials Section */
.testimonials-section {
    padding: var(--space-10) 0;
    background-color: var(--bg-subtle);
}
.testimonials-section h2 {
    text-align: center;
    margin-bottom: var(--space-6);
}

/* Testimonials Carousel */
.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.carousel-track {
    position: relative;
    min-height: 280px;
    margin-bottom: var(--space-4);
    /* Remove conflicting transition - handled by JavaScript */
}

.testimonial-slide {
    min-width: 100%;
    padding: var(--space-6) var(--space-5);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-2xl);
    opacity: 0;
    transform: translateX(40px) scale(0.95);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    /* Transitions now handled by JavaScript for precise control */
    will-change: opacity, transform;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

[data-theme="dark"] .testimonial-slide {
    background: linear-gradient(135deg, 
        rgba(25, 25, 25, 0.8) 0%, 
        rgba(35, 35, 35, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.testimonial-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 2;
}

.testimonial-slide blockquote {
    margin: 0;
    text-align: center;
}

.testimonial-slide p {
    font-size: var(--text-lg);
    line-height: 1.6;
    margin-bottom: var(--space-4);
    font-style: italic;
    color: var(--fg);
}

.testimonial-slide footer {
    text-align: center;
}

.testimonial-slide strong {
    display: block;
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-1);
    color: var(--fg);
}

.testimonial-slide span {
    font-size: var(--text-sm);
    color: var(--fg-muted);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
    padding-top: var(--space-4);
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, 
        rgba(var(--bg-rgb), 0.9) 0%, 
        rgba(var(--bg-rgb), 0.8) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: var(--fg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    font-size: var(--text-lg);
    position: relative;
    overflow: hidden;
}

.carousel-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(var(--accent-rgb), 0.2) 50%, 
        transparent 100%);
    transition: left 0.6s ease;
}

.carousel-btn:hover {
    background: rgba(var(--accent-rgb), 0.1);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.2);
}

.carousel-btn:hover::before {
    left: 100%;
}

.carousel-btn:active {
    transform: translateY(0) scale(1.02);
    transition: all 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.carousel-dots {
    display: flex;
    gap: var(--space-2);
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.carousel-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent);
    border-radius: var(--radius-full);
    transform: translate(-50%, -50%);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.carousel-dot.active {
    border-color: var(--accent);
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3);
}

.carousel-dot.active::before {
    width: 6px;
    height: 6px;
}

.carousel-dot:hover {
    border-color: var(--accent);
    transform: scale(1.1);
}

.carousel-dot:hover::before {
    width: 4px;
    height: 4px;
    background: var(--accent);
}

[data-theme="dark"] .carousel-dot {
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .carousel-dot:hover {
    border-color: var(--link);
}

/* Newsletter Section */
.newsletter-section {
  padding: var(--space-10) 0;
  background-color: var(--bg);
  border-top: 1px solid var(--border);
}
.newsletter-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}
.newsletter-content h2 {
  margin-bottom: var(--space-2);
}
.newsletter-content p {
  margin-bottom: var(--space-5);
}
.newsletter-form {
  margin-bottom: var(--space-3);
}
.form-group {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.form-input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--fg);
  transition: border-color var(--transition-fast);
}
.form-input:focus {
  outline: none;
  border-color: var(--link);
}
.form-note {
  font-size: var(--text-xs);
  color: var(--fg-muted);
  margin: 0;
}

/* Contact Section */
.contact-section {
  padding: var(--space-10) 0;
  background-color: var(--bg-subtle);
}
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.contact-content h2 {
    margin-bottom: var(--space-3);
}
.contact-content > p {
    margin-bottom: var(--space-6);
}
.contact-info-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  text-align: center;
}

.contact-label {
  font-size: var(--text-lg);
  opacity: 0.7;
  margin-right: var(--space-1);
}

.contact-item a,
.contact-item span {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-base);
}

.contact-item a:hover {
  color: var(--link);
}

.trust-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin: var(--space-5) 0;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--fg-muted);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.trust-item:hover {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.25);
  transform: translateY(-1px);
}

.trust-icon {
  font-size: var(--text-base);
}

[data-theme="dark"] .trust-item {
  background: rgba(var(--accent-rgb), 0.06);
  border-color: rgba(var(--accent-rgb), 0.12);
}

[data-theme="dark"] .trust-item:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.2);
}

/* Mobile contact cards */
@media (max-width: 768px) {
  .trust-indicators {
    gap: var(--space-2);
  }
  
  .trust-item {
    font-size: 13px;
    padding: var(--space-1) var(--space-2);
  }
  
  .contact-info-row {
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .contact-item {
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.1) 0%, 
      rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-4);
    transition: all 0.3s ease;
  }

  [data-theme="dark"] .contact-item {
    background: linear-gradient(135deg, 
      rgba(25, 25, 25, 0.8) 0%, 
      rgba(35, 35, 35, 0.6) 100%);
    border-color: rgba(255, 255, 255, 0.05);
  }

  .contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  }
}
.contact-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

/* Notification System */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: var(--space-4);
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-theme="dark"] .notification {
  background: linear-gradient(135deg, 
    rgba(15, 15, 15, 0.95) 0%, 
    rgba(25, 25, 25, 0.9) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.notification p {
  margin: 0;
  line-height: 1.5;
  color: var(--fg);
}

.notification-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  font-size: var(--text-lg);
  padding: 0;
  line-height: 1;
}

.notification-success {
  border-left: 4px solid #10b981;
}

.notification-error {
  border-left: 4px solid #ef4444;
}

.notification-info {
  border-left: 4px solid #3b82f6;
}

/* Work Status */
.work-status {
    font-size: var(--text-xs);
    color: var(--fg-muted);
    margin-top: var(--space-1);
    font-style: italic;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--fg);
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.back-to-top:hover {
    transform: translateY(-2px);
}
.back-to-top[hidden] {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 1000px) and (min-width: 769px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
}

@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    .contact-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== SEARCH MODAL ===== */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center; /* vertically center */
  justify-content: center; /* horizontally center */
  padding: 0 1rem; /* remove top offset causing bottom-left appearance */
}

.search-modal.active {
  display: flex;
  animation: searchModalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.4) 0%, 
    rgba(0, 0, 0, 0.6) 100%);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 580px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.85) 0%, 
    rgba(255, 255, 255, 0.75) 50%,
    rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform;
}

[data-theme="dark"] .search-container {
  background: linear-gradient(135deg, 
    rgba(15, 15, 15, 0.85) 0%, 
    rgba(25, 25, 25, 0.75) 50%,
    rgba(20, 20, 20, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.4),
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-4) var(--space-5);
  border-bottom: 1px solid rgba(var(--border-rgb), 0.5);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(10px);
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.search-icon {
  color: var(--fg-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--fg);
  outline: none;
  font-family: var(--font-inter);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.search-input::placeholder {
  color: var(--fg-muted);
}

.search-close {
  background: rgba(var(--fg-rgb), 0.05);
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  width: 32px;
  height: 32px;
}

.search-close:hover {
  background: rgba(var(--fg-rgb), 0.1);
  color: var(--fg);
  transform: scale(1.05);
}

/* Removed duplicate hover rule - using enhanced version above */

.search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: var(--space-3);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--fg-rgb), 0.1) transparent;
}

.search-results::-webkit-scrollbar {
  width: 6px;
}

.search-results::-webkit-scrollbar-track {
  background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
  background: rgba(var(--fg-rgb), 0.1);
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--fg-rgb), 0.2);
}

.search-placeholder {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--fg-muted);
}

.search-placeholder svg {
  margin-bottom: var(--space-3);
  opacity: 0.5;
}

.search-result {
  display: block;
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: searchResultsIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  margin-bottom: var(--space-2);
  backdrop-filter: blur(10px);
}

.search-result:hover {
  background: rgba(var(--fg-rgb), 0.05);
  border-color: rgba(var(--fg-rgb), 0.1);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .search-result:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.search-result-title {
  font-weight: 600;
  color: var(--fg);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}

.search-result-summary {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: var(--space-2);
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.search-result-tag {
  background: var(--accent);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
}

.search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.search-stats {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.search-shortcuts {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.search-shortcuts kbd {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.7rem;
}

.search-no-results {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--fg-muted);
}

.search-no-results h3 {
  margin-bottom: var(--space-2);
  color: var(--fg);
}

/* Search responsive */
@media (max-width: 768px) {
  .search-modal {
    padding: 4vh 1rem;
  }
  
  .search-container {
    max-width: 100%;
    border-radius: 20px;
  }
  
  .search-header {
    padding: var(--space-4);
  }
  
  .search-input {
    font-size: var(--text-base);
  }
  
  .search-results {
    max-height: 65vh;
    padding: var(--space-2);
  }
  
  .search-result {
    padding: var(--space-3);
    border-radius: var(--radius-lg);
  }
}

/* ===== DESIGN SYSTEM UTILITY CLASSES ===== */

/* Typography Utilities */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

.font-light { font-weight: var(--font-light); }
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
.font-black { font-weight: var(--font-black); }

.leading-none { line-height: var(--leading-none); }
.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }
.leading-loose { line-height: var(--leading-loose); }

/* Semantic Text Classes */
.heading-large {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--fg);
}

.heading-medium {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--fg);
}

.heading-small {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--fg);
}

.subheading {
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--fg-secondary);
}

.body-large {
  font-size: var(--text-lg);
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  color: var(--fg);
}

.body-medium {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--fg);
}

.body-small {
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--fg-muted);
}

.caption {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Color Utilities */
.text-primary { color: var(--fg); }
.text-secondary { color: var(--fg-secondary); }
.text-muted { color: var(--fg-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.bg-primary { background-color: var(--bg); }
.bg-subtle { background-color: var(--bg-subtle); }
.bg-elevated { background-color: var(--bg-elevated); }
.bg-accent { background-color: var(--accent); }
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-error { background-color: var(--error); }

/* Border Utilities */
.border { border: 1px solid var(--border); }
.border-strong { border: 1px solid var(--border-strong); }
.border-accent { border: 1px solid var(--accent); }

.rounded-none { border-radius: var(--radius-none); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: var(--radius-3xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Spacing Utilities */
.p-0 { padding: var(--space-0); }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.p-10 { padding: var(--space-10); }
.p-12 { padding: var(--space-12); }
.p-16 { padding: var(--space-16); }
.p-20 { padding: var(--space-20); }

/* ===== TAG & HIGHLIGHT SYSTEM ===== */

/* General tag styling for better readability */
.tag,
.badge,
.label,
.highlight {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  line-height: 1.2;
}

/* Default tag style - subtle and readable */
.tag {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-dark);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

.tag:hover {
  background: rgba(var(--accent-rgb), 0.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2);
}

/* Tag variants for different contexts */
.tag-primary {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-dark);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

.tag-secondary {
  background: rgba(var(--g600-rgb), 0.1);
  color: var(--fg-secondary);
  border: 1px solid var(--border);
}

.tag-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.tag-error {
  background: var(--error-light);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Inline highlight for text - much more readable than yellow */
mark,
.highlight-text {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--fg);
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
  font-weight: var(--font-medium);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Dark mode adaptations */
[data-theme="dark"] .tag {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
}

[data-theme="dark"] .tag-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] mark,
[data-theme="dark"] .highlight-text {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
}

/* Override any browser default yellow highlighting */
::selection {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--fg);
}

::-moz-selection {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--fg);
}

/* Fix any existing problematic yellow highlights */
*[style*="background: yellow"],
*[style*="background-color: yellow"],
*[style*="background: #FFFF00"],
*[style*="background-color: #FFFF00"] {
  background: rgba(var(--accent-rgb), 0.15) !important;
  color: var(--fg) !important;
  padding: 0.1em 0.3em !important;
  border-radius: var(--radius-sm) !important;
  font-weight: var(--font-medium) !important;
}

.m-0 { margin: var(--space-0); }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-5 { margin: var(--space-5); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }
.m-10 { margin: var(--space-10); }
.m-12 { margin: var(--space-12); }
.m-16 { margin: var(--space-16); }
.m-20 { margin: var(--space-20); }

/* Shadow Utilities */
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* Transition Utilities */
.transition-fast { transition: all var(--transition-fast); }
.transition-normal { transition: all var(--transition-normal); }
.transition-bounce { transition: all var(--transition-bounce); }
.transition-spring { transition: all var(--transition-spring); }

/* PAGINATION FIX: Prevent overlap on mobile */
@media (max-width: 768px) {
    .testimonials-section {
        padding-bottom: var(--space-16) !important;
    }
    
    .pagination {
        margin-top: var(--space-8) !important;
        margin-bottom: var(--space-8) !important;
    }
    
    .testimonial-card {
        margin-bottom: var(--space-6) !important;
    }
}

/* FOOTER FIX: Better spacing on mobile */
@media (max-width: 768px) {
    .footer {
        padding: var(--space-12) 0 var(--space-8) 0 !important;
    }
    
    .footer-content {
        padding: var(--space-6) var(--space-4) !important;
        line-height: 1.6 !important;
    }
    
    .footer p {
        margin: 0 !important;
        font-size: var(--text-base) !important;
    }
}

/* SEARCH RESULTS FIX: Better metadata display */
.search-result-meta {
    display: flex;
    gap: var(--space-3);
    margin: var(--space-2) 0;
    flex-wrap: wrap;
}

.search-tag,
.search-date,
.search-read-time {
    font-size: var(--text-sm);
    color: var(--text-muted);
    padding: var(--space-1) var(--space-2);
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
}

.search-tag {
    background: var(--accent-subtle);
    color: var(--accent);
}

/* FIX: Pagination overlap on mobile */
@media (max-width: 768px) {
    .testimonials-section {
        padding-bottom: 120px !important;
    }
    
    .testimonial-carousel-container {
        margin-bottom: 80px !important;
    }
    
    .testimonials-pagination {
        margin-top: 60px !important;
        position: relative !important;
        z-index: 100 !important;
        clear: both !important;
    }
    
    .testimonial-card {
        margin-bottom: 40px !important;
    }
}

/* FIX: Footer spacing on mobile */
@media (max-width: 768px) {
    .footer {
        padding: 60px 0 40px 0 !important;
        margin-top: 80px !important;
    }
    
    .footer-content {
        padding: 24px 20px !important;
        line-height: 1.8 !important;
        text-align: center !important;
    }
    
    .footer p {
        margin: 0 !important;
        font-size: 16px !important;
        letter-spacing: 0.5px !important;
    }
}

/* FIX: Search result metadata styling */
.search-result-meta {
    display: flex;
    gap: 12px;
    margin: 8px 0 12px 0;
    flex-wrap: wrap;
    align-items: center;
}

.search-tag,
.search-date,
.search-read-time {
    font-size: 12px;
    color: #666;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-weight: 500;
}

.search-tag {
    background: #e3f2fd;
    color: #1976d2;
}


/* Critical Layout Fixes */
.work-content p,
.case-study-section p,
.post-content p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

/* Fix text overflow in case studies */
.case-study-section {
  overflow-x: hidden;
  word-wrap: break-word;
}

.case-study-section h1,
.case-study-section h2,
.case-study-section h3 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* Fix search modal issues */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.search-modal.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.search-container {
  position: relative;
  max-width: 600px;
  margin: 10vh auto;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.search-header {
  display: flex;
  align-items: center;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.search-header input {
  flex: 1;
  border: none;
  background: none;
  font-size: var(--text-lg);
  color: var(--fg);
  outline: none;
}

.search-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--fg-muted);
  cursor: pointer;
  padding: var(--space-2);
  margin-left: var(--space-2);
}

.search-results {
  max-height: 60vh;
  overflow-y: auto;
  padding: var(--space-4);
}

/* Fix work grid alignment */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
  align-items: start;
}

@media (min-width: 1200px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Fix mobile navigation */
@media (max-width: 768px) {
  .search-container {
    margin: 5vh var(--space-4);
    max-width: none;
  }
  
  .work-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}



/* Profile Image Fixes */
.hero-image img {
  background: transparent !important;
  mix-blend-mode: normal;
  isolation: isolate;
  border-radius: 50%;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.hero-image {
  background: transparent !important;
  border-radius: 50%;
  overflow: hidden;
}

/* Ensure transparency is preserved */
.hero-image::before {
  content: none !important;
}

