/* Kris Newey CV — screen: design L4 "Dark Terminal"; print: design L3 "Career Timeline".
   Source designs: design/claude-design/L4-Web.dc.html, design/claude-design/L3-Print.dc.html */

/* ---------- fonts (self-hosted, SIL OFL — see fonts/OFL.txt) ---------- */
@font-face { font-family: 'Source Serif 4'; src: url('fonts/source-serif-4-latin-opsz-normal.woff2') format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('fonts/source-serif-4-latin-opsz-italic.woff2') format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); font-weight: 100 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('fonts/ibm-plex-sans-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
/* Subset built by scripts/subset-fonts.py from the characters the Chinese pages actually use. */
@font-face { font-family: 'Noto Serif SC'; src: url('fonts/noto-serif-sc-subset.woff2?v=be373596a3') format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }

/* ---------- tokens ---------- */
:root {
  --cjk: 'Noto Serif SC', 'Songti SC', 'STSong', 'Noto Serif CJK SC', 'Source Han Serif SC';
  --serif: 'Source Serif 4', var(--cjk), Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, var(--cjk), monospace;
  --gutter: clamp(20px, 5vw, 72px);
}
:root, [data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f1012; --fg: #ebe7de; --fg-2: #d6d1c6; --body: #cbc6bb; --dim: #a39e93;
  --panel: #16181b; --line: #2a2d32; --line-2: #34373d;
  --accent: #f0b45a; --accent-2: #ffd08a; --on-accent: #16140f;
  --ph-bg: #4a3d12; --ph-fg: #ffe08a;
}
[data-theme='light'] {
  color-scheme: light;
  --bg: #f7f5ef; --fg: #16171a; --fg-2: #33353a; --body: #2d2f33; --dim: #5b5e65;
  --panel: #ffffff; --line: #dcd8cf; --line-2: #cfcac0;
  --accent: #9a5b00; --accent-2: #6e4100; --on-accent: #ffffff;
  --ph-bg: #fbeeb8; --ph-fg: #5c4400;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--serif); font-size: 17px; line-height: 1.6;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
mark.ph { background: var(--ph-bg); color: var(--ph-fg); padding: 0 4px; border-radius: 2px; }
kbd { font-family: var(--mono); font-size: 12.5px; }
.palette-icon { display: none; font-size: 16px; line-height: 1; }
.print-only { display: none; }
.nobr { white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 30; background: var(--panel); padding: 8px 12px; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px var(--gutter);
  font-family: var(--mono); font-size: 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.site-nav .path { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompt { color: var(--accent); }
.nav-links { display: flex; flex-shrink: 0; align-items: center; gap: 22px; white-space: nowrap; }
.nav-links button {
  font: inherit; font-size: 13px; color: var(--fg); cursor: pointer;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 10px;
  min-height: 32px;
}
.nav-links button:hover { border-color: var(--accent); }

/* ---------- layout ---------- */
.layout {
  max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter) 96px;
  display: grid; grid-template-columns: minmax(300px, 34%) minmax(0, 1fr); gap: clamp(40px, 5vw, 80px);
}
.identity {
  position: sticky; top: 66px; align-self: start;
  max-height: calc(100vh - 66px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  display: flex; flex-direction: column; gap: 26px; padding: 40px 6px 32px 0;
}
.name { margin: 0; font-size: clamp(64px, 7.2vw, 104px); line-height: .92; font-weight: 400; letter-spacing: -.02em; }
.name-link { color: inherit; text-decoration: none; }
.name-link:hover { color: var(--accent-2); text-decoration: none; }
.label { margin: 0; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.3; font-weight: 400; color: var(--fg); }
.tagline { margin: -18px 0 0; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.35; font-style: italic; font-weight: 300; color: var(--fg-2); }
.term {
  font-family: var(--mono); font-size: 14px; line-height: 1.5;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.term-out { color: var(--dim); padding-left: 16px; }
.contacts, .downloads { margin: 0; font-family: var(--mono); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--dim); }
.downloads { font-size: 13px; gap: 8px 10px; }
.downloads a { color: var(--dim); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 9px; }
.downloads a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

.content { display: flex; flex-direction: column; gap: 72px; padding-top: 48px; min-width: 0; }
.content h2 {
  margin: 0 0 26px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: .08em; color: var(--dim);
}
.content h2::before { content: '## '; color: var(--accent); }
.lead { margin: 0; font-size: 22px; line-height: 1.6; font-weight: 350; color: var(--fg-2); }

/* ---------- career arc ---------- */
/* Right padding: room for the last year label and a minimum-width bar at the very end. */
.timeline { position: relative; padding-right: 36px; }
.bars {
  list-style: none; margin: 0; padding: 0; position: relative;
  height: calc(var(--main, 1) * 42px + var(--side, 0) * 22px - 6px);
}
.bar {
  position: absolute; left: var(--l); width: calc(var(--w) - 3px); height: 36px;
  top: calc(min(var(--lane, 0), var(--main, 1)) * 42px + max(var(--lane, 0) - var(--main, 1), 0) * 22px);
  display: flex; align-items: center; padding: 0 7px; overflow: hidden; white-space: nowrap;
  font-family: var(--mono); font-size: 12.5px; color: var(--fg-2);
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 4px;
  container-type: inline-size;
}
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-years { display: none; }
@container (max-width: 64px) { .bar-name { font-size: 10.5px; letter-spacing: -.02em; } }
.bar.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 500; }
/* A business run in parallel with the main line: dashed outline instead of a filled bar. */
/* A business run underneath the main line: thin, dashed, running to now. */
.bar.parallel {
  height: 16px; margin-top: -2px; padding: 0 6px; font-size: 10.5px;
  background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1.5px dashed var(--accent); color: var(--accent-2); font-weight: 500;
}
.timeline-note { margin: 4px 0 0; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.ticks { position: relative; height: 26px; margin-top: 10px; border-top: 1px solid var(--line); }
.tick { position: absolute; left: var(--l); top: 6px; font-family: var(--mono); font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.eras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; margin-top: 36px; }
.era { border-top: 3px solid var(--line-2); padding-top: 14px; }
.era-3 { border-top-color: var(--accent); }
.era-period { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--dim); }
.era-3 .era-period { color: var(--accent); }
.era h3 { margin: 6px 0 8px; font-size: 26px; line-height: 1.1; font-weight: 400; }
.era p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--body); }

/* ---------- experience ---------- */
.job { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; margin-bottom: 40px; }
.job:last-child { margin-bottom: 0; }
.when { margin: 0; padding-top: 7px; font-family: var(--mono); font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.job.current .when { color: var(--accent); }
.when-short { display: none; }
.job h3 { margin: 0 0 6px; font-size: 25px; line-height: 1.25; font-weight: 500; }
.job h3 a { color: var(--fg); }
.job h3 a:hover { color: var(--accent); }
.role { font-weight: 300; font-style: italic; color: var(--dim); }
.job-summary { margin: 0 0 8px; font-size: 16px; font-style: italic; color: var(--dim); }
.job ul { margin: 8px 0 0; padding-left: 18px; }
.job li { font-size: 17px; line-height: 1.6; color: var(--body); margin-bottom: 6px; }
.job li::marker { color: var(--accent); }
.dates { font-family: var(--mono); font-size: 12.5px; color: var(--dim); }

/* ---------- projects, skills, education ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.project { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.project h3 { margin: 0; font-size: 21px; font-weight: 500; line-height: 1.25; }
.project, .offer { min-width: 0; overflow-wrap: break-word; }
.project h3 a { color: var(--fg); }
.project p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--body); }
.project .project-desc { order: 2; }
.project .project-role { order: 3; margin-top: auto; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.skills { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.skills div { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
.skills dt { font-size: 18px; font-weight: 500; }
.skills dd { margin: 0; color: var(--body); }
.edu, .langs { margin: 0 0 8px; }
.courses { margin: 0 0 14px; font-size: 15px; color: var(--dim); }

/* ---------- web-only sections ---------- */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.principles h3 { margin: 0 0 6px; font-size: 21px; font-weight: 500; font-style: italic; }
.principles p { margin: 0; color: var(--body); font-size: 16px; }
#work-with-me .lead { margin-bottom: 22px; }
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.offer { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.offer h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; line-height: 1.3; }
.offer p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }
.cta { font-family: var(--mono); font-size: 15px; }
blockquote { margin: 0; padding-left: 20px; border-left: 2px solid var(--accent); font-style: italic; font-size: 20px; }
blockquote footer { font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--dim); margin-top: 8px; }
.site-foot { font-family: var(--mono); font-size: 12.5px; color: var(--dim); border-top: 1px solid var(--line); padding-top: 20px; }
.site-foot p { margin: 0 0 6px; }
.signature-wrap { color: var(--fg-2); margin-bottom: 10px; }
.signature { display: block; height: 52px; width: auto; }

