: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:
    'FKGroteskNeue', 'Geist', '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: 13px; /* Was 11px */
  --font-size-sm: 14px; /* Was 12px */
  --font-size-base: 16px; /* Was 14px */
  --font-size-md: 18px; /* Was 14px */
  --font-size-lg: 20px; /* Was 16px */
  --font-size-xl: 24px; /* Was 18px */
  --font-size-2xl: 28px; /* Was 20px */
  --font-size-3xl: 34px; /* Was 24px */
  --font-size-4xl: 40px; /* Was 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;

  @media (max-width: 480px) {
    :root {
      --font-size-base: 15px;
      --font-size-md: 15px;
      --font-size-lg: 16px;
      --font-size-xl: 18px;
      --font-size-2xl: 20px;
      --font-size-3xl: 22px;
      --font-size-4xl: 28px;
    }
  }

  /* 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;
}

body {
  margin: 0;
  padding: 0;
}

*,
*::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;
}

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

.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);
}

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

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

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

/* Form elements */
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-8) var(--space-12);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

textarea.form-control {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
}

select.form-control {
  padding: var(--space-8) var(--space-12);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--select-caret-light);
  background-repeat: no-repeat;
  background-position: right var(--space-12) center;
  background-size: 16px;
  padding-right: var(--space-32);
}

/* Add a dark mode specific caret */
@media (prefers-color-scheme: dark) {
  select.form-control {
    background-image: var(--select-caret-dark);
  }
}

/* Also handle data-color-scheme */
[data-color-scheme='dark'] select.form-control {
  background-image: var(--select-caret-dark);
}

[data-color-scheme='light'] select.form-control {
  background-image: var(--select-caret-light);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: var(--focus-outline);
}

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.form-group {
  margin-bottom: var(--space-16);
}

/* 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);
}
.mx-8 {
  margin-left: var(--space-8);
  margin-right: var(--space-8);
}
.my-8 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.p-0 {
  padding: 0;
}
.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
.px-8 {
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}
.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
.px-16 {
  padding-left: var(--space-16);
  padding-right: 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);
}

@font-face {
  font-family: 'FKGroteskNeue';
  src: url('https://r2cdn.perplexity.ai/fonts/FKGroteskNeue.woff2')
    format('woff2');
}

/* Base Reset & Variables */
:root {
  --cyber-bg: #040608;
  --cyber-bg-secondary: #060810;
  --cyber-cyan: #00c8ff;
  --cyber-blue: #0066ff;
  --cyber-green: #3cffb3;
  --cyber-cyan-glow: rgba(0, 200, 255, 0.6);
  --cyber-cyan-soft: rgba(0, 200, 255, 0.15);
  --cyber-text: #ffffff;
  --cyber-text-dim: #a0a0a0;
  --cyber-glass: rgba(255, 255, 255, 0.08);
  --cyber-border: rgba(0, 200, 255, 0.25);

  --font-mono: 'JetBrains Mono', monospace;
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-liquid: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: var(--font-mono);
  background: var(--cyber-bg);
  color: var(--cyber-text);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* ✅ Prevent horizontal scroll */
}

body {
  position: relative;
  transition: opacity 0.4s var(--ease-out);
  background:
    radial-gradient(
      circle at 15% 40%,
      rgba(0, 100, 255, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 25%,
      rgba(0, 200, 255, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 30% 85%,
      rgba(0, 150, 255, 0.04) 0%,
      transparent 50%
    ),
    linear-gradient(135deg, #040608 0%, #060810 50%, #050709 100%);
  min-height: 100vh;
}

body.home {
  overflow: hidden;
  height: 100vh;
}

body.page-exit {
  opacity: 0.3;
}

body.fade-in {
  opacity: 0.3;
  animation: fadeIn 0.6s var(--ease-out) forwards;
}

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

/* Enhanced Floating Shapes and Particles */
.float-shape,
.float-particle {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  border-radius: 50%;
  will-change: transform, opacity; /* Hint browser for GPU acceleration */
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-play-state: running;
}

/* Float Shapes */
.float-shape {
  background: var(--cyber-cyan-glow);
  filter: blur(6px); /* Reduced from 8px for better perf */
  opacity: 0.3; /* Lowered opacity */
  max-width: 100vw;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce), (max-width: 600px) {
  /* Disable animations on mobile and reduced motion */
  .float-shape {
    display: none !important;
  }
}

/* Numbered Float Shapes */
.float-shape-1 {
  width: 15px;
  height: 15px;
  top: 25%;
  left: 8%;
  animation: float1 28s linear infinite;
}

.float-shape-2 {
  width: 12px;
  height: 12px;
  top: 65%;
  left: 85%;
  animation: float2 35s linear infinite;
}

.float-shape-3 {
  width: 18px;
  height: 18px;
  top: 85%;
  left: 25%;
  animation: float3 40s linear infinite;
}

.float-shape-4 {
  width: 14px;
  height: 14px;
  top: 35%;
  left: 75%;
  animation: float4 32s linear infinite;
}

.float-shape-5 {
  width: 8px;
  height: 8px;
  top: 95%;
  left: 55%;
  animation: float5 38s linear infinite;
}

.float-shape-6 {
  width: 16px;
  height: 16px;
  top: 10%;
  left: 92%;
  animation: float6 30s linear infinite;
}

/* Float Particles */
.float-particle {
  width: 6px;
  height: 6px;
  background: var(--cyber-cyan);
  opacity: 0.5; /* Lowered from 0.6 */
}

.float-particle-1 {
  top: 30%;
  left: 35%;
  animation: floatParticle1 45s linear infinite;
}

.float-particle-2 {
  top: 75%;
  left: 80%;
  animation: floatParticle2 40s linear infinite;
}

.float-particle-3 {
  top: 50%;
  left: 90%;
  animation: floatParticle3 50s linear infinite;
}

/* KEYFRAMES */

@keyframes float1 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(40px, -30px) rotate(90deg);
  }
  50% {
    transform: translate(-20px, 50px) rotate(180deg);
  }
  75% {
    transform: translate(-50px, -40px) rotate(270deg);
  }
}

@keyframes float2 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(-35px, 45px) rotate(120deg);
  }
  66% {
    transform: translate(50px, -25px) rotate(240deg);
  }
}

