/* Simplified & cleaned CSS */

.filter-buttons {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  display: inline;
}

.filter-btn {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  transition: color 0.2s ease;
  color: var(--dark);
  text-transform: lowercase;
  border: 1px solid var(--gray);
  padding: 0.3em 0.6em;
  border-radius: 6px;
  background-color: white;
  margin: 0.2em;
}

.filter-btn:hover{
  background-color: var(--gray);
}

.filter-btn.active {
  background-color: var(--themed-primary);
  color: var(--themed-secondary)
}

.project-card {
  display: none;
  border-bottom: 1px solid var(--gray);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card.show {
  display: block;
}

.project-card:hover {
  border-bottom: 1px solid var(--dark);
}

.project-card:hover h3 {
  color: var(--themed-primary);
}

.project-list a {
  text-decoration: none;
  color: var(--dark);
  background: transparent;
}

.project-card h3 {
  margin: 0;
}

.project-content {
  height: 100%;
  min-height: 100px; /* fallback for older browsers */

  display: flex;
  flex-direction: row;
  justify-content: start;
}

.project-body {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.project-description {
  margin-top: 0.5rem;
  color: var(--dark);
  opacity: 0.6;
}

/* Container that enforces the visual size for both real images and placeholders */
.cover-media {
  aspect-ratio: 16/9;
  min-height: 100px; /* fallback for older browsers */
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--gray);
}

.cover-media img.cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-media{max-width:0;overflow:hidden;transition:max-width .50s ease,margin .25s}
.project-card:hover .cover-media{max-width:220px;margin-right:12px}

.cover-image{height:72px;width:auto;display:block}
.cover-placeholder{display:flex;align-items:center;justify-content:center;height:72px;background:#f4f4f4;color:#333;padding:0 8px}
.cover-title{font-weight:600}

.cover-title {
  font-size: 2.05rem;
  padding: 0.4rem 0.8rem;
  text-align: center;
  line-height: 1.1;
  opacity: 0.4;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  text-transform: lowercase;
}

.tag-pill {
  padding: 0.25rem 0.6rem;
  background: #e8e8e8;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1;
}

/* ===============================
   PROJECTS SECTION
   =============================== */

.year-container {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  position: relative;
  padding: 2em 0;
}

.projects-year {
  position: sticky;
  top: 5rem;
  flex: 0 0 200px;
  height: fit-content;
}

.project-list {
   gap: 2rem;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ===============================
   RESPONSIVE BREAKPOINTS
   =============================== */

@media (min-width: 1290px) {
  .project-list{
      grid-template-columns: 1fr 1fr 1fr
  }
}

@media (max-width: 1024px) {
  .projects-year {
    flex: 0 0 120px;
    top: 4rem;
    border: none;
  }
}

@media (max-width: 768px) {
  .year-container {
    display: block;
    }

  .projects-year {
    position: static;
    width: 100%;
    margin-bottom: 3rem;
  }

  .project-list {
    gap: 2.5rem 1rem;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .project-list {
    gap: 2rem;
    display: flex;
    flex-direction: column;
  }

}

@media (max-width: 320px) {
  .project-list {
    gap: 1.5rem;
  }

}

/* ===============================
   FLOATING COVER IMAGE
   =============================== */

.floating-cover-image {
  position: fixed;
  width: 200px;
  height: 150px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10000;
  pointer-events: none;
}
