/* Reset & global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Poppins", sans-serif;
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

/* Header */
header {
  text-align: center;
  padding: 60px 20px 30px;
}
header h1 {
  font-size: 2.5rem;
  font-weight: 600;
}
header p {
  color: #666;
  margin-top: 10px;
}

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  padding: 20px 50px;
  max-width: 1200px;
  margin: auto;
}
.portfolio-item {
  background: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.portfolio-item img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  padding: 20px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s ease;
}
.modal-content {
  background: #fff;
  margin: 80px auto;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  text-align: left;
  position: relative;
  animation: slideUp 0.4s ease;
}
.modal-body h2 {
  margin-top: 0;
}
.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 26px;
  cursor: pointer;
  color: #333;
  transition: color 0.3s ease;
}
.close:hover {
  color: #e74c3c;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  background: #111;
  color: #fff;
  margin-top: 50px;
}
footer a {
  color: #fff;
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.8rem;
  }
  .portfolio-item img {
    height: 120px;
    padding: 15px;
  }
  .modal-content {
    width: 90%;
  }
}
