/* PortfolioProject.css */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f9f9fb;
  font-family: 'Poppins', sans-serif;
  color: #333;
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 2rem auto 4rem auto;
  padding: 0 1rem;
}

.page-title {
  text-align: center;
  font-weight: 700;
  font-size: 2.5rem;
  color: #222;
  margin-bottom: 3rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.project-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #eee;
  transition: filter 0.3s ease;
}

.project-card:hover .project-img {
  filter: brightness(0.9);
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 1rem 1.25rem 0.5rem 1.25rem;
  color: #222;
  flex-shrink: 0;
}

.project-desc {
  font-size: 0.95rem;
  color: #555;
  margin: 0 1.25rem 1.25rem 1.25rem;
  flex-grow: 1;
}

.btn-group {
  display: flex;
  justify-content: space-around;
  padding: 1rem 1.25rem 1.25rem 1.25rem;
  gap: 1rem;
}

.btn {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease;
  user-select: none;
  border: 2px solid transparent;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.btn-github {
  background-color: #24292e;
  color: #fff;
  border-color: #24292e;
}

.btn-github:hover,
.btn-github:focus {
  background-color: #3f4448;
  border-color: #3f4448;
  color: #fff;
}

.btn-view {
  background-color: #0b74de;
  color: #fff;
  border-color: #0b74de;
}

.btn-view:hover,
.btn-view:focus {
  background-color: #095bb5;
  border-color: #095bb5;
  color: #fff;
}

/* Responsive tweaks */

@media (max-width: 480px) {
  .project-img {
    height: 140px;
  }
  .page-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  .btn-group {
    flex-direction: column;
  }
  .btn {
    flex: none;
    width: 100%;
  }
}
