/* ==========================================================================
   Uyen Portfolio - Main Stylesheet
   ========================================================================== */

/* CSS Custom Properties for Theme System */
:root {
  /* Light Theme Colors */
  --primary-color: #2563eb;
  --secondary-color: #f59e0b;
  --accent-color: #10b981;
  --background-color: #ffffff;
  --surface-color: #f8fafc;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --shadow-light: rgba(0, 0, 0, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --shadow-heavy: rgba(0, 0, 0, 0.25);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-code: 'Fira Code', 'Monaco', 'Cascadia Code', monospace;
  
  /* Font Sizes */
  --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 */
  
  /* Spacing Scale */
  --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 */
  
  /* Breakpoints */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
  
  /* Container Max Width */
  --container-max-width: 1200px;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* Dark Theme Colors */
[data-theme="dark"] {
  --primary-color: #3b82f6;
  --secondary-color: #fbbf24;
  --accent-color: #34d399;
  --background-color: #111827;
  --surface-color: #1f2937;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --border-color: #374151;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-heavy: rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography System
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

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

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

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

a:hover, a:focus {
  color: var(--accent-color);
  outline: none;
}

a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ==========================================================================
   Layout System - Responsive Grid
   ========================================================================== */

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

@media (min-width: 640px) {
  .container {
    padding: 0 var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-8);
  }
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

/* ==========================================================================
   Component Base Styles
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 500;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

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

.btn-primary:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-medium);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-medium);
}

/* Cards */
.card {
  background-color: var(--surface-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: 0 2px 8px var(--shadow-light);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-medium);
}

/* Section Styling */
section {
  padding: var(--space-20) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-16);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Accessibility & Skip Links
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 1000;
  transition: top var(--transition-fast);
}

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

/* Screen reader only content */
.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;
}

/* ==========================================================================
   Comprehensive Responsive Design System
   ========================================================================== */

/* Mobile First Breakpoints */
/* xs: 0px - 479px (Small phones) */
/* sm: 480px - 767px (Large phones) */
/* md: 768px - 1023px (Tablets) */
/* lg: 1024px - 1279px (Small desktops) */
/* xl: 1280px - 1535px (Large desktops) */
/* 2xl: 1536px+ (Extra large screens) */

/* Extra Small Devices (320px - 479px) */
@media (max-width: 479px) {
  .container {
    padding: 0 var(--space-3);
  }
  
  .hero-section {
    padding: calc(var(--space-16) + 80px) 0 var(--space-16);
  }
  
  .section-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-12);
  }
  
  .hero-title .name {
    font-size: var(--text-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-lg);
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .profile-image {
    width: 200px;
    height: 200px;
  }
  
  .about-grid {
    gap: var(--space-8);
  }
  
  .skills-grid {
    gap: var(--space-6);
  }
  
  .projects-grid {
    gap: var(--space-6);
  }
  
  .contact-grid {
    gap: var(--space-8);
  }
}

/* Small Devices (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .hero-content {
    gap: var(--space-10);
  }
  
  .profile-image {
    width: 250px;
    height: 250px;
  }
  
  .projects-filter {
    gap: var(--space-3);
  }
  
  .filter-btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }
}

/* Medium Devices - Tablets (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    padding: 0 var(--space-6);
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-12);
  }
  
  .hero-text {
    text-align: center;
  }
  
  .hero-contact-info {
    justify-content: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  
  .about-sidebar {
    order: 1;
  }
  
  .about-main {
    order: 2;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-marker {
    left: 30px;
  }
  
  .timeline-content {
    width: calc(100% - 70px);
    margin-left: 70px;
    margin-right: 0;
  }
  
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 70px;
    margin-right: 0;
  }
  
  .experience-card::before {
    right: auto;
    left: -12px;
    border-left-color: transparent;
    border-right-color: var(--surface-color);
  }
}

/* Large Devices - Small Desktops (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .container {
    max-width: 1000px;
  }
  
  .hero-content {
    grid-template-columns: 1.2fr 350px;
    gap: var(--space-12);
  }
  
  .profile-image {
    width: 280px;
    height: 280px;
  }
  
  .about-grid {
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-12);
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10);
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10);
  }
  
  .contact-grid {
    grid-template-columns: 1fr 1.3fr;
    gap: var(--space-12);
  }
}

/* Extra Large Devices (1280px - 1535px) */
@media (min-width: 1280px) and (max-width: 1535px) {
  .container {
    max-width: 1200px;
  }
  
  .hero-content {
    grid-template-columns: 1fr 400px;
    gap: var(--space-16);
  }
  
  .profile-image {
    width: 320px;
    height: 320px;
  }
  
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-12);
  }
}

/* 2XL Devices (1536px+) */
@media (min-width: 1536px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-content {
    grid-template-columns: 1fr 450px;
    gap: var(--space-20);
  }
  
  .profile-image {
    width: 350px;
    height: 350px;
  }
  
  .about-grid {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-20);
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-16);
  }
  
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-16);
  }
  
  .contact-grid {
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-20);
  }
}

/* Navigation Responsive Improvements */
@media (max-width: 1023px) {
  .nav-menu {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 8px 32px var(--shadow-medium);
  }

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

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-menu a {
    padding: var(--space-4);
    text-align: center;
    border-radius: var(--radius-lg);
    font-size: var(--text-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
  }
  
  .nav-menu a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }
}

