/* JST Core Main Styles */

/* Import Colors */
@import url('colors.css');

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* CSS Custom Properties */
:root {
  /* Font Stacks */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;

  /* Typography Scale */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* Spacing Scale (8px base) */
  --space-1: 0.25rem;      /* 4px */
  --space-2: 0.5rem;       /* 8px */
  --space-3: 0.75rem;      /* 12px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.25rem;      /* 20px */
  --space-6: 1.5rem;       /* 24px */
  --space-8: 2rem;         /* 32px */
  --space-10: 2.5rem;      /* 40px */
  --space-12: 3rem;        /* 48px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */
  --space-32: 8rem;        /* 128px */

  /* Border Radius */
  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 1rem;       /* 16px */
  --radius-xl: 1.5rem;     /* 24px */
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
}

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

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

/* Spacing Utilities */
.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }
.m-12 { margin: var(--space-12); }
.m-16 { margin: var(--space-16); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.p-12 { padding: var(--space-12); }

.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: var(--space-1); padding-right: var(--space-1); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }

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

.container-wide {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section {
  padding: var(--space-20) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

.section-lg {
  padding: var(--space-32) 0;
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.flex-1 { flex: 1; }
.flex-auto { flex: auto; }
.flex-none { flex: none; }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

/* Component Styles */

/* Header and Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(14, 165, 233, 0.2);
  transition: all var(--transition-normal);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.1);
}

.header.hidden {
  transform: translateY(-100%);
}

.nav {
  position: relative;
}

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

/* Logo */
.nav-logo {
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--text-xl);
  transition: all var(--transition-normal);
}

.logo-link:hover {
  color: var(--accent-blue);
}

.logo-image {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  transition: transform var(--transition-normal);
}

.logo-text {
  display: inline-block;
  transition: transform var(--transition-normal);
}

.logo-link:hover .logo-text,
.logo-link:hover .logo-image {
  transform: scale(1.05);
}

/* Desktop Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--hover-overlay);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

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

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-normal);
}

.nav-toggle:hover {
  background: var(--hover-overlay);
}

.nav-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: all var(--transition-normal);
  border-radius: 2px;
}

/* Hamburger Animation */
.nav-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent-blue);
  color: var(--text-primary);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: var(--z-tooltip);
  transition: top var(--transition-normal);
}

.skip-link:focus {
  top: 6px;
}

/* Mobile Navigation Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile browsers */
  background: var(--primary-bg);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  overflow: hidden;
}

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

.nav-overlay .nav-menu {
  flex-direction: column;
  gap: var(--space-6);
  text-align: center;
  padding: var(--space-8);
}

.nav-overlay .nav-link {
  font-size: var(--text-2xl);
  padding: var(--space-4) var(--space-6);
  min-width: 200px;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.nav-overlay .nav-link:hover,
.nav-overlay .nav-link:focus {
  background: var(--hover-overlay);
  color: var(--accent-blue);
}

.nav-overlay .nav-link::after {
  bottom: 0;
}

/* Glassmorphism Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  min-height: 44px; /* Touch-friendly */
}

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

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

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

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

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.btn-secondary:hover::before {
  opacity: 0.1;
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.2);
}

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

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

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  min-height: 36px;
}

/* Form Components */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--secondary-bg);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--text-base);
  transition: all var(--transition-normal);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Form Validation States */
.form-input.valid,
.form-textarea.valid {
  border-color: var(--success);
}

.form-input.invalid,
.form-textarea.invalid {
  border-color: var(--error);
}

.form-error {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--error);
}

.form-success {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--success);
}

/* Status Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info-border);
}

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

/* Accessibility Enhancements */
.required-indicator {
  color: var(--error);
  font-weight: 600;
}

/* Focus Management */
*:focus {
  outline: none;
}

/* High contrast focus indicators */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Skip link improvements */
.skip-link:focus {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-tooltip);
  padding: var(--space-3) var(--space-4);
  background: var(--accent-blue);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Improved button focus states */
.btn:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Form accessibility improvements */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Error state styling */
.form-input[aria-invalid="true"],
.form-textarea[aria-invalid="true"],
.form-select[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Navigation accessibility */
.nav-link:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Project card accessibility */
.project-card:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow), 0 0 0 3px var(--focus-ring);
}

