/* Project grid: matches the proportional (60%/80%/90%) container used on
   the sub-pages (see project.css / .sg-project). */

:root {
  --sg-bg: #0f0f0f;
  --sg-fg: #ffffff;
  --sg-muted: #9a9a9a;
}

body {
  background: var(--sg-bg);
}

.sg-grid {
  width: 60%;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 0 120px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.sg-grid__item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.8;
  overflow: hidden;
  color: var(--sg-fg);
  text-decoration: none;
}

.sg-grid__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.sg-grid__item:hover img {
  transform: scale(1.06);
}

.sg-grid__overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 16, 16, 0.24);
}

.sg-grid__title {
  position: absolute;
  left: 24px;
  bottom: 20px;
  right: 60px;
  font-size: 18px;
  font-weight: 600;
}

.sg-grid__arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 32px;
  height: 32px;
  border-radius: 100px;
  background: var(--sg-fg);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

@media (max-width: 1200px) {
  .sg-grid {
    width: 80%;
  }
}

@media (max-width: 700px) {
  .sg-grid {
    width: 90%;
    padding: calc(var(--nav-height) + 30px) 0 80px;
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