/* Typography Responsive Scaling */
@media (max-width: 479px) {
  :root {
    --text-xs: 0.7rem;
    --text-sm: 0.8rem;
    --text-base: 0.9rem;
    --text-lg: 1rem;
    --text-xl: 1.1rem;
    --text-2xl: 1.3rem;
    --text-3xl: 1.6rem;
    --text-4xl: 2rem;
    --text-5xl: 2.5rem;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  :root {
    --text-xs: 0.75rem;
    --text-sm: 0.85rem;
    --text-base: 0.95rem;
    --text-lg: 1.05rem;
    --text-xl: 1.15rem;
    --text-2xl: 1.4rem;
    --text-3xl: 1.7rem;
    --text-4xl: 2.1rem;
    --text-5xl: 2.6rem;
  }
}

/* Spacing Responsive Adjustments */
@media (max-width: 479px) {
  section {
    padding: var(--space-12) 0;
  }
  
  .info-card,
  .skill-category,
  .project-card,
  .experience-card,
  .contact-info,
  .contact-form-container {
    padding: var(--space-4);
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  section {
    padding: var(--space-16) 0;
  }
  
  .info-card,
  .skill-category,
  .project-card,
  .experience-card,
  .contact-info,
  .contact-form-container {
    padding: var(--space-6);
  }
}

/* Hide/Show utilities */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

@media (max-width: 479px) {
  .xs\:hidden { display: none; }
  .xs\:block { display: block; }
  .xs\:flex { display: flex; }
}

@media (min-width: 480px) and (max-width: 767px) {
  .sm\:hidden { display: none; }
  .sm\:block { display: block; }
  .sm\:flex { display: flex; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .md\:hidden { display: none; }
  .md\:block { display: block; }
  .md\:flex { display: flex; }
}

@media (min-width: 1024px) {
  .lg\:hidden { display: none; }
  .lg\:block { display: block; }
  .lg\:flex { display: flex; }
}

/* Responsive Image Handling */
@media (max-width: 767px) {
  .project-image {
    height: 180px;
  }
  
  .project-image img {
    object-position: center top;
  }
}

/* Form Responsive Improvements */
@media (max-width: 479px) {
  .form-input,
  .form-textarea {
    padding: var(--space-3);
    font-size: var(--text-sm);
  }
  
  .form-submit-btn {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }
}

/* Contact Details Responsive Layout */
@media (max-width: 767px) {
  .contact-detail-item {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
    font-size: var(--text-lg);
  }
}

/* ==========================================================================
   Header & Navigation Styles
   ========================================================================== */

.header-area {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--background-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar {
  padding: var(--space-4) 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo a {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-8);
  margin: 0;
  padding: 0;
}

.nav-menu a {
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--primary-color);
  background-color: var(--surface-color);
}

.nav-menu a.active {
  color: var(--primary-color);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

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

.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  cursor: pointer;
  font-size: var(--text-lg);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.theme-toggle:hover {
  border-color: var(--primary-color);
  background-color: var(--surface-color);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  flex-direction: column;
  gap: 4px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all var(--transition-fast);
  border-radius: 1px;
}

/* Mobile Navigation */
@media (max-width: 1023px) {
  .nav-menu {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }

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

  .mobile-menu-toggle {
    display: flex;
  }

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

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

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

  .nav-menu a {
    padding: var(--space-4);
    text-align: center;
    border-radius: var(--radius-lg);
  }
}

/* ==========================================================================
   Hero Section Styles
   ========================================================================== */

.hero-section {
  padding: calc(var(--space-20) + 80px) 0 var(--space-20);
  background: linear-gradient(135deg, var(--background-color) 0%, var(--surface-color) 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, var(--primary-color)10 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, var(--accent-color)10 0%, transparent 50%);
  opacity: 0.1;
  z-index: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
  position: relative;
  z-index: 2;
}

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

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

@media (min-width: 1024px) {
  .hero-text {
    text-align: left;
  }
}

.hero-title {
  margin-bottom: var(--space-6);
}

.greeting {
  display: block;
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.name {
  display: block;
  font-size: var(--text-5xl);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 767px) {
  .name {
    font-size: var(--text-4xl);
  }
}

.hero-subtitle {
  font-size: var(--text-2xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  font-weight: 500;
}

@media (max-width: 767px) {
  .hero-subtitle {
    font-size: var(--text-xl);
  }
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  max-width: 600px;
}

@media (min-width: 1024px) {
  .hero-description {
    max-width: none;
  }
}

.hero-contact-info {
  margin-bottom: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .hero-contact-info {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-6);
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .hero-contact-info {
    justify-content: flex-start;
  }
}

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

.contact-label {
  font-weight: 600;
  color: var(--text-primary);
}

.contact-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

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

@media (min-width: 1024px) {
  .hero-actions {
    justify-content: flex-start;
  }
}

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

.profile-image {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: 0 8px 32px var(--shadow-medium);
  transition: transform var(--transition-normal);
}

.profile-image:hover {
  transform: scale(1.05);
}

@media (max-width: 767px) {
  .profile-image {
    width: 250px;
    height: 250px;
  }
}

/* ==========================================================================
   About Section Styles
   ========================================================================== */

.about-section {
  background-color: var(--surface-color);
}

.about-content {
  max-width: 1000px;
  margin: 0 auto;
}

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

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

.about-main {
  order: 1;
}

.about-sidebar {
  order: 2;
}

@media (min-width: 1024px) {
  .about-main {
    order: 1;
  }
  
  .about-sidebar {
    order: 2;
  }
}

.about-text h3 {
  color: var(--primary-color);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.about-text h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

.about-text p {
  font-size: var(--text-lg);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.about-highlight {
  background: linear-gradient(135deg, var(--primary-color)20, var(--accent-color)20);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border-left: 4px solid var(--primary-color);
  margin: var(--space-8) 0;
}

.about-highlight p {
  margin: 0;
  font-weight: 500;
  color: var(--text-primary);
}

.info-card {
  background-color: var(--background-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-light);
}

.info-card h4 {
  color: var(--primary-color);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.info-card h4::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
}

.education-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.education-title {
  font-weight: 600;
  color: var(--text-primary);
}

.education-institution {
  color: var(--primary-color);
  font-weight: 500;
}

.education-year {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-style: italic;
}

.membership-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.membership-badge {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  flex-shrink: 0;
}

.membership-text {
  color: var(--text-primary);
  font-weight: 500;
}

.membership-period {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-left: auto;
}

/* Language Skills with Visual Indicators */
.language-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.language-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.language-name {
  font-weight: 600;
  color: var(--text-primary);
}

.language-level {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.language-progress {
  width: 100%;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.language-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 3px;
  transition: width var(--transition-slow);
}

/* Progress bar widths for different language levels */
.language-progress-bar.native { width: 100%; }
.language-progress-bar.advanced { width: 85%; }
.language-progress-bar.intermediate { width: 70%; }
.language-progress-bar.basic { width: 50%; }

/* Stats Grid */
.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-4);
  margin: var(--space-8) 0;
}

.stat-item {
  text-align: center;
  padding: var(--space-4);
  background-color: var(--background-color);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.stat-number {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

/* ==========================================================================
   Skills Section Styles
   ========================================================================== */

.skills-section {
  background-color: var(--background-color);
}

.skills-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
}

.skills-intro p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

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

@media (min-width: 1200px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-12);
  }
}

.skill-category {
  background-color: var(--surface-color);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.skill-category:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow-medium);
}

.skill-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--border-color);
}

.skill-category-header h3 {
  color: var(--text-primary);
  font-size: var(--text-xl);
  margin: 0;
}

.skill-category-icon {
  font-size: var(--text-2xl);
  opacity: 0.8;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.skill-item {
  transition: all var(--transition-normal);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.skill-item:hover {
  background-color: var(--background-color);
  transform: translateX(8px);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.skill-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-base);
}

.skill-level {
  font-size: var(--text-sm);
  color: var(--primary-color);
  font-weight: 500;
  background-color: var(--primary-color)20;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
}

.skill-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-3);
  position: relative;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 4px;
  width: 0%;
  transition: width 1.5s ease-out;
  position: relative;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

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

.skill-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
}

/* Skill level colors */
.skill-item[data-skill="python"] .skill-progress,
.skill-item[data-skill="ml"] .skill-progress,
.skill-item[data-skill="data-analysis"] .skill-progress {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.skill-item[data-skill="dl"] .skill-progress,
.skill-item[data-skill="microbiology"] .skill-progress,
.skill-item[data-skill="research"] .skill-progress,
.skill-item[data-skill="frameworks"] .skill-progress {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.skill-item[data-skill="html"] .skill-progress,
.skill-item[data-skill="nlp"] .skill-progress,
.skill-item[data-skill="drug-discovery"] .skill-progress,
.skill-item[data-skill="version-control"] .skill-progress {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.skill-item[data-skill="javascript"] .skill-progress,
.skill-item[data-skill="genetic-engineering"] .skill-progress,
.skill-item[data-skill="databases"] .skill-progress {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

/* Animation delays for staggered effect */
.skill-item:nth-child(1) .skill-progress { transition-delay: 0.1s; }
.skill-item:nth-child(2) .skill-progress { transition-delay: 0.2s; }
.skill-item:nth-child(3) .skill-progress { transition-delay: 0.3s; }
.skill-item:nth-child(4) .skill-progress { transition-delay: 0.4s; }

/* Responsive adjustments */
@media (max-width: 767px) {
  .skill-category {
    padding: var(--space-6);
  }
  
  .skill-info {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  
  .skill-level {
    align-self: flex-end;
  }
}

/* ==========================================================================
   Projects Section Styles
   ========================================================================== */

.projects-section {
  background-color: var(--surface-color);
}

.projects-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-12);
}

.projects-intro p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

.projects-filter {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-16);
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

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

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

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

.project-card {
  background-color: var(--background-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  opacity: 1;
  transform: scale(1);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 40px var(--shadow-medium);
}

.project-card.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.project-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: var(--surface-color);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color)80, var(--accent-color)80);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.project-links {
  display: flex;
  gap: var(--space-4);
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: white;
  border-radius: 50%;
  color: var(--primary-color);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-size: var(--text-lg);
}

.project-link:hover {
  transform: scale(1.1);
  background-color: var(--accent-color);
  color: white;
}

.project-info {
  padding: var(--space-6);
}

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

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

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.tech-tag {
  background-color: var(--surface-color);
  color: var(--primary-color);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.tech-tag:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.project-metrics {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.metric-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: var(--text-sm);
  color: var(--primary-color);
  font-weight: 600;
}

/* Project filtering animations */
.projects-grid {
  transition: all var(--transition-normal);
}

.project-card {
  transition: all var(--transition-normal), opacity 0.3s ease, transform 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .projects-filter {
    gap: var(--space-2);
  }
  
  .filter-btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }
  
  .project-image {
    height: 160px;
  }
  
  .project-info {
    padding: var(--space-4);
  }
  
  .project-title {
    font-size: var(--text-lg);
  }
}

/* ==========================================================================
   Experience Section Styles
   ========================================================================== */

.experience-section {
  background-color: var(--background-color);
}

.experience-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
}

.experience-intro p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
  transform: translateX(-50%);
}

@media (max-width: 767px) {
  .timeline::before {
    left: 20px;
  }
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-16);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  z-index: 2;
}

@media (max-width: 767px) {
  .timeline-marker {
    left: 20px;
  }
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  border: 4px solid var(--background-color);
  box-shadow: 0 0 0 2px var(--primary-color);
  transition: all var(--transition-normal);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px var(--primary-color)30;
}

.timeline-line {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 2px;
  height: calc(100% + var(--space-16));
  background: linear-gradient(180deg, var(--primary-color), transparent);
  transform: translateX(-50%);
}

.timeline-item:last-child .timeline-line {
  display: none;
}

.timeline-content {
  position: relative;
  width: calc(50% - 40px);
  margin-left: auto;
  margin-right: 40px;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 40px;
  margin-right: auto;
}

@media (max-width: 767px) {
  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px;
    margin-right: 0;
  }
  
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 60px;
    margin-right: 0;
  }
}

