body.gv-project-open {
  overflow: hidden;
}

.gv-projects-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.gv-projects-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.gv-project-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  backdrop-filter: none;
  content-visibility: auto;
  contain-intrinsic-size: 190px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.gv-project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.58);
  box-shadow: 0 24px 70px rgba(2, 132, 199, 0.18);
}

.gv-project-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.74);
  overflow: hidden;
}

.gv-project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.gv-project-image em {
  color: #38bdf8;
  font-style: normal;
  font-size: 28px;
  font-weight: 900;
}

.gv-project-card strong {
  display: block;
  margin-top: 9px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 900;
  min-height: 36px;
}

.gv-projects-empty {
  grid-column: 1 / -1;
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 24px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
  color: #94a3b8;
  text-align: center;
}

.gv-projects-empty strong {
  color: #e2e8f0;
  font-size: 18px;
}

.gv-project-modal[hidden] {
  display: none !important;
}

.gv-project-modal {
  position: fixed;
  inset: 0;
  z-index: 100004;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.gv-project-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.gv-project-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.gv-project-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 36px);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 22px 62px rgba(2, 6, 23, 0.58);
  overflow: auto;
  transform: translate3d(0, 8px, 0);
  transition: transform 0.14s ease;
  contain: layout paint;
  will-change: transform;
}

.gv-project-modal.is-visible .gv-project-dialog {
  transform: translate3d(0, 0, 0);
}

.gv-project-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.82);
  color: white;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.gv-project-dialog > img {
  width: 100%;
  max-height: 68vh;
  display: block;
  object-fit: contain;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.82);
  transition: opacity 0.18s ease;
}

.gv-project-modal.is-loading .gv-project-dialog > img {
  opacity: 0.42;
}

.gv-project-dialog h3 {
  margin: 0;
  padding-right: 52px;
  color: #f8fafc;
  font-size: 22px;
  line-height: 1.3;
}

.gv-project-arrow {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.8);
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.gv-project-arrow.left {
  left: 24px;
}

.gv-project-arrow.right {
  right: 24px;
}

.gv-project-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gv-project-thumbs button {
  width: 92px;
  height: 66px;
  flex: 0 0 92px;
  padding: 3px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.72);
  cursor: pointer;
  opacity: 0.65;
}

.gv-project-thumbs button.is-active {
  opacity: 1;
  border-color: rgba(56, 189, 248, 0.8);
}

.gv-project-thumbs img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
}

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

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

@media (max-width: 700px) {
  .gv-projects-section {
    width: min(100% - 24px, 1180px);
    padding: 44px 0;
  }

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

  .gv-project-card strong {
    font-size: 13px;
    min-height: auto;
  }

  .gv-project-image {
    aspect-ratio: 1 / 1;
  }

  .gv-project-modal {
    padding: 10px;
  }

  .gv-project-dialog {
    border-radius: 22px;
    padding: 12px;
  }

  .gv-project-arrow {
    width: 40px;
    height: 40px;
    font-size: 30px;
  }

  .gv-project-arrow.left {
    left: 16px;
  }

  .gv-project-arrow.right {
    right: 16px;
  }

  .gv-project-thumbs button {
    width: 78px;
    height: 58px;
    flex-basis: 78px;
  }
}

@media (max-width: 420px) {
  .gv-projects-grid {
    grid-template-columns: 1fr;
  }
}