/* Reduced motion preferences */
@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;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --border-primary: #ffffff;
    --accent-blue: #66b3ff;
    --focus-ring: rgba(102, 179, 255, 0.8);
  }
  
  .btn {
    border: 2px solid currentColor;
  }
  
  .project-card {
    border: 2px solid var(--border-primary);
  }
}

/* Keyboard Shortcuts Modal */
.keyboard-shortcuts-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: var(--z-modal);
  backdrop-filter: blur(4px);
}

.shortcuts-content {
  background: var(--secondary-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.shortcuts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--glass-border);
}

.shortcuts-header h3 {
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: 600;
  margin: 0;
}

.shortcuts-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: var(--text-2xl);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.shortcuts-close:hover,
.shortcuts-close:focus {
  color: var(--text-primary);
  background: var(--hover-overlay);
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.shortcut-group {
  margin-bottom: var(--space-6);
}

.shortcut-group h4 {
  color: var(--accent-blue);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.shortcut-item:last-child {
  border-bottom: none;
}

.shortcut-item kbd {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shortcut-item span {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* Enhanced Tab Navigation */
.tab-navigation {
  position: relative;
}

.tab-navigation::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-blue);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.tab-navigation:focus::after {
  transform: scaleX(1);
}

/* Skip Links Enhancement */
.skip-links {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  z-index: var(--z-tooltip);
}

.skip-links a {
  position: absolute;
  top: -100px;
  background: var(--accent-blue);
  color: white;
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: top var(--transition-normal);
}

.skip-links a:focus {
  top: var(--space-2);
}

/* Improved Focus Management for Interactive Elements */
.interactive-element:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Focus trap for modals and overlays */
.focus-trap {
  position: relative;
}

.focus-trap::before,
.focus-trap::after {
  content: '';
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Keyboard navigation indicators */
.keyboard-user *:focus {
  outline: 2px solid var(--accent-blue) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px var(--focus-ring) !important;
}

.mouse-user *:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Mobile menu keyboard navigation */
.nav-overlay[aria-expanded="true"] {
  display: flex;
}

.nav-overlay .nav-link:focus {
  background: var(--hover-overlay);
  outline: 2px solid var(--accent-blue);
  outline-offset: -2px;
}

/* Form keyboard navigation improvements */
.form-group:focus-within .form-label {
  color: var(--accent-blue);
}

.form-input:focus + .form-label,
.form-textarea:focus + .form-label {
  color: var(--accent-blue);
}

/* Project card keyboard navigation */
.project-card[tabindex="0"]:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
  transform: translateY(-2px);
}

.project-card .project-actions a:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Responsive keyboard shortcuts modal */
@media (max-width: 768px) {
  .shortcuts-content {
    width: 95%;
    padding: var(--space-4);
    max-height: 90vh;
  }
  
  .shortcut-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
  
  .shortcut-item kbd {
    align-self: flex-start;
  }
}

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

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

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

/* Animation Classes */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.slide-up {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.6s ease forwards;
}

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

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main Content Sections */

/* Hero Section */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-20) 0 var(--space-24);
  position: relative;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.1) 0%, transparent 70%);
  pointer-events: none;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.hero-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: var(--space-16);
}

.hero-title {
  font-size: clamp(var(--text-4xl), 8vw, var(--text-6xl));
  font-weight: 700;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 60%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-tagline {
  font-size: clamp(var(--text-lg), 3vw, var(--text-xl));
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-cta {
  margin-bottom: var(--space-12);
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-normal);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.scroll-indicator:hover {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.scroll-mouse {
  width: 20px;
  height: 32px;
  border: 1.5px solid currentColor;
  border-radius: 10px;
  position: relative;
  margin-bottom: var(--space-2);
  background: transparent;
  opacity: 0.8;
}

.scroll-wheel {
  width: 2px;
  height: 6px;
  background: currentColor;
  border-radius: 1px;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s infinite;
}

.scroll-text {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

@keyframes scrollWheel {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.5;
    transform: translateX(-50%) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* About Section */
.about {
  padding: var(--space-20) 0;
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.8) 0%, rgba(224, 242, 254, 0.9) 100%);
  backdrop-filter: blur(10px);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 30% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.about-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 600;
  margin-bottom: var(--space-6);
  color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.about-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Projects Section */
.projects {
  padding: var(--space-20) 0;
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.9) 0%, rgba(186, 230, 253, 0.8) 100%);
  position: relative;
}

.projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 70% 30%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-top: var(--space-12);
}

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

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.8), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(14, 165, 233, 0.3), 0 0 0 1px rgba(14, 165, 233, 0.5);
  border-color: rgba(14, 165, 233, 0.5);
  background: rgba(255, 255, 255, 0.95);
}

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

