* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background: #f8fafc;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.hero {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  padding: 72px 0 56px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 2.8rem;
}

.subtitle {
  font-size: 1.15rem;
  margin: 0 0 16px;
  opacity: 0.9;
}

.intro {
  max-width: 760px;
  margin-bottom: 20px;
}

.hero-links a {
  display: inline-block;
  margin-right: 14px;
  margin-top: 10px;
  color: white;
  text-decoration: none;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
}

.hero-links a:hover {
  background: rgba(255,255,255,0.12);
}

.section {
  padding: 72px 0;
  border-top: 1px solid rgba(0,0,0,0.04);
}

.section h2 {
  margin-top: 0;
  font-size: 2rem;
  margin-bottom: 24px;
}

.alt {
  background: #f1f5f9;
}

.project-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: white;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: #111827;
}

.project-card a {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  font-weight: bold;
  color: #2563eb;
  transition: color 0.2s ease;
}

.project-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.view-link {
  margin-top: 10px;
  font-weight: bold;
  color: #2563eb;
  transition: color 0.2s ease;
}

.project-card:hover .view-link {
  color: #1d4ed8;
}

.project-card:hover .project-thumb {
  transform: scale(1.03);
}

.project-tech {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 8px;
  margin-bottom: 6px;
}

.project-thumb {
  width: 100%;
  max-height: 400px;
  object-fit: contain;   /* key change */
  /*background: #f3f4f6;   /* adds neutral background */
  border-radius: 10px;
  margin-bottom: 14px;
  display: block;
  transition: transform 0.3s ease;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.footer {
  background: #111827;
  color: white;
  text-align: center;
  padding: 24px 0;
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .project-grid,
  .project-grid-auto {
    grid-template-columns: 1fr;
  }
}