body.projects-index-body {
  background:
    radial-gradient(circle at 20% 8%, rgba(183, 63, 252, 0.24), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(72, 205, 255, 0.09), transparent 30%),
    var(--color-bg);
}

.projects-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.48fr);
  gap: 36px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 150px 40px 42px;
  overflow: hidden;
}

.projects-hero::before {
  content: "";
  position: absolute;
  inset: 92px 40px 0;
  border-radius: 28px;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(90deg, #000 0%, #000 52%, transparent 100%);
  pointer-events: none;
}

.projects-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
  max-width: 860px;
}

.projects-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(38px, 5.4vw, 76px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: var(--color-text);
}

.projects-lead {
  margin: 0;
  max-width: 760px;
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.76);
}

.projects-starfield {
  position: relative;
  z-index: 1;
  min-height: 290px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(183, 63, 252, 0.22);
  background:
    radial-gradient(circle at var(--star-x, 50%) var(--star-y, 50%), rgba(183, 63, 252, 0.3), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(183, 63, 252, 0.055));
  box-shadow: inset 0 0 70px rgba(183, 63, 252, 0.12);
}

.projects-starfield::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at var(--star-x, 50%) var(--star-y, 50%), #000 0%, transparent 72%);
  pointer-events: none;
}

.projects-starfield canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.projects-starfield-hint {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  max-width: calc(100% - 32px);
  padding: 10px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(13, 13, 13, 0.42);
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.projects-filter-section {
  display: flex;
  justify-content: center;
  padding: 0 40px 28px;
}

.projects-filter-inner {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  width: min(100%, 1440px);
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(183, 63, 252, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(183, 63, 252, 0.08));
}

.projects-filter-inner p {
  margin: 0;
  max-width: 520px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.projects-filter-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.project-filter-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.project-filter-button:hover {
  transform: translateY(-1px);
  border-color: rgba(183, 63, 252, 0.58);
}

.project-filter-button.is-active {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
}

.projects-grid-section {
  display: flex;
  justify-content: center;
  padding: 0 40px 100px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1440px;
}

.project-card {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.04);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.45s ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.18) 44%, transparent 58%);
  transform: translateX(-120%);
  transition: opacity 0.25s ease;
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  background: linear-gradient(0deg, rgba(13, 13, 13, 0.86) 0%, rgba(13, 13, 13, 0.28) 48%, rgba(13, 13, 13, 0.02) 100%);
  transition: background-color 0.3s ease;
}

.project-card-type {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(183, 63, 252, 0.78);
  color: #15091d;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-card-name {
  max-width: 100%;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  color: #fff;
  transform: translateY(4px);
  transition: transform 0.3s ease;
}

.project-card:hover img {
  transform: scale(1.045);
  filter: brightness(0.62) saturate(1.06);
}

.project-card:hover::after {
  opacity: 1;
  animation: projectCardSweep 0.9s ease forwards;
}

.project-card:hover .project-card-name {
  transform: translateY(0);
}

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

@keyframes projectCardSweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

@media (max-width: 1050px) {
  .projects-hero {
    grid-template-columns: 1fr;
    padding-top: 134px;
  }

  .projects-starfield {
    min-height: 210px;
  }

  .projects-filter-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .projects-filter-list {
    justify-content: flex-start;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .projects-hero {
    padding: 124px 24px 34px;
  }

  .projects-lead {
    font-size: 17px;
  }

  .projects-filter-section,
  .projects-grid-section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .projects-grid-section {
    padding-bottom: 70px;
  }
}

@media (max-width: 560px) {
  .projects-hero {
    padding: 108px 16px 28px;
  }

  .projects-title {
    font-size: 34px;
  }

  .projects-lead,
  .projects-filter-inner p {
    font-size: 15px;
  }

  .projects-starfield {
    min-height: 170px;
    border-radius: 18px;
  }

  .projects-starfield-hint {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
    padding: 9px 11px;
    font-size: 11px;
  }

  .projects-filter-section,
  .projects-grid-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .projects-filter-inner {
    padding: 16px;
    border-radius: 16px;
  }

  .project-filter-button {
    flex: 1 1 calc(50% - 8px);
  }

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

  .project-card {
    border-radius: 18px;
  }

  .project-card-name {
    font-size: 22px;
  }
}