@keyframes float3 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(30px, -40px) rotate(72deg);
  }
  40% {
    transform: translate(-45px, 15px) rotate(144deg);
  }
  60% {
    transform: translate(25px, 55px) rotate(216deg);
  }
  80% {
    transform: translate(-30px, -35px) rotate(288deg);
  }
}

@keyframes float4 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(-40px, 35px) rotate(180deg);
  }
}

@keyframes float5 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(45px, 30px) rotate(90deg);
  }
  50% {
    transform: translate(-30px, -40px) rotate(180deg);
  }
  75% {
    transform: translate(-50px, 25px) rotate(270deg);
  }
}

@keyframes float6 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(35px, -50px) rotate(120deg);
  }
  66% {
    transform: translate(-40px, 30px) rotate(240deg);
  }
}

@keyframes floatParticle1 {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.5;
  }
  25% {
    transform: translate(120px, -60px);
    opacity: 0.7;
  }
  50% {
    transform: translate(-100px, 80px);
    opacity: 0.3;
  }
  75% {
    transform: translate(80px, -40px);
    opacity: 0.8;
  }
}

@keyframes floatParticle2 {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.4;
  }
  50% {
    transform: translate(-140px, -90px);
    opacity: 0.7;
  }
}

@keyframes floatParticle3 {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: translate(-50px, 70px);
    opacity: 0.3;
  }
  40% {
    transform: translate(100px, -30px);
    opacity: 0.8;
  }
  60% {
    transform: translate(-80px, -50px);
    opacity: 0.5;
  }
  80% {
    transform: translate(40px, 90px);
    opacity: 0.4;
  }
}

/* Optimized Grid Canvas */
#gridCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none; /* ✅ Prevent blocking clicks */
  will-change: transform; /* ✅ Hint GPU acceleration */
}

/* =========================
   TOP NAVIGATION - DESKTOP
   ========================= */

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: transparent;
  z-index: 1000;
  display: flex;
  align-items: center; /* ✅ Vertical centering */
  transition:
    background 0.4s var(--ease-liquid),
    backdrop-filter 0.4s ease;
}

.top-nav.scrolled {
  background: var(--cyber-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--cyber-border);
}

/* Subtle Glow Line */
.top-nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--cyber-cyan) 50%,
    transparent 100%
  );
  opacity: 0.8;
}

/* Container for brand + nav */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.8rem; /* ✅ Slightly reduced for better fit */
}

/* Brand */
.brand {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cyber-cyan);
  text-decoration: none;
  letter-spacing: 2px;
  transition: all 0.4s ease;
}

.glow-brand:hover {
  text-shadow:
    0 0 10px var(--cyber-cyan),
    0 0 20px var(--cyber-cyan),
    0 0 30px var(--cyber-cyan);
}

/* Nav items container */
.nav-right-section {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Nav list */
.nav-center {
  display: flex;
  list-style: none;
  gap: 1rem;
}

/* Nav Pill Buttons */
.nav-pill {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--cyber-text);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.nav-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 200, 255, 0.3),
    transparent
  );
  transition: left 0.6s ease;
}

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

.nav-pill:hover,
.nav-pill.active {
  border-color: var(--cyber-cyan);
  background: var(--cyber-cyan-soft);
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.4);
  color: var(--cyber-text);
  transform: translateY(-2px) scale(1.08);
}

.nav-pill.active {
  background: rgba(0, 200, 255, 0.2);
  box-shadow:
    0 0 25px rgba(0, 200, 255, 0.5),
    inset 0 0 20px rgba(0, 200, 255, 0.1);
}

/* ✅ Hide desktop nav on mobile */
@media (max-width: 768px) {
  .nav-right-section {
    display: none;
  }
}

/* Fixed right center positioning */
.social-icons {
  position: fixed;
  right: 25px; /* Slightly more spacing from edge */
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Increased gap for bigger icons */
  align-items: center;
  z-index: 1000;
}

/* Base icon container */
.social-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px; /* Increased size from 48px → 64px */
  height: 64px;
  border-radius: 50%;
  background: var(--cyber-glass);
  border: 2px solid var(--cyber-border);
  color: var(--cyber-cyan);
  text-decoration: none;
  overflow: hidden;
  transition: all 0.4s var(--ease-liquid);
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.1);
}

/* Glowing layer effect */
.social-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--cyber-cyan-glow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s var(--ease-liquid);
  z-index: -1;
}

.social-icon:hover {
  border-color: var(--cyber-cyan);
  color: var(--cyber-bg);
  box-shadow:
    0 0 25px var(--cyber-cyan-glow),
    0 0 50px rgba(0, 200, 255, 0.3);
  transform: translateY(-3px) scale(1.12);
}

.social-icon:hover::before {
  width: 140%; /* Larger glow spread */
  height: 140%;
}

/* Tooltip Styling */
.social-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 120%; /* Adjust for new size */
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 255, 255, 0.08);
  color: var(--cyber-cyan);
  font-size: 14px; /* Slightly bigger */
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  border: 1px solid var(--cyber-cyan);
  box-shadow: 0 0 10px var(--cyber-cyan-glow);
  z-index: 2;
}

.social-icon:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(-8px);
}

/* SVG styling inside icons */
.social-icon svg {
  width: 32px; /* Increased from 24px → 32px */
  height: 32px;
  transition: transform 0.4s var(--ease-liquid);
  z-index: 1;
}

.social-icon:hover svg {
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .social-icons {
    display: none; /* Hide on mobile */
  }
}

/* =========================
   MOBILE NAVIGATION & TOGGLE
   ========================= */

/* Mobile Toggle (Hamburger) */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(4, 6, 8, 0.85);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.mobile-toggle span {
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--cyber-cyan);
  transition: all 0.3s ease;
}

/* Default bar positions */
.mobile-toggle span:nth-child(1) {
  top: 10px;
}
.mobile-toggle span:nth-child(2) {
  top: 18px;
}
.mobile-toggle span:nth-child(3) {
  top: 26px;
}