/* ---------- command palette ---------- */
.palette {
  width: min(560px, 92vw); padding: 0; margin: 14vh auto auto;
  background: var(--panel); color: var(--fg);
  border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
}
.palette:focus-visible { outline: none; }
.palette::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); }
.palette-form { margin: 0; }
.palette-input {
  width: 100%; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--fg); font: 16px var(--mono); outline: none;
}
.palette-input:focus-visible { border-bottom: 2px solid var(--accent); padding-bottom: 15px; }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette-list a, .palette-list button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 8px;
  background: none; color: var(--fg); font: 14px var(--mono); cursor: pointer; min-height: 40px;
}
.palette-list a:hover, .palette-list button:hover { background: var(--line); text-decoration: none; color: var(--fg); }
.palette-list a:focus-visible, .palette-list button:focus-visible {
  background: var(--line); color: var(--fg); text-decoration: none; outline: 2px solid var(--accent); outline-offset: -2px;
}

.draft-badge {
  position: fixed; right: 16px; bottom: 16px; z-index: 25; margin: 0;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ph-fg); background: var(--ph-bg); border-radius: 6px; padding: 6px 10px;
}

/* ---------- Chinese pages ---------- */
html:lang(zh-CN) body { text-autospace: normal; }
html:lang(zh-CN) :is(.tagline, .role, .job-summary, .principles h3, .print-tagline, blockquote) { font-style: normal; }
/* Short Chinese titles: break only at spaces (around "AI", "+"), never inside a word. */
html:lang(zh-CN) .offer h3, html:lang(zh-CN) .principles h3, html:lang(zh-CN) .era h3 { word-break: keep-all; text-wrap: wrap; }
/* Job titles and roles too ("首席架构师" must not split as "首席架构 / 师"); overflow-wrap is the safety net. */
html:lang(zh-CN) :is(.job h3, .project h3, .project-role, .skills dd) { word-break: keep-all; overflow-wrap: anywhere; }
/* Inline date ranges never split across lines (web and print). */
.dates { white-space: nowrap; }
@media screen {
  .when, .era-period { white-space: nowrap; }
}
@media screen {
  html:lang(zh-CN) body { line-height: 1.75; }
  html:lang(zh-CN) .name { letter-spacing: 0; }
  html:lang(zh-CN) .lead { font-size: 20px; line-height: 1.8; }
  html:lang(zh-CN) .job li { line-height: 1.75; }
}