.experience-card {
  background-color: var(--surface-color);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 20px;
  right: -12px;
  width: 0;
  height: 0;
  border: 12px solid transparent;
  border-left-color: var(--surface-color);
}

.timeline-item:nth-child(even) .experience-card::before {
  right: auto;
  left: -12px;
  border-left-color: transparent;
  border-right-color: var(--surface-color);
}

@media (max-width: 767px) {
  .experience-card::before {
    right: auto;
    left: -12px;
    border-left-color: transparent;
    border-right-color: var(--surface-color);
  }
}

.experience-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow-medium);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

@media (max-width: 767px) {
  .experience-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.experience-title-group {
  flex: 1;
}

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

.experience-company {
  color: var(--primary-color);
  font-weight: 500;
  font-size: var(--text-base);
}

.experience-advisor {
  color: var(--text-secondary);
  font-style: italic;
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}

.experience-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
}

@media (max-width: 767px) {
  .experience-meta {
    align-items: flex-start;
  }
}

.experience-duration {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
}

.experience-location {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-style: italic;
}

.experience-description {
  margin-bottom: var(--space-6);
}

.experience-description p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.experience-responsibilities {
  list-style: none;
  padding: 0;
  margin: 0;
}

.experience-responsibilities li {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
  line-height: 1.5;
}