/* Active (X) state */
.mobile-toggle.active span:nth-child(1) {
  top: 50%;
  transform: rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
  top: 50%;
  transform: rotate(-45deg);
}

/* Show only on mobile */
@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }
}

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 8, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-nav.active {
  opacity: 1;
  pointer-events: auto;
}

/* Nav content inside overlay */
.mobile-nav-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  text-align: center;
}

/* Mobile Links */
.mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin: 0;
  padding: 0;
}

.mobile-links a {
  position: relative;
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--cyber-text);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 500;
  transition: all 0.4s ease;
  overflow: hidden;
}

.mobile-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 200, 255, 0.3),
    transparent
  );
  transition: left 0.6s ease;
}

.mobile-links a:hover::before {
  left: 100%;
}

.mobile-links a:hover,
.mobile-links a.active {
  border-color: var(--cyber-cyan);
  background: var(--cyber-cyan-soft);
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.4);
  color: var(--cyber-text);
  transform: translateY(-2px) scale(1.08);
}

.mobile-links a.active {
  background: rgba(0, 200, 255, 0.2);
  box-shadow:
    0 0 25px rgba(0, 200, 255, 0.5),
    inset 0 0 20px rgba(0, 200, 255, 0.1);
}

/* Mobile Social Links */
.mobile-social {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.mobile-social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyber-cyan);
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--cyber-cyan);
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 500;
  width: 80%;
  justify-content: center;
  transition: all 0.3s ease;
}

.mobile-social-link:hover {
  background: var(--cyber-cyan);
  color: var(--cyber-bg);
}

/* Icons inside social links */
.mobile-social-link .social-svg {
  width: 20px;
  height: 20px;
}

.mobile-social-link .external-icon {
  width: 16px;
  height: 16px;
  margin-left: auto;
  stroke: currentColor;
  opacity: 0.8;
}

/* Brand Animation - Optimized */
.mobile-brand {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--cyber-cyan);
  letter-spacing: 2px;
  text-shadow:
    0 0 12px var(--cyber-cyan),
    0 0 24px rgba(0, 200, 255, 0.6);
  animation: neonPulse 3s ease-in-out infinite;
  will-change: text-shadow;
}

@keyframes neonPulse {
  0%,
  100% {
    text-shadow:
      0 0 8px var(--cyber-cyan),
      0 0 16px rgba(0, 200, 255, 0.4);
  }
  50% {
    text-shadow:
      0 0 12px var(--cyber-cyan),
      0 0 28px rgba(0, 200, 255, 0.6);
  }
}

/* Page Container - Enhanced Transitions */
.page-container,
.page {
  max-width: 100vw;
  overflow: hidden;
}

.page-container {
  position: relative;
  min-height: 100vh;
  padding-top: 64px;
}

.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  opacity: 0;
  visibility: hidden;
  transform: translateX(100px) scale(0.95);
  transition: all 0.8s var(--ease-liquid);
}

.page.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.page.exiting {
  opacity: 0;
  transform: translateX(-100px) scale(0.95);
  transition: all 0.6s var(--ease-liquid);
}

/* ===========================
   HOME PAGE LAYOUT
   =========================== */
#home-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 2rem;
  position: relative;
  min-height: 100vh;
  height: auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  max-width: 1200px;
  width: 100%;
  flex: 1;
  min-height: 0;
}

/* Tablet / smaller laptops */
@media (max-width: 1200px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-heading {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
  }
}

/* ===========================
   HERO HEADING
   =========================== */
.hero-left {
  display: flex;
  justify-content: center;
}

.hero-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.hero-heading span {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  filter: blur(4px);
  animation: revealWord 0.9s ease-out forwards;
  display: inline-block;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.2);
}

.hero-heading span:nth-child(1) {
  animation-delay: 0.1s;
}
.hero-heading span:nth-child(2) {
  animation-delay: 0.3s;
}
.hero-heading span:nth-child(3) {
  animation-delay: 0.5s;
}
.hero-heading span:nth-child(4) {
  animation-delay: 0.7s;
}
.hero-heading span:nth-child(5) {
  animation-delay: 0.9s;
}

@keyframes revealWord {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ===========================
   AVATAR RING + ANIMATIONS
   =========================== */
.avatar-ring {
  position: relative;
  width: clamp(250px, 70vw, 360px);
  height: clamp(250px, 70vw, 360px);
  margin-inline: auto;
  margin-top: 2rem;
  border-radius: 50%;
  border: 4px solid var(--cyber-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ringPulse 6s infinite ease-in-out;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.4);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  perspective: 1000px;
}

.avatar-ring.tilted {
  transform: rotateX(var(--rotateX)) rotateY(var(--rotateY)) scale(1.05);
  box-shadow: 0 0 50px rgba(0, 200, 255, 0.5);
}

.avatar-placeholder {
  width: 88%;
  height: 88%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-placeholder::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.07),
    transparent
  );
  animation: shimmer 10s linear infinite;
  z-index: 1;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 2;
}

