#projects {
  background: radial-gradient(ellipse at 12% 0%, #172438 0, transparent 38rem), #090c11;
}
#projects .sectionhead { margin-bottom: 1.4rem; align-items: end; }
#projects .sectionhead h2 { letter-spacing: -.055em; }
#projects .project-filters {
  width: fit-content; max-width: 100%; padding: 4px; gap: 3px;
  background: #0b1018; border: 1px solid #334053; border-radius: 13px;
  margin-bottom: clamp(20px, 3vw, 38px);
}
#projects .project-filters button {
  border: 1px solid transparent; border-radius: 9px; background: transparent;
  color: #b7c5d7; padding-inline: clamp(10px, 1.5vw, 22px);
}
#projects .project-filters button[aria-pressed="true"] {
  background: #d7e7ff; color: #111d31; box-shadow: 0 2px 7px #0004;
}
#project-gallery {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  gap: clamp(16px, 2vw, 30px);
}
#project-gallery .card {
  --tint: #83aeec; min-width: 0; border-radius: 18px;
  background: linear-gradient(155deg,#19212e,#10151d 62%);
  border: 1px solid #344154; box-shadow: inset 0 1px #ffffff10, 0 8px 24px #0003;
}
#project-gallery .gallery-ai { --tint: #b2a9ff; }
#project-gallery .gallery-tools { --tint: #8fcdda; }
#project-gallery .shot {
  display: grid; place-items: center; isolation: isolate; padding: 0;
  aspect-ratio: 1.92; border-bottom: 1px solid #ffffff16; background: #0c121c;
}
#project-gallery .shot::before {
  content: ''; position: absolute; inset: -24px; z-index: -1;
  background: linear-gradient(0deg,#080d16bb,#0e132655), var(--art) center / cover;
  filter: blur(19px); opacity: .85;
}
#project-gallery .shot img {
  width: auto; height: 86%; max-width: 95%; aspect-ratio: 1; object-fit: contain;
  min-height: 0; border-radius: 10px; box-shadow: 0 8px 22px #0006;
}
#project-gallery .cardbody { padding: clamp(16px,1.6vw,24px); gap: 7px; border-top: 0; }
#project-gallery .cardbody small {
  display: inline-flex; align-items: center; gap: 7px; color: var(--tint);
  font: 600 .76rem/1.4 system-ui,sans-serif; letter-spacing: .045em;
}
#project-gallery .cardbody small::before {
  content: ''; width: 12px; height: 2px; background: currentColor;
}
#project-gallery .cardbody h3 { font-size: clamp(1.4rem,2vw,1.85rem); letter-spacing: -.045em; line-height: 1.12; }
#project-gallery .cardbody p { color: #bbc5d3; line-height: 1.55; margin-bottom: 12px; }
#project-gallery .project-actions { padding-top: 12px; border-top: 1px solid #ffffff13; gap: 7px; }
#project-gallery .project-actions a { min-height: 44px; padding-inline: 10px; border-radius: 9px; text-align: center; }
#project-gallery .similar { background: transparent; }
@media (hover:hover) {
  #project-gallery .card:hover { border-color: var(--tint); }
  #projects .project-filters button:hover:not([aria-pressed="true"]) { background: #1c293b; }
}
@media(max-width:1040px) { #project-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:620px) {
  #project-gallery { grid-template-columns: minmax(0,1fr); }
  #projects .project-filters { display: grid; grid-template-columns: repeat(2,1fr); width: 100%; }
  #projects .project-filters[hidden] { display: none; }
  #project-gallery .shot { aspect-ratio: 2.04; }
}
