:root {
  --primary: #1e1e2f; /* Deep charcoal for a strong, modern primary background color */
  --secondary: #4a90e2; /* Vibrant blue for calls-to-action and highlights */
  --accent: #002568; /* Soft coral for emphasis and interactive elements */
  --text-dark: #343a40; /* Rich gray for readable, balanced body text */
  --text-light: #ffffff; /* Crisp white for contrast against dark backgrounds */
  --background: #f8f9fa; /* Subtle light gray for minimal strain and a clean look */
  --card-bg: #ffffff; /* Bright white for content sections and cards */
  --neutral: #e9ecef; /* Light neutral gray for subtle dividers or secondary backgrounds */
  --font-sans: 'Poppins', sans-serif; /* Modern sans-serif font */
  --font-serif: 'Merriweather', serif; /* Elegant serif font for headings */
  --max-width: 1200px;
  --padding: 2rem;
  --border-radius: 10px; /* Smooth but defined edges */
  --box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); /* Slightly softer shadow for depth */
  --transition: all 0.3s ease-in-out;
}

/* General Styles */
body {
  margin: 0;
  font-family: var(--font-sans), Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-dark);
  background-color: var(--background);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

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

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

/* Header */
header {
  background: var(--text-light);
  color: var(--text-light);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

header .logo {
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 10px;
  transition: var(--transition);
}

header .logo:hover {
  color: var(--secondary);
}

header .logo img {
  max-height: 50px;
  margin-right: 10px;
  border-radius: var(--border-radius);
}

/* Desktop Navigation */
.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10; /* Ensure navigation is above other elements */
}

/* Desktop Navigation */
.nav-list {
  list-style: none;
  display: flex; /* Always visible on larger screens */
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  z-index: 10; /* Keep above other content */
}

.nav-list li a {
  color: var(--text-dark);
  font-size: 1rem;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-list li a:hover {
  background-color: var(--secondary);
  color: var(--text-light); /* Better contrast on hover */
}

/* Mobile Navigation Adjustments */
.nav-toggle {
  display: none; /* Hidden on larger screens */
  flex-direction: column;
  justify-content: space-between;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  position: absolute; /* Positioned on the top-right */
  top: 1rem;
  right: 1rem; /* Adjusted for better alignment */
  z-index: 15; /* Keep toggle above navigation */
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

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

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-list {
    display: none; /* Hidden by default on mobile */
    flex-direction: column; /* Column layout for mobile */
    align-items: center;
    background-color: var(--secondary); /* Improved background for contrast */
    color: var(--text-light); /* Better readability */
    position: absolute;
    top: 100%;
    right: 0; /* Anchored to the top-right */
    width: 80%; /* Adjusted width for a sleek appearance */
    padding: 1.5rem 0;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    z-index: 10; /* Above other content */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  }

  .nav-list.active {
    display: flex; /* Visible when toggled */
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list li {
    margin: 0.5rem 0; /* Space between menu items */
  }

  .nav-list li a {
    color: var(--text-light); /* Updated for better readability */
    font-size: 1.2rem; /* Slightly larger for better visibility */
    text-transform: uppercase;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  .nav-list li a:hover {
    background-color: var(--accent); /* Highlighted background for hover */
    color: var(--text-light); /* Ensure text remains readable */
  }

  .nav-toggle {
    display: flex; /* Visible on mobile */
  }

  .nav-wrapper {
    justify-content: space-between;
    width: 100%;
  }
}

/* Hero Section */
#hero {
  padding: calc(var(--padding) * 2.5) 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--text-light);
  position: relative;
  overflow: hidden;
  clip-path: ellipse(150% 100% at center top);
  z-index: 1; /* Ensure hero content stays above all background elements */
}

/* Dynamic Glow Effect */
#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2), transparent 70%);
  z-index: 1;
  pointer-events: none;
  animation: pulse 6s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
}

/* Hero Title */
#hero h1 {
  font-family: var(--font-sans);
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-light);
  z-index: 3; /* Ensure above all decorative elements */
  position: relative;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Subtitle */
#hero .subtitle {
  font-size: 1.75rem;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  z-index: 3; /* Ensure above all decorative elements */
  position: relative;
  letter-spacing: 1px;
}

/* Call-to-Action Button */
.cta-button {
  background: var(--secondary);
  color: var(--text-light);
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease-in-out;
  z-index: 3; /* Ensure above all decorative elements */
  position: relative;
}

.cta-button:hover {
  background: var(--accent);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}



