/* Base Styles and Variables */
:root {
  /* Light Theme (Sky Colors) */
  --primary-light: #4682b4; /* Darker blue for better contrast */
  --secondary-light: #87ceeb;
  --accent-light: #1e5180; /* Darker accent for better contrast */
  --text-light: #333333;
  --background-light: #f0f8ff;
  --card-light: #ffffff;
  --border-light: #d6eaf8;

  /* Dark Theme (Soothing Colors) */
  --primary-dark: #7398c2;
  --secondary-dark: #1c2541;
  --accent-dark: #5bc0be;
  --text-dark: #ffffff;
  --background-dark: #1c2541;
  --card-dark: #212c40;
  --border-dark: #4a5a7c;

  /* Common Variables */
  --transition: all 0.2s ease;
  --transition-normal: all 0.3s ease;
  --transition-slow: all 0.4s ease;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);
  --shadow-active: 0 12px 28px rgba(0, 0, 0, 0.2);
  --shadow-dark: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-dark-hover: 0 8px 20px rgba(0, 0, 0, 0.4);
  --border-radius: 12px;

  /* Default Theme (Light) */
  --primary: var(--primary-light);
  --secondary: var(--secondary-light);
  --accent: var(--accent-light);
  --text: var(--text-light);
  --background: var(--background-light);
  --card: var(--card-light);
  --border: var(--border-light);

  /* RGB values for animations */
  --primary-rgb: 70, 130, 180; /* Updated to match new primary-light */
  --accent-rgb: 30, 81, 128; /* Updated to match new accent-light */
  --primary-dark-rgb: 115, 152, 194;
  --accent-dark-rgb: 91, 192, 190;
  --secondary-dark-rgb: 28, 37, 65;
}

/* Dark Theme Class */
body.dark-theme {
  --primary: var(--primary-dark);
  --secondary: var(--secondary-dark);
  --accent: var(--accent-dark);
  --text: var(--text-dark);
  --background: var(--background-dark);
  --card: var(--card-dark);
  --border: var(--border-dark);

  /* RGB values for dark theme */
  --primary-rgb: 115, 152, 194;
  --accent-rgb: 91, 192, 190;
  --secondary-dark-rgb: 28, 37, 65;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  transition: background-color 0.3s ease, color 0.3s ease;
  opacity: 0;
  animation: fadeInPage 0.5s ease-out forwards;
  min-height: 100vh;
  will-change: background-color, color;
}

/* Optimize animations for better performance */
@keyframes fadeInPage {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

a:hover {
  color: var(--primary);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
  background-color: var(--background);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 10px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.underline {
  height: 4px;
  width: 60px;
  background: var(--accent);
  margin: 0 auto;
  border-radius: 5px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: none;
}

.primary-btn {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.primary-btn:hover {
  background-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.4);
}

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

.secondary-btn:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.small-btn {
  padding: 8px 15px;
  font-size: 0.9rem;
}

/* Header and Navigation - Fixed Background Issues */
header,
.main-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  will-change: transform;
}

.main-header.fixed-header {
    position: fixed;
    background-color: rgba(var(--secondary-dark-rgb), 0.8); /* Adjust for dark theme gloss */
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    animation: slideDown 0.3s ease;
}

/* Dark theme header consistency - Fixed */
body.dark-theme .main-header {
  background-color: rgba(var(--secondary-dark-rgb), 0.8); /* Dark theme glossy background */
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px) saturate(150%);
  -webkit-backdrop-filter: blur(15px) saturate(150%);
  border-bottom: 1px solid var(--border);
}

/* Light theme header consistency */
body:not(.dark-theme) .main-header {
  background-color: rgba(var(--secondary-dark-rgb), 0.8); /* Dark theme glossy background */
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px) saturate(150%);
  -webkit-backdrop-filter: blur(15px) saturate(150%);
  border-bottom: 1px solid var(--border);
}