.project-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--surface-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-normal);
}

.project-card:hover .project-icon {
  transform: scale(1.05);
}

.project-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.project-card:hover .project-icon::before {
  opacity: 0.6;
}

.project-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-normal);
}

.project-card:hover .project-icon img {
  transform: scale(1.1);
}

.project-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.project-tagline {
  font-size: var(--text-base);
  color: var(--accent-blue);
  margin-bottom: var(--space-4);
  font-weight: 500;
}

.project-description {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-6);
}

.project-status {
  margin-bottom: var(--space-6);
}

.status-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-available {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-coming-soon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

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

/* Contact Section */
.contact {
  padding: var(--space-20) 0;
  background: linear-gradient(180deg, rgba(186, 230, 253, 0.8) 0%, rgba(125, 211, 252, 0.6) 100%);
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  margin-top: var(--space-12);
}

@media (min-width: 1024px) {
  .contact-content {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-16);
  }
}

.contact-form-wrapper {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.15);
}

.contact-form {
  display: grid;
  gap: var(--space-6);
}

.form-submit {
  justify-self: start;
  min-width: 160px;
}

.contact-info {
  display: grid;
  gap: var(--space-6);
}

.contact-item {
  text-align: left;
}

.contact-item-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.contact-link {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.contact-link:hover {
  color: var(--accent-blue-hover);
}

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

.social-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  transition: all var(--transition-normal);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.social-link:hover {
  color: var(--accent-blue);
  background: var(--hover-overlay);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.2);
}

.social-link svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-normal);
}

.social-link:hover svg {
  transform: scale(1.1);
}

.social-text {
  font-size: var(--text-sm);
  font-weight: 500;
}

/* Footer */
.footer {
  background: linear-gradient(180deg, rgba(186, 230, 253, 0.9) 0%, rgba(125, 211, 252, 0.8) 100%);
  border-top: 1px solid rgba(14, 165, 233, 0.3);
  padding: var(--space-16) 0 var(--space-8);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-section {
  text-align: left;
}

.footer-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.footer-text {
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.footer-link:hover {
  color: var(--accent-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-primary);
}

.footer-copyright {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Smooth scrolling for reduced motion users */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  .fade-in,
  .slide-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .glass-card:hover,
  .btn:hover,
  .project-card:hover {
    transform: none;
  }
  
  .scroll-arrow {
    animation: none;
  }
}

/* Enhanced Animations */
.hero-content > * {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.hero-title {
  animation-delay: 0.2s;
}

.hero-tagline {
  animation-delay: 0.4s;
}

.hero-cta {
  animation-delay: 0.6s;
}

.hero-scroll {
  animation-delay: 0.8s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for project cards */
.project-card:nth-child(1) {
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.1s;
  opacity: 0;
  transform: translateY(30px);
}

.project-card:nth-child(2) {
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
  transform: translateY(30px);
}

.project-card:nth-child(3) {
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
  transform: translateY(30px);
}

/* Improved section titles */
.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* Enhanced form styling */
.contact-form-wrapper {
  position: relative;
}

.contact-form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  opacity: 0.5;
}

/* Improved status badges */
.status-badge {
  position: relative;
  overflow: hidden;
}

.status-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.project-card:hover .status-badge::before {
  left: 100%;
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    display: none;
  }
  
  .hero-title {
    font-size: var(--text-4xl);
  }
  
  .hero-tagline {
    font-size: var(--text-lg);
  }
  
  .projects-grid {
    gap: var(--space-6);
  }
  
  .project-card {
    padding: var(--space-6);
  }
  
  .social-links {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .social-link {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Tablet improvements */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-container {
    padding: 0 var(--space-6);
  }
  
  .projects-grid {
    gap: var(--space-6);
  }
}

/* Desktop enhancements */
@media (min-width: 1024px) {
  .hero-content {
    max-width: 900px;
  }
  
  .project-card {
    padding: var(--space-10);
  }
  
  .contact-form {
    gap: var(--space-8);
  }
}

/* Ultra-wide screen optimizations */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-title {
    font-size: var(--text-6xl);
  }
  
  .hero-tagline {
    font-size: var(--text-2xl);
  }
}

/* Print styles */
@media print {
  .header,
  .hero-scroll,
  .nav-toggle,
  .contact-form {
    display: none;
  }
  
  .hero {
    min-height: auto;
    padding: var(--space-8) 0;
  }
  
  .project-card {
    break-inside: avoid;
    margin-bottom: var(--space-4);
  }
}

/* Dark mode enhancements (already default, but ensuring consistency) */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-bg: #0f1419;
    --secondary-bg: #1a2332;
    --text-primary: #ffffff;
    --text-secondary: #a0a6b8;
  }
}

/* Light mode support (optional) */
@media (prefers-color-scheme: light) {
  :root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8fafc;
    --surface-bg: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-primary: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --hover-overlay: rgba(0, 0, 0, 0.05);
  }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-content {
  text-align: center;
}

.loading-logo {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--text-primary), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-primary);
  border-top: 3px solid var(--accent-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* Animation classes for intersection observer */
.animate-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: all 0.6s ease;
}

