:root {
  /* Primitive Color Tokens */
  --color-white: rgba(255, 255, 255, 1);
  --color-black: rgba(0, 0, 0, 1);
  --color-cream-50: rgba(252, 252, 249, 1);
  --color-cream-100: rgba(255, 255, 253, 1);
  --color-gray-200: rgba(245, 245, 245, 1);
  --color-gray-300: rgba(167, 169, 169, 1);
  --color-gray-400: rgba(119, 124, 124, 1);
  --color-slate-500: rgba(98, 108, 113, 1);
  --color-brown-600: rgba(94, 82, 64, 1);
  --color-charcoal-700: rgba(31, 33, 33, 1);
  --color-charcoal-800: rgba(38, 40, 40, 1);
  --color-slate-900: rgba(19, 52, 59, 1);
  --color-teal-300: rgba(50, 184, 198, 1);
  --color-teal-400: rgba(45, 166, 178, 1);
  --color-teal-500: rgba(33, 128, 141, 1);
  --color-teal-600: rgba(29, 116, 128, 1);
  --color-teal-700: rgba(26, 104, 115, 1);
  --color-teal-800: rgba(41, 150, 161, 1);
  --color-red-400: rgba(255, 84, 89, 1);
  --color-red-500: rgba(192, 21, 47, 1);
  --color-orange-400: rgba(230, 129, 97, 1);
  --color-orange-500: rgba(168, 75, 47, 1);

  /* RGB versions for opacity control */
  --color-brown-600-rgb: 94, 82, 64;
  --color-teal-500-rgb: 33, 128, 141;
  --color-slate-900-rgb: 19, 52, 59;
  --color-slate-500-rgb: 98, 108, 113;
  --color-red-500-rgb: 192, 21, 47;
  --color-red-400-rgb: 255, 84, 89;
  --color-orange-500-rgb: 168, 75, 47;
  --color-orange-400-rgb: 230, 129, 97;

  /* Background color tokens (Light Mode) */
  --color-bg-1: rgba(59, 130, 246, 0.08); /* Light blue */
  --color-bg-2: rgba(245, 158, 11, 0.08); /* Light yellow */
  --color-bg-3: rgba(34, 197, 94, 0.08); /* Light green */
  --color-bg-4: rgba(239, 68, 68, 0.08); /* Light red */
  --color-bg-5: rgba(147, 51, 234, 0.08); /* Light purple */
  --color-bg-6: rgba(249, 115, 22, 0.08); /* Light orange */
  --color-bg-7: rgba(236, 72, 153, 0.08); /* Light pink */
  --color-bg-8: rgba(6, 182, 212, 0.08); /* Light cyan */

  /* Semantic Color Tokens (Light Mode) */
  --color-background: var(--color-cream-50);
  --color-surface: var(--color-cream-100);
  --color-text: var(--color-slate-900);
  --color-text-secondary: var(--color-slate-500);
  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-primary-active: var(--color-teal-700);
  --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
  --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
  --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
  --color-border: rgba(var(--color-brown-600-rgb), 0.2);
  --color-btn-primary-text: var(--color-cream-50);
  --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
  --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
  --color-error: var(--color-red-500);
  --color-success: var(--color-teal-500);
  --color-warning: var(--color-orange-500);
  --color-info: var(--color-slate-500);
  --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);
  --color-select-caret: rgba(var(--color-slate-900-rgb), 0.8);

  /* Common style patterns */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for opacity control */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;

  /* Typography */
  --font-family-base: "JetBrains Mono", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 550;
  --font-weight-bold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;

  /* Mobile-specific variables */
  --touch-target-min: 44px; /* Minimum touch target size */
  --mobile-padding: 16px;
  --mobile-gap: 12px;
}
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    /* RGB versions for opacity control (Dark Mode) */
    --color-gray-400-rgb: 119, 124, 124;
    --color-teal-300-rgb: 50, 184, 198;
    --color-gray-300-rgb: 167, 169, 169;
    --color-gray-200-rgb: 245, 245, 245;

    /* Background color tokens (Dark Mode) */
    --color-bg-1: rgba(29, 78, 216, 0.15); /* Dark blue */
    --color-bg-2: rgba(180, 83, 9, 0.15); /* Dark yellow */
    --color-bg-3: rgba(21, 128, 61, 0.15); /* Dark green */
    --color-bg-4: rgba(185, 28, 28, 0.15); /* Dark red */
    --color-bg-5: rgba(107, 33, 168, 0.15); /* Dark purple */
    --color-bg-6: rgba(194, 65, 12, 0.15); /* Dark orange */
    --color-bg-7: rgba(190, 24, 93, 0.15); /* Dark pink */
    --color-bg-8: rgba(8, 145, 178, 0.15); /* Dark cyan */
    
    /* Semantic Color Tokens (Dark Mode) */
    --color-background: var(--color-charcoal-700);
    --color-surface: var(--color-charcoal-800);
    --color-text: var(--color-gray-200);
    --color-text-secondary: rgba(var(--color-gray-300-rgb), 0.7);
    --color-primary: var(--color-teal-300);
    --color-primary-hover: var(--color-teal-400);
    --color-primary-active: var(--color-teal-800);
    --color-secondary: rgba(var(--color-gray-400-rgb), 0.15);
    --color-secondary-hover: rgba(var(--color-gray-400-rgb), 0.25);
    --color-secondary-active: rgba(var(--color-gray-400-rgb), 0.3);
    --color-border: rgba(var(--color-gray-400-rgb), 0.3);
    --color-error: var(--color-red-400);
    --color-success: var(--color-teal-300);
    --color-warning: var(--color-orange-400);
    --color-info: var(--color-gray-300);
    --color-focus-ring: rgba(var(--color-teal-300-rgb), 0.4);
    --color-btn-primary-text: var(--color-slate-900);
    --color-card-border: rgba(var(--color-gray-400-rgb), 0.2);
    --color-card-border-inner: rgba(var(--color-gray-400-rgb), 0.15);
    --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    --button-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
    --color-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
    --color-select-caret: rgba(var(--color-gray-200-rgb), 0.8);

    /* Common style patterns - updated for dark mode */
    --focus-ring: 0 0 0 3px var(--color-focus-ring);
    --focus-outline: 2px solid var(--color-primary);
    --status-bg-opacity: 0.15;
    --status-border-opacity: 0.25;
    --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    /* RGB versions for dark mode */
    --color-success-rgb: var(--color-teal-300-rgb);
    --color-error-rgb: var(--color-red-400-rgb);
    --color-warning-rgb: var(--color-orange-400-rgb);
    --color-info-rgb: var(--color-gray-300-rgb);
  }
}

