/*
  The project cards - thumbnail, body and link button.
  
  The prefers-reduced-motion block at the end lives here because it has to
  load last to override the animations and transitions declared above it.
*/

/*projects*/

.projects {
  column-gap: 16px;
  columns: 2;
}

@media (max-width: 560px) {
  .projects {
    columns: 1;
  }
}

.projects .pcard {
  break-inside: avoid;
  margin-bottom: 16px;
}

.pcard {
  background: linear-gradient(#fff, #f2faff);
  border-radius: 16px;
  border: 1px solid #d4ecf8;
  box-shadow: 0 4px 14px rgba(0, 90, 140, 0.12);
  display: grid;
  grid-template-rows: auto auto;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.pcard:hover {
  box-shadow: 0 10px 24px rgba(0, 90, 140, 0.2);
  transform: translateY(-3px);
}

.thumb {
  background: var(--g);
  display: grid;
  max-width: 100%;
  overflow: hidden;
  padding: 12px;
  place-items: center;
  position: relative;
}

.thumb::before {
  background: linear-gradient(
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0.08)
  );
  content: '';
  inset: 0 0 52% 0;
  position: absolute;
}

.thumb::after {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.8) 0 10%,
    rgba(255, 255, 255, 0.15) 40%,
    transparent 70%
  );
  border-radius: 50%;
  bottom: -14px;
  content: '';
  height: 60px;
  position: absolute;
  right: -14px;
  width: 60px;
}

.thumb:not(:has(img)) {
  aspect-ratio: 16/10;
}

.thumb:has(img) {
  background: none;
  display: block;
  padding: 0;
}

.thumb img {
  display: block;
  height: auto;
  position: relative;
  width: 100%;
  z-index: 0;
}

.thumb:has(img)::after,
.thumb:has(img)::before {
  display: none;
}

.thumb::before,
.thumb::after {
  z-index: 1;
}

.pbody {
  background: linear-gradient(#1aa6dc, #0b7fb8);
  border-top: 3px solid #7fdcf7;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
  text-shadow: 0 1px 1px rgba(0, 40, 70, 0.35);
}

.pbody h3 {
  color: #fff;
  font: 600 19px var(--ui);
  margin: 0;
}

.pbody p {
  font-size: 15.5px;
  line-height: 1.5;
  margin: 0;
}

/* The card body is a dark blue panel, so the tech list is white at reduced
   opacity rather than the muted grey used on light backgrounds. */
.pbody small {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13.5px;
}

.pbody .pbtn {
  background: linear-gradient(#b6ef7a, var(--leaf) 50%, #3ea624 51%, #63c63f);
  text-shadow: 0 1px 1px rgba(20, 70, 10, 0.5);
}

.pbtn {
  align-self: flex-start;
  background: linear-gradient(#5fd0f5, var(--aqua) 50%, #0b93c8 51%, #28b2e0);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0, 90, 140, 0.3);
  color: #fff;
  font: 600 14px var(--ui);
  margin-top: 10px;
  padding: 7px 16px;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 60, 100, 0.4);
}

.pbtn:hover {
  filter: brightness(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .pcard {
    transition: none;
  }

  .bubbles i {
    animation: none;
  }

  .bubbles {
    display: none;
  }
}