.section-title,
.about-description,
.contact-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

/* Enhanced focus styles for better accessibility */
.project-card:focus-within .project-title {
  color: var(--accent-blue);
}

.project-card:focus-within .project-icon {
  transform: scale(1.05);
}

/* Improved button text positioning */
.btn {
  position: relative;
  z-index: 1;
}

.btn * {
  position: relative;
  z-index: 2;
}

/* Enhanced glassmorphism effects */
.glass-card,
.contact-form-wrapper,
.project-card {
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Improved mobile touch targets */
@media (max-width: 768px) {
  .btn {
    min-height: 48px;
    padding: var(--space-4) var(--space-6);
  }
  
  .nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  
  .social-link {
    min-height: 48px;
  }
}

/* Performance optimizations */
.project-icon img,
.hero-title,
.hero-tagline {
  will-change: transform;
}

.project-card:hover .project-icon img,
.project-card:hover .project-icon {
  will-change: auto;
}

/* Reduced motion support enhancement */
@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
  }
  
  .scroll-wheel {
    animation: none;
  }
  
  .project-card:nth-child(1),
  .project-card:nth-child(2),
  .project-card:nth-child(3) {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .hero-content > * {
    animation: none;
    opacity: 1;
    transform: none;
  }
}/* Ab
out Features */
.about-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-top: var(--space-12);
}

