/* PORTFOLIO PAGE */
/* Featured Projects Grid */
.featured-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Featured Card Titles */
.featured-card .card-title,
.card .card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.featured-card .card-title img {
  flex-shrink: 0;
}

/* Header Links - BTP & PTB */
h1,
h2 {
  font-size: 1.5rem;
}

/* Generic Card */
div.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

div.card > a {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  width: min-content;
}

.image-container > img {
  width: 15rem;
  height: 15rem;
  border-radius: 0.25rem;
}

/* Image Container, Skeleton, Loading */
.image-container {
  position: relative;
  width: 15rem;
  height: 15rem;
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.skeleton {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 15rem;
  height: 15rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 0.25rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.skeleton.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.loading {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading.loaded {
  opacity: 1;
}

/* Please To Begin & Portfolio Cards */
.featured-card .card-title,
.card .card-title {
  font-size: 1.25rem;
  font-weight: 600;
}

h1 + p + div > div > p:last-of-type {
  font-size: 0.9rem;
}

/* Grid Layout */
@media (min-width: 769px) {
  .featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem;
    row-gap: 1.5rem;
    width: 100%;
    max-width: 100%;
  }

  /* Ensure grid items don't exceed container width */
  .featured-grid > .card {
    width: 100%;
    max-width: 100%;
    min-width: 0; /* Allow shrinking */
  }

  /* Force grid items to respect container bounds */
  .featured-grid > .card > div {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
}