/* Light theme header text color */
body:not(.dark-theme) .main-header .logo h1,
body:not(.dark-theme) .main-header .nav-links a,
body:not(.dark-theme) .main-header .theme-toggle i {
  color: white;
}

body:not(.dark-theme) .main-header .hamburger span {
  background-color: white;
}

/* Remove the sticky class styles since we're using position: sticky */
.main-header.sticky {
  position: fixed;
  top: 0;
  left: 0;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

/* Header Logo Styles */
.logo .logo-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeIn 0.8s ease-out;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.logo h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  transition: var(--transition);
}

.logo span {
  color: var(--primary);
  transition: var(--transition);
}

.logo .logo-container:hover .logo-icon {
  transform: rotate(10deg) scale(1.1);
  background-color: var(--accent);
}

.logo .logo-container:hover h1 {
  transform: translateX(5px);
}

/* Animated Logo Styles */
#animated-logo {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  animation: gradientShift 5s infinite alternate;
  user-select: none;
}

#animated-logo::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.5s ease;
  pointer-events: none;
}

#animated-logo:hover {
  transform: rotate(360deg) scale(1.2);
  box-shadow: 0 0 20px var(--primary);
}

#animated-logo:hover::before {
  opacity: 0.8;
  transform: scale(1);
  animation: shine 1.5s infinite;
}

@keyframes shine {
  0% {
    top: -50%;
    left: -50%;
    opacity: 0.8;
  }
  100% {
    top: 50%;
    left: 50%;
    opacity: 0;
  }
}

@keyframes gradientShift {
  0% {
    background: linear-gradient(135deg, var(--primary), var(--accent));
  }
  50% {
    background: linear-gradient(225deg, var(--accent), var(--primary));
  }
  100% {
    background: linear-gradient(315deg, var(--primary), var(--accent));
  }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-left: auto; /* Push the nav links to the right */
}

.nav-links li {
  margin: 0; /* Ensure no default margin */
  padding: 0; /* Ensure no default padding */
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Enhanced Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.theme-toggle.theme-changing {
  transform: rotate(180deg);
}

.theme-toggle i {
  transition: all 0.3s ease;
  color: var(--text);
}

.theme-toggle:hover i {
  color: var(--primary);
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--text);
  transition: var(--transition);
}

/* Mobile Menu Close Button */
.nav-links .nav-close-li {
  display: none; /* Hidden by default, shown on mobile when active */
  position: absolute;
  top: 15px;
  right: 25px;
  list-style: none;
}

.nav-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.nav-close-btn:hover {
  transform: rotate(90deg) scale(1.1);
  color: var(--primary);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  background-color: var(--background);
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  flex-direction: row;
  width: 95%;
  max-width: 1400px;
}

.hero-content {
  flex: 1;
  padding-right: 30px;
  animation: fadeIn 0.8s ease-out;
  transform: translateZ(0);
  max-width: 700px;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: 700;
  white-space: nowrap;
  overflow: visible;
}

.hero-content h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: 600;
  white-space: nowrap;
  overflow: visible;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: 500;
  white-space: nowrap;
  overflow: visible;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

/* New Profile Picture Styles */
.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-frame {
  position: relative;
  width: 320px;
  height: 320px;
  margin: -100px;
}

