/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Poppins", sans-serif;
  color: #fff;
  background: #0f0f0f;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* background grid */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: moveGrid 12s linear infinite;
  z-index: -1;
}
@keyframes moveGrid {
  from { background-position: 0 0; }
  to { background-position: 40px 40px; }
}

/* nav */
nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,20,20,0.6);
  border-radius: 20px;
  padding: 12px 30px;
  display: flex;
  gap: 30px;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.25), 0 0 12px rgba(181,110,255,0.25);
  z-index: 5;
}
nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 12px;
  transition: 0.25s;
}
nav a:hover {
  color: #b56eff;
  background: rgba(181,110,255,0.1);
}

/* layout */
.main-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 70px;
  padding-top: 120px;
  flex-wrap: wrap;
}

/* left column */
.left { text-align: center; }
.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg,#b56eff,#5e2c91);
  box-shadow: 0 0 24px rgba(181,110,255,0.5);
  margin: 0 auto;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.left h1 {
  margin-top: 15px;
  font-size: 2.2rem;
  color: #b56eff;
}
.socials {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 20px;
}
.pill-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(181,110,255,0.12);
  padding: 7px 14px;
  border-radius: 12px;
  color: #b56eff;
  text-decoration: none;
  font-weight: 600;
  transition: 0.25s;
}
.pill img {
  width: 20px;
  height: 20px;
  filter: none;
}
.pill:hover {
  background: rgba(181,110,255,0.2);
  box-shadow: 0 0 8px rgba(181,110,255,0.35);
}
.separator {
  width: 80%;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 18px auto;
}
.cert-icon {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 15px; /* Reduced space to bio card */
}
.cert-icon a {
  display: inline-block;
  margin: 5px;
  transition: transform 0.2s;
}
.cert-icon img {
  width: 70px;
  filter: drop-shadow(0 0 6px rgba(181,110,255,0.25));
  cursor: pointer;
}
.cert-icon a:hover img {
  transform: scale(1.05);
}
.card {
  background: rgba(0,0,0,0.45);
  border-radius: 18px;
  padding: 26px;
  width: 420px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 0 25px rgba(181,110,255,0.24);
  margin-top: 10px; /* Reduced gap from certs */
  margin-bottom: 30px; /* Added space from footer */
}
.card h2 { color: #b56eff; margin-bottom: 12px; }
.card p { color: #ddd; line-height: 1.6; }
footer { color: #bbb; text-align: center; padding-bottom: 12px; }
footer span { color: #b56eff; font-weight: 600; }

/* Responsive for mobile */
@media (max-width: 600px) {
  nav {
    padding: 8px 16px;
    gap: 15px;
  }
  nav a { padding: 5px 10px; font-size: 0.95rem; }
  .main-area {
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
  }
  .card {
    width: 90%;
    margin-top: 10px;
    margin-bottom: 30px; /* Space from footer */
  }
}