/* Avatar animations */
@keyframes ringPulse {
  0%,
  100% {
    box-shadow: 0 0 40px rgba(0, 200, 255, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 70px rgba(0, 200, 255, 0.25);
    transform: scale(1.04);
  }
}

@keyframes shimmer {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.floating-avatar {
  animation: floatingAvatar 7s ease-in-out infinite;
}

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

/* Responsive avatar tweaks */
@media (max-width: 768px) {
  .avatar-ring {
    width: 280px;
    height: 280px;
    margin-top: 2rem;
    transform: translateY(20px);
  }
  .avatar-ring.tilted {
    transform: rotateX(var(--rotateX)) rotateY(var(--rotateY)) scale(1.02)
      translateY(20px);
  }
}

@media (max-width: 480px) {
  .avatar-ring {
    width: 250px;
    height: 250px;
    margin-top: 3rem;
  }
  .avatar-ring.tilted {
    transform: rotateX(calc(var(--rotateX) / 1.5))
      rotateY(calc(var(--rotateY) / 1.5)) scale(1.02) translateY(30px);
  }
}

/* ===========================
   HERO TEXT (RIGHT SIDE)
   =========================== */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-headline {
  font-size: clamp(2.2rem, 3.2vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--cyber-text);
  word-break: break-word;
}

/* Sweet spot for 14-inch laptops 
@media (min-width: 1280px) and (max-width: 1500px) {
  .hero-headline {
    font-size: clamp(1.8rem, 2.8vw, 3rem);
  }
}*/

.no-wrap {
  white-space: nowrap;
}

.name-highlight {
  color: var(--cyber-blue);
  text-shadow: 0 0 10px var(--cyber-blue);
}

.matrix-text {
  display: inline-block;
}

.tagline {
  /* font-size: 1rem; */
  color: var(--cyber-text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

/* For mid-sized screens like 14-inch laptops (~1366px width) */
@media (max-width: 1400px) {
  .tagline {
    max-width: 600px; /* adjust until it fits nicely */
    white-space: normal; /* ensures text wraps */
    word-wrap: break-word; /* breaks long words if needed */
  }
}

.typewriter-container {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--cyber-cyan);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 3rem;
}

.typewriter-text {
  text-shadow: 0 0 8px var(--cyber-cyan);
}

.cursor {
  font-weight: 300;
  animation: blink 1s infinite;
}

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

/* === Stats Counters - Elevated Section === */
.stats-counters {
  display: flex;
  align-items: center;
  gap: 2rem;
  position: absolute;
  bottom: 8vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;

  background: rgba(4, 6, 8, 0.8);
  backdrop-filter: blur(15px);
  padding: 1.2rem 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--cyber-border);
  box-shadow: 0 8px 25px rgba(0, 200, 255, 0.2);

  min-height: 80px;
}

.counter-item {
  text-align: center;
}

.counter-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;

  color: var(--cyber-cyan);
  text-shadow: 0 0 8px var(--cyber-cyan);
  min-width: 3ch; /* enough space for up to 3 digits */
  text-align: center;
}

.counter-label {
  font-size: 0.75rem;
  color: var(--cyber-text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.counter-separator {
  font-size: 2rem;
  font-weight: 300;
  color: var(--cyber-text-dim);
}

/* LinkedIn CTA Button */
.cta-container {
  margin-bottom: 2rem;
}

.linkedin-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border: 1px solid var(--cyber-border);
  border-radius: 12px;
  color: var(--cyber-text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.5s var(--ease-liquid);
  position: relative;
  overflow: hidden;
  will-change: transform, background, box-shadow;
}

.linkedin-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 200, 255, 0.3),
    transparent
  );
  transition: left 0.6s var(--ease-liquid);
}

.linkedin-cta:hover::before {
  left: 100%;
}

.linkedin-cta:hover {
  background: rgba(0, 200, 255, 0.15);
  border-color: var(--cyber-cyan);
  box-shadow:
    0 0 25px rgba(0, 200, 255, 0.4),
    0 8px 20px rgba(0, 200, 255, 0.2);
  transform: translateY(-3px) scale(1.05);
}

.animated-arrow {
  transition: transform 0.5s var(--ease-liquid);
  will-change: transform;
}

.linkedin-cta:hover .animated-arrow {
  transform: translateX(5px) rotate(10deg);
  animation: arrowPulse 1s infinite;
}

@keyframes arrowPulse {
  0%,
  100% {
    transform: translateX(5px) rotate(10deg) scale(1);
  }
  50% {
    transform: translateX(8px) rotate(10deg) scale(1.1);
  }
}

/* Other Pages - Fixed Scroll */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
}

.page:not(#home-page) {
  position: relative;
  overflow-y: auto;
  min-height: calc(100vh - 64px);
}

.page:not(#home-page).active {
  position: static;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--cyber-cyan);
  text-align: center;
  margin-bottom: 3rem;
  text-shadow: 0 0 8px var(--cyber-cyan);
}

.matrix-title .matrix-text {
  display: inline-block;
}

/* Enhanced Animations for Coming Soon */
.glitch-text {
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%,
  100% {
    transform: translate(0);
    text-shadow: 0 0 10px var(--cyber-cyan);
  }
  10% {
    transform: translate(-2px, -2px);
    text-shadow:
      2px 2px 0 #ff0000,
      -2px -2px 0 #00ff00;
  }
  20% {
    transform: translate(2px, 2px);
    text-shadow:
      -2px -2px 0 #ff0000,
      2px 2px 0 #00ff00;
  }
  30% {
    transform: translate(-2px, 2px);
    text-shadow:
      2px -2px 0 #ff0000,
      -2px 2px 0 #00ff00;
  }
  40% {
    transform: translate(2px, -2px);
    text-shadow:
      -2px 2px 0 #ff0000,
      2px -2px 0 #00ff00;
  }
  50% {
    transform: translate(0);
    text-shadow: 0 0 15px var(--cyber-cyan);
  }
}

.bounce-text {
  animation: bounce 2s infinite;
}

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

/* About Page */
.about-intro {
  text-align: center;
  font-size: 1.125rem;
  color: var(--cyber-text-dim);
  max-width: 800px;
  margin: 0 auto 4rem;
  line-height: 1.8;
}

.section-block {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cyber-text);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === SECTION TITLES === */
.section-title-centered {
  font-size: 2rem; /* Bigger for emphasis */
  font-weight: 700;
  color: var(--cyber-cyan);
  text-align: center; /* ✅ Center alignment */
  margin-top: 3rem;
  margin-bottom: 2rem;
  letter-spacing: 1px;
  text-transform: uppercase; /* Optional for a bold look */
  position: relative;
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--cyber-border);
}

.timeline-item {
  position: relative;
  padding: 0 0 3rem 60px;
}

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 8px;
  width: 18px;
  height: 18px;
  background: var(--cyber-cyan);
  border-radius: 50%;
  border: 3px solid var(--cyber-bg);
  box-shadow: 0 0 15px var(--cyber-cyan-glow);
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  box-shadow:
    0 0 25px rgba(0, 200, 255, 0.8),
    0 0 50px rgba(0, 200, 255, 0.4);
  transform: scale(1.2);
}

.timeline-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cyber-cyan);
  margin-bottom: 0.5rem;
}

