/* ============================================================
   Brush display face — 明菜の笔记
   ------------------------------------------------------------
   One self-hosted woff2 (57 KB) built from:
     · Ma Shan Zheng   (OFL) — simplified-Chinese brush strokes
     · Yuji Syuku      (OFL) — only 「の」 and 「・」, which Ma Shan
                              Zheng does not draw
   Both are 1000 upem TrueType outlines, merged into a single
   subset so the browser never has to fall through per-glyph.

   Scope: every title-like string the page actually shows —
   nav wordmark, hero subtitle, inner-page hero titles and the
   author card. Body copy stays in the system sans; brush type
   is a display face, not a reading face.

   Loaded after design-system.css so it wins the font-family
   cascade for those selectors.
   ============================================================ */

@font-face {
  font-family: 'MingCai Brush';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/mingshan-brush.woff2') format('woff2'),
       url('/fonts/mingshan-brush.woff') format('woff');
}

/* ---- Shared treatment -------------------------------------- */
/* Scope note: only `.nav-site-title .site-name` is the wordmark. Butterfly
   reuses the same class inside `a.nav-page-title` for the current post's
   title, which must keep the body face — brush on a long article title
   reads as broken, and the subset doesn't carry those glyphs anyway. */
#nav .nav-site-title .site-name,
#page-site-info #site-title,
#page-header #site-subtitle,
#aside-content .card-info .author-info-name,
#aside-content .card-info .author-info-description {
  font-family: 'MingCai Brush', Georgia, 'Songti SC', 'STSong', 'SimSun', serif;
  /* The face ships a single weight; block faux-bold so it stays a brush
     stroke instead of a smeared outline. */
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.02em;
}

/* ---- Nav wordmark ------------------------------------------ */
/* Butterfly nests this as span.site-name inside a.nav-site-title — not
   #site-name, and not to be confused with a.nav-page-title .site-name. */
#nav .nav-site-title .site-name {
  font-size: 1.55em;
  letter-spacing: 0.05em;
  line-height: 1.2;
  /* Ma Shan Zheng is a light brush; a hairline stroke restores the
     weight of the hero logotype without smearing the strokes. */
  -webkit-text-stroke: 0.3px currentColor;
}

/* ---- Hero subtitle ----------------------------------------- */
/* design-system.css letterspaces this at 0.12em, which pulls the brush
   strokes apart; tighter tracking keeps the handwritten rhythm. */
#page-header #site-subtitle {
  font-size: 1.22em;
  letter-spacing: 0.06em;
  line-height: 1.7;
  -webkit-text-stroke: 0.2px currentColor;
}

/* ---- Inner-page hero title (分类 / 标签 / 归档 …) ---------- */
#page-site-info #site-title {
  font-size: 3.3em;
  letter-spacing: 0.06em;
  -webkit-text-stroke: 0.75px currentColor;
  paint-order: stroke fill;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

/* ---- Author card ------------------------------------------- */
#aside-content .card-info .author-info-name {
  font-size: 1.5em;
  letter-spacing: 0.08em;
  line-height: 1.4;
  -webkit-text-stroke: 0.3px currentColor;
}

#aside-content .card-info .author-info-description {
  font-size: 1.05em;
  letter-spacing: 0.02em;
  line-height: 1.65;
}

/* ---- Small screens ----------------------------------------- */
@media screen and (max-width: 768px) {
  #nav .nav-site-title .site-name {
    font-size: 1.35em;
  }

  #page-header #site-subtitle {
    font-size: 1.08em;
    letter-spacing: 0.05em;
  }

  #page-site-info #site-title {
    font-size: 2.3em;
    letter-spacing: 0.05em;
  }

  #aside-content .card-info .author-info-name {
    font-size: 1.35em;
  }
}
