.section {
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  border-bottom: 1px solid var(--site-border);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.018), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, var(--site-bg-alt) 100%);
}

.section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(15, 23, 42, 0.045), transparent 28%),
    radial-gradient(circle at 82% 70%, rgba(15, 23, 42, 0.03), transparent 26%);
  opacity: 0.32;
}

.header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 0.66fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.title {
  margin: 0.8rem 0 0;
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: -0.05em;
  color: var(--site-text);
}

.subtitle {
  max-width: 34rem;
  margin: 2.25rem 0 0;
  color: var(--site-muted-bright);
  font-size: 1rem;
  line-height: 1.7;
}

.projectsGrid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.projectCard {
  display: grid;
  align-content: space-between;
  gap: 1.4rem;
  min-height: 13rem;
  padding: 1.15rem;
  border: 1px solid var(--site-border);
  background: var(--site-surface);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.projectCard:hover {
  border-color: var(--site-border-strong);
  background: var(--site-surface-alt);
  color: inherit;
  text-decoration: none;
  transform: translateY(-2px);
}

.projectCardTop,
.projectCopy {
  display: grid;
  gap: 0.8rem;
}

.projectLogoWrapper {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--site-border);
  background: var(--site-surface-alt);
}

.projectCard[data-project-id='amd'] .projectLogoWrapper {
  background: #111827;
}

.projectCard[data-project-id='pytorch'] .projectLogoWrapper {
  background: #f8fafc;
}

.projectLogo {
  max-width: 54px;
  max-height: 54px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.projectMeta,
.projectLink {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--site-muted-bright);
}

.projectName {
  font-size: 1rem;
  font-weight: 600;
  color: var(--site-text);
  line-height: 1.35;
}

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

@media (max-width: 996px) {
  .header {
    grid-template-columns: 1fr;
  }

  .subtitle {
    margin-top: 0;
  }

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

@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }

  .projectsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .projectCard {
    min-height: 11rem;
    padding: 1rem;
  }

  .projectLogoWrapper {
    width: 64px;
    height: 64px;
  }
}