.timeline-content .company {
  color: var(--cyber-text);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.timeline-content .duration {
  color: var(--cyber-text-dim);
  font-size: 0.875rem;
  margin-bottom: 1.2rem; /* More spacing for clarity */
}

/* Subtitles for Key Achievements & Responsibilities */
.timeline-content .sub-title {
  font-size: 0.85rem; /* Smaller for hierarchy */
  color: var(--cyber-cyan);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}

/* Description lists */
.timeline-content .description {
  color: var(--cyber-text-dim);
  line-height: 1.6;
  font-size: 0.95rem;
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.timeline-content .description li {
  margin-bottom: 0.6rem;
  position: relative;
  padding-left: 0.8rem;
}

.timeline-content .description li::before {
  content: '•';
  color: var(--cyber-cyan);
  position: absolute;
  left: -0.8rem;
}

/* === UNIVERSAL GRID === */
.card-grid,
.cert-grid,
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  column-gap: 1rem;
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  padding: 0;
  justify-items: center;
}

@media (max-width: 1024px) {
  .card-grid,
  .cert-grid,
  .compliance-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .card-grid,
  .cert-grid,
  .compliance-grid {
    grid-template-columns: 1fr;
  }
}

/* === Base Card Styles === */
.card,
.compliance-item {
  position: relative;
  overflow: hidden;
  background: rgba(10, 15, 25, 0.7);
  border: 1px solid var(--cyber-border);
  border-radius: 12px;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.08);
  width: 100%;
  max-width: 320px;
  min-height: 140px;
  padding: 1.5rem;
}

/* === Card Icons === */
.card-icon {
  width: 150px;
  height: 90px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(64%) sepia(33%) saturate(430%)
    hue-rotate(140deg) brightness(95%) contrast(90%);
  transition:
    filter 0.4s ease,
    transform 0.4s ease;
  z-index: 1;
}

.card:hover,
.compliance-item:hover {
  background: rgba(0, 200, 255, 0.2);
  transform: scale(1.05);
  border-color: var(--cyber-cyan);
  box-shadow: 0 0 22px rgba(0, 200, 255, 0.3);
  backdrop-filter: blur(12px);
}

.card:hover .card-icon {
  filter: none;
  transform: scale(1.1);
}

/* === Certification Cards (Circular Design) === */
.cert-card {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background:
    repeating-linear-gradient(
      45deg,
      /* Diagonal stripes */ rgba(0, 0, 0, 0.15) 0px,
      /* Dark transparent stripe */ rgba(0, 0, 0, 0.15) 8px,
      /* Stripe width */ transparent 8px,
      transparent 16px /* Gap between stripes */
    ),
    radial-gradient(
      circle at center,
      rgba(0, 200, 255, 0.18),
      rgba(0, 0, 0, 0.35)
    );
  border: 3px dashed var(--cyber-cyan);
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.25);
  transition:
    background 0.4s ease,
    transform 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem;
}

.cert-card:hover {
  background:
    repeating-linear-gradient(
      45deg,
      /* Diagonal stripes */ rgba(0, 0, 0, 0.15) 0px,
      rgba(0, 0, 0, 0.15) 8px,
      transparent 8px,
      transparent 16px
    ),
    radial-gradient(
      circle at center,
      rgba(0, 200, 255, 0.28),
      rgba(0, 0, 0, 0.4)
    );
  transform: scale(1.08);
  box-shadow: 0 0 28px rgba(0, 200, 255, 0.5);
}

.cert-logo {
  width: 80%;
  height: auto;
  object-fit: contain;
  transition: transform 0.4s ease;
  z-index: 2;
}

.cert-card:hover .cert-logo {
  transform: scale(1.1);
}

@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* === Compliance Items === */
.compliance-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(10, 15, 25, 0.7);
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.08);
}

.compliance-badge {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyber-cyan);
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.compliance-info h4 {
  color: var(--cyber-cyan);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.compliance-info p {
  color: var(--cyber-text-dim);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

/* === ROLES GRID === */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(320px, 1fr)
  ); /* Balanced width */
  gap: 0.6rem; /* Minimal spacing */
  max-width: 900px; /* Prevents too wide layout */
  margin: 0 auto 1.5rem;
  justify-items: center;
  padding: 0;
}

@media (max-width: 1024px) {
  .roles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .roles-grid {
    grid-template-columns: 1fr;
  }
}

/* === Roles Card === */
.roles-item {
  position: relative;
  overflow: hidden;
  background: rgba(10, 15, 25, 0.75);
  border: 1px solid var(--cyber-border);
  border-radius: 14px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align text properly */
  justify-content: center;
  text-align: left;
  padding: 1.2rem 1.5rem;
  width: 100%;
  max-width: 420px; /* Restrict individual card width */
  min-height: 130px;
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.08);
  backdrop-filter: blur(6px);
}

.roles-item:hover {
  background: rgba(0, 200, 255, 0.15);
  transform: scale(1.02);
  border-color: var(--cyber-cyan);
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.25);
}

/* === Roles Info === */
.roles-info h4 {
  color: var(--cyber-cyan);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.roles-info p {
  color: var(--cyber-text-dim);
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
}

.dynamic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  justify-items: center;
  justify-content: center; /* ensures centering when columns change dynamically */
}

.center-row {
  display: flex;
  justify-content: center;
  gap: 1.2rem; /* same as grid gap */
  width: 100%;
  margin-top: 1.2rem;
}

/* ✅ On mobile, force full-width stacking */
@media (max-width: 640px) {
  .dynamic-grid {
    display: grid !important; /* Override JS flex */
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 1rem;
  }

  .center-row {
    display: grid !important; /* Override flex row */
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
  }

  .card,
  .cert-card,
  .compliance-item {
    max-width: 90%; /* ✅ Prevent full bleed */
  }
  .card.animate-in,
  .cert-card.animate-in,
  .compliance-item.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  /* Hover effect remains the same as desktop */
  .card.animate-in:hover,
  .cert-card.animate-in:hover,
  .compliance-item.animate-in:hover {
    background: rgba(0, 200, 255, 0.2);
    transform: scale(1.05);
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 22px rgba(0, 200, 255, 0.3);
    backdrop-filter: blur(12px);
  }

  .card.animate-in:hover .card-icon,
  .cert-card.animate-in:hover .cert-logo {
    filter: none;
    transform: scale(1.1);
  }
}
/* Coming Soon */
.coming-soon {
  text-align: center;
  padding: 4rem 0;
}