/* Data attribute for manual theme switching */
[data-color-scheme="dark"] {
  /* RGB versions for opacity control (dark mode) */
  --color-gray-400-rgb: 119, 124, 124;
  --color-teal-300-rgb: 50, 184, 198;
  --color-gray-300-rgb: 167, 169, 169;
  --color-gray-200-rgb: 245, 245, 245;

  /* Colorful background palette - Dark Mode */
  --color-bg-1: rgba(29, 78, 216, 0.15); /* Dark blue */
  --color-bg-2: rgba(180, 83, 9, 0.15); /* Dark yellow */
  --color-bg-3: rgba(21, 128, 61, 0.15); /* Dark green */
  --color-bg-4: rgba(185, 28, 28, 0.15); /* Dark red */
  --color-bg-5: rgba(107, 33, 168, 0.15); /* Dark purple */
  --color-bg-6: rgba(194, 65, 12, 0.15); /* Dark orange */
  --color-bg-7: rgba(190, 24, 93, 0.15); /* Dark pink */
  --color-bg-8: rgba(8, 145, 178, 0.15); /* Dark cyan */
  
  /* Semantic Color Tokens (Dark Mode) */
  --color-background: var(--color-charcoal-700);
  --color-surface: var(--color-charcoal-800);
  --color-text: var(--color-gray-200);
  --color-text-secondary: rgba(var(--color-gray-300-rgb), 0.7);
  --color-primary: var(--color-teal-300);
  --color-primary-hover: var(--color-teal-400);
  --color-primary-active: var(--color-teal-800);
  --color-secondary: rgba(var(--color-gray-400-rgb), 0.15);
  --color-secondary-hover: rgba(var(--color-gray-400-rgb), 0.25);
  --color-secondary-active: rgba(var(--color-gray-400-rgb), 0.3);
  --color-border: rgba(var(--color-gray-400-rgb), 0.3);
  --color-error: var(--color-red-400);
  --color-success: var(--color-teal-300);
  --color-warning: var(--color-orange-400);
  --color-info: var(--color-gray-300);
  --color-focus-ring: rgba(var(--color-teal-300-rgb), 0.4);
  --color-btn-primary-text: var(--color-slate-900);
  --color-card-border: rgba(var(--color-gray-400-rgb), 0.15);
  --color-card-border-inner: rgba(var(--color-gray-400-rgb), 0.15);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  --color-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
  --color-select-caret: rgba(var(--color-gray-200-rgb), 0.8);

  /* Common style patterns - updated for dark mode */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for dark mode */
  --color-success-rgb: var(--color-teal-300-rgb);
  --color-error-rgb: var(--color-red-400-rgb);
  --color-warning-rgb: var(--color-orange-400-rgb);
  --color-info-rgb: var(--color-gray-300-rgb);
}

[data-color-scheme="light"] {
  /* RGB versions for opacity control (light mode) */
  --color-brown-600-rgb: 94, 82, 64;
  --color-teal-500-rgb: 33, 128, 141;
  --color-slate-900-rgb: 19, 52, 59;
  
  /* Semantic Color Tokens (Light Mode) */
  --color-background: var(--color-cream-50);
  --color-surface: var(--color-cream-100);
  --color-text: var(--color-slate-900);
  --color-text-secondary: var(--color-slate-500);
  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-primary-active: var(--color-teal-700);
  --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
  --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
  --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
  --color-border: rgba(var(--color-brown-600-rgb), 0.2);
  --color-btn-primary-text: var(--color-cream-50);
  --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
  --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
  --color-error: var(--color-red-500);
  --color-success: var(--color-teal-500);
  --color-warning: var(--color-orange-500);
  --color-info: var(--color-slate-500);
  --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);

  /* RGB versions for light mode */
  --color-success-rgb: var(--color-teal-500-rgb);
  --color-error-rgb: var(--color-red-500-rgb);
  --color-warning-rgb: var(--color-orange-500-rgb);
  --color-info-rgb: var(--color-slate-500-rgb);
}

/* Base styles */
html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
  scroll-behavior: smooth;
  /* Mobile optimizations */
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  margin: 0;
  padding: 0;
  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden;
  /* Better touch scrolling on iOS */
  -webkit-overflow-scrolling: touch;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--font-size-4xl);
}
h2 {
  font-size: var(--font-size-3xl);
}
h3 {
  font-size: var(--font-size-2xl);
}
h4 {
  font-size: var(--font-size-xl);
}
h5 {
  font-size: var(--font-size-lg);
}
h6 {
  font-size: var(--font-size-md);
}

p {
  margin: 0 0 var(--space-16) 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

code,
pre {
  font-family: var(--font-family-mono);
  font-size: calc(var(--font-size-base) * 0.95);
  background-color: var(--color-secondary);
  border-radius: var(--radius-sm);
}

code {
  padding: var(--space-1) var(--space-4);
}

pre {
  padding: var(--space-16);
  margin: var(--space-16) 0;
  overflow: auto;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  border: none;
  text-decoration: none;
  position: relative;
  /* Mobile touch improvements */
  min-height: var(--touch-target-min);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Button states with better mobile feedback */
.btn:active {
  transform: translateY(1px);
}

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

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

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

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-text);
}

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

.btn--secondary:active {
  background: var(--color-secondary-active);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

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

.btn--sm {
  padding: var(--space-4) var(--space-12);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  min-height: 36px; /* Smaller but still touch-friendly */
}

.btn--lg {
  padding: var(--space-10) var(--space-20);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
  min-height: 48px;
}

.btn--full-width {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Card component */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-standard);
  /* Mobile touch improvements */
  -webkit-tap-highlight-color: transparent;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Better mobile touch feedback */
@media (hover: none) and (pointer: coarse) {
  .card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  /* Enhanced mobile card spacing */
  .project-card, .blog-card, .contact-card {
    margin-bottom: 16px;
  }
  
  .project-card:last-child,
  .blog-card:last-child,
  .contact-card:last-child {
    margin-bottom: 0;
  }
  
  /* Mobile-specific enhanced card touch effects */
  .stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .stat-card:active {
    transform: scale(0.95);
  }
  
  .project-card:active,
  .blog-card:active {
    transform: scale(0.97);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.15);
  }
  
  .contact-card:active {
    transform: scale(0.96);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
  }
}

