body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background: #f9f9f9;
  color: #222;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #222;
  color: white;
}

header .logo {
  font-weight: 600;
}

nav a {
  color: white;
  margin-left: 1rem;
  text-decoration: none;
}

nav a.active {
  border-bottom: 2px solid orange;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 2rem;
}

.profile-pic {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.project-card {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
}

.project-card img {
  width: 60%;              /* smaller thumbnail style */
  max-width: 150px;        /* keep it neat */
  height: auto;            /* preserve proportions */
  object-fit: contain;     /* no stretching */
  border-radius: 8px;
  margin: 0 auto 1rem;     /* center image */
  display: block;
}

/* Chess Gallery */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}

.gallery figure {
  text-align: center;
  max-width: 320px;
}

.gallery img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Specific tweaks */
.gallery img[alt="Chess board"] {
  width: 280px;       /* casual chess fun */
}

.gallery img[alt="Playing chess"] {
  width: 340px;       /* certificate */
  height: auto;
}

.gallery figcaption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #444;
  font-weight: 500;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: #222;
  color: white;
  margin-top: 2rem;
}

/* Responsive Tweaks */
@media (max-width: 600px) {
  .profile-pic {
    width: 120px;
    height: 120px;
  }
  .gallery img {
    width: 100%;
    max-width: 300px;
    height: auto;
  }
}