.coming-soon-text {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--cyber-cyan);
  margin-bottom: 2rem;
  text-shadow: 0 0 15px var(--cyber-cyan);
  letter-spacing: 2px;
}

.coming-soon-desc {
  white-space: normal; /* Allow wrapping */
  overflow: visible; /* No hidden text */
  display: block;
  width: 100%; /* Full width */
  text-align: center; /* Center the text */
  font-size: 1rem; /* Adjust as needed */
  line-height: 1.5; /* Better readability */
  max-width: 700px; /* Optional: Limit width for nicer layout */
  margin: 0 auto; /* Center horizontally */
}

/* === EVENTS GRID === */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* === EVENT CARD === */
.event-card {
  background: var(--cyber-glass);
  border: 1px solid var(--cyber-border);
  border-radius: 12px;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  cursor: pointer;
  position: relative;
}

.event-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--cyber-cyan);
  box-shadow: 0 10px 30px rgba(0, 200, 255, 0.25);
}

/* === IMAGE PLACEHOLDER === */
.event-image-placeholder {
  height: 200px; /* Larger viewport */
  background: linear-gradient(
    135deg,
    var(--cyber-cyan-soft),
    rgba(0, 200, 255, 0.15)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.event-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.event-card:hover .event-img {
  transform: scale(1.08);
}

/* === EVENT CONTENT === */
.event-content {
  padding: 1.25rem 1.5rem;
}

.event-header h3 {
  color: var(--cyber-cyan);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  transition: color 0.3s ease;
}

.event-card:hover .event-header h3 {
  color: var(--cyber-cyan-bright);
}

/* === META INFO === */
.event-meta {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  color: var(--cyber-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.event-date {
  color: var(--cyber-cyan);
  font-weight: 500;
}

/* === TOPIC & DESCRIPTION === */
.event-topic {
  color: var(--cyber-text);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.event-description {
  color: var(--cyber-text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* === Front Page Grid for Cert Prep (Updated Effects) === */
.lens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  justify-items: center; /* Align like universal grid */
}

.lens-card {
  position: relative;
  overflow: hidden;
  background: rgba(10, 15, 25, 0.7); /* Same as universal cards */
  border: 1px solid var(--cyber-border);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
  transition: all 0.4s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px); /* Match universal glass look */
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.08);
  width: 100%;
  max-width: 320px;
  min-height: 200px; /* Balanced with image size */
}

/* Hover Effect: Matches .card hover */
.lens-card:hover {
  background: rgba(0, 200, 255, 0.2);
  transform: scale(1.05);
  border-color: var(--cyber-cyan);
  box-shadow: 0 0 22px rgba(0, 200, 255, 0.3);
  backdrop-filter: blur(12px);
}

/* Image Style (like card-icon) */
.lens-img {
  width: 150px;
  height: 120px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(64%) sepia(33%) saturate(430%)
    hue-rotate(140deg) brightness(95%) contrast(90%);
  transition:
    filter 0.4s ease,
    transform 0.4s ease;
  margin-bottom: 1rem;
}

.lens-card:hover .lens-img {
  filter: none;
  transform: scale(1.1);
}

/* Title Styling */
.lens-title {
  color: var(--cyber-cyan);
  font-size: 1.3rem;
  font-weight: 600;
}

/* Article Pill Button */
.article-pill {
  text-align: center;
  margin: 1.5rem 0;
}

/* === Glass Effect Buttons === */
.pill-btn,
.back-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.8rem 2.2rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cyber-cyan);
  letter-spacing: 1px;
  border-radius: 40px;
  background: rgba(10, 20, 30, 0.4);
  border: 1px solid rgba(0, 200, 255, 0.4);
  backdrop-filter: blur(12px);
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
  transition:
    color 0.4s ease,
    border-color 0.4s ease,
    transform 0.4s ease;
  will-change: transform, box-shadow;
}

/* Liquid gradient */
.pill-btn::before,
.back-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(0, 200, 255, 0.2),
    rgba(0, 255, 255, 0.4),
    rgba(0, 200, 255, 0.2)
  );
  background-size: 200% 200%;
  animation: liquidMove 6s ease-in-out infinite;
  z-index: 0;
  opacity: 0.4;
}

@keyframes liquidMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Content layering */
.pill-btn span,
.back-btn span,
.pill-btn .animated-arrow,
.back-btn .animated-arrow {
  position: relative;
  z-index: 2;
}

/* Arrow styling */
.animated-arrow {
  transition: transform 0.5s var(--ease-liquid);
  will-change: transform;
}

/* Hover Effects */
.pill-btn:hover,
.back-btn:hover {
  color: #fff;
  border-color: var(--cyber-cyan);
  box-shadow:
    0 0 25px rgba(0, 200, 255, 0.3),
    inset 0 0 10px rgba(0, 200, 255, 0.3);
  transform: translateY(-3px) scale(1.05);
}

/* Pill Button Arrow (Right) Animation (Pulse) */
.pill-btn:hover .animated-arrow {
  transform: translateX(6px);
  animation: arrowPulse 1s infinite;
}

@keyframes arrowPulse {
  0%,
  100% {
    transform: translateX(6px) scale(1);
  }
  50% {
    transform: translateX(9px) scale(1.1);
  }
}

/* Back Button Arrow (Straight Left) One-Time Slide */
.back-btn:hover .animated-arrow.left {
  animation: arrowSlideLeft 0.6s forwards;
}

@keyframes arrowSlideLeft {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-8px);
  }
  100% {
    transform: translateX(0);
  }
}

/* === Responsive Adjustments === */

/* ✅ Tablets */
@media (max-width: 1024px) {
  .back-btn {
    padding: 0.55rem 1.2rem;
    font-size: 0.95rem;
    gap: 0.5rem;
  }

  .back-btn .animated-arrow {
    width: 16px;
    height: 16px;
  }
}

