*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #fff;
  background: #050812;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.projects-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 8, 18, 0.78);
  backdrop-filter: blur(18px);
}

.projects-nav {
  width: min(1180px, calc(100% - 36px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.projects-brand {
  font-size: 20px;
  font-weight: 800;
}

.projects-menu,
.projects-socials {
  display: flex;
  align-items: center;
}

.projects-menu {
  gap: clamp(18px, 4vw, 42px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}

.projects-menu a {
  position: relative;
  padding: 25px 0;
  transition: color 0.25s ease;
}

.projects-menu a:hover,
.projects-menu a.active {
  color: #b056ff;
}

.projects-menu a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: #9b35ff;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.8);
  transform: translateX(-50%);
}

.projects-socials {
  gap: 22px;
  font-size: 24px;
}

.projects-socials a {
  opacity: 0.9;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.projects-socials a:hover {
  color: #b056ff;
  transform: translateY(-2px);
}

.projects-page {
  min-height: 100vh;
  padding: 120px 0 80px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.18), transparent 34%),
    radial-gradient(circle at 8% 20%, rgba(37, 99, 235, 0.1), transparent 26%),
    #050812;
}

.projects-hero {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto 46px;
  text-align: center;
}

.projects-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1.02;
  font-weight: 900;
}

.projects-hero h1 span {
  color: #9b5cff;
  text-shadow: 0 0 28px rgba(155, 92, 255, 0.45);
}

.projects-hero p {
  max-width: 610px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1.55;
}

.projects-title-line {
  display: block;
  width: 64px;
  height: 4px;
  margin: 24px auto 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #c084fc);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.8);
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  min-width: 95px;
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
  font: inherit;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: rgba(168, 85, 247, 0.85);
  background: linear-gradient(135deg, #7c1dff, #5410c6);
  box-shadow: 0 0 26px rgba(124, 58, 237, 0.45);
  transform: translateY(-2px);
}

.projects-grid {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.project-card {
  overflow: hidden;
  border: 1px solid rgba(188, 196, 220, 0.16);
  border-radius: 18px;
  background: rgba(8, 12, 24, 0.88);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.28);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.project-card.project-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.38),
    0 0 38px rgba(124, 58, 237, 0.13);
  transform: translateY(-5px);
}

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

.project-image-link {
  display: block;
  height: 255px;
  overflow: hidden;
  background: #0f1320;
}

.project-image-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.45s ease;
}

.project-card:hover .project-image-link img {
  transform: scale(1.045);
}

.project-card-body {
  padding: 22px 24px 24px;
}

.project-type {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #a855f7;
  font-size: 14px;
  font-weight: 700;
}

.project-type span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.95);
}

.project-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 800;
}

.project-description {
  min-height: 54px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.project-tags span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.project-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c084fc;
  font-weight: 800;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.project-links a:hover {
  color: #fff;
  transform: translateX(3px);
}

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

@media (max-width: 900px) {
  .projects-nav {
    flex-wrap: wrap;
    padding: 18px 0;
  }

  .projects-menu {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 18px;
    font-size: 14px;
  }

  .projects-menu a {
    padding: 8px 0 12px;
  }

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

@media (max-width: 560px) {
  .projects-page {
    padding-top: 34px;
  }

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

  .projects-socials {
    gap: 14px;
    font-size: 20px;
  }

  .projects-hero h1 {
    font-size: 40px;
  }

  .projects-hero p {
    font-size: 16px;
  }

  .filter-btn {
    min-width: auto;
    padding: 10px 14px;
  }

  .project-image-link {
    height: 205px;
  }

  .project-card-body {
    padding: 20px;
  }
}
