/* projects.css — featured case study and project grid */

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  overflow: hidden;
}
.featured__media {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(14px, 2.4vw, 32px);
  background: var(--surface-2);
}
.featured__media img {             /* the whole dashboard, shown like a screenshot on a desk */
  flex: none;
  width: 100%; height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--line);
}
.featured__body {
  display: flex; flex-direction: column; gap: var(--space-4);
  padding: clamp(var(--space-5), 3.5vw, var(--space-7));
}
.featured__title {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: var(--track-title);
}
.featured__text { color: var(--text-2); line-height: 1.65; }
.featured__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }

@media (max-width: 899px) {
  .featured { grid-template-columns: 1fr; }
  .featured__media { padding: 14px; }
}
@media (max-width: 479px) {
  .featured__actions .btn { flex: 1 1 100%; }
}

/* Project grid: any number of projects, 1 to 3 columns */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--space-4);
}
.project {
  display: flex; flex-direction: column;
  overflow: hidden;
  color: var(--text);
}
.project__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}
.project__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .project:hover .project__media img { transform: scale(1.04); }
}
.project__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-4) var(--space-5); flex: 1; }
.project__title { font-size: var(--fs-body); font-weight: 650; letter-spacing: var(--track-headline); line-height: 1.3; }
.project__summary {
  font-size: var(--fs-footnote);
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: var(--space-2);
  flex: 1;
}

/* Phones: compact rows so the list stays short */
@media (max-width: 559px) {
  .project-grid { gap: var(--space-3); }
  .project { flex-direction: row; align-items: stretch; border-radius: var(--r-md); }
  .project__media { flex: none; width: 112px; aspect-ratio: auto; min-height: 112px; }
  .project__body { padding: var(--space-3) var(--space-4); gap: 4px; }
  .project__summary { -webkit-line-clamp: 2; margin-bottom: 4px; }
  .project .tags { display: none; }
}

/* Detail panel content (inside the sheet) */
.detail__media { position: relative; background: var(--surface-2); aspect-ratio: 16 / 9; overflow: hidden; }
.detail__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail__body { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5) clamp(var(--space-5), 4vw, var(--space-7)) var(--space-6); }
.detail__eyebrow { margin-bottom: calc(-1 * var(--space-2)); }
.detail__title { font-size: var(--fs-headline); font-weight: 700; letter-spacing: var(--track-headline); line-height: 1.2; padding-right: var(--space-7); }
.detail__meta { color: var(--text-2); font-size: var(--fs-callout); }
.detail__text { color: var(--text-2); line-height: 1.65; }
.detail__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.detail__actions:empty { display: none; }