.card__body {
  padding: var(--space-16);
}

.card__header,
.card__footer {
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-card-border-inner);
}

/* Status indicators - simplified with CSS variables */
.status {
  display: inline-flex;
  align-items: center;
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.status--success {
  background-color: rgba(
    var(--color-success-rgb, 33, 128, 141),
    var(--status-bg-opacity)
  );
  color: var(--color-success);
  border: 1px solid
    rgba(var(--color-success-rgb, 33, 128, 141), var(--status-border-opacity));
}

.status--error {
  background-color: rgba(
    var(--color-error-rgb, 192, 21, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-error);
  border: 1px solid
    rgba(var(--color-error-rgb, 192, 21, 47), var(--status-border-opacity));
}

.status--warning {
  background-color: rgba(
    var(--color-warning-rgb, 168, 75, 47),
    var(--status-bg-opacity)
  );
  color: var(--color-warning);
  border: 1px solid
    rgba(var(--color-warning-rgb, 168, 75, 47), var(--status-border-opacity));
}

.status--info {
  background-color: rgba(
    var(--color-info-rgb, 98, 108, 113),
    var(--status-bg-opacity)
  );
  color: var(--color-info);
  border: 1px solid
    rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
}

/* Container layout */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-16);
  padding-left: var(--space-16);
}

@media (min-width: 640px) {
  .container {
    max-width: var(--container-sm);
  }
}
@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
  }
}
@media (min-width: 1024px) {
  .container {
    max-width: var(--container-lg);
  }
}
@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

/* Utility classes */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-4 {
  gap: var(--space-4);
}
.gap-8 {
  gap: var(--space-8);
}
.gap-16 {
  gap: var(--space-16);
}

.m-0 {
  margin: 0;
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-8 {
  margin-bottom: var(--space-8);
}

.p-0 {
  padding: 0;
}
.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.block {
  display: block;
}
.hidden {
  display: none;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Dark mode specifics */
[data-color-scheme="dark"] .btn--outline {
  border: 1px solid var(--color-border-secondary);
}

/* Removed external Perplexity font - using JetBrains Mono instead */

/* END PERPLEXITY DESIGN SYSTEM */
/* Enhanced Cybersecurity Portfolio with Rich Animations & Multi-Column Layouts */

/* Custom Color Palette */
:root {
  /* Primary Dark Theme Colors */
  --color-bg-primary: #0a0a0a;
  --color-bg-secondary: #1a1a1a;
  --color-bg-tertiary: #2a2a2a;
  --color-bg-card: #151515;

  /* Accent Colors */
  --color-electric-blue: #00d4ff;
  --color-electric-blue-dark: #0099cc;
  --color-crimson: #ff0051;
  --color-crimson-dark: #cc0040;

  /* Text Colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #b3b3b3;
  --color-text-muted: #808080;
  --color-text-accent: var(--color-electric-blue);

  /* Status Colors */
  --color-status-stable: #00ff41;
  --color-status-beta: #ffaa00;
  --color-status-alpha: #ff0051;
  --color-status-progress: #00d4ff;

  /* Border and Shadow */
  --color-border-primary: rgba(255, 255, 255, 0.1);
  --color-border-secondary: rgba(0, 212, 255, 0.2);
  --color-glow-blue: rgba(0, 212, 255, 0.3);
  --color-glow-red: rgba(255, 0, 81, 0.3);

  /* Typography */
  --font-family-mono: 'JetBrains Mono', 'Berkeley Mono', ui-monospace, monospace;

  /* Layout & Spacing */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --animation-fast: 0.15s;
  --animation-normal: 0.3s;
  --animation-slow: 0.6s;
  --animation-micro: 0.05s;
  --animation-ultra-smooth: 0.08s;
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-typing: cubic-bezier(0.4, 0, 0.2, 1);
}

/****************************
  BASE & TYPOGRAPHY
*****************************/
html {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-family-mono);
  font-size: 14px;
  line-height: 1.7;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--color-text-primary);
  cursor: none;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-mono);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.9rem; }
h4 { font-size: 1.4rem; }

p, li {
  color: var(--color-text-secondary);
  font-weight: 400;
}

a {
  color: var(--color-electric-blue);
  text-decoration: none;
  transition: all var(--animation-fast) var(--ease-out-cubic);
}

a:hover {
  color: var(--color-electric-blue-dark);
  text-shadow: 0 0 8px var(--color-glow-blue);
}

/****************************
  ANIMATED BACKGROUND
*****************************/
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  /* animation: grid-move 20s linear infinite; */
  z-index: -2;
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.08) 5%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(255, 0, 81, 0.06) 5%, transparent 50%),
              radial-gradient(ellipse at 40% 80%, rgba(0, 212, 255, 0.04) 5%, transparent 50%);
  animation: gradient-shift 8s ease-in-out infinite;
  z-index: -1;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

@keyframes gradient-shift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/****************************
  SPACING UTILITIES
*****************************/
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mt-40  { margin-top: 40px; }
.mt-48  { margin-top: 48px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mb-32  { margin-bottom: 32px; }
.mb-40  { margin-bottom: 40px; }
.mb-48  { margin-bottom: 48px; }
.ml-8   { margin-left: 8px; }
.ml-16  { margin-left: 16px; }

.py-24  { padding-top: 24px; padding-bottom: 24px; }
.py-16  { padding-top: 16px; padding-bottom: 16px; }
.py-32  { padding-top: 32px; padding-bottom: 32px; }
.py-40  { padding-top: 40px; padding-bottom: 40px; }
.py-48  { padding-top: 48px; padding-bottom: 48px; }

.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-40 { gap: 40px; }
.gap-48 { gap: 48px; }

/****************************
  ANIMATION KEYFRAMES
*****************************/
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--color-glow-blue); }
  50% { box-shadow: 0 0 20px var(--color-glow-blue), 0 0 30px var(--color-glow-blue); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
    letter-spacing: 0.1em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: -0.02em;
  }
}

/****************************
  ANIMATION CLASSES
*****************************/
.animate-fade-in {
  animation: fadeIn 0.8s var(--ease-out-cubic) forwards;
  opacity: 0;
}

.animate-slide-up {
  animation: slideInUp 0.8s var(--ease-out-cubic) forwards;
  opacity: 0;
}

.animate-slide-in {
  animation: slideInUp 0.6s var(--ease-out-cubic) forwards;
  opacity: 0;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s var(--ease-out-cubic) forwards;
  opacity: 0;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s var(--ease-out-cubic) forwards;
  opacity: 0;
}

