/* Projects page layout (Clarity-inspired) */

.projects-intro {
  max-width: 920px;
}

.projects-intro p.text {
  margin-top: 0.25rem;
}

.projects-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.6rem 1.4rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media screen and (min-width: 769px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Match screenshot: 3 cards per row on desktop */
@media screen and (min-width: 992px) {
  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.project-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transform: translateY(0);
  transition: transform 160ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
}

.project-thumb {
  width: 100%;
  /* Prefer "poster-like" vertical thumbnails */
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f6f6;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.05);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* crops to fill */
  object-position: center;
  transform: scale(1);
  transition: transform 220ms ease;
}

.project-card:hover .project-thumb {
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.06);
}

.project-card:hover .project-thumb img {
  transform: scale(1.03);
}

.project-thumb.placeholder {
  background:
    linear-gradient(135deg, rgba(192, 57, 43, 0.22), rgba(53, 53, 53, 0.06)),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
}

.project-card h3 {
  margin: 0;
  padding: 0;
  font-size: 1.02em;
  font-weight: 600;
}

.project-meta {
  margin-top: -0.15rem;
  color: #666667;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 0.88em;
  line-height: 1.45;
}

.divider {
  margin: 2.5rem 0 1.5rem;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
}

.pubs h2 {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95em;
  font-weight: 600;
}

.pubs-list {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.pub-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 1rem;
  align-items: start;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.pub-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pub-venue {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: #666667;
  letter-spacing: 0.04em;
  font-size: 0.9em;
}

.pub-cite {
  color: #353535;
}

.pub-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.pub-title-row .pub-title {
  font-weight: 600;
}

/* Superscript-like links at title top-right */
.pub-title-row .pub-links {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 0.72em;
  color: #666667;
  white-space: nowrap;
  position: relative;
  top: -0.35em;
}

.pub-title-row .pub-links a {
  color: inherit;
  text-decoration: none;
}

.pub-title-row .pub-links a:hover {
  color: #353535;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pub-bibtex {
  margin-top: 0.4rem;
  font-size: 0.95em;
}

.pub-bibtex summary {
  cursor: pointer;
  color: #666667;
  font-family: "Poppins", sans-serif;
  font-size: 0.9em;
}

.pub-bibtex pre {
  margin-top: 0.6rem;
}

.pub-cite b {
  font-weight: 600;
}

@media screen and (max-width: 600px) {
  .pub-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

