/* ═══════════════════════════════════════════════════════════════
   enhancements.css — hover previews, GitHub badges, project page
   ═══════════════════════════════════════════════════════════════ */

/* .banner/.grid set an explicit `display`, which otherwise beats the
   browser's default [hidden] rule at equal specificity. */
[hidden] {
  display: none !important;
}

/* ── Hover preview card (Wikipedia-style page preview) ── */
#wiki-hovercard {
  position: fixed;
  width: 280px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  padding: 12px 14px;
  font-family: var(--sans);
  z-index: 500;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#wiki-hovercard.on {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hc-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.3;
}

.hc-tagline {
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 8px;
}

.hc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.hc-more {
  font-size: 11.5px;
  color: var(--link);
  text-decoration: none;
}

.hc-more:hover {
  text-decoration: underline;
}


/* ── Project heading: internal detail link + external repo link ── */
.proj-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.proj-repo-link {
  font-size: 11px;
  font-weight: 400;
  font-family: var(--sans);
  color: var(--link);
  text-decoration: none;
  white-space: nowrap;
}

.proj-repo-link:hover {
  text-decoration: underline;
}


/* ── Live GitHub badge on project cards / infobox ── */
.gh-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  margin-left: 2px;
}


/* ── Project detail page ── */
.proj-back {
  margin: 14px 0;
  font-family: var(--sans);
  font-size: 12.5px;
}

.proj-back a {
  color: var(--link);
  text-decoration: none;
}

.proj-back a:hover {
  text-decoration: underline;
}