.animate-slide-in-up {
  animation: slideInUp 0.6s var(--ease-out-cubic) forwards;
  opacity: 0;
}

.animate-title {
  animation: titleReveal 1s var(--ease-out-cubic) forwards;
  opacity: 0;
}

/****************************
  HEADER & NAV
*****************************/
.header-nav {
  position: fixed;
  top: 20px;
  left: 12px;
  right: 12px;
  z-index: 1000;
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(0.5px);
  border: 1px solid var(--color-border-primary);
  border-radius: 100px;
  transition: all var(--animation-normal) var(--ease-out-cubic);
  padding: 10px 28px !important;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--animation-fast) var(--ease-out-cubic);
}

.logo:hover {
  transform: scale(1.05);
  text-shadow: 0 0 10px var(--color-glow-blue);
}

.logo-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.logo__underscore {
  color: var(--color-electric-blue);
  animation: blink 1.5s infinite;
}

.nav__link {
  position: relative;
  padding: 10px 18px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--animation-fast) var(--ease-out-cubic);
  border-radius: var(--border-radius);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-electric-blue), var(--color-crimson));
  transition: width var(--animation-normal) var(--ease-out-cubic);
  transform: translateX(-50%);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-text-primary);
  background: rgba(0, 212, 255, 0.1);
  text-shadow: 0 0 8px var(--color-glow-blue);
}

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

/* Mobile Navigation Dropdown */
.nav-mobile {
  position: relative;
  display: none;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--color-border-primary);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--animation-fast) var(--ease-out-cubic);
}

.nav-dropdown-toggle:hover {
  background: rgba(0, 212, 255, 0.2);
  transform: translateY(-1px);
}

.nav-dropdown-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 18px;
  height: 14px;
}

.nav-dropdown-icon span {
  width: 100%;
  height: 2px;
  background: var(--color-electric-blue);
  border-radius: 1px;
  transition: all var(--animation-fast) var(--ease-out-cubic);
}

.nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-icon span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-icon span:nth-child(2) {
  opacity: 0;
}

.nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border-primary);
  border-radius: 12px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--animation-normal) var(--ease-out-cubic);
  z-index: 1001;
}

.nav-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu .nav__link {
  display: block;
  padding: 12px 16px;
  margin: 2px 0;
  border-radius: 8px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.nav-dropdown-menu .nav__link::after {
  display: none;
}

/****************************
  HERO SECTION
*****************************/
.hero {
  min-height: 100vh;
  /* Use CSS custom property for mobile viewport */
  min-height: calc(var(--vh, 1vh) * 100);
  position: relative;
  overflow: hidden;
}

.hero__typing {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(45deg, var(--color-electric-blue), var(--color-crimson), var(--color-electric-blue));
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-text 3s ease-in-out infinite;
  /* Performance optimizations for smooth typing */
  will-change: contents;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: opacity var(--animation-ultra-smooth) var(--ease-typing);
}

@keyframes gradient-text {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cursor { 
  color: var(--color-electric-blue);
  animation: smoothBlink 1.2s ease-in-out infinite;
  -webkit-text-fill-color: var(--color-electric-blue);
  display: inline-block;
  will-change: opacity, transform;
  backface-visibility: hidden;
}

.intro {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  max-width: 640px;
  line-height: 1.8;
  transition: opacity var(--animation-micro) var(--ease-smooth);
}

.quotes-container {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  margin: 8px 0;
  /* Optimizations for buttery smooth quote transitions */
  will-change: contents;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.cyber-quote {
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
  width: 100%;
  /* Enhanced performance for smooth typing */
  will-change: contents, opacity;
  backface-visibility: hidden;
}
  text-align: center;
}

.quote-text {
  font-style: italic;
  color: var(--color-text-secondary);
  font-size: 1.4rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.quote-text::before {
  content: '';
  font-size: 2rem;
  color: var(--color-electric-blue);
  position: absolute;
  left: -1.5rem;
  top: -0.5rem;
  font-family: serif;
}

.quote-text::after {
  content: '';
  font-size: 2rem;
  color: var(--color-electric-blue);
  position: absolute;
  right: -1.5rem;
  bottom: -0.5rem;
  font-family: serif;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  max-width: 600px;
}

/****************************
  MULTI-COLUMN LAYOUTS
*****************************/
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-bio {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.blog-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
}

.contact-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

.contact-channels-main {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.contact-channels-main ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-items: stretch;
  max-width: 100%;
  width: 100%;
}

.contact-channel {
  list-style: none;
  margin-bottom: 0;
  width: 100%;
}

.contact-card {
  padding: 8px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--border-radius);
  transition: all var(--animation-fast) var(--ease-out-cubic);
  position: relative;
  overflow: hidden;
  height: 60px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.15);
  border-color: var(--color-electric-blue);
  text-decoration: none;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-electric-blue), var(--color-neon-green));
  opacity: 0;
  transition: opacity var(--animation-fast);
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
  border-color: var(--color-electric-blue);
}

.contact-card:hover::before {
  opacity: 1;
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.contact-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 212, 255, 0.3);
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
  text-align: left;
}

.contact-name {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.contact-priority {
  color: var(--color-electric-blue);
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(0, 212, 255, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-block;
  margin-left: 4px;
}

.contact-handle {
  color: var(--color-text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  margin: 4px 0;
  font-weight: 500;
  line-height: 1.2;
  word-break: break-all;
}

.contact-description {
  color: var(--color-text-muted);
  font-size: 0.65rem;
  line-height: 1.2;
  margin: 1px 0;
}

/****************************
  GRID & CARD COMPONENTS
*****************************/
.tools-section {
  margin-top: 48px;
  width: 100%;
}

.tools-section h4 {
  color: var(--color-text-primary);
  font-size: 1.5rem;
  margin-bottom: 24px;
  text-align: center;
}

.stats-grid,
.tools-grid,
.projects-grid {
  display: grid;
  gap: 32px;
}

.stats-grid { 
  grid-template-columns: repeat(4, 1fr);
  max-width: 800px;
}

.tools-grid { 
  width: 100%;
  height: 150px;
  overflow: hidden;
  position: relative;
  background: transparent;
  border: none;
  border-radius: var(--border-radius);
  /* Hide scrollbars completely */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  padding: 10px 0;
}

.tools-grid::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

.tools-track {
  display: flex;
  gap: 20px;
  animation: scrollHorizontal 45s linear infinite;
  width: fit-content;
  padding: 15px 0;
  align-items: center;
}

.tools-track:hover {
  animation-play-state: paused;
}

.tool-item-marquee {
  min-width: 260px;
  width: 260px;
  height: 110px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-secondary));
  border: 1px solid var(--color-border-primary);
  border-radius: var(--border-radius);
  padding: 16px;
  position: relative;
  transition: all var(--animation-normal) var(--ease-out-cubic);
  overflow: hidden;
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tool-item-marquee:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--color-electric-blue);
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.2);
}