.experience-responsibilities li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
}

.experience-responsibilities li:last-child {
  margin-bottom: 0;
}

.experience-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.skill-badge {
  background-color: var(--background-color);
  color: var(--primary-color);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.skill-badge:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* Timeline animations */
.timeline-item {
  opacity: 1; /* Default to visible */
  transform: translateY(0); /* Default position */
  transition: all 0.6s ease-out;
  min-height: 200px; /* Ensure items have minimum height */
  position: relative;
}

/* Only hide if JavaScript is working and will animate */
.js-enabled .timeline-item:not(.animate-in) {
  opacity: 0;
  transform: translateY(30px);
}

.timeline-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}





/* ==========================================================================
   Contact Section Styles
   ========================================================================== */

.contact-section {
  background-color: var(--surface-color);
}

.contact-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
}

.contact-intro p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  max-width: 1200px;
  margin: 0 auto;
}

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

/* Contact Information Styles */
.contact-info {
  background-color: var(--background-color);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--border-color);
  height: fit-content;
}

.contact-info h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  font-size: var(--text-2xl);
}

.contact-details {
  margin-bottom: var(--space-8);
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

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

.contact-detail-item:hover {
  background-color: var(--surface-color);
  margin: 0 calc(-1 * var(--space-4));
  padding: var(--space-4);
  border-radius: var(--radius-lg);
}

.contact-icon {
  font-size: var(--text-2xl);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-color);
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

.contact-detail-content {
  flex: 1;
}

.contact-detail-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}

.contact-detail-value {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.contact-detail-value:hover {
  color: var(--primary-color);
}

.availability-status {
  background: linear-gradient(135deg, var(--primary-color)10, var(--accent-color)10);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border-left: 4px solid var(--accent-color);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: relative;
}

.status-dot.available {
  background-color: var(--accent-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--accent-color)40;
  }
  70% {
    box-shadow: 0 0 0 10px var(--accent-color)00;
  }
  100% {
    box-shadow: 0 0 0 0 var(--accent-color)00;
  }
}

.status-text {
  font-weight: 600;
  color: var(--text-primary);
}

.status-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Contact Form Styles */
.contact-form-container {
  background-color: var(--background-color);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--border-color);
}

.contact-form-container h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  font-size: var(--text-2xl);
}

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

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

.required {
  color: var(--secondary-color);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-4);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-family: var(--font-primary);
  background-color: var(--surface-color);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  box-sizing: border-box; /* Ensure proper sizing */
  -webkit-appearance: none; /* Remove default styling */
  -moz-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--background-color);
  box-shadow: 0 0 0 3px var(--primary-color)20;
}

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

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

.form-error {
  color: var(--secondary-color);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease-out;
}

.form-error.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.form-submit-btn {
  width: 100%;
  position: relative;
  overflow: hidden;
  min-height: 48px; /* Ensure consistent height */
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-text,
.btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-loading {
  display: none;
}

.form-submit-btn.loading .btn-text {
  display: none;
}

.form-submit-btn.loading .btn-loading {
  display: inline-flex;
}

.form-success {
  background-color: var(--accent-color)20;
  border: 1px solid var(--accent-color);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-top: var(--space-6);
  display: none;
  align-items: flex-start;
  gap: var(--space-4);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease-out;
}

.form-success.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.success-icon {
  font-size: var(--text-2xl);
  flex-shrink: 0;
}

.success-message strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--space-2);
}

.success-message p {
  color: var(--text-secondary);
  margin: 0;
  font-size: var(--text-sm);
}

/* Form animations */
.form-group {
  opacity: 1; /* Default to visible */
  transform: translateY(0); /* Default position */
  transition: all 0.6s ease-out;
}

/* Only hide if JavaScript is working and will animate */
.js-enabled .form-group:not(.animate-in) {
  opacity: 0;
  transform: translateY(20px);
}

