/* Modern Personal Website Styles */
/* Additional styles to complement the existing design */

/* CSS Variables for consistent theming */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #28a745;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --border-radius: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

/* Global improvements */
* {
  box-sizing: border-box;
}

body {
  line-height: 1.6;
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
}

/* Enhanced navigation */
.w3-sidebar {
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%) !important;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.w3-sidebar a {
  transition: var(--transition);
  position: relative;
}

.w3-sidebar a:hover {
  background-color: rgba(255,255,255,0.1) !important;
  transform: translateX(5px);
}

.w3-sidebar a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--primary-color);
  transform: scaleY(0);
  transition: var(--transition);
}

.w3-sidebar a:hover::before {
  transform: scaleY(1);
}

/* Enhanced hero section */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(transparent, rgba(255,255,255,0.1));
  pointer-events: none;
}

/* Enhanced project cards */
.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::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::before {
  left: 100%;
}

/* Enhanced news items */
.news-item {
  position: relative;
  overflow: hidden;
}

.news-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.news-item:hover::before {
  width: 8px;
}

/* Enhanced award items */
.award-item {
  position: relative;
  overflow: hidden;
}

.award-item::before {
  content: '🏆';
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  opacity: 0.3;
}

/* Enhanced contact links */
.contact-link {
  position: relative;
  overflow: hidden;
}

.contact-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
  transform: translate(-50%, -50%);
}

.contact-link:hover::before {
  width: 300px;
  height: 300px;
}

/* Enhanced section titles */
.section-title {
  position: relative;
  overflow: hidden;
}

.section-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.8s ease;
}

.section-title:hover::before {
  left: 100%;
}

/* Enhanced profile image */
.profile-image {
  position: relative;
  overflow: hidden;
}

.profile-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.profile-image:hover::before {
  transform: translateX(100%);
}

/* Responsive improvements */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1rem !important;
  }
  
  .section-title {
    font-size: 1.8rem !important;
  }
  
  .project-card {
    margin-bottom: 1.5rem;
  }
  
  .contact-links {
    gap: 1rem !important;
  }
  
  .contact-link {
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 2rem !important;
  }
  
  .profile-image {
    width: 120px !important;
    height: 120px !important;
  }
  
  .project-card {
    padding: 1rem !important;
  }
}

/* Print styles */
@media print {
  .hero-section {
    background: white !important;
    color: black !important;
  }
  
  .w3-sidebar {
    display: none !important;
  }
  
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .project-card,
  .news-item,
  .award-item {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .hero-section {
    background: #000 !important;
    color: #fff !important;
  }
  
  .project-card,
  .news-item,
  .award-item {
    border: 2px solid #000 !important;
  }
}

/* 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;
  }
  
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #e0e0e0;
    --light-bg: #2c2c2c;
  }
  
  .w3-container {
    background-color: #1a1a1a !important;
    color: var(--text-color) !important;
  }
  
  .w3-light-grey {
    background-color: var(--light-bg) !important;
  }
  
  .project-card {
    background-color: #2c2c2c !important;
    border-left-color: var(--primary-color) !important;
  }
  
  .news-item {
    background-color: var(--light-bg) !important;
  }
  
  .news-item:hover {
    background-color: #3c3c3c !important;
  }
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Focus styles for better accessibility */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

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

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

