/* ═══════════════════════════════════════════
   Student Projects Catalog
   Modern, minimal card design
   ═══════════════════════════════════════════ */

/* ── Toolbar ── */
.student-projects-toolbar {
  width: 100%;
  box-sizing: border-box;
  margin: 4px 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--site-border, rgba(24,32,42,0.14));
  border-radius: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.student-projects-toolbar__controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.student-projects-toolbar__field {
  display: grid;
  gap: 4px;
}

.student-projects-toolbar__field-label {
  color: var(--site-muted, #586271);
  font: 700 0.68rem/1.2 "Manrope", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.student-projects-toolbar__field-label a {
  color: #1d4ed8;
}

.student-projects-toolbar__field select {
  height: 38px;
  border: 1px solid var(--site-border);
  border-radius: 10px;
  background: var(--site-bg-2, #fbfaf6);
  color: var(--site-text, #18202a);
  padding: 0 10px;
  font: 600 0.84rem/1 "Manrope", sans-serif;
  transition: border-color 150ms ease;
}

.student-projects-toolbar__field select:focus {
  border-color: var(--site-accent, #9c5a2e);
  outline: none;
}

.student-projects-toolbar__reset {
  height: 38px;
  border: 1px solid var(--site-border);
  border-radius: 10px;
  background: var(--site-bg-2, #fbfaf6);
  color: var(--site-muted);
  font: 700 0.78rem/1 "Manrope", sans-serif;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.student-projects-toolbar__reset:hover {
  background: var(--site-accent-soft, rgba(156,90,46,0.12));
  color: var(--site-accent);
}

.student-projects-toolbar__status {
  margin: 4px 0 0;
  padding: 6px 10px;
  border-left: 3px solid var(--site-accent, #9c5a2e);
  background: rgba(156, 90, 46, 0.04);
  border-radius: 0 8px 8px 0;
  color: var(--site-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* ── Card Grid ── */
.student-projects-shell .cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* ── Card ── */
.student-project-card {
  border-radius: 16px;
  border: 1px solid var(--site-border, rgba(24,32,42,0.14));
  box-shadow: none;
  background: #fff;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.student-project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

/* Media */
.student-project-card .content-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--site-border);
}

.student-project-card .content-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--site-bg-2, #fbfaf6);
  transition: transform 300ms ease;
}

.student-project-card:hover .content-card__media img {
  transform: scale(1.03);
}

/* Body */
.student-project-card .content-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
}

/* ── Chips Row ── */
.student-project-card__top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.student-project-card__chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font: 800 0.58rem/1.3 "Manrope", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.student-project-card__chip--year {
  background: var(--site-bg-1, #f8f5ef);
  color: var(--site-muted, #586271);
}

.student-project-card__chip--type {
  background: rgba(29, 78, 216, 0.08);
  color: #1d4ed8;
  white-space: nowrap;
}

.student-project-card__institution {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--site-bg-1, #f8f5ef);
  color: var(--site-muted);
  font: 800 0.52rem/1.2 "Manrope", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: auto;
}

.student-project-card__institution img {
  width: auto;
  height: 13px;
  max-width: 44px;
  display: block;
  object-fit: contain;
}

/* ── Title ── */
.student-project-card .content-card__title {
  font-size: clamp(0.96rem, 1.5vw, 1.12rem);
  font-weight: 800;
  line-height: 1.24;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ── Course name ── */
.student-project-card__course-name {
  margin: 0;
  color: var(--site-muted, #586271);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ── Description ── */
.student-project-card__desc,
.student-project-card .content-card__desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.58;
  color: var(--site-muted, #586271);
  font-family: "Source Serif 4", Georgia, serif;
}

/* ── Students ── */
.student-project-card__students,
.student-project-card .content-card__meta {
  margin: 0;
  padding-top: 6px;
  border-top: 1px solid var(--site-border, rgba(24,32,42,0.14));
  color: var(--site-text, #18202a);
  font: 600 0.78rem/1.4 "Manrope", sans-serif;
}

/* ── Bottom / Links ── */
.student-project-card__bottom {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.student-project-card__bottom--solo {
  justify-content: flex-end;
}

.student-project-card__links {
  margin-top: 0;
  padding-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.student-project-card .content-card__links.student-project-card__links--paired {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 6px;
}

.student-project-card .content-card__links.student-project-card__links--paired .content-card__link {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
}

.student-project-card .content-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 7px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  background: var(--site-bg-2, #fbfaf6);
  color: var(--site-text, #18202a);
  white-space: nowrap;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.student-project-card .content-card__link:hover {
  background: var(--site-accent-soft, rgba(156,90,46,0.12));
  border-color: rgba(156, 90, 46, 0.3);
  color: var(--site-accent-deep, #7a3f16);
}

.student-project-card .content-card__link--github {
  background: #24292f;
  border-color: #24292f;
  color: #fff;
}

.student-project-card .content-card__link--github:hover {
  background: #1b1f23;
  border-color: #1b1f23;
  color: #fff;
}

.student-project-card .student-link-icon {
  width: 0.85rem;
  height: 0.85rem;
  display: inline-block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 0C3.58 0 0 3.58 0 8a8 8 0 0 0 5.47 7.59c.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.5-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.01.08-2.1 0 0 .67-.21 2.2.82a7.6 7.6 0 0 1 4 0c1.53-1.04 2.2-.82 2.2-.82.44 1.09.16 1.9.08 2.1.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.19 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 0C3.58 0 0 3.58 0 8a8 8 0 0 0 5.47 7.59c.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.5-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.01.08-2.1 0 0 .67-.21 2.2.82a7.6 7.6 0 0 1 4 0c1.53-1.04 2.2-.82 2.2-.82.44 1.09.16 1.9.08 2.1.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.19 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .student-projects-toolbar__controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .student-projects-toolbar {
    padding: 12px;
  }
  .student-projects-toolbar__controls {
    grid-template-columns: 1fr;
  }
  .student-projects-shell .cards-grid {
    grid-template-columns: 1fr;
  }
  .student-project-card .content-card__body {
    padding: 12px 14px 14px;
  }
  .student-project-card__bottom {
    flex-direction: column;
    align-items: stretch;
  }
  .student-project-card .content-card__links.student-project-card__links--paired {
    flex-wrap: wrap !important;
  }
  .student-project-card .content-card__links.student-project-card__links--paired .content-card__link {
    flex: 1 1 auto;
  }
}
