/* ===== Projects layout ===== */
.body-container {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2vw, 2rem);
  padding: clamp(1rem, 3vw, 2rem);
  width: 100%;
  max-width: 1400px; /* keeps layout centered on ultrawide screens */
  margin: 0 auto 75px auto;
  align-items: center;
}


/* Project card (column) */
.project-container {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  width: min(900px, 90vw);
  background-color: var(--primary-color);
  padding: clamp(1rem, 2vw, 2rem);
  border: 4px solid var(--accent-color);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  color: #111;
}

/* media wrapper keeps consistent bounding box */
.project-img-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* media box: default aspect ratio + background matches card surface */
.project-card-media {
  width: 50%;                /* ← half the card width */
  max-width: 450px;          /* safety cap */
  aspect-ratio: 16 / 9;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary-color);
  border-radius: 8px;
  max-height: 35vh;          /* ← half of your previous 70vh */
  
}


/* Fallback for browsers without aspect-ratio */
.project-card-media::before {
  content: "";
  float: left;
  padding-top: 56.25%; /* 16:9 fallback */
}

.project-card-media.portrait {
  aspect-ratio: 3 / 4;
}

.project-card-media.landscape {
  aspect-ratio: 16 / 9;
}


/* images & videos: scale proportionally, centered, no distortion */
.project-card-media img,
.project-card-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}

/* If you prefer to fill the box and crop edge content instead of letterboxing,
   swap object-fit: contain -> object-fit: cover on the lines above. */

/* small video overlay (if you use it) */
.video-overlay {
  position: absolute;
  /* only if you make .project-card-media position:relative */
  pointer-events: none;
}

/* Project title */
/* text content */
.project-title {
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent-color);
}

/* Section header inside description */
.project-description h4 {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Body text */
.project-description p {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  line-height: 1.5;
  color: #222;
}



/* skills list */
.skill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
}

.skill-title {
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  font-weight: 600;
}

.skill-item {
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  background: var(--accent-color);
  color: var(--primary-color);
}


/* Mobile-first: Read More CTA */
.read-more-link {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 0.25rem; /* subtle separation from skills */
}

.read-more-link a {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: var(--accent-color);
  color: var(--primary-color);
  text-decoration: none;
}

.read-more-link a:active {
  transform: scale(0.97);
  opacity: 0.9;
}


/* responsive tweaks */
@media (max-width: 640px) {
  .body-container {
    padding: 1rem;
    gap: 1.25rem;
  }

  .project-container {
    padding: 1rem;
    gap: 0.75rem;
    border-radius: 10px;
  }

  .project-title {
    font-size: 1.1rem;
  }

  .read-more-link {
    justify-content: flex-end;
  }

  .project-card-media {
    width: 100%;
    max-height: 40vh;
  }
}