.form-group.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.js-enabled .form-group:nth-child(1) { animation: fadeInUp 0.6s ease-out 0.1s forwards; }
.js-enabled .form-group:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.2s forwards; }
.js-enabled .form-group:nth-child(3) { animation: fadeInUp 0.6s ease-out 0.3s forwards; }
.js-enabled .form-group:nth-child(4) { animation: fadeInUp 0.6s ease-out 0.4s forwards; }
.js-enabled .form-group:nth-child(5) { animation: fadeInUp 0.6s ease-out 0.5s forwards; }

/* Responsive adjustments */
@media (max-width: 767px) {
  .contact-info,
  .contact-form-container {
    padding: var(--space-6);
  }

  .contact-detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .contact-icon {
    align-self: flex-start;
  }

  .form-input,
  .form-textarea {
    padding: var(--space-3);
    font-size: var(--text-sm);
  }

  .form-submit-btn {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    min-height: 44px; /* Ensure touch-friendly size */
  }

  .contact-form-container h3 {
    font-size: var(--text-xl);
  }
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: var(--space-8) 0;
}

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

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

.footer-content p {
  color: var(--text-secondary);
  margin: 0;
}

.footer-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-color);
}/* 
==========================================================================
   Scroll Animations
   ========================================================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation delays for child elements */
.animate-on-scroll .card:nth-child(1) { transition-delay: 0.1s; }
.animate-on-scroll .card:nth-child(2) { transition-delay: 0.2s; }
.animate-on-scroll .card:nth-child(3) { transition-delay: 0.3s; }
.animate-on-scroll .card:nth-child(4) { transition-delay: 0.4s; }

/* Loading states */
body:not(.loaded) * {
  animation-play-state: paused !important;
}

.loaded .hero-title {
  animation: fadeInUp 0.8s ease-out;
}

.loaded .hero-subtitle {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.loaded .hero-description {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.loaded .hero-contact-info {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.loaded .hero-actions {
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.loaded .profile-image {
  animation: fadeInScale 1s ease-out 0.5s both;
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .header-area,
  .theme-toggle,
  .mobile-menu-toggle,
  .hero-actions,
  .footer {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }

  .hero-section {
    padding: 20pt 0;
    background: none;
  }

  .section-title {
    font-size: 16pt;
    margin-bottom: 12pt;
  }

  .card {
    border: 1pt solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   High Contrast Mode Support
   ========================================================================== */

@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000ff;
    --secondary-color: #ff8c00;
    --accent-color: #008000;
    --text-primary: #000000;
    --text-secondary: #333333;
    --border-color: #000000;
  }

  [data-theme="dark"] {
    --primary-color: #66b3ff;
    --secondary-color: #ffb366;
    --accent-color: #66ff66;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #ffffff;
  }
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */

@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;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Enhanced Accessibility Features
   ========================================================================== */

/* Enhanced focus styles for better visibility */
*:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--background-color), 0 0 0 4px var(--primary-color)40;
}

/* High contrast focus for better visibility */
@media (prefers-contrast: high) {
  *:focus-visible {
    outline: 4px solid var(--primary-color);
    outline-offset: 3px;
  }
}

/* Skip focus for mouse users */
.js-focus-visible *:focus:not(.focus-visible) {
  outline: none;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 1000;
  font-weight: 600;
  transition: top var(--transition-fast);
  border: 2px solid var(--primary-color);
}

.skip-link:focus {
  top: 6px;
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* Focus trap for modal/menu states */
.nav-menu.active {
  position: fixed;
  top: 100%;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background-color);
  z-index: 999;
  overflow-y: auto;
}

/* Keyboard navigation indicators */
.keyboard-user *:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Enhanced button focus states */
.btn:focus-visible,
.filter-btn:focus-visible,
.theme-toggle:focus-visible,
.mobile-menu-toggle:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 3px;
  transform: translateY(-2px);
}

/* Form element focus enhancements */
.form-input:focus-visible,
.form-textarea:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-color)20;
}

/* Link focus enhancements */
a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-color)10;
  padding: 2px 4px;
  margin: -2px -4px;
}

/* Card focus states for keyboard navigation */
.project-card:focus-within,
.experience-card:focus-within,
.skill-item:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-medium);
}

/* Ensure sufficient color contrast */
:root {
  --text-contrast-ratio: 4.5; /* WCAG AA compliance */
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000cc;
    --secondary-color: #cc6600;
    --accent-color: #006600;
    --text-primary: #000000;
    --text-secondary: #333333;
    --border-color: #666666;
    --background-color: #ffffff;
    --surface-color: #f5f5f5;
  }

  [data-theme="dark"] {
    --primary-color: #6666ff;
    --secondary-color: #ff9933;
    --accent-color: #66ff66;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #999999;
    --background-color: #000000;
    --surface-color: #1a1a1a;
  }
}

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

