h1 {
  font-size: 2.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project {
  border: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.3);
}

.project h3 {
  margin-bottom: 0.5rem;
}

.project h4{
  margin-bottom: 0.5rem;
}

.hidden {
  display: none;
}

.more-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: inherit;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
}

.project-links {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.project-links a:hover {
  border-color: white;
}

.project-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

@media (max-width: 480px) {
  .project-card {
    padding: 1.6rem;
    border-radius: 18px;
  }
}

/* ===== Modal Overlay ===== */
.project-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

/* Hidden by default */
.project-modal.hidden {
  display: none;
}

/* ===== Modal Card ===== */
.modal-content {
  background: linear-gradient(
    135deg,
    rgba(25, 32, 44, 0.95),
    rgba(20, 20, 20, 0.95)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: modalFadeIn 0.3s ease;
}

/* Smooth entrance */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== Close Button ===== */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ===== Modal Typography ===== */
.modal-content h3,
.modal-content h4 {
  margin-top: 1.5rem;
}

.modal-content ul {
  padding-left: 1.2rem;
}

.modal-content li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* ===== Links Inside Modal ===== */
.modal-content .project-links {
  margin-top: 2rem;
}

.modal-content .project-links a {
  display: inline-block;
  margin-right: 1rem;
  padding-bottom: 0.3rem;
}

/* ===== Improve Card Buttons ===== */
.more-btn {
  margin-top: 1rem;
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.more-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ===== Mobile Tweaks ===== */
@media (max-width: 480px) {
  .modal-content {
    padding: 1.5rem;
    border-radius: 14px;
  }
}