/* =========================================
   PROJECTS PAGE STYLES (Overlay & Tags)
   ========================================= */

/* --- Back Link (Pill Style) --- */
.back-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px; /* Pill shape */
  color: #b0b0b0;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #00f2ff;
  border-color: rgba(0, 242, 255, 0.3);
  transform: translateX(-5px);
  box-shadow: 0 4px 10px rgba(0, 242, 255, 0.1);
}

/* --- Tag Filter Section --- */
.filter-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  padding: 0 20px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b0b0b0;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(0, 242, 255, 0.3);
}

.filter-btn.active {
  background: rgba(0, 242, 255, 0.15);
  color: #00f2ff;
  border-color: #00f2ff;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

/* --- Project Card Updates --- */
.project {
  cursor: pointer; /* Indicate clickability */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Hide the old button if it still exists in DOM but we want to be sure */
.project .project-button {
  display: none; 
}

/* --- Project Overlay (Modal) --- */
.project-overlay {
  position: fixed;
  inset: 0; /* Ensures full coverage */
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999; /* Very high z-index */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  margin: 0; /* Reset margin */
}

/* ... (lines 98-278) ... */

.project:hover {
  transform: translateY(-10px);
  box-shadow: 0px 0px 15px 2px rgba(0, 242, 255, 0.15); /* Duller, tighter cyan glow */
  border-color: rgba(0, 242, 255, 0.3);
}

.project-overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay-content {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-overlay.active .overlay-content {
  transform: scale(1);
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: #aaa;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
  background: none;
  border: none;
  line-height: 1;
}

.close-btn:hover {
  color: #fff;
}

/* Overlay Layout */
.overlay-image-container {
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay-details {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.overlay-title {
  font-size: 2rem;
  color: #fff;
  margin: 0;
}

.overlay-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.overlay-tag {
  background: rgba(0, 242, 255, 0.1);
  color: #00f2ff;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  border: 1px solid rgba(0, 242, 255, 0.2);
}

.overlay-description {
  color: #ccc;
  line-height: 1.6;
  font-size: 1.05rem;
}

/* Action Buttons */
.overlay-actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  align-items: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #00f2ff 0%, #00c8ff 100%);
  color: #000;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 242, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
}

.github-icon {
  width: 20px;
  height: 20px;
  filter: invert(1); /* Make black icon white */
}

/* Responsive */
/* Responsive */
@media screen and (max-width: 768px) {
  .overlay-content {
    width: 95%;
    max-height: 85vh;
  }

  .overlay-image-container {
    height: 200px;
  }
  
  .overlay-title {
    font-size: 1.5rem;
  }
  
  .overlay-details {
    padding: 20px;
  }

  .overlay-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .action-btn {
    justify-content: center;
  }
}

/* =========================================
   PROJECT CARD STYLES (Moved from style.css)
   ========================================= */

.project-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 30px;
}

.project img {
  height: 180px;
  width: 100%;
  object-fit: cover;
}

.project {
  background-color: #1e1e1e;
  border-radius: 12px;
  border: 1px solid #3a3a3a;
  overflow: hidden;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.project:hover {
  transform: translateY(-10px);
  box-shadow: 0px 0px 15px 2px rgba(0, 242, 255, 0.15); /* Duller, tighter cyan glow */
  border-color: rgba(0, 242, 255, 0.3);
}

.card {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card h3 {
  color: #e0e0e0;
  margin-bottom: 10px;
}

.card p {
  color: #a0a0a0;
  line-height: 1.6;
  margin-bottom: 15px;
  flex-grow: 1;
}

.card-tags {
  margin-bottom: 20px;
}

.card span {
  background-color: rgba(0, 242, 255, 0.1);
  color: #00f2ff;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.75rem;
  margin-right: 5px;
}

.view-all-container {
  text-align: center;
  margin-top: 30px;
}

/* Projects Page Container */
.projects-page-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 40px;
  background-color: rgba(42, 42, 42, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #3a3a3a;
  border-radius: 16px;
  position: relative;
  z-index: 1;
}
/* Responsive Project Grid */
@media screen and (max-width: 768px) {
  .project-container {
    grid-template-columns: 1fr;
  }
}
