/* Base Styles */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* Header Styles */
header {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

#mobile-menu-toggle {
  transition: transform 0.3s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Theme Styles */
body.light {
  background-color: #f9fafb;
  color: #24292f;
}

body.dark {
  background-color: #0d1117;
  color: #c9d1d9;
}

/* Section Titles */
.section-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 2rem;
  border-bottom: 4px solid #0366d6;
  display: inline-block;
  color: #0366d6;
  text-align: center;
  width: 100%;
}

body.dark .section-title {
  color: #58a6ff;
  border-color: #58a6ff;
}

/* Responsive Section Titles */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background-color: #e2e8f0;
  border: none;
  border-radius: 50%;
  padding: 0.5rem;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
}

body.dark .theme-toggle-btn {
  background-color: #30363d;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  background-color: #d1d5db;
}

body.dark .theme-toggle-btn:hover {
  background-color: #4b5563;
}

.theme-toggle-btn i {
  font-size: 1rem;
  color: #0366d6;
  transition: color 0.3s ease;
}

body.dark .theme-toggle-btn i {
  color: #58a6ff;
}

/* Mobile Theme Toggle Button */
.mobile-theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.mobile-theme-toggle-btn:hover {
  color: #0366d6;
  background-color: #f3f4f6;
}

body.dark .mobile-theme-toggle-btn {
  color: #9ca3af;
}

body.dark .mobile-theme-toggle-btn:hover {
  color: #58a6ff;
  background-color: #374151;
}

.mobile-theme-toggle-btn i {
  font-size: 1rem;
  width: 1rem;
  text-align: center;
}

/* Mobile Menu Toggle */
#mobile-menu-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  background-color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  z-index: 1000;
  transition: all 0.3s ease;
}

body.dark #mobile-menu-toggle {
  background-color: #30363d;
  color: white;
}

/* Navigation Styles */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

/* Button Styles */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: #0366d6;
  color: white;
}

.btn-primary:hover {
  background-color: #2188ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(3, 102, 214, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: #0366d6;
  border: 2px solid #0366d6;
}

.btn-secondary:hover {
  background-color: #0366d6;
  color: white;
  transform: translateY(-2px);
}

body.dark .btn-secondary {
  color: #58a6ff;
  border-color: #58a6ff;
}

body.dark .btn-secondary:hover {
  background-color: #58a6ff;
  color: #0d1117;
}

.nav-link:hover {
  color: #0366d6;
  background-color: #f3f4f6;
  transform: translateY(-2px);
}

body.dark .nav-link {
  color: #9ca3af;
}

body.dark .nav-link:hover {
  color: #58a6ff;
  background-color: #374151;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.mobile-nav-link:hover {
  color: #0366d6;
  background-color: #f3f4f6;
}

body.dark .mobile-nav-link {
  color: #9ca3af;
}

body.dark .mobile-nav-link:hover {
  color: #58a6ff;
  background-color: #374151;
}

/* Hero Section */
#hero {
  padding-top: 5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#hero h1 {
  font-size: 2.5rem;
  font-weight: 900;
  color: #24292f;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.15);
  transition: color 0.5s;
}

body.dark #hero h1 {
  color: #8b949e;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
}

#hero p {
  font-size: 1.25rem;
  color: #4a5568;
  margin-bottom: 2rem;
  transition: color 0.5s;
}

body.dark #hero p {
  color: #8b949e;
}

/* Responsive Hero */
@media (min-width: 640px) {
  #hero h1 {
    font-size: 3rem;
  }
  #hero p {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) {
  #hero h1 {
    font-size: 3.5rem;
  }
  #hero p {
    font-size: 1.75rem;
  }
}

@media (min-width: 1024px) {
  #hero h1 {
    font-size: 4rem;
  }
  #hero p {
    font-size: 2rem;
  }
}

/* Button Styles */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: #0366d6;
  color: white;
}

.btn-primary:hover {
  background-color: #2188ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(3, 102, 214, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: #0366d6;
  border: 2px solid #0366d6;
}

.btn-secondary:hover {
  background-color: #0366d6;
  color: white;
  transform: translateY(-2px);
}

body.dark .btn-secondary {
  color: #58a6ff;
  border-color: #58a6ff;
}