.profile-background {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  z-index: 1;
  animation: morph 8s ease-in-out infinite;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.profile-picture {
  position: absolute;
  width: 90%;
  height: 90%;
  top: 5%;
  left: 5%;
  z-index: 2;
  overflow: hidden;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morph 8s ease-in-out infinite;
  animation-delay: 0.5s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 4px solid var(--card);
}

.profile-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.profile-frame:hover .profile-picture img {
  transform: scale(1.05);
}

.profile-badge {
  position: absolute;
  bottom: 5%;
  right: 5%;
  width: 50px;
  height: 50px;
  background-color: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 3;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 3px solid var(--card);
  transition: var(--transition);
}

.profile-frame:hover .profile-badge {
  transform: rotate(360deg);
}

@keyframes morph {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  50% {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

/* Enhanced About Section */
.about {
  background-color: var(--background);
  padding: 100px 0 80px 0;
  position: relative;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
  animation: fadeIn 0.8s ease-out;
}

.about-visual {
  position: relative;
}

.about-image-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Enhanced About Profile Image with Social Media Overlay */
.about-profile-image {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
}

.about-profile-image:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.about-profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.9), rgba(var(--accent-rgb), 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.about-profile-image:hover .image-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.overlay-content h4 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 600;
}

.social-overlay-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-overlay-link {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-overlay-link:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-overlay-link i {
  color: white;
}

/* Specific social media colors on hover */
.social-overlay-link.github:hover {
  background-color: #333;
  border-color: #333;
}

.social-overlay-link.linkedin:hover {
  background-color: #0077b5;
  border-color: #0077b5;
}

.social-overlay-link.twitter:hover {
  background-color: #131414;
  border-color: #131414;
}

.social-overlay-link.instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: #bc1888;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
  padding: 20px 15px;
  background-color: var(--card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.about-intro h3 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--text);
  font-weight: 700;
}

.intro-text {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 20px;
}

.about-description p {
  margin-bottom: 20px;
  color: var(--text);
  line-height: 1.7;
  font-size: 1.05rem;
}

.about-highlights {
  background-color: var(--card);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background-color: var(--background);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.highlight-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.highlight-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.highlight-icon i {
  font-size: 1.3rem;
  color: white;
}

.highlight-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.highlight-content p {
  font-size: 0.95rem;
  color: var(--accent);
  line-height: 1.5;
  margin: 0;
}

.about-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.about-actions .btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 25px;
  font-size: 1rem;
}

.about-actions .btn i {
  font-size: 1rem;
}

/* Enhanced Contact Section */
.contact {
  background-color: var(--background);
  padding: 100px 0;
  position: relative;
}

.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
  margin-top: 40px;
}

.contact-info-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-intro h3 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 20px;
  font-weight: 700;
}

.contact-intro p {
  font-size: 1.1rem;
  color: var(--accent);
  line-height: 1.7;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 25px;
  background-color: var(--card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.contact-method:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.method-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.method-icon i {
  font-size: 1.5rem;
  color: white;
}

.method-content h4 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 600;
}

.method-content p {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 500;
}

.method-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.method-link:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.method-note {
  font-size: 0.9rem;
  color: var(--accent);
  font-style: italic;
}

.social-connect h4 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 20px;
  font-weight: 600;
}

.social-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background-color: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.social-link i {
  font-size: 1.3rem;
  color: var(--primary);
}

.social-link span {
  color: var(--text);
  font-weight: 500;
}

.social-link:hover span {
  color: var(--primary);
}

.contact-form-section {
  background-color: var(--card);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
}

.form-header {
  margin-bottom: 30px;
  text-align: center;
}

.form-header h3 {
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 700;
}

.form-header p {
  color: var(--accent);
  font-size: 1rem;
}

.enhanced-contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  padding: 15px 18px;
  border: 2px solid var(--border);
  border-radius: var(--border-radius);
  background-color: var(--background);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
  transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--accent);
  opacity: 0.7;
}

.input-focus-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.form-group input:focus + .input-focus-line,
.form-group textarea:focus + .input-focus-line {
  width: 100%;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 30px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.3);
}

.submit-btn:active {
  transform: translateY(-1px);
}

.submit-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 ease;
}

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

.btn-icon {
  transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
  transform: translateX(5px);
}

/* Footer Logo Styles */
.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-logo-icon {
  width: 35px;
  height: 35px;
  font-size: 0.9rem;
  margin-bottom: 5px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
  transition: all 0.3s ease;
}