/* Announce dynamic content changes */
.live-region {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Ensure interactive elements are large enough */
.btn,
.filter-btn,
.theme-toggle,
.mobile-menu-toggle,
.project-link {
  min-width: 44px;
  min-height: 44px;
}

/* Touch target improvements for mobile */
@media (max-width: 767px) {
  .nav-menu a,
  .contact-detail-value {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
  }
}

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

  .animate-on-scroll,
  .timeline-item,
  .skill-progress {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Ensure proper heading hierarchy */
h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

/* Responsive heading sizes for accessibility */
@media (max-width: 767px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  h4 { font-size: var(--text-xl); }
}

/* Error state accessibility */
.form-input.error,
.form-textarea.error {
  border-color: var(--secondary-color);
  background-color: var(--secondary-color)10;
  outline: 2px solid var(--secondary-color);
}

.form-error.show {
  display: block;
  color: var(--secondary-color);
  font-weight: 600;
  margin-top: var(--space-2);
}

/* Loading state accessibility */
[aria-busy="true"] {
  cursor: wait;
}

/* Ensure sufficient spacing for readability */
p, li {
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

/* Language and direction support */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .timeline::before {
  right: 50%;
  left: auto;
}

[dir="rtl"] .timeline-marker {
  right: 50%;
  left: auto;
}

/* ==========================================================================
   Error States and Fallbacks
   ========================================================================== */

/* Fallback for when custom properties aren't supported */
@supports not (color: var(--primary-color)) {
  :root {
    color: #1f2937;
    background-color: #ffffff;
  }

  .btn-primary {
    background-color: #2563eb;
    color: white;
  }

  .btn-secondary {
    border: 2px solid #2563eb;
    color: #2563eb;
  }
}

/* Image loading fallback */
img {
  background-color: var(--surface-color);
}

img[alt] {
  font-style: italic;
  color: var(--text-secondary);
  text-align: center;
  display: block;
}

/* ==========================================================================
   Loading States & Skeleton Screens
   ========================================================================== */

/* Loading skeleton animations */
@keyframes skeleton-loading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-color) 25%, var(--border-color) 50%, var(--surface-color) 75%);
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s infinite;
}

/* Section loading states */
section.loading {
  opacity: 0.7;
  pointer-events: none;
}

section.loading .section-title {
  background: var(--border-color);
  color: transparent;
  border-radius: var(--radius-md);
  animation: skeleton-loading 1.5s infinite;
}

section.loading .card,
section.loading .project-card,
section.loading .experience-card {
  background: linear-gradient(90deg, var(--surface-color) 25%, var(--border-color) 50%, var(--surface-color) 75%);
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s infinite;
}

section.loading .card *,
section.loading .project-card *,
section.loading .experience-card * {
  color: transparent !important;
  background-color: var(--border-color) !important;
  border-radius: var(--radius-sm);
}

/* Image lazy loading */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

img.lazy.loaded {
  opacity: 1;
}

