/* WORK — Project cards, grid, skeletons */
.work-section {
  background: hsla(270, 20%, 6%, 0.65);
  padding: 5.5rem 2rem;
}
.work-section .section-inner {
  max-width: 1140px;
  margin: 0 auto;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
  cursor: pointer;
  min-height: 300px;
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: hsla(270, 60%, 55%, 0.4);
  box-shadow: 0 20px 60px hsla(270, 80%, 30%, 0.25);
}
.project-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}
.project-img {
  width: 100%;
  height: 100%;
  transition: transform var(--transition);
  display: block;
}
.project-img-photo {
  object-fit: cover;
  object-position: center;
  filter: brightness(0.82) saturate(1.1);
  transition:
    transform var(--transition),
    filter var(--transition);
}
.project-card:hover .project-img-photo {
  filter: brightness(0.72) saturate(1.05);
  transform: scale(1.03);
}
.proj-skeleton {
  background: linear-gradient(
    90deg,
    hsla(270, 15%, 12%, 0.6) 25%,
    hsla(270, 20%, 18%, 0.4) 50%,
    hsla(270, 15%, 12%, 0.6) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-lg);
  height: 340px;
  border: 1px solid hsla(270, 20%, 20%, 0.2);
}
.project-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}
.project-card:hover .project-overlay {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.03);
}
.project-link,
.project-link-modern {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.project-link:hover,
.project-link-modern:hover {
  background: var(--purple-2);
  border-color: var(--purple-2);
}
.project-link-modern .action-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.project-link-modern:hover .action-arrow {
  transform: translateX(3px);
}
.project-info {
  padding: 1.4rem 1.5rem 1.6rem;
}
.project-tags {
  display: flex;
  flex-wrap: wrap; /* Allows tags to drop to the next line when space runs out */
  gap: 0.5rem; /* Keeps a uniform horizontal and vertical space between tags */
  width: max-content; /* Shrinks the container width to fit only the current row of content */
  max-width: 100%; /* Ensures it never overflows the card padding bounds */
  margin-bottom: 0.75rem;
}

.project-tags .tag {
  display: inline-block; /* Forces the item to size itself strictly according to its text */
  white-space: nowrap; /* Prevents a single tag's text from breaking into two lines */
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #d946ef;
  border: 1px solid rgba(217, 70, 239, 0.4);
  padding: 3px 8px; /* Slight vertical & horizontal padding for clean pill scaling */
  border-radius: 4px;
  background: rgba(217, 70, 239, 0.05);
}
.project-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.view-all-wrap {
  margin-top: 2.5rem;
  text-align: center;
  width: 100%;
}

.view-all-wrap .btn {
  min-width: 240px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::before {
  opacity: 1;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple-2), var(--purple-3));
  color: #fff;
  box-shadow: 0 4px 30px hsla(270, 80%, 50%, 0.4);
}
.btn-primary:hover {
  box-shadow: 0 6px 40px hsla(270, 80%, 50%, 0.6);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid hsla(0, 0%, 70%, 0.3);
}
.btn-ghost:hover {
  border-color: var(--purple-1);
  color: var(--purple-1);
  transform: translateY(-2px);
}
.btn-arrow {
  display: inline-block;
  transition: transform 0.25s;
}
.btn:hover .btn-arrow {
  transform: translateX(4px);
}
.btn-full {
  width: 100%;
  justify-content: center;
}
