/* Research-project page (the style of ML paper sites), used by _layouts/project.html */

:root {
  --pp-ink: #1d1d1f;
  --pp-muted: #5f6368;
  --pp-line: #e6e6e6;
  --pp-soft: #f5f5f7;
  --pp-accent: #2f6fb5;
  --pp-btn: #363636;
}

body.pp {
  margin: 0;
  background: #fff;
  color: var(--pp-ink);
  font-family: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.pp main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.pp a { color: var(--pp-accent); text-decoration: none; }
.pp a:hover { text-decoration: underline; text-underline-offset: 3px; }

.pp-top {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 24px 0;
  font-size: 0.9rem;
}
.pp-top a { color: var(--pp-muted); display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- hero ---------- */
.pp-hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.pp-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  color: var(--pp-ink);
}
.pp-subtitle {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--pp-muted);
  max-width: 720px;
  margin: 0 auto 1.25rem;
  line-height: 1.45;
}
.pp-authors { font-size: 1.15rem; margin: 0 0 0.2rem; }
.pp-meta { color: var(--pp-muted); font-size: 0.95rem; margin: 0 0 1.5rem; }

.pp-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--pp-btn);
  color: #fff !important;
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}
.pp-btn:hover { background: #111; }
.pp-btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- sections ---------- */
.pp section { padding: 1.5rem 0; }
.pp h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin: 1.5rem 0 1.25rem;
  color: var(--pp-ink);
}
.pp h3 { font-size: 1.2rem; font-weight: 600; margin: 1.75rem 0 0.5rem; color: var(--pp-ink); }
.pp .pp-text { max-width: 820px; margin: 0 auto; }
.pp .pp-text p { margin: 0 0 1rem; }
.pp .pp-abstract p { text-align: justify; hyphens: auto; }
.pp ul.pp-list { padding-left: 1.2rem; margin: 0 0 1rem; }
.pp ul.pp-list li { margin: 0.3rem 0; }

/* ---------- figures ---------- */
.pp figure { margin: 0 0 1.75rem; }
.pp figure img,
.pp figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: var(--pp-soft);
}
.pp figure.pp-boxed img,
.pp figure.pp-boxed video { border: 1px solid var(--pp-line); }
.pp figcaption {
  color: var(--pp-muted);
  font-size: 0.93rem;
  line-height: 1.5;
  margin-top: 0.6rem;
}
.pp figcaption b { color: var(--pp-ink); font-weight: 600; }
.pp-teaser figure video { max-width: 760px; margin: 0 auto; }
.pp-teaser figcaption { text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }

.pp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.pp-grid .pp-wide { grid-column: 1 / -1; }

/* ---------- repos ---------- */
.pp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pp-card {
  display: block;
  border: 1px solid var(--pp-line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--pp-ink) !important;
  text-decoration: none !important;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.pp-card:hover { border-color: #c7c7cc; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.pp-card .pp-repo { font-weight: 600; font-size: 0.98rem; word-break: break-word; }
.pp-card .pp-owner { color: var(--pp-muted); font-weight: 400; }
.pp-card p { margin: 0.35rem 0 0; color: var(--pp-muted); font-size: 0.9rem; line-height: 1.5; }
.pp-card.pp-mine { border-color: #b9cde6; background: #f6f9fd; }

/* ---------- code ---------- */
.pp pre {
  position: relative;
  background: var(--pp-soft);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}
.pp code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
.pp p code { background: var(--pp-soft); border-radius: 4px; padding: 0.1em 0.35em; }
.pp-copy {
  position: absolute; top: 8px; right: 8px;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--pp-line); border-radius: 8px;
  background: #fff; color: var(--pp-muted);
  font: inherit; font-size: 0.8rem; cursor: pointer;
}

.pp-note {
  max-width: 820px;
  margin: 0 auto 1.25rem;
  padding: 12px 16px;
  border-left: 3px solid #c9b458;
  background: #fbf8ec;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}

.pp-footer {
  max-width: 960px;
  margin: 2rem auto 0;
  padding: 1.5rem 24px 3rem;
  border-top: 1px solid var(--pp-line);
  font-size: 0.95rem;
}
.pp-footer a { color: var(--pp-muted); display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  body.pp { font-size: 16px; }
  .pp main, .pp-top, .pp-footer { padding-left: 16px; padding-right: 16px; }
  .pp-hero { padding-top: 1.25rem; }
  .pp-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .pp-btn { justify-content: center; padding: 0 12px; }
  .pp-grid { grid-template-columns: minmax(0, 1fr); }
  .pp-cards { grid-template-columns: minmax(0, 1fr); }
  .pp h2 { font-size: 1.45rem; }
  .pp .pp-abstract p { text-align: left; }
  .pp figure img, .pp figure video { border-radius: 8px; }
}
@media (min-width: 761px) and (max-width: 960px) {
  .pp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
