/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to right, #f0f4f8, #e6eaf1);
  color: #333;
  padding: 2rem;
  line-height: 1.6;
}
.container {
  max-width: 1300px;
  margin: auto;
  padding: 1rem;
}

/* Title and section headers */
.page-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #1e3a8a;
  animation: fadeIn 1s ease;
}
section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #2563eb;
  border-left: 5px solid #60a5fa;
  padding-left: 1rem;
}

/* Grid for cards */
.projects-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease;
}

/* Card styles */
.project-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}
.project-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.project-content {
  padding: 1.2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #111827;
  margin: 0.5rem 0;
}
.project-desc {
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

/* Buttons */
.btn-group {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.btn {
  flex: 1;
  padding: 0.6rem;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  color: #fff;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.btn-github {
  background: #111827;
}
.btn-github:hover {
  background: #1f2937;
}
.btn-view {
  background: linear-gradient(135deg, #3b82f6, #9333ea);
}
.btn-view:hover {
  background: linear-gradient(135deg, #2563eb, #7e22ce);
}

/* Animations */
@keyframes fadeIn {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes fadeInUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .page-title {
    font-size: 2.2rem;
  }
  .project-title {
    font-size: 1.2rem;
  }
  .project-desc {
    font-size: 0.9rem;
  }
}
@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
  }
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.project-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.project-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-title {
  font-size: 1.2rem;
  color: #222;
  margin: 0;
}

.project-desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.btn-github {
  background-color: #333;
  color: #fff;
}

.btn-github:hover {
  background-color: #000;
}

.btn-view {
  background-color: #007bff;
  color: #fff;
}

.btn-view:hover {
  background-color: #0056b3;
}

@media screen and (max-width: 600px) {
  .project-img {
    height: 160px;
  }

  .project-title {
    font-size: 1rem;
  }

  .project-desc {
    font-size: 0.85rem;
  }
}
