/* --- GENERAL SECTION SPACING --- */
.project-hero,
.project-description,
.project-people,
.project-news,
.project-videos,
.project-publications {
  margin: 2rem 0;
}

/* --- HERO: LOGO LEFT, NAME PILLS RIGHT --- */
.project-header {
  display: grid;
  grid-template-columns: auto 1fr; /* fixed logo + flexible right */
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

/* Fixed-height logo (left) */
.project-header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
}

.project-logo-fixed-h {
  height: 150px;      /* adjust as desired */
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Right-side name pills */
.project-header__names {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.name-blocks {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.name-block {
  display: inline-flex;
  align-items: center;
  border-radius: 0.75rem;
  padding: 0.45rem 0.75rem;
  line-height: 1.2;
}

.name-block--acronym {
  font-weight: 800;
  letter-spacing: 0.5px;
  background: #111;
  color: #fff;
}

.name-block--title {
  font-weight: 600;
  background: var(--mm-code-bg, #f6f8fa);
  color: inherit;
}

/* --- META GRID --- */
.project-hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  justify-items: center;
  margin: 1rem 0;
}

.meta-item {
  background: var(--mm-code-bg, #f6f8fa);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  text-align: center;
  width: 100%;
  max-width: 260px;
}

.meta-label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.75;
}

.meta-value {
  font-weight: 600;
}

/* --- DESCRIPTION --- */
.project-description p {
  font-size: 1.05rem;
  line-height: 1.7;
}

/* --- PEOPLE --- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.person-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.person-photo {
  width: 88px;
  height: 88px;
  border-radius: 0.75rem;
  object-fit: cover;
  background: #f2f2f2;
}

.person-content { min-width: 0; }
.person-name { margin: 0 0 0.25rem 0; font-size: 1.05rem; }
.person-role, .person-affiliation { margin: 0; font-size: 0.95rem; color: #444; }

.person-links {
  list-style: none; padding: 0; margin: 0.35rem 0 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem;
}
.person-links a { text-decoration: none; border-bottom: 1px dotted currentColor; font-size: 0.9rem; }

/* --- NEWS (from YAML) --- */
.project-news .news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.news-card {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
}

.news-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.05rem;
}

.news-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.news-excerpt {
  margin: 0;
  color: #333;
}

/* --- VIDEOS --- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.video-card {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 1rem;
  background: #fff;
  padding: 0.75rem;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0; width: 100%; height: 100%;
}

.video-title { margin: 0.5rem 0 0; font-size: 0.95rem; }

/* --- PUBLICATIONS --- */
.pub-list { padding-left: 1.2rem; }
.pub-item { margin: 0.5rem 0; }
.pub-venue, .pub-year { color: #555; }

/* --- RESPONSIVE --- */
@media (max-width: 780px) {
  .project-header {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .project-header__logo {
    justify-content: center;
    min-width: 0;
  }
  .project-header__names {
    justify-content: center;
  }
  .project-logo-fixed-h { height: 120px; }
}

@media (max-width: 600px) {
  .person-card { grid-template-columns: 1fr; text-align: center; }
  .person-photo { margin: 0 auto; }
}


/* ===== Projects Index (manual, 1 card per row) ===== */
.projects-index {
  margin: 2rem 0;
}

.projects-grid.one-per-row {
  display: grid;
  grid-template-columns: 1fr; /* one per row */
  gap: 1.25rem;
}

.proj-card {
  display: grid;
  grid-template-columns: 140px 1fr; /* space for larger logo */
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.proj-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.proj-card__logo img {
  height: 90px; /* larger logo */
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* fallback if no logo */
.proj-card__logo--placeholder {
  height: 90px;
  min-width: 90px;
  display: grid;
  place-items: center;
  border-radius: 0.6rem;
  background: #f0f0f2;
  font-weight: 800;
  font-size: 1rem;
  color: #333;
  padding: 0 0.5rem;
}

.proj-card__body {
  min-width: 0;
}

.proj-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}

.proj-card__acronym {
  display: inline-block;
  font-weight: 800;
  font-size: 0.95rem;
  background: #111;
  color: #fff;
  border-radius: 0.6rem;
  padding: 0.25rem 0.6rem;
  letter-spacing: 0.4px;
  width: fit-content;
}

.proj-card__title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.proj-card__title a {
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.proj-card__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.5rem;
  align-items: baseline;
  margin: 0.15rem 0;
}

.proj-card__label {
  font-size: 0.8rem;
  opacity: 0.7;
}

.proj-card__value {
  font-size: 0.95rem;
  font-weight: 600;
}

.proj-card__desc {
  margin: 0.5rem 0 0;
  color: #333;
  line-height: 1.6;
}

/* Tighter spacing between consecutive meta lines */
.proj-card__meta + .proj-card__meta {
  margin-top: 0.15rem;
}

/* Mobile: stack logo above text */
@media (max-width: 640px) {
  .proj-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .proj-card__logo {
    justify-content: flex-start;
    margin-bottom: 0.5rem;
  }
}
