/* =====================
   BASE STYLES
   ===================== */
body {
  background: #121212;           
  color: #EAEAEA;
  font-family: 'Fira Code', monospace;
  margin: 0;
  padding: 20px;
  opacity: 0;
  animation: fadeInPage 1.2s ease forwards;
  text-align: center;  
  max-width: 100%;
  overflow-x: hidden; 
}

@keyframes fadeInPage {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================
   NAVBAR
   ===================== */
.navbar {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.nav-btn {
  padding: 10px 18px;
  border: 2px solid #BB86FC;   
  color: #BB86FC;
  background: transparent;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 120px;
  text-align: center;
}
.nav-btn:hover,
.nav-btn.active {
  background: #BB86FC;
  color: #121212;
  box-shadow: 0 0 8px #BB86FC80; 
}

/* ✅ Mobile: 2x2 grid navbar */
@media (max-width: 768px) {
  .navbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto 30px auto;
  }
  .nav-btn {
    min-width: unset;
    width: 100%;
  }
}
@media (max-width: 400px) {
  .navbar { grid-template-columns: 1fr; }
}

/* =====================
   HERO SECTION
   ===================== */
header {
  margin-bottom: 40px;
}
#hero-name {
  font-size: 2.5rem;
  word-wrap: break-word;
}
header h2 {
  font-size: 1.2rem;
  margin: 10px 0 15px 0;
}

/* Social buttons */
.tag-btn {
  display: inline-block;
  margin: 8px;
  padding: 6px 14px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.crimson-btn { color: #FF4C4C; border-color: #FF4C4C; }
.crimson-btn:hover {
  background: #FF4C4C; color: #121212;
  box-shadow: 0 0 8px rgba(255,76,76,0.6);
}
.name-btn { color: #BB86FC; border-color: #BB86FC; }
.name-btn:hover {
  background: #BB86FC; color: #121212;
  box-shadow: 0 0 8px rgba(187,134,252,0.6);
}

/* =====================
   CONTACT SECTION
   ===================== */
.contact-card {
  background: #1E1E1E;
  border: 1px solid #2C2C2C;
  border-radius: 10px;
  max-width: 600px;
  margin: 30px auto;
  padding: 25px;
  box-shadow: 0 0 10px rgba(187, 134, 252, 0.1);
  text-align: left; 
}
#contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
#contact-form label {
  color: #BB86FC;
  margin-bottom: 4px;
}
#contact-form input,
#contact-form textarea {
  padding: 10px;
  border: 1px solid #2C2C2C;
  border-radius: 6px;
  background: #121212;
  color: #EAEAEA;
  width: 100%;
  font-size: 0.95rem;
}
#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: #BB86FC;
  box-shadow: 0 0 6px #BB86FC80;
}
#contact-form button {
  align-self: flex-start;
  padding: 10px 25px;
  border: 2px solid #03DAC6; 
  color: #03DAC6;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}
#contact-form button:hover {
  background: #03DAC6;
  color: #121212;
  box-shadow: 0 0 8px #03DAC680;
}

/* =====================
   PROJECTS SECTION (Grid with edge gaps)
   ===================== */
section { text-align: center; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;                  /* reduced gap */
  margin: 0 auto;
  margin-top: 20px;
  max-width: 1100px;          /* keeps edge gaps */
  justify-content: center;
}
.card {
  background: #1E1E1E;
  border: 1px solid #2C2C2C;
  border-radius: 8px;
  padding: 18px;
  max-width: 300px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 0 10px #BB86FC60; }
.card h3 { color: #BB86FC; }

/* ✅ Project images responsive */
.card img {
  max-width: 100%; height: auto;
  border-radius: 6px; margin-bottom: 10px;
  display: block; margin-left: auto; margin-right: auto;
  object-fit: contain;
}

/* =====================
   TECH STACK
   ===================== */
.stack-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px; text-align: center;
}
.stack-icons span {
  display: inline-block;
  margin: 6px;
  padding: 8px 14px;
  border: 1px solid #03DAC6;
  border-radius: 5px;
  color: #03DAC6; background: #121212;
  transition: 0.3s;
}
.stack-icons span:hover {
  background: #03DAC6; color: #121212;
  box-shadow: 0 0 6px #03DAC670;
}

/* =====================
   ABOUT / CERTIFICATIONS (Grid with edge gaps)
   ===================== */
.about-section {
  max-width: 900px; margin: 40px auto;
  padding: 30px; background: #1E1E1E;
  border: 1px solid #2C2C2C; border-radius: 12px;
  text-align: center;
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  justify-items: center;
  margin: 0 auto;
  margin-top: 20px;
  max-width: 1100px;   /* keeps edge gaps */
}
.cert-card {
  background: #1E1E1E; border: 1px solid #2C2C2C;
  border-radius: 8px; padding: 10px;
  max-width: 280px; width: 100%;
  text-align: center; 
  transition: transform 0.3s, box-shadow 0.3s;
}
.cert-card img {
  max-width: 100%; height: auto;
  border-radius: 6px; margin-bottom: 10px;
  display: block; margin-left:auto; margin-right:auto;
  object-fit: contain;
}
.cert-card h3 { color: #BB86FC; font-size: 15px; margin: 6px 0; }
.cert-card .issuer { font-size: 13px; color: #8B949E; }
.cert-card .year { font-size: 13px; font-weight: bold; color: #03DAC6; }
.cert-card:hover { transform: translateY(-5px);
  box-shadow: 0 0 12px rgba(3,218,198,0.4); }

/* =====================
   RESPONSIVE MEDIA QUERIES
   ===================== */
@media (max-width: 900px) {
  #hero-name { font-size: 2.2rem; }
  header h2 { font-size: 1rem; }
}
@media (max-width: 600px) {
  #hero-name { font-size: 1.8rem; }
  header h2 { font-size: 0.95rem; }
  .tag-btn { display: block; margin: 10px auto; width: max-content; }
}
