/* ============================================
   MerLean — Academic Project Page
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- Header ---- */
.site-header {
  text-align: center;
  padding: 60px 0 10px;
}

.site-logo {
  display: block;
  margin: 0 auto 18px;
  width: 180px;
  height: auto;
}

.title {
  font-size: 2.4rem;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 1.15rem;
  font-weight: 400;
  color: #444;
  line-height: 1.6;
  margin-bottom: 24px;
}

.authors {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 500;
  color: #222;
}

.author-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
}

.affiliations {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 4px;
}

.equal {
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 24px;
}

.links,
.header-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.links a,
.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #333;
  background: #f9fafb;
  transition: background 0.15s, border-color 0.15s;
}

.links a:hover,
.header-btn:hover {
  background: #f0f4ff;
  border-color: #93a3d0;
  text-decoration: none;
}

.links svg,
.header-links svg {
  flex-shrink: 0;
}

/* ---- Divider ---- */
.divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 32px 0;
}

/* ---- Sections ---- */
.section {
  padding: 4px 0;
}

.section h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 14px;
}

.section p {
  color: #333;
  margin-bottom: 12px;
  font-size: 0.97rem;
}

.section p:last-child {
  margin-bottom: 0;
}

/* ---- Example Links ---- */
.example-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.example-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 280px;
  padding: 14px 0;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  cursor: pointer;
}

.example-btn:hover {
  background: #1d4ed8;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.example-btn svg {
  flex-shrink: 0;
  stroke: #fff;
}

/* ---- Card Grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  display: block;
  padding: 22px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafbfc;
  transition: box-shadow 0.2s, border-color 0.2s;
  color: #333;
}

.card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
  border-color: #b0bdd4;
  text-decoration: none;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 6px;
}

.card p {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* ---- Pipeline ---- */
.pipeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 140px;
  max-width: 190px;
  background: #f8f9fb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px 16px;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.55;
  text-align: center;
}

.step strong {
  color: #111;
  font-size: 0.92rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 4px;
  vertical-align: middle;
}

.arrow {
  display: flex;
  align-items: center;
  color: #bbb;
  font-size: 1.3rem;
  padding-top: 22px;
}

.subsection {
  margin-top: 24px;
}

/* ---- BibTeX ---- */
.bibtex {
  background: #f5f6f8;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 18px 22px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82rem;
  color: #333;
  overflow-x: auto;
  line-height: 1.65;
  white-space: pre;
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 28px 0 40px;
  font-size: 0.82rem;
  color: #999;
}

.site-footer a {
  color: #777;
}

.site-footer a:hover {
  color: #333;
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
  .title {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .pipeline {
    flex-direction: column;
    align-items: center;
  }

  .step {
    max-width: 100%;
  }

  .arrow {
    transform: rotate(90deg);
    padding-top: 0;
  }

  .authors {
    gap: 12px;
  }

  .links a {
    padding: 7px 14px;
    font-size: 0.82rem;
  }
}
