#projects {
  background: #000 !important;
  color: #f0f0f0;
  padding: 60px 20px;
  position: relative;
}

#projects .heading-section {
  text-align: center;
  margin-bottom: 40px;
}

#projects .heading-section h2 {
  font-size: 50px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

#projects .heading-section p {
  color: #aaa;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 35px;
  margin: 0 auto 60px;
  max-width: 1300px;
}

.project-card {
  background: linear-gradient(145deg, #1a1a1a, #151515);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: all 0.4s ease;
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 2px #ffc107;
}

.project-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.8));
}

.project-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #ffc107;
  color: #0a0a0a;
  padding: 8px 15px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.project-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
}

.project-category {
  font-size: 0.95rem;
  color: #ffc107;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-description {
  color: #bbb;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.tech-tag {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  color: #ffc107;
  border: 1px solid #ffc107;
  padding: 10px 22px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  flex: 1;
  justify-content: center;
}

.project-link:hover {
  background-color: #ffc107;
  color: #0a0a0a;
}

.project-link.demo {
  background-color: #ffc107;
  color: #0a0a0a;
}

.project-link.demo:hover {
  background-color: #ff9800;
}

.project-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.project-modal-content {
  background: linear-gradient(145deg, #1a1a1a, #151515);
  width: 100%;
  max-width: 900px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  border: 2px solid #ffc107;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.4s ease;
}

.project-modal-content.show {
  transform: scale(1);
  opacity: 1;
}

.project-modal-content.hide {
  transform: scale(0.9);
  opacity: 0;
}

.project-modal-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid #333;
  position: relative;
}

.project-close-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  background: rgba(255, 193, 7, 0.1);
  border: none;
  color: #ffc107;
  font-size: 1.8rem;
  cursor: pointer;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
}

.project-close-btn:hover {
  background-color: #ffc107;
  color: #0a0a0a;
}

.project-modal-title {
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: #ffc107;
  line-height: 1.3;
  padding-right: 60px;
}

.project-modal-category {
  font-size: 1.1rem;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-modal-category i {
  color: #ffc107;
}

.project-modal-body {
  padding: 0;
}

.project-modal-text-container {
  padding: 30px;
}

.project-modal-description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #ddd;
  margin-bottom: 25px;
}

.project-modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-modal-tech-tag {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.project-modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #333;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  gap: 15px;
}

.project-modal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 30px;
  background: #ffc107;
  color: #0a0a0a;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  flex: 1;
}

.project-modal-link:hover {
  background: #ff9800;
  color: #0a0a0a;
}

.project-modal-link.github {
  background: transparent;
  color: #ffc107;
  border: 1px solid #ffc107;
}

.project-modal-link.github:hover {
  background: #ffc107;
  color: #0a0a0a;
}

.other-projects-link {
  display: block;
  max-width: 320px;
  margin: 0 auto;
  text-align: center;
}

.project-btn {
  width: 100%;
  background: transparent;
  color: #ffc107;
  border: 2px solid #ffc107;
  padding: 12px 22px;
  border-radius: 30px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.project-btn:hover {
  background: #ffc107;
  color: #0a0a0a;
}

@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 768px) {
  #projects {
    padding: 40px 15px;
  }

  #projects .heading-section h2 {
    font-size: 38px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-card {
    max-width: 540px;
    margin: 0 auto;
  }

  .project-links {
    flex-direction: column;
    gap: 10px;
  }

  .project-modal {
    padding: 15px;
  }

  .project-modal-content {
    max-width: 100%;
  }

  .project-modal-header {
    padding: 25px 20px 15px;
  }

  .project-modal-title {
    font-size: 1.6rem;
    padding-right: 50px;
  }

  .project-modal-text-container {
    padding: 20px;
  }

  .project-modal-footer {
    padding: 15px 20px 20px;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  #projects {
    padding: 30px 10px;
  }

  #projects .heading-section h2 {
    font-size: 30px;
  }

  .projects-grid {
    gap: 15px;
  }

  .project-image {
    height: 190px;
  }

  .project-content {
    padding: 18px;
  }

  .project-title {
    font-size: 1.3rem;
  }

  .project-description {
    font-size: 0.95rem;
  }

  .project-modal-header {
    padding: 20px 15px 12px;
  }

  .project-modal-title {
    font-size: 1.35rem;
  }

  .project-modal-text-container {
    padding: 15px;
  }

  .project-modal-description {
    font-size: 0.95rem;
  }

  .project-close-btn {
    width: 36px;
    height: 36px;
    top: 15px;
    right: 15px;
    font-size: 1.4rem;
  }
}
