/* =========================
   Running Projects Page — Compact & Centered Two-column Layout
   ========================= */

/* 页面整体样式 */
main.content {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background-color: #fafbfc;
}

/* 顶部标题与简介（居中） */
.quarto-title-block,
#title-block-header,
#quarto-document-content > p:first-of-type {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 2.8rem; /* ✅ 增大下间距 */
  line-height: 1.8;
  color: #374151;
  font-size: 1.05rem;
}

/* --- 网格布局：两列对称 --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.2rem;              /* ✅ 均匀间距 */
  justify-content: center;
  align-items: stretch;
  width: 88%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 0;
}

/* --- 卡片样式（更紧凑） --- */
.project-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  padding: 1.6rem 2rem;     /* ✅ 适度留白，文字更呼吸 */
  min-height: 300px;        /* ✅ 统一卡片高度（由原520px缩小） */
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
  border-color: #c7d2fe;
}

/* --- 标题样式 --- */
.project-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0 0 0.8rem 0;
  line-height: 1.35;
  text-align: left;
}

/* --- 正文文字 --- */
.project-card p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #374151;
  text-align: justify;
  text-justify: inter-word;
  margin: 0 0 0.8rem 0;
  flex-grow: 1;
}

/* 响应式布局：移动端单列显示 */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
    width: 92%;
    gap: 1.8rem;
    padding: 1.8rem 0;
  }

  .project-card {
    min-height: auto;
    padding: 1.5rem 1.6rem;
  }

  .project-card h3 {
    font-size: 1.1rem;
  }
}