/* Shared design tokens for Zhao Pengcheng's personal site & resume.
 * Extends the Hallmark Ledger editorial visual system across web & print. */

:root {
  --color-paper: oklch(0.992 0.004 250);
  --color-surface: oklch(0.972 0.006 250);
  --color-desk: oklch(0.95 0.008 250);
  --color-ink: oklch(0.22 0.02 255);
  --color-muted: oklch(0.46 0.02 255);
  --color-faint: oklch(0.58 0.016 255);
  --color-rule: oklch(0.895 0.009 255);
  --color-rule-strong: oklch(0.22 0.02 255);
  --color-accent: oklch(0.42 0.1 250);
  --color-accent-hover: oklch(0.35 0.11 250);
  --color-accent-soft: oklch(0.952 0.018 250);
  --color-accent-ink: var(--color-paper);
  --color-focus: oklch(0.55 0.15 250);
  --color-shadow: oklch(0.3 0.03 255 / 0.14);

  --font-body: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-body);
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;

  --leading-site: 1.65;
  --track-heading: -0.015em;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --site-max: 900px;
}

:root:lang(zh-CN) {
  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --leading-site: 1.78;
  --track-heading: 0;
}

/* Bilingual visibility controlled synchronously via <html data-lang="en|zh"> */
html[data-lang="en"] [data-i18n="zh"],
html[data-lang="zh"] [data-i18n="en"] {
  display: none !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: clip;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

::selection {
  background: color-mix(in oklab, var(--color-accent) 22%, transparent);
  color: var(--color-ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
