#works {
  position: relative;
  min-height: 100vh;
  padding: 6rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.works-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.works-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--fg);
}

.works-title-line {
  width: 80px;
  height: 3px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.works-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

#works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1050px;
}

.work-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: default;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.work-card.hidden {
  display: none !important;
}

.work-card-img-wrapper {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-bottom: var(--ink-border-width) solid var(--ink);
  background: var(--item-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.work-card-placeholder-title {
  position: absolute;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--muted);
  opacity: 0.4;
  z-index: 1;
  text-align: center;
  padding: 0 1rem;
}

.work-card-img {
  width: 100%;
  height: 100%;
  z-index: 2;
  object-fit: cover;
  position: relative;
}

.work-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.work-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--fg);
  line-height: 1.3;
}

.work-card-description {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--fg);
  opacity: 0.8;
  line-height: 1.6;
  flex: 1;
}

.work-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

#works-empty {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--muted);
  margin-top: 3rem;
}
#works-empty.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  #works {
    min-height: auto !important;
    padding: 2rem 1rem !important;
  }
}