@keyframes scrollHorizontal {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.tool-item {
  transform-style: preserve-3d;
  animation: toolFloat 6s ease-in-out infinite;
  animation-delay: calc(var(--delay) * 0.2s);
}

.tool-level {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
}

.tool-level--expert {
  background: rgba(0, 255, 65, 0.2);
  color: var(--color-status-stable);
  border: 1px solid var(--color-status-stable);
}

.tool-level--advanced {
  background: rgba(0, 212, 255, 0.2);
  color: var(--color-electric-blue);
  border: 1px solid var(--color-electric-blue);
}

.tool-level--intermediate {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid #ffc107;
}

.tool-level--learning {
  background: rgba(255, 0, 81, 0.2);
  color: var(--color-crimson);
  border: 1px solid var(--color-crimson);
}

.tool-item:nth-child(odd) {
  animation: toolFloatReverse 8s ease-in-out infinite;
  animation-delay: calc(var(--delay) * 0.3s);
}

@keyframes toolFloat {
  0%, 100% { transform: translateY(0px) rotateZ(0deg); }
  25% { transform: translateY(-8px) rotateZ(1deg); }
  50% { transform: translateY(-4px) rotateZ(-0.5deg); }
  75% { transform: translateY(-12px) rotateZ(0.8deg); }
}

@keyframes toolFloatReverse {
  0%, 100% { transform: translateY(0px) rotateZ(0deg); }
  25% { transform: translateY(-10px) rotateZ(-1deg); }
  50% { transform: translateY(-6px) rotateZ(0.7deg); }
  75% { transform: translateY(-14px) rotateZ(-0.9deg); }
}

.projects-grid { 
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.project-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: rgba(0, 212, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.project-status span {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-meta {
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.8;
}

.project-meta span {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 3px;
}

.card,
.project-card,
.blog-card,
.stat-card,
.tool-item,
.tool-item-marquee,
.skill-item,
.cert-item,
.featured-post {
  background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-secondary));
  border: 1px solid var(--color-border-primary);
  border-radius: var(--border-radius);
  padding: 20px;
  position: relative;
  transition: all var(--animation-normal) var(--ease-out-cubic);
  overflow: hidden;
  /* Performance optimizations */
  will-change: transform, box-shadow, border-color;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.card::before,
.project-card::before,
.blog-card::before,
.stat-card::before,
.tool-item::before,
.tool-item-marquee::before,
.skill-item::before,
.featured-post::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  transition: left 0.5s ease-out;
}

/* Enhanced card hover effects - optimized for all card types */
.card:hover,
.project-card:hover,
.blog-card:hover,
.stat-card:hover,
.tool-item:hover,
.skill-item:hover,
.featured-post:hover {
  transform: translateY(-4px);
  border-color: var(--color-electric-blue);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

/* Special enhanced effects for project cards */
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-electric-blue);
  box-shadow: 0 12px 35px rgba(0, 212, 255, 0.25);
}

/* Special enhanced effects for blog cards */
.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-electric-blue);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15);
}

/* Special enhanced effects for stat cards */
.stat-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--color-electric-blue);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

/* Tool item marquee hover effects */
.tool-item-marquee:hover {
  transform: translateY(-2px);
  border-color: var(--color-electric-blue);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.15);
}

/* Make project cards fully clickable */
.project-card a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
  transition: all 0.3s ease;
}

.project-card a:hover {
  color: inherit;
}

.card:hover::before,
.project-card:hover::before,
.blog-card:hover::before,
.stat-card:hover::before,
.tool-item:hover::before,
.skill-item:hover::before,
.featured-post:hover::before {
  left: 100%;
}

/* Add glowing top border effect for all cards on hover */
.card::after,
.project-card::after,
.blog-card::after,
.stat-card::after,
.tool-item-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-electric-blue), var(--color-neon-green), var(--color-electric-blue));
  opacity: 0;
  transition: opacity var(--animation-fast) var(--ease-out-cubic);
}

.card:hover::after,
.project-card:hover::after,
.blog-card:hover::after,
.stat-card:hover::after,
.tool-item-marquee:hover::after {
  opacity: 1;
}

/****************************
  ENHANCED CARD ANIMATIONS
*****************************/

/* Optimized entrance animations for different card types */
@keyframes cardSlideInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardFadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cardSlideInRight {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Enhanced card entrance classes */
.card-entrance-up {
  animation: cardSlideInUp 0.6s var(--ease-out-cubic) forwards;
  opacity: 0;
}

.card-entrance-scale {
  animation: cardFadeInScale 0.5s var(--ease-out-cubic) forwards;
  opacity: 0;
}

.card-entrance-right {
  animation: cardSlideInRight 0.7s var(--ease-out-cubic) forwards;
  opacity: 0;
}

/* Staggered animation delays for card grids */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

.blog-card:nth-child(1) { animation-delay: 0.15s; }
.blog-card:nth-child(2) { animation-delay: 0.25s; }
.blog-card:nth-child(3) { animation-delay: 0.35s; }

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }

.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.15s; }
.contact-card:nth-child(3) { animation-delay: 0.2s; }
.contact-card:nth-child(4) { animation-delay: 0.25s; }

/* Tool items get individual stagger timing */
.tool-item-marquee:nth-child(odd) { 
  animation: float 6s ease-in-out infinite;
}
.tool-item-marquee:nth-child(even) { 
  animation: toolFloatReverse 6.5s ease-in-out infinite;
}

/****************************
  CUSTOM CURSOR
*****************************/
#cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background-color: var(--color-electric-blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: transform 0.1s ease-out;
}

#cursor-ring {
  position: fixed;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-electric-blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.55;
  transition: all 0.15s ease-out;
}

#cursor-trail {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--color-crimson);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.3;
  transition: all 0.2s ease-out;
}