/* ---------- motion ---------- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .content > section { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@keyframes rise { from { opacity: 0; translate: 0 28px; } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media screen and (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .identity { position: static; max-height: none; overflow: visible; padding: 32px 0 0; }
  .term { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
  .principles { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links a:not([hreflang]) { display: none; }
  /* Touch targets: at least 44 × 44px (Apple HIG / WCAG 2.5.5). */
  .nav-links { gap: 8px; }
  .nav-links a, .nav-links button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  .palette-open kbd { display: none; }
  .palette-icon { display: inline; }
  .site-nav { padding-block: 10px; }
  .contacts a, .cta { display: inline-block; padding: 11px 0; }
  .site-foot a { display: inline-block; padding: 12px 3px; }
  .contacts { gap: 0 20px; }
  .downloads a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; }
  .site-foot p { margin: 0; }
  .site-nav .path { font-size: 12.5px; }
  .name { font-size: clamp(52px, 16vw, 72px); }
  .term { display: flex; }
  /* Phones: the first six commands; the rest repeat facts shown in the sections below. */
  .term-row:nth-child(n + 7) { display: none; }
  .content { gap: 56px; padding-top: 40px; }
  .lead { font-size: 19px; }
  .timeline { padding-right: 0; }
  .bars { height: auto; display: flex; flex-direction: column; gap: 6px; }
  /* The parallel business goes last: it is the line that continues to now. */
  .bar.parallel { order: 1; }
  .bar, .bar.parallel { position: static; width: auto; height: 36px; margin: 0; justify-content: space-between; gap: 12px; font-size: 12.5px; }
  .bar-years { display: inline; font-size: 11.5px; opacity: .85; }
  .ticks { display: none; }
  .eras { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .job { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .when { padding-top: 0; }
  .job h3 { font-size: 22px; }
  .skills div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .project { padding: 18px; }
}

/* =================================================================
   PRINT — design L3 "Career Timeline", A4, single column, always light
   ================================================================= */
@page {
  size: A4;
  margin: 14mm 15mm 15mm;
  @bottom-right { content: counter(page) ' / ' counter(pages); font-family: 'IBM Plex Sans', sans-serif; font-size: 8.5pt; color: #56607a; }
}
@media print {
  /* One left column for every section (years, skill groups, "Languages"), so all left edges line up. */
  :root, [data-theme] { --accent: #c2410c; --col: 112px; color-scheme: light; }
  * { animation: none !important; }
  html, body { background: #ffffff !important; }
  body {
    color: #14213d; font-family: 'IBM Plex Sans', var(--cjk), sans-serif;
    font-size: 14px; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  html:lang(zh-CN) body { font-family: 'Source Serif 4', var(--cjk), serif; font-size: 13.5px; line-height: 1.65; }
  .screen-only { display: none !important; }
  .print-only { display: block; }
  a { color: inherit !important; text-decoration: none !important; }
  mark.ph { background: #fbeeb8; color: #5c4400; padding: 0 3px; }

  .layout { display: block; max-width: none; padding: 0; margin: 0; }
  .content { display: flex; flex-direction: column; gap: 13px; padding: 0; }

  /* header */
  .print-head { display: block; }
  .print-id { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
  .print-timeline { margin-top: 16px; }
  .print-name { margin: 0; font-family: 'Instrument Serif', var(--cjk), serif; font-size: 56px; line-height: .95; font-weight: 400; }
  .print-name em { color: var(--accent); }
  .print-label { margin: 6px 0 0; font-size: 15px; line-height: 1.4; color: #14213d; }
  .print-tagline { font-style: italic; color: #46506a; }
  .print-contacts { margin: 5px 0 0; font-size: 12.5px; color: #46506a; display: flex; flex-wrap: wrap; gap: 0 14px; }
  .qr { width: 66px; height: 66px; flex-shrink: 0; }

  /* section labels */
  .content h2 {
    margin: 0 0 7px; padding: 0 0 4px; border: 0; border-bottom: 1px solid #c9cdd6; break-after: avoid;
    font-family: 'IBM Plex Sans', var(--cjk), sans-serif; font-size: 12px; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase; color: #46506a;
  }
  .content h2::before { content: none; }
  #experience h2 { border-bottom-color: #14213d; }
  .lead { font-size: 14px; line-height: 1.55; color: #14213d; font-weight: 400; }
  html:lang(zh-CN) .lead { font-size: 13.5px; line-height: 1.7; }
  .metrics-line { margin: 6px 0 0; font-size: 13px; color: #33405e; }

  /* timeline */
  .bars { height: calc(var(--main, 1) * 24px + var(--side, 0) * 14px - 3px); }
  .bar { top: calc(min(var(--lane, 0), var(--main, 1)) * 24px + max(var(--lane, 0) - var(--main, 1), 0) * 14px); }
  .bar {
    height: 21px; padding: 0 5px; border: 0; border-radius: 2px; width: calc(var(--w) - 2px);
    font-family: 'IBM Plex Sans', var(--cjk), sans-serif; font-size: 10.5px; font-weight: 500;
    background: #e6e2d8; color: #14213d;
  }
  .bar.bar-era-2 { background: #d6dae4; }
  .bar.current { background: var(--accent); color: #ffffff; }
  .bar.parallel { height: 10px; margin-top: -1px; padding: 0; background: #ffffff; border: 1px dashed var(--accent); }
  .bar.parallel .bar-name { display: none; }
  .ticks { height: 16px; margin-top: 7px; border-top: 1px solid #c9cdd6; }
  .tick { top: 3px; font-family: 'IBM Plex Sans', sans-serif; font-size: 10.5px; color: #56607a; }
  .timeline-note { margin: 3px 0 0; font-family: 'IBM Plex Sans', var(--cjk), sans-serif; font-size: 10.5px; color: #56607a; }
  .bar-years { display: none; }

  /* the shared two-column grid: experience, projects, education, languages, skills */
  .job, .project, .edu-row, .skills div {
    display: grid; grid-template-columns: var(--col) minmax(0, 1fr); column-gap: 16px; break-inside: avoid;
  }
  .when { margin: 0; padding: 0; font-family: 'IBM Plex Sans', sans-serif; font-size: 12.5px; font-weight: 600; line-height: 1.6; color: #46506a; }
  .when-full { display: none; }
  .when-short { display: inline; }

  .job { margin: 0 0 10px; }
  .job.current .when { color: var(--accent); }
  .job h3 { margin: 0 0 3px; font-family: inherit; font-size: 15.5px; font-weight: 600; line-height: 1.4; }
  .job h3 a { color: #14213d !important; }
  .role { font-style: normal; font-weight: 400; color: #33405e; }
  .role::before { content: '— '; }
  .job-summary { margin: 0 0 4px; font-size: 13px; color: #46506a; }
  .job ul { margin: 0; padding-left: 16px; }
  .job li { font-size: 14px; line-height: 1.45; color: #14213d; margin: 0 0 2px; }
  html:lang(zh-CN) .job li { font-size: 13.5px; line-height: 1.65; }
  .job li::marker { color: #46506a; }
  .dates { font-family: inherit; font-size: 12.5px; color: #46506a; }

  .projects { display: block; }
  .project { background: none; border: 0; border-radius: 0; padding: 0; margin: 0 0 7px; }
  /* Screen card styles (.project gap / .project p size and colour) must not leak into the print grid. */
  .project { row-gap: 0; }
  .project .when { grid-column: 1; grid-row: 1 / span 3; font-size: 12.5px; line-height: 1.6; color: #46506a; }
  .project h3 { grid-column: 2; margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
  .project h3 a { color: #14213d !important; }
  .project .project-role { grid-column: 2; margin: 0 0 2px; font-family: inherit; font-size: 12.5px; color: #46506a; }
  .project .project-desc { grid-column: 2; margin: 0; font-size: 14px; line-height: 1.45; color: #14213d; }
  html:lang(zh-CN) .project .project-desc { font-size: 13.5px; line-height: 1.65; }

  .skills { gap: 3px; }
  .skills dt { font-size: 13px; line-height: 1.5; font-weight: 600; }
  .skills dd { font-size: 13.5px; line-height: 1.45; color: #14213d; }

  .edu-row { margin: 0 0 6px; }
  .edu, .langs { margin: 0; font-size: 14px; line-height: 1.6; }

  blockquote { border-left: 2px solid var(--accent); padding-left: 10px; font-size: 13.5px; }
  blockquote footer { font-family: inherit; font-size: 12px; color: #46506a; margin-top: 2px; }
  .print-head, #summary, #skills, #education, #references { break-inside: avoid; }
  .signature-wrap { color: #14213d; margin: 0 0 3px; }
  .signature { height: 40px; }
  .site-foot { margin-top: 6px; padding-top: 8px; border-top: 1px solid #d6dae4; font-family: 'IBM Plex Sans', sans-serif; font-size: 11.5px; color: #56607a; }
}
