/* ===== PORTFOLIO ===== */
#portfolio {
  background: var(--bg2);
  overflow: hidden;
}

.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: none;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(77, 255, 164, 0.3);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(77, 255, 164, 0.1);
}

.project-card.featured {
  grid-column: span 2;
}

.project-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition:
    transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
    filter 0.4s;
  filter: brightness(0.8) saturate(0.9);
}

.project-card:hover .project-img {
  transform: scale(1.05);
  filter: brightness(1) saturate(1.1);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8, 12, 20, 0.95) 0%,
    rgba(8, 12, 20, 0.2) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.project-type {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}

.project-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 300;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.project-card:hover .project-desc {
  max-height: 80px;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(77, 255, 164, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s;
  flex-shrink: 0;
  background: var(--accent-dim);
}

.project-link:hover {
  background: var(--accent);
  color: #000;
  transform: rotate(45deg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-card.featured {
    grid-column: span 1;
  }
  .portfolio-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}