/****************************
  BUTTONS WITH ANIMATIONS
*****************************/
.btn {
  font-family: var(--font-family-mono);
  font-weight: 600;
  padding: 12px 26px;
  border-radius: var(--border-radius);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--animation-fast) var(--ease-out-cubic);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  transition: left .5s ease-out;
}

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

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: linear-gradient(135deg, var(--color-electric-blue), var(--color-crimson));
  color: var(--color-text-primary);
  border-color: var(--color-electric-blue);
}

.btn--outline {
  background: transparent;
  color: var(--color-electric-blue);
  border-color: var(--color-electric-blue);
}

.btn--outline:hover {
  background: var(--color-electric-blue);
  color: var(--color-bg-primary);
}

.btn--sm { padding: 8px 18px; font-size: 0.875rem; }
.btn--full-width { width: 100%; }

.btn-glow {
  animation: glow 2s ease-in-out infinite;
}

.btn-pulse:hover {
  animation: pulse 1s ease-in-out infinite;
}

.btn-float {
  animation: float 3s ease-in-out infinite;
}

/****************************
  FORM CONTROLS
*****************************/
.form-control {
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-primary);
  color: var(--color-text-primary);
  border-radius: var(--border-radius);
  padding: 12px 14px;
  font-family: var(--font-family-mono);
  transition: all var(--animation-fast) var(--ease-out-cubic);
}

.form-control:focus {
  border-color: var(--color-electric-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3);
  background: var(--color-bg-secondary);
}

/****************************
  STATUS INDICATORS
*****************************/
.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.status--info {
  background: rgba(0, 212, 255, 0.2);
  color: var(--color-electric-blue);
  border: 1px solid var(--color-electric-blue);
}

.status--success {
  background: rgba(0, 255, 65, 0.2);
  color: var(--color-status-stable);
  border: 1px solid var(--color-status-stable);
}

/****************************
  BLOG COMPONENTS
*****************************/
#blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  margin-top: 24px;
}

.blog-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-primary);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
  height: fit-content;
  /* Performance optimizations */
  will-change: transform, box-shadow, border-color;
  backface-visibility: hidden;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-electric-blue);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15);
}

/* Enhanced blog card interactions */
.blog-card:hover .blog-header h4 a {
  color: var(--color-electric-blue);
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
  transition: all 0.3s ease;
}

.blog-card:hover .blog-tag {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--color-electric-blue);
  transform: scale(1.05);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.blog-tag {
  font-family: 'JetBrains Mono', monospace;
}

.featured-post {
  padding: 32px;
  min-height: 300px;
  background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg-tertiary));
}

.recent-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recent-post-item {
  padding: 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--border-radius);
  transition: all var(--animation-fast) var(--ease-out-cubic);
  cursor: pointer;
}

.recent-post-item:hover {
  border-color: var(--color-border-secondary);
  background: var(--color-bg-secondary);
}

.blog-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-tag {
  padding: 4px 12px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--color-border-secondary);
  border-radius: 16px;
  font-size: 0.75rem;
  color: var(--color-electric-blue);
  transition: all var(--animation-fast) var(--ease-out-cubic);
}

.topic-tag:hover {
  background: rgba(0, 212, 255, 0.2);
  transform: scale(1.05);
}

/****************************
  PGP & SECURITY COMPONENTS
*****************************/
.pgp-section {
  padding: 20px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--border-radius);
}

.pgp-code {
  background: var(--color-bg-tertiary);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--font-family-mono);
  font-size: 0.875rem;
  display: block;
  line-height: 1.4;
}

.security-notice {
  padding: 16px;
  background: rgba(255, 0, 81, 0.1);
  border: 1px solid rgba(255, 0, 81, 0.3);
  border-radius: var(--border-radius);
}