/* ✅ Small Phones */
@media (max-width: 480px) {
  .back-btn {
    padding: 0.5rem 1rem; /* ✅ Tighter for mobile */
    font-size: 0.9rem;
    gap: 0.4rem;
    border-radius: 30px; /* ✅ Slightly smaller radius */
    margin: 0.8rem 0 1.2rem 0;
  }

  .back-btn span {
    white-space: nowrap; /* ✅ Prevents wrapping */
  }

  .back-btn .animated-arrow {
    width: 14px;
    height: 14px;
  }
}

/* Tron Overlay */
.tron-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 9999;
}

.tron-overlay.active {
  opacity: 1;
}

/* Grid Background */
.tron-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 255, 255, 0.15) 0px,
      rgba(0, 255, 255, 0.15) 1px,
      transparent 1px,
      transparent 50px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 255, 255, 0.15) 0px,
      rgba(0, 255, 255, 0.15) 1px,
      transparent 1px,
      transparent 50px
    );
  background-size: 50px 50px;
  opacity: 0.2;
  animation: gridMove 12s linear infinite;
}

@keyframes gridMove {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(50px);
  }
}

/* Welcome Message */
.tron-message {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'TRON', sans-serif;
  color: #0ff;
  font-size: 2rem;
  font-weight: bold;
  text-shadow:
    0 0 25px #0ff,
    0 0 50px #0ff;
  opacity: 0;
  animation: messageDrop 3s ease forwards;
  z-index: 5;
}

@keyframes messageDrop {
  0% {
    top: -100px;
    opacity: 0;
  }
  30% {
    top: 30%;
    opacity: 1;
  }
  70% {
    top: 30%;
    opacity: 1;
  }
  100% {
    top: -100px;
    opacity: 0;
  }
}

/* Bikes */
.tron-bike {
  position: absolute;
  top: 60%;
  display: flex;
  align-items: center;
  transform: translateX(0);
  transition: transform 3s linear;
  z-index: -1;
}

.tron-bike.left {
  left: 0;
  color: #0ff;
}
.tron-bike.right {
  right: 0;
  color: #ff6600;
}

/* Bike Body */
.bike-body {
  width: 70px;
  height: 16px;
  background: currentColor;
  border-radius: 8px;
  box-shadow:
    0 0 20px currentColor,
    0 0 40px currentColor;
  margin: 0 8px;
}

/* Trails */
.trail {
  position: absolute;
  top: calc(60% + 18px);
  height: 6px;
  opacity: 0.9;
  box-shadow:
    0 0 20px currentColor,
    0 0 50px currentColor;
  transition: width 3s linear;
  z-index: -1;
}

.trail.cyan {
  background: #0ff;
  color: #0ff;
}
.trail.orange {
  background: #ff6600;
  color: #ff6600;
}

/* ===== CYBER LIQUID GLASS BUTTON ===== */
.liquidGlass-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 3rem;
  background: rgba(10, 20, 30, 0.35);
  border: 1px solid rgba(0, 200, 255, 0.4);
  box-shadow:
    0 6px 10px rgba(0, 0, 0, 0.25),
    inset 0 0 10px rgba(0, 200, 255, 0.2);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Hover Expansion */
.liquidGlass-wrapper:hover {
  transform: scale(1.05);
  box-shadow:
    0 10px 20px rgba(0, 200, 255, 0.35),
    inset 0 0 15px rgba(0, 200, 255, 0.3);
}

/* Distortion Effect Layer */
.liquidGlass-effect {
  position: absolute;
  inset: 0;
  filter: url(#glass-distortion);
  background: rgba(0, 200, 255, 0.05);
  z-index: 0;
}

/* Subtle Tint */
.liquidGlass-tint {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  z-index: 1;
}

/* Shine effect */
.liquidGlass-shine {
  position: absolute;
  inset: 0;
  box-shadow:
    inset 2px 2px 1px rgba(255, 255, 255, 0.5),
    inset -2px -2px 1px rgba(255, 255, 255, 0.3);
  z-index: 2;
}

/* Button Text */
.liquidGlass-text {
  position: relative;
  z-index: 3;
  font-size: 1.2rem;
  color: var(--cyber-cyan);
  font-weight: 600;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.liquidGlass-wrapper:hover .liquidGlass-text {
  color: #fff;
}

.cyber-footer {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 9999;
  font-family: 'Orbitron', sans-serif;
}

/* === Info Button (Desktop Default) === */
.info-button {
  display: flex;
  align-items: center;
  background: #000;
  border: 1px solid var(--cyber-cyan);
  border-radius: 50px;
  height: 32px;
  max-width: 32px; /* Circle by default */
  transition:
    max-width 0.4s ease,
    box-shadow 0.4s ease;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(0, 200, 255, 0.25);
  cursor: pointer;
  padding: 0;
  position: relative;
}

.info-circle {
  width: 32px;
  height: 32px;
  position: relative;
  flex-shrink: 0;
  background: #000;
}

.info-icon {
  width: 14px;
  height: 14px;
  stroke: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-58%, -52%);
}

.info-text {
  color: var(--cyber-cyan);
  font-size: 0.75rem;
  opacity: 0;
  transform: translateX(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Hover expands pill on Desktop */
.info-button:hover {
  max-width: 320px;
  box-shadow: 0 0 14px rgba(0, 200, 255, 0.5);
  padding-right: 10px;
}

.info-button:hover .info-text {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .info-button {
    height: 28px;
    width: 28px; /* ✅ Explicit width instead of max-width for idle */
    border-radius: 50%; /* ✅ Perfect circle */
    padding: 0;
    opacity: 0.5; /* ✅ More transparent when idle */
    transition:
      width 0.4s ease,
      border-radius 0.4s ease,
      box-shadow 0.4s ease;
  }

  .info-circle {
    width: 28px;
    height: 28px;
  }

  .info-icon {
    width: 12px;
    height: 12px;
  }

  .info-text {
    display: inline-block;
    opacity: 0;
    white-space: nowrap;
  }

  /* ✅ Active State */
  .info-button.active {
    max-width: 320px; /* ✅ Use width instead of max-width */
    border-radius: 50px; /* ✅ Pill shape */
    padding-right: 10px;
    opacity: 1;
    box-shadow: 0 0 14px rgba(0, 200, 255, 0.5);
  }

  .info-button.active .info-text {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 480px) {
  .info-button {
    height: 24px;
    width: 24px; /* ✅ Perfect circle when idle */
    opacity: 0.5; /* ✅ More transparent when idle */
  }

  .info-circle {
    width: 24px;
    height: 24px;
  }

  .info-icon {
    width: 10px;
    height: 10px;
  }

  .info-button.active {
    width: 227px; /* ✅ Smooth pill expansion */
    border-radius: 50px;
    opacity: 1;
  }
}

.back-to-top {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); /* ✅ More transparent */
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.15),
    inset 0 0 10px rgba(255, 255, 255, 0.15),
    0 0 15px rgba(0, 200, 255, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1500;
  cursor: pointer;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.14); /* ✅ Slightly brighter on hover */
  box-shadow:
    0 0 18px rgba(0, 200, 255, 0.5),
    inset 0 0 12px rgba(255, 255, 255, 0.2);
}

.back-icon {
  width: 18px;
  height: 18px;
  stroke: #fff;
  transition: transform 0.3s ease;
}

.back-to-top:hover .back-icon {
  transform: translateY(-3px);
}

.back-text {
  font-family: 'SF Pro Display', 'Orbitron', sans-serif;
  color: #fff;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .back-to-top {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    gap: 0;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08); /* ✅ Extra transparent on mobile */
  }

  .back-to-top:hover .back-icon {
    transform: translateY(0px);
  }

  .back-text {
    display: none;
  }

  .back-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    width: 38px;
    height: 38px;
  }

  .back-to-top:hover .back-icon {
    transform: translateY(0px);
  }

  .back-icon {
    width: 16px;
    height: 16px;
  }
}

