/* ============================================================
   Projects page cards
   ============================================================ */

.project-page-intro {
  max-width: 900px;
  margin-bottom: 2rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
  margin: 1.5rem 0 3rem;
}

.project-card {
  border: 1px solid var(--xy-border);
  border-radius: 18px;
  padding: 1.6rem;
  background: var(--xy-surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.10);
}

.project-card h3 {
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 1.25rem;
}

.project-card p {
  line-height: 1.65;
}

.project-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--xy-link);
  background: rgba(74, 163, 255, 0.12);
  border: 1px solid rgba(74, 163, 255, 0.28);
}

.project-keywords {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--xy-muted);
}

.project-status {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--xy-muted);
}

.project-links {
  margin-top: 1.2rem;
}

.project-links .btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   Project buttons
   ============================================================ */

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.project-button {
  display: inline-block;
  padding: 0.52rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.project-button:hover {
  transform: translateY(-1px);
  text-decoration: none !important;
}

.project-button-primary {
  color: #ffffff !important;
  background: #58a6ff;
  border: 1px solid #58a6ff;
}

.project-button-primary:hover {
  color: #ffffff !important;
  background: #79b8ff;
  border-color: #79b8ff;
}

.project-button-secondary {
  color: #2f7fbf !important;
  background: rgba(88, 166, 255, 0.10);
  border: 1px solid rgba(88, 166, 255, 0.45);
}

.project-button-secondary:hover {
  color: #ffffff !important;
  background: #58a6ff;
  border-color: #58a6ff;
}

html.dark-mode .project-button-secondary {
  color: #79c0ff !important;
  background: rgba(88, 166, 255, 0.12);
  border-color: rgba(88, 166, 255, 0.45);
}

html.dark-mode .project-button-secondary:hover {
  color: #ffffff !important;
  background: #58a6ff;
  border-color: #58a6ff;
}


/* ============================================================
   Projects page layout
   ============================================================ */

.projects-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.projects-page h1,
.projects-page h2,
.projects-page h3 {
  letter-spacing: 0.02em;
}

.project-page-intro {
  max-width: 900px;
  margin-bottom: 2.2rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ============================================================
   No-sidebar centered page layout
   ============================================================ */

/* Hide the title automatically generated by Minimal Mistakes */
.no-sidebar-page #page-title,
.no-sidebar-page .archive > h1:first-child {
  display: none !important;
}

/* Center the whole content area after removing the author sidebar */
@media screen and (min-width: 1024px) {
  .no-sidebar-page .archive {
    float: none !important;
    width: min(1100px, calc(100% - 2rem)) !important;
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

@media screen and (max-width: 1023px) {
  .no-sidebar-page .archive {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Your own page title, aligned with the content */
.custom-page-title {
  margin-top: 0;
  margin-bottom: 1.2rem;
  font-size: 1.8rem;
  line-height: 1.25;
}

/* Let page wrappers use the parent archive width */
.projects-page,
.research-page,
.papers-page {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 0 3rem !important;
}