.security-text {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/****************************
  CMS INTERFACE
*****************************/
.cms-interface {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.cms-container {
  width: 90%;
  max-width: 1100px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: slideInUp 0.4s ease-out;
}

.cms-header {
  padding: 24px;
  border-bottom: 1px solid var(--color-border-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cms-content { flex: 1; display: flex; overflow: hidden; }

.cms-sidebar {
  flex: 0 0 280px;
  border-right: 1px solid var(--color-border-primary);
  padding: 24px;
  overflow-y: auto;
}

.cms-editor {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.cms-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.cms-post-item {
  padding: 12px 16px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--animation-fast) var(--ease-out-cubic);
}

.cms-post-item:hover { 
  background: var(--color-bg-card);
  border-color: var(--color-border-secondary);
}

.cms-post-form .form-group { margin-bottom: 24px; }

.hidden { display: none !important; }

/****************************
  RESPONSIVE DESIGN
*****************************/

/* Large tablet and small desktop adjustments */
@media (max-width: 1024px) {
  .about-grid,
  .blog-layout,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Container padding adjustments */
  .container {
    padding-right: var(--space-12);
    padding-left: var(--space-12);
  }
}

/* Tablet responsiveness */
@media (max-width: 768px) {
  /* Navigation improvements - better mobile header */
  .header-nav {
    position: fixed;
    top: 10px;
    left: 16px;
    right: 16px;
    padding: 8px 16px !important;
    border-radius: 12px;
  }
  
  /* Hide desktop nav, show mobile nav */
  .nav-desktop {
    display: none;
  }
  
  .nav-mobile {
    display: block;
  }
  
  .nav {
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .nav__link {
    padding: 6px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  /* Better header layout */
  .header-nav .container {
    align-items: center;
    justify-content: space-between;
  }
  
  /* Hero section optimizations - more centered */
  .hero {
    padding-top: 85px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  
  .hero__typing {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 16px;
  }
  
  .intro {
    font-size: 1rem;
    line-height: 1.6;
    padding: 0 24px;
    max-width: 500px;
    margin: 0 auto 32px auto;
  }
  
  /* Section spacing - better centering */
  section {
    padding: 48px 0 !important;
    text-align: center;
  }
  
  /* Container with better side spacing */
  .container {
    padding-right: 24px;
    padding-left: 24px;
    max-width: 600px;
  }
  
  /* Typography scaling - all centered */
  h3 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 24px;
  }
  
  h4 {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 20px;
  }
  
  /* Stats grid - smaller, more compact */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    justify-items: center;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .stat-card {
    padding: 16px 12px;
    text-align: center;
    border-radius: 12px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .stat-value {
    font-size: 1.8rem !important;
    margin-bottom: 8px;
  }
  
  .stat-label {
    font-size: 0.8rem !important;
  }
  
  /* Project and blog grids - better spacing */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .project-card {
    margin-bottom: 0;
    padding: 20px;
    border-radius: 12px;
  }
  
  /* Skills chart container - centered */
  .chart-container {
    height: 280px !important;
    max-width: 450px;
    margin: 0 auto;
  }
  
  /* About section grid - better centering */
  .about-grid {
    gap: 32px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .about-content {
    text-align: left;
  }
  
  .about-skills {
    text-align: center;
  }
  
  .about-skills h4 {
    text-align: center;
    margin-bottom: 20px;
  }
  
  /* Tools section improvements - perfectly centered */
  .tools-section {
    text-align: center;
    margin: 0 auto;
  }
  
  .tools-section h4 {
    margin-bottom: 24px;
  }
  
  .tools-grid {
    overflow: hidden;
    margin: 0 -24px;
    padding: 0 24px;
    height: 140px;
  }
  
  .tools-track {
    animation-duration: 45s;
    justify-content: center;
    gap: 16px;
  }
  
  .tool-item-marquee {
    min-width: 180px;
    flex-shrink: 0;
    text-align: center;
    padding: 12px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    margin: 8px 0;
  }
  
  /* Contact section improvements - perfectly centered */
  .contact-centered {
    padding: 0 24px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .contact-channels-main {
    display: flex;
    justify-content: center;
  }
  
  .contact-channels-main ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    justify-items: center;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .contact-card {
    height: 80px;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.2s ease;
  }
  
  .contact-card:hover {
    transform: translateY(-2px);
  }
  
  .contact-header {
    gap: 10px;
    justify-content: center;
  }
  
  .contact-icon {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
  
  .contact-name {
    font-size: 0.9rem;
  }
  
  /* Blog grid responsive - centered with spacing */
  #blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: center;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .blog-card {
    max-width: 100%;
    width: 100%;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 0;
  }
  
  /* Button improvements - centered */
  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    border-radius: 8px;
  }
  
  .hero__cta {
    flex-direction: column;
    gap: 16px;
    width: 100%;
    align-items: center;
    max-width: 300px;
    margin: 32px auto 0 auto;
  }
  
  .hero__cta .btn {
    width: 100%;
    max-width: 280px;
  }
  
  /* Disable custom cursor on mobile */
  body {
    cursor: auto;
  }
  
  #cursor-dot, #cursor-ring, #cursor-trail {
    display: none;
  }
  
  /* Improve quote section - perfectly centered */
  .quotes-container {
    padding: 0 24px;
    min-height: 80px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .quote-text {
    font-size: 1.2rem !important;
    line-height: 1.5 !important;
    min-height: 3.5em !important;
    height: auto !important;
  }
}

/* Medium screens - 2 column blog grid */
@media (max-width: 1024px) and (min-width: 769px) {
  #blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  /* Container adjustments - perfect centering */
  .container {
    padding-right: 20px;
    padding-left: 20px;
    max-width: 100%;
  }
  
  /* Header improvements - cleaner layout */
  .header-nav {
    top: 8px;
    left: 12px;
    right: 12px;
    padding: 8px 16px !important;
    border-radius: 12px;
  }
  
  /* Navigation ultra-compact layout */
  .nav {
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .nav__link {
    padding: 5px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  /* Hero section for mobile - perfectly centered */
  .hero {
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
  }
  
  .hero__typing {
    font-size: 1.7rem;
    padding: 0 20px;
    margin-bottom: 16px;
  }
  
  .intro {
    font-size: 0.95rem;
    padding: 0 20px;
    max-width: 350px;
    margin: 0 auto 24px auto;
  }
  
  /* Typography scaling - all perfectly centered */
  h3 {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 20px;
  }
  
  h4 {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 16px;
  }
  
  /* Section spacing - better flow */
  section {
    padding: 40px 0 !important;
    text-align: center;
  }
  
  /* Stats grid mobile - much smaller, single column */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .stat-card {
    padding: 12px 8px;
    text-align: center;
    border-radius: 10px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .stat-value {
    font-size: 1.5rem !important;
    margin-bottom: 6px;
    font-weight: 700;
  }
  
  .stat-label {
    font-size: 0.75rem !important;
    line-height: 1.2;
  }
  
  .stat-icon {
    font-size: 1.5rem !important;
    margin-bottom: 8px !important;
  }
  
  /* Skills chart mobile - compact */
  .chart-container {
    height: 220px !important;
    max-width: 340px;
    margin: 0 auto;
  }
  
  /* Tools section - perfectly centered, NO scrollbar */
  .tools-section {
    text-align: center;
    margin: 0 auto;
  }
  
  .tools-section h4 {
    margin-bottom: 20px;
  }
  
  .tools-grid {
    margin: 0 -20px;
    padding: 0 20px;
    overflow: hidden;
    height: 140px;
  }
  
  .tools-track {
    animation-duration: 60s;
    justify-content: center;
    gap: 12px;
  }
  
  .tool-item-marquee {
    min-width: 160px;
    text-align: center;
    padding: 10px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    margin: 6px 0;
  }
  
  .tool-header {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
  
  .tool-name {
    font-size: 0.85rem !important;
  }
  
  .tool-category {
    font-size: 0.65rem !important;
  }
  
  /* Projects grid - perfectly spaced */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 350px;
    margin: 0 auto;
  }
  
  .project-card {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 0;
  }
  
  /* Contact single column - beautifully centered */
  .contact-centered {
    padding: 0 20px;
    text-align: center;
    max-width: 320px;
    margin: 0 auto;
  }
  
  .contact-channels-main {
    display: flex;
    justify-content: center;
  }
  
  .contact-channels-main ul {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 280px;
    justify-items: center;
    margin: 0 auto;
  }
  
  .contact-card {
    height: 70px;
    padding: 12px;
    text-align: center;
    width: 100%;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
  }
  
  .contact-header {
    justify-content: center;
    gap: 8px;
  }
  
  .contact-icon {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
  
  .contact-name {
    font-size: 0.85rem;
  }
  
  /* Blog cards - perfectly centered with spacing */
  #blog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: center;
    max-width: 350px;
    margin: 0 auto;
  }
  
  .blog-card {
    max-width: 100%;
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 0;
  }
  
  /* Button improvements - centered */
  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
    border-radius: 8px;
  }
  
  /* Quote container mobile - perfectly centered */
  .quotes-container {
    padding: 0 20px;
    min-height: 100px;
    text-align: center;
    max-width: 350px;
    margin: 0 auto;
  }
  
  .quote-text {
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
    min-height: 4em !important;
  }
  
  /* About section mobile - better centering */
  .about-grid {
    gap: 24px;
    text-align: center;
    max-width: 350px;
    margin: 0 auto;
  }
  
  .about-content {
    text-align: left;
  }
  
  .about-bio {
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left;
  }
  
  /* Hero CTA perfectly centered */
  .hero__cta {
    align-items: center;
    padding: 0 20px;
    max-width: 280px;
    margin: 24px auto 0 auto;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .container {
    padding-right: 16px;
    padding-left: 16px;
  }
  
  /* Ultra-compact header */
  .header-nav {
    top: 6px;
    left: 8px;
    right: 8px;
    padding: 6px 12px !important;
    border-radius: 10px;
  }
  
  .logo {
    font-size: 1rem;
  }
  
  /* Hero perfectly centered */
  .hero {
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  
  .hero__typing {
    font-size: 1.5rem;
    padding: 0 16px;
    margin-bottom: 12px;
  }
  
  .intro {
    font-size: 0.85rem;
    padding: 0 16px;
    max-width: 280px;
    margin: 0 auto 20px auto;
  }
  
  /* Navigation ultra-compact */
  .nav {
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav__link {
    padding: 3px 6px;
    font-size: 0.7rem;
    margin: 1px;
    border-radius: 4px;
  }
  
  /* Typography perfectly scaled */
  h3 {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 16px;
  }
  
  h4 {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 12px;
  }
  
  /* Section spacing optimized */
  section {
    padding: 32px 0 !important;
    text-align: center;
  }
  
  /* Stats grid - ultra compact */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 260px;
    margin: 0 auto;
  }
  
  .stat-card {
    padding: 10px 6px;
    text-align: center;
    border-radius: 8px;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .stat-value {
    font-size: 1.3rem !important;
    margin-bottom: 4px;
    font-weight: 700;
  }
  
  .stat-label {
    font-size: 0.7rem !important;
    line-height: 1.1;
  }
  
  .stat-icon {
    font-size: 1.2rem !important;
    margin-bottom: 6px !important;
  }
  
  /* Quote section compact */
  .quotes-container {
    padding: 0 16px;
    min-height: 80px;
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .quote-text {
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    min-height: 3.5em !important;
  }
  
  /* Skills chart ultra compact */
  .chart-container {
    height: 200px !important;
    max-width: 290px;
    margin: 0 auto;
  }
  
  /* Tools ultra compact */
  .tools-grid {
    margin: 0 -16px;
    padding: 0 16px;
    height: 120px;
  }
  
  .tools-track {
    animation-duration: 70s;
    gap: 8px;
  }
  
  .tool-item-marquee {
    min-width: 140px;
    padding: 8px;
    margin: 4px 0;
  }
  
  .tool-name {
    font-size: 0.8rem !important;
  }
  
  .tool-category {
    font-size: 0.6rem !important;
  }
  
  /* Projects ultra compact */
  .projects-grid {
    max-width: 280px;
    margin: 0 auto;
    gap: 12px;
  }
  
  .project-card {
    padding: 12px;
    border-radius: 8px;
  }
  
  /* Contact ultra compact */
  .contact-centered {
    max-width: 260px;
    margin: 0 auto;
  }
  
  .contact-channels-main ul {
    max-width: 240px;
    gap: 8px;
  }
  
  .contact-card {
    height: 60px;
    padding: 8px;
  }
  
  .contact-icon {
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
  }
  
  .contact-name {
    font-size: 0.8rem;
  }
  
  /* Blog cards ultra compact */
  #blog-grid {
    max-width: 280px;
    margin: 0 auto;
    gap: 12px;
  }
  
  .blog-card {
    padding: 12px;
    border-radius: 8px;
  }
  
  /* About section ultra compact */
  .about-grid {
    max-width: 280px;
    margin: 0 auto;
    gap: 16px;
  }
  
  .about-bio {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  
  /* Hero CTA ultra compact */
  .hero__cta {
    max-width: 240px;
    margin: 20px auto 0 auto;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .hero__typing {
    font-size: 1.6rem;
    margin-bottom: 12px;
  }
  
  .intro {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
  
  section {
    padding: 24px 0 !important;
  }
  
  .quotes-container {
    min-height: 60px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 500px;
    margin: 0 auto;
    gap: 12px;
  }
  
  .stat-card {
    min-height: 70px;
    padding: 8px 6px;
  }
  
  .stat-value {
    font-size: 1.3rem !important;
  }
  
  .stat-label {
    font-size: 0.7rem !important;
  }
}

/* Perfect mobile centering utilities */
@media (max-width: 768px) {
  /* Ensure all content sections are perfectly centered */
  .hero,
  section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  /* Section content containers */
  .about-grid,
  .projects-grid,
  .tools-section,
  .contact-centered,
  #blog-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  /* Grid containers perfect centering */
  .stats-grid,
  .projects-grid,
  #blog-grid {
    justify-self: center;
    align-self: center;
  }
  
  /* Ensure proper spacing between elements */
  .hero > *,
  section > * {
    margin-left: auto;
    margin-right: auto;
  }
  
  /* Better section dividers */
  section + section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0;
    padding-top: 48px;
  }
}

/****************************
  ACCESSIBILITY & MOTION
*****************************/
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { 
    animation-duration: 0.01ms !important; 
    transition-duration: 0.01ms !important; 
    animation-iteration-count: 1 !important;
  }
  
  .bg-grid,
  .bg-gradient {
    animation: none;
  }
}

/* Buttery smooth blinking cursor animation for quotes */
@keyframes blink {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes smoothBlink {
  0%, 40% { 
    opacity: 1; 
    transform: scaleX(1);
  }
  45%, 55% { 
    opacity: 0.3; 
    transform: scaleX(0.8);
  }
  60%, 100% { 
    opacity: 1; 
    transform: scaleX(1);
  }
}

.cursor-blink {
  animation: smoothBlink 1.2s ease-in-out infinite;
  color: var(--color-electric-blue);
  font-weight: 300;
  display: inline-block;
  transition: all 0.1s ease-out;
  will-change: opacity, transform;
}

/* Enhanced styles for buttery smooth typing */
.quote-text {
  font-style: italic;
  transition: all var(--animation-ultra-smooth) var(--ease-smooth);
  will-change: opacity, transform;
  backface-visibility: hidden;
}

#typing-quote, #typed-text {
  transition: opacity var(--animation-micro) var(--ease-typing);
  will-change: contents, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Smooth text appearance optimization */
.typing-char-enter {
  animation: charFadeIn var(--animation-micro) var(--ease-typing) forwards;
}

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