/* =========================
   Responsive Design
   ========================= */

/* Tablets & Small Desktops */
@media (max-width: 1024px) {
  .hero-grid {
    max-width: 95%;
    gap: 2.5rem;
  }
}

/* =========================
   Mobile & Tablets (≤ 768px)
   ========================= */
@media (max-width: 768px) {
  #home-page {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
  }

  .nav-right-section {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  /* Hero Layout */
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding-top: 2rem;
  }

  /* Avatar */
  .avatar-ring {
    width: clamp(180px, 60vw, 220px);
    height: clamp(180px, 60vw, 220px);
    margin-bottom: 0.8rem;
  }

  .avatar-placeholder {
    width: 88%;
    height: 88%;
  }

  /* Hero Heading */
  .hero-heading {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    line-height: 1.2;
    /* margin-bottom: 0.4rem; */
  }

  /* Typewriter */
  .typewriter-container {
    justify-content: center;
    text-align: center;
    /* margin: 0 auto 0.6rem; */
  }

  /* Hero Description */
  .hero-description {
    font-size: 0.95rem;
    max-width: 90%;
    /* margin: 0 auto 1rem; */
    line-height: 1.4;
  }

  /* Hero Button */
  .hero-button {
    width: 90%;
    max-width: 300px;
    font-size: 1rem;
    padding: 0.9rem 1.2rem;
    margin: 0 auto;
  }
  .hero-headline {
    font-size: clamp(1.8rem, 4vw, 3rem);
  }

  /* ✅ Stats Counter Positioned Slightly Higher */
  .stats-counters {
    position: fixed;
    bottom: 5rem; /* ✅ Pushed up slightly */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 420px;
    background: rgba(4, 6, 8, 0.9);
    backdrop-filter: blur(14px);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1rem;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 200, 255, 0.3);
  }

  .counter-number {
    font-size: 2rem;
  }

  .counter-separator {
    font-size: 1.5rem;
  }
}

/* =========================
   Small Phones (≤ 480px)
   ========================= */
@media (max-width: 480px) {
  #home-page {
    height: 100vh;
    padding: 0 1rem;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .page-content {
    padding: 2.5rem 1rem 1rem;
  }

  .avatar-ring {
    width: clamp(160px, 55vw, 200px);
    height: clamp(160px, 55vw, 200px);
  }

  .hero-heading {
    font-size: clamp(1.6rem, 7vw, 2rem);
    /* margin-bottom: 0.3rem; */
  }

  .typewriter-container {
    margin: 0 auto 0.5rem;
  }

  .hero-description {
    font-size: 0.9rem;
    /* margin-bottom: 0.8rem; */
  }

  .hero-button {
    font-size: 0.95rem;
    /* padding: 0.8rem 1rem; */
  }
    .hero-headline {
    font-size: clamp(1.6rem, 7.5vw, 3rem);
  }

  /* ✅ Stats Counter Higher on Small Phones */
  .stats-counters {
    bottom: 8rem; /* ✅ More up for small screens */
    padding: 0.8rem;
    gap: 0.8rem;
  }
  

  .counter-number {
    font-size: 1.8rem;
  }

  .counter-separator {
    font-size: 1.2rem;
  }
  .cta-container{
    margin-bottom: 9rem;
  }
}
@media (max-width: 400px) and (min-width: 350px) {
  .stats-counters {
    bottom: 7rem; /* Raised a bit more for 6.4-inch mobiles */
    padding: 0.8rem;
    gap: 0.8rem;
  }
}

/* =========================
   Reduced Motion
   ========================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .float-shape,
  .float-particle,
  .bg-gradient-blob,
  .circuit-pattern {
    display: none;
  }
}


/* -- Watch Dogs–Style Loader -- */
#loadingScreen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease-out; /* slightly smoother fade */
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.loading-content {
  position: relative;
  color: #00e5ff;
  text-align: center;
  font-family: var(--font-mono);
  animation: fadeIn 0.4s ease-out;
}

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

#loadingPhrase {
  font-size: 1.3rem;
  margin-bottom: 16px;
  min-height: 1.5em; /* fixed height to prevent layout shift */
  display: flex;     /* center text vertically */
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}

.progress-bar {
  width: 240px; /* fixed width to prevent resizing */
  height: 6px;
  background: #111;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto; /* keep it centered */
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #00a0cc, #00e5ff);
  border-radius: 3px;
  transition: width 0.25s ease; /* smoother width change */
}