@media (min-width: 768px) {
  .about-features {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.feature-item {
  text-align: center;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(14, 165, 233, 0.3);
  transition: all var(--transition-normal);
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.2);
  border-color: rgba(14, 165, 233, 0.5);
  background: rgba(255, 255, 255, 0.9);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border-radius: var(--radius-lg);
  color: white;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.feature-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.feature-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* Enhanced mobile responsiveness */
@media (max-width: 480px) {
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .hero-tagline {
    font-size: var(--text-base);
  }
  
  .section-title {
    font-size: var(--text-3xl);
  }
  
  .project-card {
    padding: var(--space-4);
  }
  
  .project-icon {
    width: 72px;
    height: 72px;
  }
  
  .contact-form-wrapper {
    padding: var(--space-6);
  }
  
  .hero-scroll {
    bottom: var(--space-8);
  }
  
  .scroll-indicator {
    padding: var(--space-3);
  }
  
  .scroll-text {
    font-size: 10px;
  }
}/* Enha
nced Footer */
.footer-bottom {
  border-top: 1px solid var(--border-primary);
  padding-top: var(--space-6);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  background: var(--glass-bg);
  border: 1px solid var(--border-primary);
}

.footer-social-link:hover {
  color: var(--accent-blue);
  background: var(--hover-overlay);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
}

/* Final polish and optimizations */
* {
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Ensure proper stacking context */
.header {
  isolation: isolate;
}

.hero {
  isolation: isolate;
}

.loading-screen {
  isolation: isolate;
}

/* Improve text selection */
::selection {
  background: rgba(74, 158, 255, 0.3);
  color: var(--text-primary);
}

::-moz-selection {
  background: rgba(74, 158, 255, 0.3);
  color: var(--text-primary);
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue-hover);
}/* 
Ensure scroll indicator never overlaps with next section */
.hero-scroll {
  margin-bottom: var(--space-4);
}

/* Add extra safety spacing */
.about {
  position: relative;
  z-index: 1;
}

/* Ensure proper section separation */
.hero + .about {
  margin-top: 0;
}/* Imag
e loading and error handling */
.logo-image,
.project-icon img {
  object-fit: contain;
  background: var(--surface-bg);
}

/* Fallback for broken images */
.logo-image[alt]:after,
.project-icon img[alt]:after {
  content: attr(alt);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-2);
  background: var(--surface-bg);
  border-radius: var(--radius-sm);
  display: none;
}

/* Show fallback text when image fails to load */
.logo-image:not([src]),
.project-icon img:not([src]) {
  background: var(--surface-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-image:not([src]):after,
.project-icon img:not([src]):after {
  display: block;
}

/* Ensure images are visible when loaded */
.logo-image[src],
.project-icon img[src] {
  display: block;
}

/* Loading state for images */
.logo-image,
.project-icon img {
  transition: opacity var(--transition-normal);
}

.logo-image:not([complete]),
.project-icon img:not([complete]) {
  opacity: 0.7;
}

/* Mobile logo adjustments */
@media (max-width: 768px) {
  .logo-image {
    width: 28px;
    height: 28px;
  }
  
  .logo-text {
    font-size: var(--text-lg);
  }
}/* Image 
error states */
.image-error {
  background: var(--surface-bg);
  border: 2px dashed var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.image-error::before {
  content: '🖼️ Image not found';
  text-align: center;
}

.image-loaded {
  opacity: 1;
}

/* Project icon error state */
.project-icon .image-error {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
}

.project-icon .image-error::before {
  content: '📱 App Icon';
}

/* Logo error state */
.logo-image.image-error {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
}

.logo-image.image-error::before {
  content: 'JST';
  font-weight: 600;
  font-size: 10px;
}/* Light 
Blue Theme Enhancements */

/* Subtle background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(45deg, rgba(59, 130, 246, 0.02) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(59, 130, 246, 0.02) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(59, 130, 246, 0.02) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(59, 130, 246, 0.02) 75%);
  background-size: 80px 80px;
  background-position: 0 0, 0 40px, 40px -40px, -40px 0px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

/* Ensure content is above background pattern */
.header,
.hero,
.about,
.projects,
.contact,
.footer {
  position: relative;
  z-index: 1;
}

/* Enhanced section title with light blue accent */
.section-title::after {
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.8), transparent);
}

/* Enhanced button glow effects */
.btn-primary {
  box-shadow: 0 4px 20px rgba(96, 165, 250, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(96, 165, 250, 0.6);
}

/* Enhanced scroll indicator for light blue theme */
.scroll-indicator {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(14, 165, 233, 0.3);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.15);
  color: var(--text-primary);
}

.scroll-indicator:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.2);
  color: var(--accent-blue);
}

/* Enhanced social links */
.social-link {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2);
}

/* Enhanced form inputs */
.form-input,
.form-textarea,
.form-select {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: var(--text-primary);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: rgba(14, 165, 233, 0.6);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
  background: rgba(255, 255, 255, 1);
}

/* Enhanced loading screen */
.loading-screen {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
}

.loading-spinner {
  border: 3px solid rgba(14, 165, 233, 0.2);
  border-top: 3px solid #0ea5e9;
}

/* Enhanced status badges */
.status-available {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.2);
}

.status-coming-soon {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

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

.project-icon {
  animation: float 6s ease-in-out infinite;
}

.project-card:nth-child(1) .project-icon {
  animation-delay: 0s;
}

.project-card:nth-child(2) .project-icon {
  animation-delay: 2s;
}

.project-card:nth-child(3) .project-icon {
  animation-delay: 4s;
}

/* Shimmer effect on hover */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.project-card:hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(96, 165, 250, 0.1),
    transparent
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  pointer-events: none;
}

/* Enhanced hero title gradient */
.hero-title {
  background: linear-gradient(135deg, #0f172a 0%, #0ea5e9 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(14, 165, 233, 0.3));
}

/* Glow effect for accent elements */
.feature-icon,
.project-icon {
  position: relative;
}

.feature-icon::after,
.project-icon::after {
  content: '';
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
  z-index: -1;
}

.feature-item:hover .feature-icon::after,
.project-card:hover .project-icon::after {
  opacity: 1;
}