/* projects.css — Projects page */

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  align-items: stretch;   /* equal-height cards per row (Hobby cards match) */
}
.project-card { display: flex; flex-direction: column; }
.project-card .card-body { flex: 1; }

/* Research & Tools: uniform, fixed-height cards so uneven text stays tidy.
   Longer descriptions scroll gently inside the fixed frame; the links row
   stays pinned to the bottom. */
.research-card {
  height: 420px;
}
.research-card .card-body {
  overflow-y: auto;
  margin-right: -6px;   /* keep text off the scrollbar */
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
.research-card .card-body::-webkit-scrollbar { width: 6px; }
.research-card .card-body::-webkit-scrollbar-thumb {
  background: var(--accent);
}

/* Links row (repo + optional paper DOI) */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.repo-link,
.doi-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: .82rem;
  font-weight: 700;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  word-break: break-all;
  transition: background .18s, box-shadow .18s, color .18s;
}
.repo-link {
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.repo-link:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}
/* DOI = filled, to stand out as the "paper" call-to-action */
.doi-link {
  color: #fff;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  white-space: nowrap;
}
.doi-link::before { content: "\1F4C4  "; }  /* page emoji */
.doi-link:hover {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: var(--shadow);
}

@media (max-width: 520px) {
  .card-grid { grid-template-columns: 1fr; }
  .research-card { height: auto; }          /* let it breathe on phones */
  .research-card .card-body { overflow: visible; }
}