/* Placeholder for images while loading */
img[loading="lazy"] {
  background: linear-gradient(90deg, var(--surface-color) 25%, var(--border-color) 50%, var(--surface-color) 75%);
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s infinite;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Progressive loading for content */
.content-loading {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.content-loading.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Optimize critical rendering path */
.above-fold {
  contain: layout style paint;
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

/* GPU acceleration for animations */
.profile-image,
.card,
.btn,
.skill-progress,
.timeline-dot {
  will-change: transform;
}

/* Optimize repaints */
.header-area {
  contain: layout style paint;
}

.section-title::after {
  contain: layout style paint;
}

/* Reduce layout thrashing */
.nav-menu.active {
  contain: layout style;
}

/* Optimize font loading */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Inter Regular'), local('Inter-Regular');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('Poppins SemiBold'), local('Poppins-SemiBold');
}

/* Preload critical resources */
.hero-section {
  contain: layout style paint;
}

/* Optimize animations for 60fps */
@media (prefers-reduced-motion: no-preference) {
  .skill-progress,
  .timeline-dot,
  .project-card {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
  }
}

/* Resource hints for better loading */
.project-image img,
.profile-image {
  content-visibility: auto;
  contain-intrinsic-size: 300px 200px;
}

/* Optimize scroll performance */
.timeline::before {
  contain: layout style paint;
}

/* Critical CSS inlining optimization */
.hero-section,
.header-area {
  critical: true;
}

/* Defer non-critical animations */
.animate-on-scroll:not(.animate-in) {
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

/* Optimize image loading */
img {
  max-width: 100%;
  height: auto;
  loading: lazy;
  decoding: async;
}

/* Critical images should load immediately */
.profile-image {
  loading: eager;
  fetchpriority: high;
}/* ======
====================================================================
   Cross-Browser Compatibility Fixes
   ========================================================================== */

/* CSS Grid fallback for older browsers */
@supports not (display: grid) {
  .hero-content,
  .about-grid,
  .skills-grid,
  .projects-grid,
  .contact-grid {
    display: flex;
    flex-wrap: wrap;
  }
  
  .hero-content > *,
  .about-grid > *,
  .skills-grid > *,
  .projects-grid > *,
  .contact-grid > * {
    flex: 1;
    min-width: 300px;
    margin: var(--space-4);
  }
}

/* Flexbox vendor prefixes for older browsers */
.flex {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.flex-col {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.items-center {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.justify-center {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.justify-between {
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

/* Transform vendor prefixes */
.profile-image:hover,
.card:hover,
.project-card:hover,
.experience-card:hover {
  -webkit-transform: translateY(-4px) scale(1.02);
  -ms-transform: translateY(-4px) scale(1.02);
  transform: translateY(-4px) scale(1.02);
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover {
  -webkit-transform: translateY(-2px);
  -ms-transform: translateY(-2px);
  transform: translateY(-2px);
}

/* Transition vendor prefixes */
.btn,
.card,
.project-card,
.experience-card,
.form-input,
.form-textarea {
  -webkit-transition: all var(--transition-normal);
  -o-transition: all var(--transition-normal);
  transition: all var(--transition-normal);
}

/* Border radius vendor prefixes for older browsers */
.btn,
.card,
.project-card,
.experience-card,
.form-input,
.form-textarea {
  -webkit-border-radius: var(--radius-lg);
  -moz-border-radius: var(--radius-lg);
  border-radius: var(--radius-lg);
}

/* Box shadow vendor prefixes */
.card:hover,
.project-card:hover,
.experience-card:hover {
  -webkit-box-shadow: 0 8px 24px var(--shadow-medium);
  -moz-box-shadow: 0 8px 24px var(--shadow-medium);
  box-shadow: 0 8px 24px var(--shadow-medium);
}

/* Backdrop filter vendor prefixes */
.header-area {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Background clip vendor prefixes for gradient text */
.name {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* Fallback for browsers that don't support background-clip */
}

/* Fallback for browsers that don't support background-clip */
@supports not (-webkit-background-clip: text) {
  .name {
    color: var(--primary-color);
    background: none;
  }
}

/* CSS Custom Properties fallback */
@supports not (color: var(--primary-color)) {
  /* Fallback colors for browsers that don't support CSS custom properties */
  body {
    color: #1f2937;
    background-color: #ffffff;
  }
  
  .btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    color: white;
  }
  
  .btn-secondary {
    background-color: transparent;
    border-color: #2563eb;
    color: #2563eb;
  }
  
  .card,
  .project-card,
  .experience-card {
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
  }
  
  .section-title::after {
    background: linear-gradient(90deg, #2563eb, #10b981);
  }
}

/* Internet Explorer specific fixes */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  /* IE10+ specific styles */
  .hero-content,
  .about-grid,
  .skills-grid,
  .projects-grid,
  .contact-grid {
    display: -ms-flexbox;
    -ms-flex-wrap: wrap;
  }
  
  .hero-content > *,
  .about-grid > *,
  .skills-grid > *,
  .projects-grid > *,
  .contact-grid > * {
    -ms-flex: 1 1 300px;
  }
  
  /* Fix for IE flexbox bugs */
  .nav-menu {
    -ms-flex-direction: row;
  }
  
  @media (max-width: 1023px) {
    .nav-menu {
      -ms-flex-direction: column;
    }
  }
}

/* Safari specific fixes */
@supports (-webkit-appearance: none) {
  /* Safari-specific styles */
  .form-input,
  .form-textarea {
    -webkit-appearance: none;
  }
  
  .btn {
    -webkit-appearance: none;
  }
  
  /* Fix for Safari's handling of flexbox */
  .hero-content,
  .about-grid,
  .contact-grid {
    -webkit-box-flex: 1;
  }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
  /* Firefox-specific styles */
  .skill-progress {
    background: -moz-linear-gradient(90deg, var(--primary-color), var(--accent-color));
  }
  
  .section-title::after {
    background: -moz-linear-gradient(90deg, var(--primary-color), var(--accent-color));
  }
  
  /* Fix for Firefox's handling of CSS Grid */
  .projects-grid {
    display: -moz-grid;
  }
}

/* Edge specific fixes */
@supports (-ms-ime-align: auto) {
  /* Edge-specific styles */
  .hero-content,
  .about-grid,
  .skills-grid,
  .projects-grid,
  .contact-grid {
    display: -ms-grid;
  }
  
  /* Fix for Edge's CSS Grid implementation */
  .projects-grid {
    -ms-grid-columns: 1fr 1fr 1fr;
    -ms-grid-rows: auto;
  }
  
  .project-card:nth-child(1) { -ms-grid-column: 1; -ms-grid-row: 1; }
  .project-card:nth-child(2) { -ms-grid-column: 2; -ms-grid-row: 1; }
  .project-card:nth-child(3) { -ms-grid-column: 3; -ms-grid-row: 1; }
  .project-card:nth-child(4) { -ms-grid-column: 1; -ms-grid-row: 2; }
  .project-card:nth-child(5) { -ms-grid-column: 2; -ms-grid-row: 2; }
  .project-card:nth-child(6) { -ms-grid-column: 3; -ms-grid-row: 2; }
}

/* Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  /* Chrome-specific styles */
  .form-input::-webkit-input-placeholder,
  .form-textarea::-webkit-input-placeholder {
    color: var(--text-secondary);
    opacity: 1;
  }
  
  /* Fix for Chrome's autofill styles */
  .form-input:-webkit-autofill,
  .form-input:-webkit-autofill:hover,
  .form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--surface-color) inset;
    -webkit-text-fill-color: var(--text-primary);
  }
}

/* Smooth scrolling fallback for browsers that don't support it */
@supports not (scroll-behavior: smooth) {
  html {
    scroll-behavior: auto;
  }
}

/* Object-fit fallback for older browsers */
@supports not (object-fit: cover) {
  .profile-image,
  .project-image img {
    width: 100%;
    height: 100%;
  }
}

/* Sticky positioning fallback */
@supports not (position: sticky) {
  .header-area {
    position: fixed;
  }
}

/* CSS Grid minmax() fallback */
@supports not (grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))) {
  .projects-grid {
    display: flex;
    flex-wrap: wrap;
  }
  
  .project-card {
    flex: 1 1 300px;
    margin: var(--space-4);
  }
}

/* Intersection Observer fallback */
.no-intersection-observer .animate-on-scroll {
  opacity: 1;
  transform: translateY(0);
}

.no-intersection-observer .timeline-item {
  opacity: 1;
  transform: translateY(0);
}



/* CSS containment fallback */
@supports not (contain: layout style paint) {
  .header-area,
  .hero-section,
  .section-title::after {
    /* Remove containment for browsers that don't support it */
  }
}

/* Print styles for better cross-browser printing */
@media print {
  * {
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
  }
  
  .header-area,
  .theme-toggle,
  .mobile-menu-toggle,
  .hero-actions,
  .footer,
  .project-overlay {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }
  
  .hero-section,
  section {
    padding: 20pt 0;
    background: none;
    page-break-inside: avoid;
  }
  
  .section-title {
    font-size: 16pt;
    margin-bottom: 12pt;
    page-break-after: avoid;
  }
  
  .card,
  .project-card,
  .experience-card {
    border: 1pt solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
    margin-bottom: 12pt;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }
}/*
 ==========================================================================
   Final Polish & Interactive Enhancements
   ========================================================================== */

/* Smooth Page Transitions */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Micro-animations for Interactive Elements */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

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

@keyframes bounce-in {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slide-in-left {
  0% { transform: translateX(-100px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-right {
  0% { transform: translateX(100px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--primary-color); }
}

/* Enhanced Hover Effects */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--shadow-medium);
}

.btn:active {
  transform: translateY(-1px);
  transition: transform 0.1s;
}

/* Card Hover Enhancements */
.card,
.project-card,
.experience-card,
.info-card,
.skill-category {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card::after,
.project-card::after,
.experience-card::after,
.info-card::after,
.skill-category::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color)05, var(--accent-color)05);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
  pointer-events: none;
}

.card:hover::after,
.project-card:hover::after,
.experience-card:hover::after,
.info-card:hover::after,
.skill-category:hover::after {
  opacity: 1;
}

.card:hover,
.project-card:hover,
.experience-card:hover,
.info-card:hover,
.skill-category:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px var(--shadow-medium);
}

/* Interactive Navigation Enhancements */
.nav-menu a {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
  width: 100%;
}

.nav-menu a:hover {
  transform: translateY(-2px);
  color: var(--primary-color);
}

/* Logo Animation */
.logo a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.logo a:hover {
  transform: scale(1.1);
  text-shadow: 0 0 20px var(--primary-color)40;
}

/* Theme Toggle Enhancement */
.theme-toggle {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.theme-toggle:hover {
  transform: rotate(180deg) scale(1.1);
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.theme-toggle:active {
  transform: rotate(180deg) scale(0.95);
}

/* Profile Image Enhancements */
.profile-image {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.profile-image::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--primary-color));
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.profile-image:hover::before {
  opacity: 0.7;
}

.profile-image:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 15px 35px var(--shadow-heavy);
}

/* Skill Progress Bar Enhancements */
.skill-progress {
  position: relative;
  overflow: hidden;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.skill-item:hover .skill-progress::after {
  transform: translateX(100%);
}

/* Project Filter Button Enhancements */
.filter-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--primary-color);
  border-radius: 50%;
  transition: all 0.4s ease;
  transform: translate(-50%, -50%);
  z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
  width: 120%;
  height: 120%;
}

.filter-btn:hover,
.filter-btn.active {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow-medium);
}

/* Timeline Dot Enhancements */
.timeline-dot {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.timeline-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--primary-color)30;
  border-radius: 50%;
  transition: all 0.4s ease;
  transform: translate(-50%, -50%);
}

