/* ─────────────────────────────────────────────────────────────
   Cheng Feng — academic site tokens
   Aesthetic: warm beige + deep brown, editorial serif
   ───────────────────────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=Noto+Serif+SC:wght@400;500;600;700&family=Inter:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* Off-white paper palette — warm undertone but clean */
  --paper:        #ffffff;    /* main background — pure white */
  --paper-soft:   #faf6ec;    /* card / quiet section fill — barely cream */
  --paper-deep:   #f1ead8;    /* placeholder fig / sunken */
  --ink:          #221913;    /* primary text — deep walnut */
  --ink-2:        #4a3a2a;    /* body text */
  --ink-3:        #8a7b66;    /* meta / labels */
  --rule:         #e6decb;    /* hairline */
  --rule-strong:  #c9bca0;    /* stronger hairline */
  --accent:       #8a3a1f;    /* deep cinnabar — Cornell-leaning brick */
  --accent-soft:  #c08055;
  --highlight:    #fbf3e2;
  --shadow-warm:  0 1px 0 rgba(34,25,19,.04), 0 8px 24px -16px rgba(34,25,19,.18);

  /* Type — western faces first, Chinese faces in fallback so CJK glyphs match */
  --serif:    "Source Serif 4", "Source Serif Pro", "Iowan Old Style", "Apple Garamond", Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  --sans:     "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono:     "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-display: clamp(34px, 3.6vw, 52px);
  --fs-h1:      clamp(22px, 2vw, 28px);
  --fs-h2:      clamp(17px, 1.4vw, 20px);
  --fs-body:    15.5px;
  --fs-small:   13px;
  --fs-meta:    11.5px;
  --lh-tight:   1.12;
  --lh-body:    1.55;
}

[data-font-mode="sans"] {
  --serif: "Inter", -apple-system, BlinkMacSystemFont, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "calt";
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color .15s ease, border-color .15s ease;
}
a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .01em; }

/* ── Top nav (shared across subpages) ─────────────────────────── */
.site-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 56px 16px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
}
.site-nav .brand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.005em;
  border: 0;
}
.site-nav .brand em {
  font-style: normal;
  font-weight: 400;
  color: var(--ink-3);
  margin-left: 8px;
  font-size: 13px;
}
.site-nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
}
.site-nav ul a {
  border: 0;
  color: var(--ink-2);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.site-nav ul a.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.site-nav ul a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-foot {
  margin-top: 48px;
  padding: 20px 56px 28px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  letter-spacing: .04em;
}

/* ── Avatar (real photo container) ───────────────────────────── */
.avatar {
  position: relative;
  overflow: hidden;
}
.avatar.is-mini { width: 56px; height: 56px; }
