:root {
  --primary-color: #2a2a72;
  --secondary-color: #009ffd;
  --text-color: #333;
  --bg-color: #f8f9fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  padding: 1rem;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  transition: all 0.3s ease;
}

nav ul.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

nav ul li {
  margin: 0 1.5rem;
}

nav ul li a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
}

nav ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
}

nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: white;
  bottom: 0;
  left: 0;
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

/* Burger Button */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
}

.burger div {
  height: 3px;
  background: white;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.burger.active div:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active div:nth-child(2) {
  opacity: 0;
}

.burger.active div:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Sections */
section {
  padding: 0rem 2rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Section */
#hero {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  text-align: center;
  padding-top: 12rem;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 10%,
    transparent 11%
  );
  background-size: 30px 30px;
  transform: rotate(45deg);
  opacity: 0.1;
}

#hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease;
}

#hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.2s;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: white;
  color: var(--primary-color);
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease;
  animation: fadeInUp 1s ease 0.4s;
}

.cta-button:hover {
  cursor: pointer;
  transform: translateY(-3px);
}

/* About Section */
#about {
  background: var(--bg-color);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  background-color: #017ac1;
  border-radius: 120px;
  padding: 20px;
  max-width: 400px;
}

.about-image img {
  width: 100%;
  border-radius: 15px;
}

/* Skills Section */
#skills {
  background: white;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Adjusted to 3 in a row */
  gap: 2rem;
}

.skill {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid #b4b4b4;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.skill:hover {
  transform: translateY(-10px);
  color: #009ffd;
  border: 2px solid #528efd;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.skill i {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

/* Projects Section */
.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid #727272;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
  transform: translateY(-10px);
  border: 2px solid #528efd;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.project-card h3:hover {
  color: #005ca3;
}

.project-card p:hover {
  color: #009ffd;
}

.project-image {
  height: 300px;
  background: #ddd;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-info {
  padding: 1.5rem;
}

/* Contact Section */
#contact {
  background: var(--bg-color);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 15px;
  border: 2px solid #c2c2c2;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

input,
textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 2px solid #c2c2c2;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
}

button {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.3s ease;
}

button:hover {
  transform: translateY(-3px);
}

/* Certificates Section */
.certificate-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  border: 2px solid #727272;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.certificate-card:hover {
  border: 2px solid #528efd;
  color: #009ffd;
  transform: translateY(-10px);
}

.certificate-card img {
  border: 2px solid #727272;
}

.certificate-card img:hover {
  border: 2px solid #528efd;
}

.certificates-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}
h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
}
h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

#go-to-certificates {
  margin-top: 20px;
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
#go-to-certificates:hover {
  transform: translateY(-3px) translateX(-50%);
}

#go-to-projects {
  margin-top: 20px;
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
#go-to-projects:hover {
  transform: translateY(-3px) translateX(-50%);
}

footer {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 3rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-links a {
  color: white;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: white;
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: rgb(234, 234, 234) solid 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 1rem;
    display: none;
    flex-direction: column;
    background: linear-gradient(
      135deg,
      var(--primary-color),
      var(--secondary-color)
    );
    position: absolute;
    top: 50px;
    right: 0;
    width: 100%;
    padding: 1rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  }

  .burger {
    display: flex;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  nav ul {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .skills-container,
  .projects-container,
  .certificates-container {
    grid-template-columns: 1fr 1fr;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
  }

  .footer-section {
    text-align: center;
  }
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }

  .skills-container,
  .projects-container,
  .certificates-container {
    grid-template-columns: 1fr;
  }

  #hero h1 {
    font-size: 2.5rem;
  }

  #hero p {
    font-size: 1.2rem;
  }

  .cta-button {
    padding: 0.8rem 1.5rem;
  }

  .about-image {
    max-width: 300px;
  }

  .footer-content {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  nav ul li {
    margin: 0.5rem 0;
  }

  #hero h1 {
    font-size: 2rem;
  }

  #hero p {
    font-size: 1rem;
  }

  .cta-button {
    font-size: 0.9rem;
  }

  .about-image {
    max-width: 250px;
    margin-left: 2rem;
  }

  .footer-section h3 {
    font-size: 1.2rem;
  }

  .footer-bottom p {
    font-size: 0.9rem;
  }
}
