/* --- Reset & Globals --- */
  * { 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;
  }


/* --- Grid Background --- */
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 60s linear infinite;
  z-index: 0;
}
@keyframes moveGrid {
  from { background-position: 0 0; }
  to { background-position: 80px 80px; }
}

/* --- Navbar --- */
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);
}

/* --- Main Container --- */
  .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 100px 15px 50px; /* padding inside instead of margin */
    z-index: 2;
  }


/* --- Project Grid --- */
.projects-grid {
  max-width: 1000px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  padding: 0;
}

/* --- Project Card --- */
.project-card {
  background: rgba(20, 20, 20, 0.7);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 0 0 25px rgba(181,110,255,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 40px rgba(181,110,255,0.4);
}
.project-card h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-card h2 img {
  width: 24px;
  height: 24px;
}
.project-card p {
  font-size: 0.95rem;
  color: #ccc;
  flex: 1;
}
.project-links {
  display: flex;
  gap: 15px;
}
.btn {
  text-decoration: none;
  background: linear-gradient(135deg, rgba(181,110,255,0.3), rgba(181,110,255,0.6));
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.btn:hover {
  background: rgba(181,110,255,0.8);
  box-shadow: 0 0 15px rgba(181,110,255,0.4);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 30px 20px 20px;
  color: #bbb;
  font-size: 0.9rem;
  z-index: 5;
}
footer span {
  color: #b56eff;
  font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  nav {
    padding: 8px 16px;
    gap: 15px;
  }
  nav a {
    padding: 5px 10px;
    font-size: 0.95rem;
  }
  .container {
    margin-top: 60px;
    margin-bottom: 20px;
  }
  .projects-grid {
    gap: 15px;
  }
  .project-card {
    padding: 20px;
    gap: 12px;
  }
  .project-card h2 {
    font-size: 1.2rem;
  }
  .project-card h2 img {
    width: 22px;
    height: 22px;
  }
  .project-card p {
    font-size: 0.9rem;
  }
  .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
  footer {
    font-size: 0.85rem;
    padding: 25px 15px 15px;
  }
}