.projects-section {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(83, 128, 116, 0.18), transparent 30%),
    linear-gradient(180deg, #080808 0%, #101010 48%, #070707 100%);
  border-top: 1px solid var(--border-soft);
}

.projects-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 78%, transparent);
}

.projects-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 118px 0 96px;
}

.projects-header {
  max-width: 740px;
  margin-bottom: 30px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  margin-bottom: 14px;
  border: 1px solid rgba(217, 255, 102, 0.5);
  color: #d9ff66;
  background: rgba(217, 255, 102, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.projects-header h2 {
  color: var(--text-title);
  font-size: 2.65rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.projects-header p {
  max-width: 680px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.project-filter-lead {
  width: 32px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d9ff66;
}

.project-filter-lead .icon {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 10px rgba(217, 255, 102, 0.2));
}

.project-filter {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #a2a2a2;
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.project-filter .icon {
  width: 17px;
  height: 17px;
  color: #969696;
  opacity: 1;
  transition:
    color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.project-filter:hover,
.project-filter.is-active {
  color: #111111;
  border-color: #d9ff66;
  background: #d9ff66;
  box-shadow: 0 0 0 3px rgba(217, 255, 102, 0.08);
}

.project-filter:hover .icon,
.project-filter.is-active .icon {
  color: #111111;
  opacity: 1;
}

.project-filter:hover {
  transform: translateY(-1px);
}

.project-filter:hover .icon {
  transform: scale(1.06);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.project-card {
  display: flex;
  min-width: 0;
  min-height: 560px;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    #161616;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  transition:
    border-color 0.28s ease,
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(217, 255, 102, 0.52);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.56);
}

.project-card.is-hidden {
  display: none;
}

.project-media {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  background-color: #222222;
  background-position: center;
  background-size: cover;
}

.project-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.7)),
    radial-gradient(circle at 50% 20%, rgba(217, 255, 102, 0.16), transparent 42%);
  z-index: 1;
}

.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  background-position: center;
  background-size: cover;
  transform: scale(1);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.project-card:hover .project-media::after {
  transform: scale(1.09);
  filter: saturate(1.18) contrast(1.05);
}

.project-media-1 {
  background-image: url("https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1400&q=90");
}

.project-media-2 {
  background-image: url("https://images.unsplash.com/photo-1563013544-824ae1b704d3?auto=format&fit=crop&w=1400&q=90");
}

.project-media-3 {
  background-image: url("https://images.unsplash.com/photo-1677442136019-21780ecad995?auto=format&fit=crop&w=1400&q=90");
}

.project-media-4 {
  background-image: url("https://images.unsplash.com/photo-1515879218367-8466d910aaa4?auto=format&fit=crop&w=1400&q=90");
}

.project-media-5 {
  background-image: url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1400&q=90");
}

.project-media-6 {
  background-image: url("https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?auto=format&fit=crop&w=1400&q=90");
}

.project-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 18px 14px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  margin-bottom: 16px;
}

.project-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  color: #101010;
  background: #d9ff66;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.project-date {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.project-context {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 8px;
  color: #cfcfcf;
  background: rgba(255, 255, 255, 0.055);
  border-left: 2px solid rgba(217, 255, 102, 0.75);
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

.project-card h3 {
  min-height: 54px;
  color: var(--text-main);
  font-size: 1.18rem;
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-card p {
  min-height: 104px;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  list-style: none;
}

.project-stack li {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  color: #d8d8d8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

.project-stack li .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #9b9b9b;
  opacity: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.project-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.project-action {
  min-height: 58px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  color: #b9b9b9;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px;
  font-size: 0.83rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.project-action .icon {
  width: 26px;
  height: 26px;
  color: #9d9d9d;
  opacity: 0.95;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.project-action.is-disabled {
  color: #9a9a9a;
  border-color: rgba(255, 255, 255, 0.13);
  cursor: default;
}

.project-action:not(.is-disabled):hover {
  color: #101010;
  background: #d9ff66;
  border-color: #d9ff66;
}

.project-action:not(.is-disabled):hover .icon {
  color: #101010;
}

.project-card:hover .project-stack li .icon {
  color: #d9ff66;
  transform: translateY(-1px);
}

.project-card:hover .project-action.is-disabled {
  color: #b5b5b5;
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.18);
}

.project-card:hover .project-action.is-disabled .icon {
  color: #d9ff66;
  opacity: 0.9;
}

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

  .projects-shell {
    width: min(920px, calc(100% - 44px));
  }
}

@media (max-width: 900px) {
  .projects-shell {
    width: min(680px, calc(100% - 32px));
    padding: 72px 0 72px;
  }

  .projects-header h2 {
    font-size: 2.05rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 0;
  }

  .project-card h3,
  .project-card p {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .projects-shell {
    width: calc(100% - 28px);
  }

  .projects-header h2 {
    font-size: 1.8rem;
  }

  .project-filters {
    gap: 8px;
  }

  .project-filter {
    font-size: 0.78rem;
    gap: 6px;
  }

  .project-media {
    min-height: 184px;
  }

  .project-meta,
  .project-actions {
    grid-template-columns: 1fr;
  }

  .project-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