body.dark .btn-secondary:hover {
  background-color: #58a6ff;
  color: #0d1117;
}

/* Card Styles */
.card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

body.dark .card {
  background-color: #161b22;
  box-shadow: 0 4px 8px rgba(21,24,28,0.7);
  border-color: #30363d;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

body.dark .card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

/* Project Cards */
.project-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  height: 100%;
  display: flex;
  flex-direction: column;
}

body.dark .project-card {
  background-color: #161b22;
  box-shadow: 0 4px 8px rgba(21,24,28,0.7);
  border-color: #30363d;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

body.dark .project-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #24292f;
  margin-bottom: 0.5rem;
  transition: color 0.5s;
}

body.dark .project-title {
  color: #c9d1d9;
}

.project-date {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

body.dark .project-date {
  color: #8b949e;
}

.project-description {
  color: #374151;
  margin-bottom: 1rem;
  flex-grow: 1;
  line-height: 1.6;
}

body.dark .project-description {
  color: #adbac7;
}

.project-link {
  color: #0366d6;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  margin-top: auto;
}

.project-link:hover {
  color: #2188ff;
  transform: translateX(4px);
}

body.dark .project-link {
  color: #58a6ff;
}

body.dark .project-link:hover {
  color: #79c0ff;
}

/* Skill Cards */
.skill-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  height: 100%;
}

body.dark .skill-card {
  background-color: #161b22;
  box-shadow: 0 4px 8px rgba(21,24,28,0.7);
  border-color: #30363d;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

body.dark .skill-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.skill-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #24292f;
  margin-bottom: 1rem;
  text-align: center;
}

body.dark .skill-title {
  color: #c9d1d9;
}

.skill-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.skill-icon {
  width: 2rem;
  height: 2rem;
  transition: transform 0.3s ease;
}

.skill-icon:hover {
  transform: scale(1.2);
}

/* Contact Links */
.contact-link {
  color: #6b7280;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.contact-link:hover {
  color: #0366d6;
  transform: translateY(-4px) scale(1.1);
}

body.dark .contact-link {
  color: #9ca3af;
}

body.dark .contact-link:hover {
  color: #58a6ff;
}

/* Footer */
footer {
  background-color: white;
  border-top: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

body.dark footer {
  background-color: #0d1117;
  border-color: #30363d;
}

/* Mobile Menu */
#mobile-menu {
  transition: all 0.3s ease;
}

#mobile-menu.show {
  display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Navigation adjustments */
  header {
    padding: 0.5rem 0;
  }
  
  /* Hero adjustments */
  #hero {
    padding-top: 4rem;
    padding-bottom: 2rem;
  }
  
  /* Section spacing */
  section {
    padding: 2rem 1rem;
  }
  
  /* Card padding */
  .card, .project-card, .skill-card {
    padding: 1rem;
  }
  
  /* Grid adjustments */
  .grid {
    gap: 1rem;
  }
  
  /* Button adjustments */
  .btn-primary, .btn-secondary {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 1024px) {
  /* Adjust navigation spacing for medium screens */
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .theme-toggle-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0.4rem;
  }
  
  .theme-toggle-btn i {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  /* Further mobile optimizations */
  .section-title {
    font-size: 1.5rem;
  }
  
  #hero h1 {
    font-size: 2rem;
  }
  
  #hero p {
    font-size: 1rem;
  }
  
  .project-title {
    font-size: 1.125rem;
  }
  
  .skill-title {
    font-size: 1.125rem;
  }
  
  /* Contact icons */
  .contact-link {
    font-size: 1.5rem;
  }
  
  /* Navigation icons */
  .nav-link i, .mobile-nav-link i {
    font-size: 1rem;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.6s ease forwards;
}

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

/* Smooth scrolling for anchor links */
html {
  scroll-padding-top: 80px;
}

/* Focus styles for accessibility */
button:focus,
a:focus {
  outline: 2px solid #0366d6;
  outline-offset: 2px;
}

body.dark button:focus,
body.dark a:focus {
  outline-color: #58a6ff;
}

/* Loading animation */
.loading {
  opacity: 0;
  transform: translateY(20px);
}

.loaded {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease;
}
