/* ───────────────────────────────────────────────────────────────
   Keji Xu — personal site
   Plain CSS, no build step. Tweak the variables below to reskin.
   ─────────────────────────────────────────────────────────────── */

:root {
  --ink:        #1a1a1a;   /* body text            */
  --muted:      #6b6b6b;   /* dates, secondary text */
  --link:       #1a56db;   /* links                 */
  --link-hover: #0b3bb0;
  --bg:         #ffffff;
  --rule:       #ececec;   /* hairline dividers     */
  --measure:    42rem;     /* max line length       */
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #e8e8e8;
    --muted:      #9a9a9a;
    --link:       #7aa2f7;
    --link-hover: #a9c1ff;
    --bg:         #111111;
    --rule:       #2a2a2a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
               Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 14vh 1.5rem 6rem;
}

/* ── Header ─────────────────────────────────────────────────────── */

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.25rem;
  display: block;
}

h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}

.status {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.intro {
  margin: 0 0 2rem;
}

/* ── Nav ────────────────────────────────────────────────────────── */

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

/* ── Sections ───────────────────────────────────────────────────── */

section { margin-bottom: 3rem; }

h2 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

ul.posts {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.posts li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.3rem 0;
}

.date, .meta { color: var(--muted); font-size: 0.95rem; }

/* ── Links ──────────────────────────────────────────────────────── */

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 2px;
}
a:hover { color: var(--link-hover); text-decoration: underline; }

/* ── Footer ─────────────────────────────────────────────────────── */

footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}
footer p { margin: 0; }

/* ── Small screens ──────────────────────────────────────────────── */

@media (max-width: 480px) {
  body { font-size: 17px; }
  main { padding-top: 8vh; }
}
