/* @Xiaotian personal site. Book-paper colours (light) or pure black #000 (dark), serif, one column. Claude, 2026-11-23. */
:root {
  --paper: #f3ecdd;      /* book page */
  --ink: #2e2820;
  --muted: #6b6052;
  --line: #d8cbb2;
  --blue: #2f5fd0;       /* the bar after the name */
  --cap: 0.7em;          /* capital height; index.html measures the real value */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  color-scheme: light;
}
/* Dark: follows the device unless the toggle chose a mode (data-theme). Pure black for OLED, warm off-white text, brighter blue. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --paper: #000000; --ink: #ece6da; --muted: #9a917f; --line: #2e2b26; --blue: #5b86f0; color-scheme: dark; }
}
:root[data-theme=dark] { --paper: #000000; --ink: #ece6da; --muted: #9a917f; --line: #2e2b26; --blue: #5b86f0; color-scheme: dark; }

/* Toggle, top right. Quiet until hovered. */
.theme-toggle { position: fixed; top: max(20px, env(safe-area-inset-top)); right: max(20px, env(safe-area-inset-right)); z-index: 10;
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer; transition: color .18s, border-color .18s; }
.theme-toggle svg { width: 22px; height: 22px; }
.theme-toggle:hover, .theme-toggle:focus-visible { color: var(--ink); border-color: var(--line); }
.theme-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .theme-toggle { transition: none; } }
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.95; -webkit-font-smoothing: antialiased; }
.page { max-width: 720px; margin: 0 auto; padding: max(56px, env(safe-area-inset-top)) 28px 72px; }

/* Wordmark: @ X iaotian | — the X and the bar sit on the baseline and are exactly one capital tall. */
.wordmark { margin: 0; font-size: 44px; font-weight: 400; line-height: 1.1; letter-spacing: .01em; white-space: nowrap; }
.wordmark-x { display: inline-block; height: var(--cap); width: calc(var(--cap) * .8); margin: 0 .02em 0 .03em; vertical-align: baseline; fill: var(--ink); }
.wordmark-bar { display: inline-block; height: var(--cap); width: calc(var(--cap) * .15); margin-left: .24em; vertical-align: baseline; background: var(--blue); }

/* Contact line (the intro text will sit above it later). */
.contact { display: flex; align-items: baseline; gap: 14px; margin: 56px 0 0; padding-top: 1.1em; border-top: 1px solid var(--line); }
.contact-label { font: 12px/1 var(--mono); letter-spacing: .16em; color: var(--muted); }
.contact a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--blue); }
.contact a:hover, .contact a:focus-visible { color: var(--blue); }

.foot { margin-top: 64px; font: 12px/1.6 var(--mono); letter-spacing: .08em; color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .page { padding: max(36px, env(safe-area-inset-top)) 20px 56px; }
  .wordmark { font-size: 34px; }
  .contact { margin-top: 40px; }
}
