/* =====================================================
   PROJECTS PAGE
===================================================== */

.projects {
  padding: 4rem 1rem;
  background: var(--bg);
  color: var(--text);
  text-align: center;
}

/* =====================================================
   TITLES
===================================================== */

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 3rem;
}

/* =====================================================
   GRID
===================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  justify-items: center;
}

/* =====================================================
   PROJECT CARD
===================================================== */

.project-card {
  position: relative;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0)
    ),
    var(--card);

  border-radius: 24px;
  padding: 1.6rem;
  max-width: 360px;
  text-align: center;

  border: 1px solid rgba(0, 255, 209, 0.35);

  box-shadow:
    0 0 18px rgba(0, 255, 209, 0.25),
    0 20px 45px rgba(0, 0, 0, 0.65);

  display: flex;
  flex-direction: column;

  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;

  cursor: default;
  overflow: hidden;
}

/* Glow sheen */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;

  background: linear-gradient(
    120deg,
    transparent,
    rgba(0, 255, 209, 0.45),
    transparent
  );

  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Hover */
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 255, 209, 0.8);

  box-shadow:
    0 0 35px rgba(0, 255, 209, 0.6),
    0 35px 80px rgba(0, 0, 0, 0.85);
}

.project-card:hover::before {
  opacity: 1;
}

/* PREVENT CARD GLOW WHEN HOVERING BUTTONS */
.project-card:has(.project-buttons a:hover) {
  transform: none;
  border-color: rgba(0, 255, 209, 0.35);
  box-shadow:
    0 0 18px rgba(0, 255, 209, 0.25),
    0 20px 45px rgba(0, 0, 0, 0.65);
}

.project-card:has(.project-buttons a:hover)::before {
  opacity: 0;
}

/* IMAGE */
.project-card img {
  width: 100%;
  height: 180px;
  border-radius: 18px;
  margin-bottom: 1.1rem;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

/* TEXT */
.project-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.project-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
  line-height: 1.6;
}

/* TAGS */
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}

.tags span {
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
}

/* BUTTONS */
.project-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: auto;
}

.btn-visit,
.btn-code {
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: 0.3s ease;
  border: none;
}

.btn-visit {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 255, 209, 0.6), 0 0 30px rgba(0, 255, 209, 0.35);
}

.btn-visit:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 0 35px rgba(0, 255, 209, 1), 0 0 70px rgba(0, 255, 209, 0.7);
}

.btn-code.disabled {
  background: rgba(255, 255, 255, 0.05);
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
}

/* =====================================================
   NEW: LOCATION TAG & FOOTER SYNC
===================================================== */

.location-tag {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 50px;
}

.main-footer {
    border-top: 1px solid #111;
    padding: 60px 0;
    margin-top: 100px;
    background: #000;
}

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.footer-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.invert {
    filter: invert(0.5);
    width: 20px;
    transition: 0.3s ease;
}

.invert:hover {
    filter: invert(1) drop-shadow(0 0 5px var(--primary));
}

.ori-host {
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
}

.ori-host span {
    color: var(--primary);
}

/* RESPONSIVE */

@media (max-width: 768px) {
  /* --- Navbar Sync --- */
  .nav { 
    padding: 15px 5vw; 
    position: relative; /* Keeps the dropdown anchored correctly */
  }

  /* Show Hamburger Icon */
  .hamburger { 
    display: flex; 
  }

  /* Mobile Dropdown Logic */
  .nav-links {
    display: none; /* Hidden by default */
    flex-direction: column;
    position: absolute;
    top: 100%; /* Sits exactly below the border-bottom of .nav */
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.98); /* Matching your card/bg theme */
    backdrop-filter: blur(15px);
    padding: 30px;
    gap: 20px;
    text-align: center;
    border-bottom: 1px solid #111;
    z-index: 999;
  }

  /* Toggle class when clicked */
  .nav-links.active {
    display: flex;
  }

  /* Hamburger Animation */
  .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* --- Grid & Footer Layout --- */
  .projects-grid { 
    grid-template-columns: 1fr; 
    gap: 1.5rem;
  }
  
  .project-card {
    max-width: 90%; /* Better fit for mobile screens */
  }

  .footer-bottom { 
    flex-direction: column; 
    gap: 25px; 
    text-align: center; 
  }
}