.footer-logo-icon:hover {
  transform: rotate(360deg) scale(1.1);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

.footer-logo h2 {
  font-size: 1.8rem;
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.footer-logo span {
  color: var(--primary);
}

.footer-logo p {
  color: var(--accent);
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

.footer-links h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

.footer-links h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  transition: all 0.3s ease;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(5px);
  padding-left: 5px;
}

.footer-links a i {
  font-size: 0.9rem;
  width: 16px;
  color: var(--primary);
}

.footer-links span {
  color: var(--accent);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}

.footer-links span i {
  font-size: 0.9rem;
  width: 16px;
  color: var(--primary);
}

/* Footer */
footer {
  background-color: var(--background);
  padding: 30px 0 0;
  border-top: 1px solid var(--border);
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
  animation: fadeIn 0.8s ease-out;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 15px 0;
  background-color: var(--background);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: var(--accent);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
  }

  .hero-content {
    padding-right: 0;
    margin-bottom: 50px;
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    justify-content: center;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .about-stats {
    justify-content: center;
  }

  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .social-links {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .profile-frame {
    margin-top: 30px;
  }

  .section-header h2 {
    font-size: 2.2rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content h2 {
    font-size: 1.6rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .about-intro h3 {
    font-size: 1.8rem;
  }

  .profile-frame {
    width: 280px;
    height: 280px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--secondary-dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transition: var(--transition);
    z-index: 1001;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links.active .nav-close-li {
    display: block;
  }

  /* Adjust nav links padding to make space for the close button */
  .nav-links.active {
    padding-top: 60px;
  }

  .nav-links a {
    color: white;
    font-weight: 600;
  }

  .theme-toggle i {
    color: white;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

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

  .about-stats {
    grid-template-columns: 1fr;
  }

  .highlight-grid {
    grid-template-columns: 1fr;
  }

  .about-actions {
    justify-content: center;
  }

  .profile-frame {
    width: 280px;
    height: 280px;
  }

  .hero-content h1,
  .hero-content h2,
  .hero-content p {
    white-space: normal;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content h2 {
    font-size: 1.4rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .about {
    padding: 60px 0;
  }

  .about-intro h3 {
    font-size: 1.6rem;
  }

  .contact-form-section {
    padding: 30px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    text-align: center;
  }

  .footer-logo {
    grid-column: 1 / -1;
    margin-bottom: 15px;
    align-items: center;
  }
}

@media (max-width: 576px) {
  .section-header h2 {
    font-size: 1.8rem;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content h2 {
    font-size: 1.2rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .profile-frame {
    width: 220px;
    height: 220px;
  }

  .profile-badge {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .underline {
    width: 50px;
    height: 3px;
  }

  .about-intro h3 {
    font-size: 1.4rem;
  }

  .highlight-item {
    padding: 15px;
  }

  .highlight-icon {
    width: 40px;
    height: 40px;
  }

  .highlight-icon i {
    font-size: 1.1rem;
  }

  .contact-intro h3 {
    font-size: 1.4rem;
  }

  .contact-form-section {
    padding: 25px 15px;
  }

  .container {
    width: 95%;
    padding: 0 10px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 25px;
    text-align: center;
  }

  .footer-links h3 {
    font-size: 1.1rem;
  }

  .footer-links h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-logo h2 {
    font-size: 1.6rem;
  }
}

/* Fix for very small screens */
@media (max-width: 375px) {
  .hero-content h1 {
    font-size: 1.6rem;
  }

  .profile-frame {
    width: 200px;
    height: 200px;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .about-intro h3,
  .contact-intro h3 {
    font-size: 1.3rem;
  }
}

/* Add styles for the parallax effect */
.parallax-section {
  perspective: 1px;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.parallax-section .container {
  transform-style: preserve-3d;
}

.hero-content,
.hero-image {
  transform: translateZ(-0.5px) scale(1.5);
}

/* Add a semi-transparent overlay to the parallax background for better text contrast */
.parallax-background::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* Fix the hero container layout */
.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  flex-direction: row;
  position: relative;
  z-index: 2;
}

/* Fix the white board issue by ensuring proper background handling */
.parallax-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(https://postimage.me/images/2025/04/30/ASTRONOMY.jpeg);
  background-size: cover;
  background-position: center;
  opacity: 1;
  z-index: -2;
}

/* Ensure the hero content has proper width */
.hero-content {
  flex: 1;
  padding-right: 30px;
  animation: fadeIn 0.8s ease-out;
  transform: translateZ(0);
  max-width: 600px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-content h2,
  .hero-content p {
    padding-right: 0;
  }
}

/* Dark theme header adjustments - Fixed */
body.dark-theme .nav-links a {
  color: var(--text);
}

body.dark-theme .logo h1,
body.dark-theme .nav-links a {
  color: var(--text);
}

body.dark-theme .theme-toggle i {
  color: white;
}

body.dark-theme .hamburger span {
  background-color: white;
}

/* Dark theme specific adjustments for mobile navigation - Fixed */
body.dark-theme .nav-links {
  background-color: var(--secondary-dark);
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

body.dark-theme .nav-links a {
  color: white;
}

body.dark-theme .theme-toggle,
body.dark-theme .theme-toggle i {
  color: white;
}

/* Skills Section - Enhanced for dark mode */
.skills {
  background-color: var(--background);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.skill-category {
  background-color: var(--card);
  backdrop-filter: blur(8px);
  border-radius: var(--border-radius);
  padding: 35px;
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  transition: all var(--transition-normal);
  position: relative;
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

/* Dark mode specific enhancements */
body.dark-theme .skill-category {
  background-color: var(--card);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-dark);
}

body.dark-theme .skill-category:hover {
  box-shadow: var(--shadow-dark-hover);
  border-color: var(--primary);
}

.skill-card {
  background-color: var(--card);
  border-radius: var(--border-radius);
  padding: 25px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  justify-content: center;
}

body.dark-theme .skill-card {
  background-color: var(--card);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-dark);
}

body.dark-theme .skill-card:hover {
  box-shadow: var(--shadow-dark-hover);
  border-color: var(--primary);
}

/* Projects Section - Enhanced for dark mode */
.projects {
  background-color: var(--background);
  padding: 80px 0;
}

/* Enhanced dark mode visibility */
body.dark-theme .about-profile-image,
body.dark-theme .contact-method,
body.dark-theme .social-link,
body.dark-theme .contact-form-section,
body.dark-theme .stat-item,
body.dark-theme .highlight-item {
  background-color: var(--card);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-dark);
}

body.dark-theme .about-profile-image:hover,
body.dark-theme .contact-method:hover,
body.dark-theme .social-link:hover,
body.dark-theme .stat-item:hover,
body.dark-theme .highlight-item:hover {
  box-shadow: var(--shadow-dark-hover);
  border-color: var(--primary);
}

/* Ensure visibility */
.about-content,
.contact-wrapper,
.enhanced-contact-form {
  visibility: visible !important;
  opacity: 1 !important;
}



   blockquote {
            position: relative;
            max-width: 600px;
            margin: 2rem;
            padding-left: 3.5rem; 
        }


        blockquote::before {
            content: '“';
            position: absolute;
            top: -0.4em;
            left: -0.2em;
            
            font-family: 'Lora', serif;
            font-size: 6rem;
            font-weight: 700;
            color: #bcd6e6; 
            line-height: 1;
            z-index: -1;
        }

        /* Styling for the actual quote text */
        blockquote p {
            font-size: 1.25rem; /* 20px */
            line-height: 1.6;
            font-style: italic;
            margin-bottom: 1rem;
        }

        /* Styling for the author/source */
        blockquote footer {
            font-size: 1rem;
            font-style: normal;
            text-align: right;
            color: #6b7280;
        }

        blockquote cite {
            font-style: italic;
        }

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition-normal);
    z-index: 1000;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

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

.back-to-top:hover {
    background-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.back-to-top:active {
    transform: translateY(1px);
}

/* Responsive adjustments for back-to-top button */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .back-to-top {
        bottom: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}