/* General Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: #eaeaea;
  background-color: #292944;
}

/* Header */
header {
  background-color: #2d8cff;
  padding: 20px 0;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  animation: fadeInDown 1s ease-out;
}

.container {
  width: 90%;
  margin: 0 auto;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav {
  position: relative;
}

.nav-links {
  list-style: none;
  display: flex;
}

.nav-links li {
  margin: 0 15px;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #fec100;
}

.menu-icon {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(to right, #2d8cff, #6610f2, #5a0ec9);
  padding: 100px 0;
  text-align: center;
  color: white;
  animation: fadeInUp 1.5s ease-out;
}

.hero h2 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.hero p {
  font-size: 1.2rem;
  margin: 20px 0;
}

.cta {
  text-decoration: none;
  background-color: #fec100;
  padding: 12px 25px;
  border-radius: 25px;
  color: #1a1a2e;
  font-weight: bold;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  transition: background-color 0.3s ease;
}

.cta:hover {
  background-color: #ffd700;
}

/* Projects Section */
.projects {
  padding: 70px 0;
  background-color: #161625;
  text-align: center;
}

.projects h2 {
  color: #2d8cff;
  font-size: 2.4rem;
  margin-bottom: 40px;
  animation: fadeInUp 1.5s ease-out;
}

.project-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 2s ease-out;
}

.project-card {
  background: #20203a;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  margin: 20px;
  width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card h3 {
  margin-top: 0;
  color: #fec100;
  font-size: 1.8rem;
}

.project-card p {
  color: #bbb;
}

.btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #6610f2;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #5a0ec9;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* About Section */
.about {
  padding: 20px 0;
  background-color: #302a3a;
  color: white;
  text-align: center;
}

.about h2 {
  margin-bottom: 30px;
  animation: fadeInUp 1.5s ease-out;
}

.about p {
  font-size: 1.2rem;
  animation: fadeInUp 2s ease-out;
}

/* Contact Section */
.contact {
  padding: 20px 0;
  background-color: #2d8cff;
  color: white;
  text-align: center;
}

.contact h2 {
  margin-bottom: 30px;
  animation: fadeInUp 1.5s ease-out;
}

.contact p {
  font-size: 1.2rem;
  animation: fadeInUp 2s ease-out;
}

/* Footer */
footer {
  background-color: #20203a;
  padding: 25px 0;
  text-align: center;
  color: white;
}

/* Hide the menu by default on mobile */
.nav-links {
  display: none;
  flex-direction: column;
  text-align: center;
  background-color: #2d8cff; /* Optional: background for dropdown */
  padding: 10px;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 100;
}

/* Display the menu when the "active" class is added */
.nav-links.active {
  display: flex;
  justify-content: left;
}

/* Menu icon visibility for mobile */
.menu-icon {
  display: block;
  font-size: 28px;
  cursor: pointer;
}

/* Regular nav styles for desktop */
@media (min-width: 768px) {
  .nav-links {
      display: flex;
      flex-direction: row;
      position: static; /* Make sure it’s inline for larger screens */
      width: auto;
  }
  .menu-icon {
      display: none; /* Hide the menu icon on larger screens */
  }
}


/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    text-align: center;
  }

  .menu-icon {
    display: block;
  }
  .menu-icon:checked {
    .nav-links{ display: block;}
  }

  .cta {
    padding: 10px 20px;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .hero h2 {
    font-size: 2.2rem;
  }

  .project-card {
    width: 100%;
  }
}
