/* Reset default spacing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base Styles */
body {
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 0 20px;
}

/* Back Button */
.back-btn {
  margin-top: 15px;
  text-align: center;
}

.back-btn a {
  display: inline-block;
  padding: 10px 20px;
  background: #2575fc;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, transform 0.2s;
}

.back-btn a:hover {
  background: #6a11cb;
  transform: scale(1.05);
}

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
  animation: fadeIn 1s ease;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Projects Section */
.projects-section {
  width: 100%;
  max-width: 1200px;
  flex: 1 0 auto; /* ensures it grows properly */
  padding-bottom: 20px; /* space above footer */
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.project-card {
  background: #fff;
  color: #333;
  padding: 20px;
  border-radius: 12px;
  width: 250px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.6s forwards;
}

.project-card:nth-child(1) {
  animation-delay: 0.1s;
}
.project-card:nth-child(2) {
  animation-delay: 0.3s;
}
.project-card:nth-child(3) {
  animation-delay: 0.5s;
}
.project-card:nth-child(4) {
  animation-delay: 0.7s;
}
.project-card:nth-child(5) {
  animation-delay: 0.9s;
} /* for To-Do App */

.project-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  background: #f9f9f9;
}

.project-card a {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  background: #2575fc;
  color: #fff;
  padding: 8px 15px;
  border-radius: 8px;
  transition: background 0.3s, transform 0.2s;
}

.project-card a:hover {
  background: #6a11cb;
  transform: scale(1.05);
}

/* Footer */
footer {
  flex-shrink: 0;
  width: 100vw;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 0;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */

/* Tablet */
@media (max-width: 900px) {
  .project-card {
    width: 45%;
  }
}

/* Mobile */
@media (max-width: 500px) {
  .project-card {
    width: 90%;
  }
  header h1 {
    font-size: 1.5rem;
  }
  header p {
    font-size: 1rem;
  }
}

/* Extra small mobile */
@media (max-width: 350px) {
  header h1 {
    font-size: 1.3rem;
  }
  header p {
    font-size: 0.9rem;
  }
  .project-card {
    width: 100%;
    padding: 15px;
  }
  .project-card a {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}