/* Responsive Adjustments */
@media (max-width: 768px) {
  #hero {
    padding: calc(var(--padding) * 1.5) 0;
    clip-path: none;
  }

  #hero h1 {
    font-size: 2.5rem;
  }

  #hero .subtitle {
    font-size: 1.2rem;
  }

  .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  #hero::after {
    height: 150px; /* Reduce wave size for smaller screens */
    bottom: -10px; /* Adjust for smaller screens */
  }
}

/* About Section */
#about {
  padding: calc(var(--padding) * 2) 0;
  background: var(--background);
  text-align: center;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.about-description {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Skills Section */
#skills {
  padding: calc(var(--padding) * 2) 0;
  background: var(--background);
  text-align: center;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.skills-description {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.skill-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem auto;
}

.skill-icon img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.skill-card h3 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.skill-card p {
  font-size: 1rem;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Portfolio Section */
#portfolio {
  padding: calc(var(--padding) * 2.5) 0; /* Increased padding for breathing space */
  background: var(--neutral); /* Light gray background for subtle separation */
  text-align: center;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 2.8rem; /* Slightly larger font for emphasis */
  color: var(--primary);
  margin-bottom: 2rem;
  letter-spacing: 1.2px; /* Adds a modern touch */
  text-transform: uppercase; /* Professional look */
}

.portfolio-description {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 2.5rem;
  max-width: 750px;
  line-height: 1.8;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem; /* Increased gap for better spacing */
  padding: 0 1rem; /* Ensure some horizontal padding */
}

.portfolio-item {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.portfolio-item:hover {
  transform: translateY(-8px); /* More noticeable hover effect */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); /* Softer, larger shadow */
}

.portfolio-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 150px; /* Increased height for better visuals */
  background: var(--neutral); /* Subtle background for consistency */
  border-radius: var(--border-radius) var(--border-radius) 0 0; /* Rounded only at the top */
  overflow: hidden;
}

.portfolio-image {
  width: auto;
  height: 100%;
  object-fit: contain; /* Ensures proper scaling */
  transition: transform 0.3s ease-in-out;
}

.portfolio-item:hover .portfolio-image {
  transform: scale(1.05); /* Slight zoom effect on hover */
}

.portfolio-content {
  padding: 1.5rem;
  flex: 1; /* Ensures consistent height alignment */
}

.portfolio-content h3 {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  letter-spacing: 0.8px; /* Refines spacing */
}

.portfolio-content p {
  font-size: 1rem;
  margin-bottom: 1.2rem;
  color: var(--text-dark);
  line-height: 1.6;
}

.portfolio-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--secondary);
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--secondary);
  border-radius: 50px; /* Rounded for modern design */
  transition: background 0.3s ease-in-out, color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.portfolio-link:hover {
  background: var(--secondary);
  color: var(--text-light);
  transform: translateY(-2px);
}
/* Contact Section */
#contact {
  padding: calc(var(--padding) * 2) 0; /* Spacious padding for emphasis */
  background: linear-gradient(135deg, var(--primary), var(--text-dark));
  color: var(--text-light);
  text-align: center;
  position: relative;
}

#contact .section-title {
  font-family: var(--font-sans);
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

#contact .contact-description {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.contact-options {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--secondary);
  color: var(--text-light);
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: var(--box-shadow);
  text-decoration: none;
}

.contact-card:hover {
  background: var(--accent);
  transform: translateY(-3px); /* Subtle hover lift effect */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

.contact-icon {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)); /* Subtle icon shadow */
}

/* Footer */
footer {
  background: #222;
  color: var(--text-light);
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  position: relative; /* Allows for additional decorative elements */
}

footer .footer-nav {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem; /* Spacing between navigation links */
  margin: 0;
  padding: 0;
}

footer .footer-nav li a {
  color: var(--text-light);
  font-weight: 600; /* Slightly bold for emphasis */
  text-transform: uppercase; /* Adds a professional touch */
  font-size: 0.95rem; /* Slightly larger than base font size */
  transition: color 0.3s ease-in-out; /* Smooth hover transition */
}

footer .footer-nav li a:hover {
  color: var(--secondary); /* Highlight color for interaction */
}

footer p {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.8); /* Subtle fade for secondary text */
  font-size: 0.85rem;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: var(--secondary); /* Subtle line above the footer */
  border-radius: 5px;
  margin-bottom: 1rem;
}

footer .social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

footer .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: var(--text-light);
  border-radius: 50%; /* Circular icons */
  transition: background 0.3s ease-in-out, transform 0.3s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

footer .social-icons a:hover {
  background: var(--secondary);
  transform: scale(1.1); /* Subtle zoom on hover */
}