
/* GLOBAL */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0f172a, #020617);
  color: white;
}

html {
  scroll-behavior: smooth;
}

/* NAVBAR */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #38bdf8;
}
#about {
  padding-top: 20px;
  margin-top: -40px;
}
/* LOGO */
nav h2::before {
  content: "";
  width: 115px;
  height: 115px;
  background: url("logo.png") no-repeat center/cover;
  border-radius: 50%;
}

/* NAV LINKS */
nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: white;
  position: relative;
  transition: 0.3s;
}

/* underline animation */
nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: #38bdf8;
  left: 0;
  bottom: -5px;
  transition: 0.3s;
}

nav a:hover::after {
  width: 100%;
}

/* HERO */
#home {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

#home h1, #home h2, #home p {
  margin: 0;
}

#home h1 {
  font-size: 60px;
  color: #38bdf8;
}

#home h2 {
  font-size: 32px;
}

#home p {
  font-size: 18px;
  color: #94a3b8;
}

/* SECTIONS */
section {
  padding: 80px 20px;
  text-align: center;
  scroll-margin-top: 100px;
}

/* PROJECTS */
#projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: auto;
}

#projects h2 {
  grid-column: span 2;
}

/* CARD */
.card {
  background: linear-gradient(135deg, #08e280, #2563eb);
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  transition: 0.4s;
}

.card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 0 20px rgba(59,130,246,0.7);
}

/* Certification */
#certification {
  display: flex;
  flex-direction: column; 
  align-items: center;    
  gap: 30px; /* Increased gap for better breathing room */
  max-width: 900px;
  margin: 40px auto;
}

/* Fix the card wrappers */
#certification > div { 
  width: 100%; /* Changed from 200% to 100% to fit the container */
  max-width: 500px; 
}
/* CARD */
.card {
  background: linear-gradient(135deg, #08e280, #2563eb);
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  transition: 0.4s;
}

.card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 0 20px rgba(59,130,246,0.7);
}

/* SKILLS */
#skills {
  display: flex;
  text-align: center;
  flex-direction: column;
  align-items: center;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  width: 100%;
}

.skill {
  background: linear-gradient(135deg, #56e215, #2563eb);
  padding: 20px;
  border-radius: 12px;
  transition: 0.3s;
}

.skill:hover {
  transform: translateY(-5px) scale(1.05);
}

/* CONTACT */
#contact p {
  color: #94a3b8;
  text-align: center;
}

/* ========================= */
/* 🔥 SCROLL ANIMATION */
/* ========================= */

section {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1s ease forwards;
}

#home { animation-delay: 0.2s; }
#about { animation-delay: 0.4s; }
#projects { animation-delay: 0.6s; }
#skills { animation-delay: 0.8s; }
#contact { animation-delay: 1s; }

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

/* ========================= */
/* 🔥 FINAL MOBILE FIX */
/* ========================= */

@media (max-width: 768px) {

  /* NAVBAR */
  nav {
    padding: 12px 15px;
  }

  nav h2::before {
    width: 35px;
    height: 35px;
  }

  /* HERO (MAIN FIX) */
  #home {
    min-height: auto;
    padding: 20px 10px;
    gap: 5px;
  }

  /* REMOVE EXTRA SPACE */
  section {
    padding: 30px 15px;
  }

  /* TEXT SIZE */
  #home h1 {
    font-size: 28px;
  }

  #home h2 {
    font-size: 20px;
  }

  #home p {
    font-size: 14px;
  }

  /* PROJECTS */
  #projects {
    grid-template-columns: 1fr;
  }

  #projects h2 {
    grid-column: span 1;
  }
}
