/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BODY */
body {
  font-family: "Poppins", sans-serif;
  background: radial-gradient(circle at top, #0a0f1a, #000);
  color: #eaeaea;
  line-height: 1.6;
  overflow-x: hidden;
}

/* HEADER */
header {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #000814, #001d3d);
  color: #fff;
  box-shadow: 0 0 25px #00e6b8;
  animation: fadeInDown 1.3s ease-in-out;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}
header h1 {
  font-size: 2.8rem;
  background: linear-gradient(90deg, #00e6b8, #64ffda, #00b4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
header p {
  font-size: 1.2rem;
  color: #ccc;
  margin-top: 0.4rem;
}
.social-links a {
  color: #00e6b8;
  margin: 0 0.5rem;
  font-size: 1.6rem;
  transition: all 0.3s;
  cursor: pointer; /* Ensure links are interactive */
}
.social-links a:hover {
  color: #64ffda;
  transform: scale(1.3);
}

/* SECTION BASE */
section {
  padding: 3rem 1rem;
}
.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 1rem; /* Added padding to prevent content from touching edges */
}
h2 {
  font-size: 2rem;
  color: #64ffda;
  border-bottom: 3px solid #00e6b8;
  display: inline-block;
  margin-bottom: 1.5rem;
}
h3 {
  color: #00e6b8;
  margin: 2rem 0 1rem;
}

/* ABOUT */
.about p {
  color: #ccc;
  font-size: 1.05rem;
  line-height: 1.7;
  animation: fadeIn 1.5s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* PROJECT GRID */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 200, 0.2);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 0 15px rgba(0, 255, 200, 0.1);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  /* Added z-index to ensure cards sit above the body/background */
  z-index: 1; 
}
.card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(0, 255, 200, 0.3), transparent 50%);
  animation: spin 6s linear infinite;
  z-index: -1; /* Ensure the animated background is behind the content */
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 0 25px rgba(0, 255, 200, 0.4);
}
.card h4 {
  color: #64ffda;
  margin-bottom: 0.5rem;
}
.card p {
  font-size: 0.95rem;
  color: #bbb;
  margin-bottom: 0.8rem;
}
.card a {
  text-decoration: none;
  color: #00e6b8;
  font-weight: bold;
  transition: color 0.3s;
  cursor: pointer; /* Ensure links are interactive */
}
.card a:hover {
  color: #64ffda;
  text-decoration: underline;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 1rem;
  background: #000814;
  color: #64ffda;
  font-size: 0.9rem;
}

/* RESPONSIVENESS (for 400px and below) */
@media (max-width: 400px) {
  header { padding: 2rem 1rem; }
  header h1 { font-size: 2.2rem; }
  header p { font-size: 1.1rem; }
  section { padding: 2rem 0.5rem; }
  .container { padding: 0 0.5rem; }
  h2 { font-size: 1.8rem; }
  .card { padding: 1.2rem; }
  .project-grid { gap: 1rem; }
  .about p { font-size: 1rem; }
}