* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #f5f6fa;
  color: #333;
  padding: 40px;
}
a {
  text-decoration: none;
}

h1 {
  text-align: center;
  margin-bottom: 50px;
  font-size: 3rem;
  color: #2f3640;
}

.card_container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card .image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover .image img {
  transform: scale(1.05);
}

.card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  cursor: pointer;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.mobile-card .phone-frame {
  width: 160px;
  height: 300px;
  margin: 0 auto;
  border: 16px solid #333;
  border-radius: 36px;
  position: relative;
  background: #000;
  overflow: hidden;
}

.mobile-card .phone-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  border-radius: 4px;
  background: #555;
  margin-top: 8px;
}

.mobile-card .phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card .description {
  padding: 20px;
  text-align: center;
}

.card .description p {
  font-size: 1.1rem;
  color: #2f3640;
  line-height: 1.5;
}

.github-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6e5494, #f0f0f0);
  color: white;
  text-decoration: none;
  border-radius: 15px;
  padding: 20px;
  width: 100%; /* make card width responsive */
  max-width: 400px; /* keep desktop max size */
  height: 200px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  text-align: center;
  box-sizing: border-box; /* include padding in width */
  margin: 10px auto; /* center horizontally on small screens */
}

.github-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
}

.github-card .github-icon img {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
}

/* Optional: fine-tune for really small screens */
@media (max-width: 400px) {
  .github-card {
    height: auto; /* let height grow if content wraps */
    padding: 15px;
  }

  .github-card .github-icon img {
    width: 50px;
    height: 50px;
  }
}
