/* ============================================================
   PROJECTS HEADER
   ============================================================ */
.projects-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  padding: 0;
}

.timeline__year {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 2rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--rule);
}

.timeline__year:last-child { border-bottom: none; }

.timeline__year-label {
  padding-top: 0.2rem;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

/* ============================================================
   PROJECT GRID
   ============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* ============================================================
   PROJECT CARD
   ============================================================ */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: visible;
  transition: border-color 0.15s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  border-color: var(--text-tertiary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.project-card__image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: var(--rule);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.project-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

.project-card:hover .project-card__image img { transform: scale(1.03); }

.project-card__image-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 300;
  color: var(--text-tertiary);
}

/* Text panel with inverted image backdrop + frosted glass */
.project-card__body {
  position: relative;
  z-index: 1;
  padding: 0.75rem 1.25rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Inverted image bleeding into text zone */
.project-card__body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--project-card-bg-image);
  background-size: cover;
  background-position: center bottom;
  filter: blur(18px) saturate(1.5) brightness(1.15);
  transform: scale(1.15) scaleY(-1);
  z-index: 0;
  opacity: 0.6;
}

/* Frosted glass over the inverted image */
.project-card__body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--card-body-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1;
}

/* Text sits above both layers */
.project-card__body > * {
  position: relative;
  z-index: 2;
}

.project-card__category {
  margin-bottom: 0.4rem;
}

.project-card__title {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.project-card__desc { flex: 1; }

.project-card__arrow {
  display: inline-block;
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  transition: transform 0.15s, color 0.15s;
}

.project-card:hover .project-card__arrow {
  transform: translateX(3px);
  color: var(--text-primary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .timeline__year {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem 0;
  }
  .timeline__year-label { position: static; }
  .project-grid { grid-template-columns: 1fr; }
}