.timeline-item:hover .timeline-dot::before {
  width: 40px;
  height: 40px;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  animation: pulse-glow 2s infinite;
}

/* Contact Form Enhancements */
.form-input,
.form-textarea {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.form-input:focus,
.form-textarea:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-light);
}

.form-group {
  position: relative;
}

.form-label {
  transition: all 0.3s ease;
}

/* Fix: Labels are before inputs in HTML, not after */
.form-group:focus-within .form-label {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Loading State Enhancements */
.loading-spinner {
  animation: spin 1s linear infinite, pulse-glow 2s ease-in-out infinite;
}

/* Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  z-index: 1001;
  transition: width 0.1s ease;
}

/* Section Reveal Animations */
.section-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Text Highlight Effect */
.text-highlight {
  background: linear-gradient(120deg, var(--accent-color)30 0%, var(--accent-color)30 100%);
  background-repeat: no-repeat;
  background-size: 100% 0px;
  background-position: 0 88%;
  transition: background-size 0.4s ease;
}

.text-highlight:hover,
.text-highlight.active {
  background-size: 100% 88%;
}

/* Interactive Icons */
.contact-icon,
.skill-category-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-detail-item:hover .contact-icon,
.skill-category:hover .skill-category-icon {
  transform: scale(1.2) rotate(10deg);
  filter: brightness(1.2);
}

/* Status Indicator Enhancement */
.status-dot.available {
  position: relative;
}

.status-dot.available::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: var(--accent-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 2s infinite;
}

/* Fine-tuned Typography */
.hero-title .name {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color), var(--primary-color));
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Enhanced Visual Hierarchy */
.section-title {
  position: relative;
  transition: all 0.3s ease;
}

.section-title:hover {
  transform: translateY(-2px);
  text-shadow: 0 4px 8px var(--shadow-light);
}

.section-title::after {
  transition: all 0.3s ease;
}

.section-title:hover::after {
  width: 80px;
  height: 4px;
}

/* Responsive Micro-animations */
@media (max-width: 767px) {
  .card:hover,
  .project-card:hover,
  .experience-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
  
  .btn:hover {
    transform: translateY(-2px);
  }
  
  .profile-image:hover {
    transform: scale(1.03);
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .btn::before,
  .profile-image::before,
  .timeline-dot::before,
  .filter-btn::before {
    display: none;
  }
  
  .theme-toggle:hover {
    transform: scale(1.1);
  }
  
  .nav-menu a:hover {
    transform: none;
  }
  
  .card:hover,
  .project-card:hover,
  .experience-card:hover {
    transform: none;
  }
}

/* High contrast mode enhancements */
@media (prefers-contrast: high) {
  .btn:hover,
  .filter-btn:hover,
  .card:hover,
  .project-card:hover {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
  }
}

/* Print optimizations for interactive elements */
@media print {
  .btn::before,
  .card::after,
  .project-card::after,
  .nav-menu a::before,
  .profile-image::before {
    display: none;
  }
  
  .scroll-progress {
    display: none;
  }
}