/* Public CV (December 2026).
   Loads after home.css: same tokens, navigation, buttons, contact band and footer.
   The first screen answers who, what is distinctive and what proves it (hero + highlights).
   Below it the CV is a reading document: section titles in a left rail, rows divided by hairlines,
   and one tinted panel (the highlights) so the eye has a single place to land.
   Print produces a compact A4 document. */

.cv-page .site-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* ---------- Hero ---------- */

.cv-hero {
  padding: clamp(56px, 8vw, 104px) 0 clamp(44px, 6vw, 72px);
  text-align: center;
}

.cv-kicker {
  color: var(--graphite);
  font-size: clamp(15px, 1.5vw, 17px);
  font-weight: 600;
  letter-spacing: -0.005em;
}

.cv-title {
  margin-top: 8px;
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

:lang(zh) .cv-title {
  letter-spacing: -0.01em;
}

.cv-role {
  margin-top: 14px;
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.cv-summary {
  max-width: 740px;
  margin: 18px auto 0;
  color: var(--graphite);
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.5;
  text-wrap: pretty;
}

.cv-location {
  margin-top: 10px;
  color: var(--graphite);
  font-size: 15px;
}

/* The written-out contact line is for paper only; on screen the icon row carries it. */
.cv-print-contact {
  display: none;
}

/* Contact icons: four round targets; the destination shows on hover or keyboard focus. */
.cv-links-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.cv-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: var(--mist);
  border-radius: 50%;
  transition: background-color 160ms ease, color 160ms ease;
}

.cv-link svg,
.cv-actions svg,
.cv-print-contact svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cv-link:hover {
  color: #fff;
  background: var(--ink);
  text-decoration: none;
}

.cv-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.cv-link-tip {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 2;
  padding: 4px 9px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.cv-link:hover .cv-link-tip,
.cv-link:focus-visible .cv-link-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (hover: none) {
  .cv-link-tip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cv-link,
  .cv-link-tip {
    transition: none;
  }
}

.cv-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.cv-updated {
  margin-top: 18px;
  color: var(--graphite);
  font-size: 13px;
}

/* Highlights: four evidence-backed statements, the one tinted panel on the page. */

.cv-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 56px;
  margin-top: clamp(44px, 6vw, 64px);
  padding: clamp(28px, 4vw, 44px);
  text-align: left;
  background: var(--mist);
  border-radius: var(--radius-l);
}

.cv-highlights strong {
  display: block;
  font-size: clamp(19px, 2vw, 22px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.cv-highlights span {
  display: block;
  margin-top: 8px;
  color: var(--graphite);
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- Sections ---------- */

.cv-body {
  width: min(100% - 2 * var(--gutter), 1080px);
  margin-inline: auto;
}

.cv-section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px 48px;
  padding-block: clamp(44px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.cv-hero + .cv-section {
  border-top: 0;
  padding-top: 0;
}

.cv-section-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.cv-section-lead {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

:lang(zh) .cv-section-lead {
  letter-spacing: -0.005em;
  line-height: 1.35;
}

.cv-prose {
  max-width: 760px;
  font-size: 17px;
  line-height: 1.6;
}

.cv-section-intro,
.cv-toolkit-intro {
  max-width: 700px;
  margin-bottom: 20px;
  color: var(--graphite);
  font-size: 17px;
}

.cv-subhead {
  margin: 36px 0 12px;
  color: var(--graphite);
  font-size: 17px;
  font-weight: 600;
}

.cv-subhead:first-child {
  margin-top: 0;
}

/* ---------- Experience and education rows ---------- */

.cv-entry,
.cv-edu {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  grid-template-areas: "logo body date";
  gap: 4px 28px;
  padding-block: 30px;
}

.cv-edu {
  padding-block: 22px;
}

.cv-entry:first-child,
.cv-edu:first-child {
  padding-top: 0;
}

.cv-entry + .cv-entry,
.cv-edu + .cv-edu {
  border-top: 1px solid #e8e8ed;
}

.cv-entry[data-continued] {
  border-top-style: dashed !important;
}

.cv-entry-logo {
  grid-area: logo;
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: start;
  min-height: 40px;
}

.cv-entry-logo img {
  width: auto;
  max-width: 112px;
  max-height: 40px;
  object-fit: contain;
}

.cv-entry-logo .cv-logo-pair {
  max-width: 48px;
}

.cv-entry-logo .cv-logo-pair-wide {
  max-width: 54px;
}

.cv-ceng-mark {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.cv-entry-body {
  grid-area: body;
}

.cv-entry time,
.cv-edu time {
  grid-area: date;
  padding-top: 3px;
  color: var(--graphite);
  font-size: 15px;
  white-space: nowrap;
}

.cv-entry h3,
.cv-edu h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.cv-edu h3 {
  font-size: 19px;
}

.cv-place {
  margin-top: 4px;
  color: var(--graphite);
  font-size: 15px;
}

.cv-edu-detail {
  max-width: 680px;
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.55;
}

.cv-entry ul {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.cv-entry li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  line-height: 1.55;
}

.cv-entry li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 2px;
  width: 5px;
  height: 5px;
  background: var(--graphite);
  border-radius: 50%;
}

.cv-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 14px;
  font-size: 15px;
}

.cv-note {
  margin-top: 14px;
  color: var(--graphite);
  font-size: 13px;
}

/* ---------- Research ---------- */

.cv-themes {
  max-width: 760px;
  margin-bottom: 30px;
  font-size: 17px;
  line-height: 1.55;
}

.cv-themes strong {
  display: block;
  margin-bottom: 4px;
  color: var(--graphite);
  font-size: 15px;
  font-weight: 600;
}

.cv-record-list li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 4px 20px;
  padding-block: 18px;
  border-top: 1px solid #e8e8ed;
}

.cv-record-list li:first-child {
  border-top: 0;
  padding-top: 4px;
}

.cv-year {
  padding-top: 2px;
  color: var(--graphite);
  font-size: 15px;
}

.cv-record-list strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.cv-record-meta {
  display: block;
  margin-top: 4px;
  color: var(--graphite);
  font-size: 15px;
  line-height: 1.5;
}

.cv-record-list a {
  display: inline-block;
  margin-top: 6px;
  font-size: 15px;
}

.cv-record-note {
  margin-top: 12px;
  color: var(--graphite);
  font-size: 13px;
}

/* ---------- Expertise ---------- */

.cv-expertise {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}

.cv-capability-card {
  padding-block: 20px 22px;
  border-top: 1px solid #e8e8ed;
}

.cv-capability-card:nth-child(-n + 2) {
  padding-top: 0;
  border-top: 0;
}

.cv-capability-card h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.cv-capability-card p {
  margin-top: 8px;
  color: var(--graphite);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- Tools ---------- */

.cv-toolkit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.cv-toolkit > div {
  padding: 20px 22px;
  background: var(--mist);
  border-radius: var(--radius-m);
}

.cv-toolkit dt {
  color: var(--graphite);
  font-size: 14px;
  font-weight: 600;
}

.cv-toolkit dd {
  margin: 6px 0 0;
}

.cv-toolkit dd strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.cv-toolkit dd span {
  display: block;
  margin-top: 6px;
  color: var(--graphite);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Lab ---------- */

.cv-project {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 6px 32px;
  padding-block: 26px;
  border-top: 1px solid #e8e8ed;
}

.cv-section-intro + .cv-project {
  border-top: 0;
  padding-top: 4px;
}

.cv-project-id h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.cv-project-id p {
  margin-top: 4px;
  color: var(--graphite);
  font-size: 14px;
  line-height: 1.45;
}

.cv-project-desc {
  max-width: 680px;
  font-size: 16px;
  line-height: 1.55;
}

.cv-status {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  color: var(--graphite);
  font-size: 15px;
  line-height: 1.5;
}

.cv-status strong {
  margin-right: 8px;
  color: var(--ink);
  font-weight: 600;
}

.cv-project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 14px;
  font-size: 15px;
}

/* ---------- Additional ---------- */

.cv-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
}

.cv-meta-grid h3 {
  font-size: 17px;
  font-weight: 600;
}

.cv-meta-grid p {
  margin-top: 6px;
  color: var(--graphite);
  font-size: 15px;
  line-height: 1.6;
}

.cv-page .contact-section {
  margin-top: clamp(24px, 4vw, 48px);
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .cv-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
}

@media (max-width: 760px) {
  .cv-highlights {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .cv-entry,
  .cv-edu {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "logo" "date" "body";
    gap: 10px;
  }

  .cv-entry[data-continued] .cv-entry-logo {
    display: none;
  }

  .cv-entry time,
  .cv-edu time {
    padding-top: 0;
  }

  .cv-expertise,
  .cv-toolkit,
  .cv-meta-grid,
  .cv-project {
    grid-template-columns: minmax(0, 1fr);
  }

  .cv-capability-card:nth-child(2) {
    padding-top: 20px;
    border-top: 1px solid #e8e8ed;
  }

  .cv-record-list li {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Print: compact A4 ----------
   Every rule a narrow screen changes is set again here in absolute units, so the printed
   document is the same whatever the window width (phones and some exporters lay print out
   at the window width). scripts/build-cv-pdf.mjs renders this to the downloadable PDFs. */

@media print {
  @page {
    size: A4;
    margin: 13mm 14mm 15mm;

    @bottom-left {
      content: "Dr Yang Liu, CEng";
      color: #6e6e73;
      font: 7.5pt "Inter Variable", "Noto Sans SC Variable", sans-serif;
      vertical-align: top;
      padding-top: 4mm;
    }

    @bottom-right {
      content: "Page " counter(page) " of " counter(pages);
      color: #6e6e73;
      font: 7.5pt "Inter Variable", "Noto Sans SC Variable", sans-serif;
      vertical-align: top;
      padding-top: 4mm;
    }
  }

  @page cv-zh {
    @bottom-left {
      content: "刘杨博士，CEng";
    }

    @bottom-right {
      content: "第 " counter(page) " 页，共 " counter(pages) " 页";
    }
  }

  html:lang(zh-CN) body {
    page: cv-zh;
  }

  html {
    scroll-padding-top: 0;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 9.4pt;
    line-height: 1.42;
  }

  .site-header,
  .skip-link,
  .no-print,
  .site-footer,
  .contact-section,
  .cv-toolkit dd span {
    display: none !important;
  }

  a {
    color: #000;
  }

  .cv-hero {
    display: grid;
    grid-template-columns: 24mm minmax(0, 1fr);
    column-gap: 6mm;
    padding: 0 0 3mm;
    text-align: left;
  }

  .cv-hero > * {
    grid-column: 2;
  }

  .cv-hero .hero-portrait {
    grid-column: 1;
    grid-row: 1 / span 6;
    width: 24mm;
    height: 24mm;
    margin: 0;
  }

  .cv-kicker {
    font-size: 8.5pt;
  }

  .cv-title {
    margin-top: 0.5mm;
    font-size: 21pt;
    letter-spacing: -0.02em;
  }

  .cv-role {
    margin-top: 1mm;
    font-size: 11pt;
  }

  .cv-summary {
    max-width: none;
    margin: 1.5mm 0 0;
    color: #222;
    font-size: 9.4pt;
  }

  .cv-location,
  .cv-print-contact {
    margin-top: 1mm;
    color: #333;
    font-size: 8.8pt;
  }

  .cv-print-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5mm 5mm;
  }

  .cv-print-contact a {
    display: inline-flex;
    align-items: center;
    gap: 1.2mm;
    color: #333;
    text-decoration: none;
  }

  .cv-print-contact svg {
    width: 2.9mm;
    height: 2.9mm;
    stroke-width: 2;
  }

  .cv-body {
    width: auto;
    margin: 0;
  }

  .cv-highlights {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.4mm 7mm;
    margin-top: 3.5mm;
    padding: 2.8mm 0 0;
    background: none;
    border-top: 0.5pt solid #bbb;
    border-radius: 0;
  }

  .cv-highlights strong {
    font-size: 9.8pt;
    letter-spacing: -0.01em;
  }

  .cv-highlights span {
    margin-top: 0.6mm;
    color: #333;
    font-size: 8.6pt;
    line-height: 1.4;
  }

  .cv-section {
    display: block;
    padding-block: 3mm 3.2mm;
    border-top-color: #bbb;
  }

  .cv-hero + .cv-section {
    border-top: 0.5pt solid #bbb;
    padding-top: 3mm;
  }

  .cv-section-title {
    margin-bottom: 2mm;
    font-size: 11pt;
    break-after: avoid;
  }

  .cv-section-lead {
    margin-bottom: 1.5mm;
    font-size: 11pt;
  }

  .cv-prose {
    max-width: none;
    font-size: 9.4pt;
  }

  .cv-section-intro,
  .cv-toolkit-intro {
    margin-bottom: 2mm;
    font-size: 9pt;
  }

  .cv-subhead {
    margin: 3mm 0 1mm;
    font-size: 9.4pt;
    break-after: avoid;
  }

  .cv-entry,
  .cv-edu {
    grid-template-columns: 18mm minmax(0, 1fr) auto;
    grid-template-areas: "logo body date";
    gap: 0.5mm 5mm;
    padding-block: 2.4mm;
    break-inside: auto;
  }

  .cv-edu {
    padding-block: 1.8mm;
    break-inside: avoid;
  }

  /* Only where more text follows: a last child passes break-after up to its section. */
  .cv-entry-body > h3,
  .cv-place:not(:last-child) {
    break-after: avoid;
  }

  .cv-entry li {
    break-inside: avoid;
  }

  .cv-entry:first-child,
  .cv-edu:first-child {
    padding-top: 0;
  }

  .cv-entry-logo,
  .cv-entry[data-continued] .cv-entry-logo {
    display: flex;
    min-height: 0;
    gap: 1.5mm;
  }

  .cv-entry-logo img {
    max-width: 18mm;
    max-height: 7mm;
  }

  .cv-entry-logo .cv-logo-pair,
  .cv-entry-logo .cv-logo-pair-wide {
    max-width: 8.5mm;
  }

  .cv-ceng-mark {
    font-size: 12pt;
  }

  .cv-entry h3,
  .cv-edu h3 {
    font-size: 10.5pt;
  }

  .cv-edu h3 {
    font-size: 10pt;
  }

  .cv-entry time,
  .cv-edu time,
  .cv-place {
    color: #333;
    font-size: 8.8pt;
  }

  .cv-entry time,
  .cv-edu time {
    padding-top: 0.5mm;
  }

  .cv-place {
    margin-top: 0.5mm;
  }

  .cv-edu-detail {
    max-width: none;
    margin-top: 0.8mm;
    font-size: 9pt;
    line-height: 1.4;
  }

  .cv-entry ul {
    gap: 0.8mm;
    margin-top: 1.5mm;
  }

  .cv-entry li {
    padding-left: 3.2mm;
    font-size: 9.2pt;
    line-height: 1.4;
  }

  .cv-entry li::before {
    content: "•";
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    color: #555;
    background: none;
  }

  .cv-links,
  .cv-project-links,
  .cv-record-list a,
  .cv-note,
  .cv-record-note {
    margin-top: 1.2mm;
    color: #333;
    font-size: 8.3pt;
  }

  .cv-themes {
    max-width: none;
    margin-bottom: 2mm;
    font-size: 9pt;
  }

  .cv-themes strong {
    display: inline;
    margin: 0 2mm 0 0;
    color: #000;
    font-size: 9pt;
  }

  .cv-record-list li {
    grid-template-columns: 11mm minmax(0, 1fr);
    gap: 0.5mm 4mm;
    padding-block: 2mm;
    break-inside: avoid;
  }

  .cv-year {
    font-size: 8.8pt;
  }

  .cv-record-list strong {
    font-size: 9.4pt;
  }

  .cv-record-meta,
  .cv-capability-card p,
  .cv-meta-grid p,
  .cv-status {
    margin-top: 0.8mm;
    color: #333;
    font-size: 8.6pt;
    line-height: 1.4;
  }

  .cv-expertise,
  .cv-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cv-expertise {
    gap: 0 7mm;
  }

  .cv-capability-card {
    padding-block: 1.8mm 2mm;
    border-top-color: #ddd;
    break-inside: avoid;
  }

  .cv-capability-card:nth-child(-n + 2) {
    padding-top: 0;
    border-top: 0;
  }

  .cv-capability-card h3,
  .cv-meta-grid h3 {
    font-size: 9.8pt;
  }

  .cv-toolkit {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2mm 5mm;
  }

  .cv-toolkit > div {
    padding: 0;
    background: none;
    border: 0;
    break-inside: avoid;
  }

  .cv-toolkit dt {
    font-size: 8.3pt;
  }

  .cv-toolkit dd {
    margin-top: 0.6mm;
  }

  .cv-toolkit dd strong {
    font-size: 8.8pt;
  }

  .cv-project {
    grid-template-columns: 34mm minmax(0, 1fr);
    gap: 0.5mm 5mm;
    padding-block: 2.2mm;
    border-top-color: #ddd;
    break-inside: avoid;
  }

  .cv-project-id h3 {
    font-size: 10.2pt;
  }

  .cv-project-id p {
    margin-top: 0.5mm;
    color: #333;
    font-size: 8.3pt;
  }

  .cv-project-desc {
    max-width: none;
    font-size: 9.2pt;
  }

  .cv-status {
    gap: 0.6mm;
  }

  .cv-meta-grid {
    gap: 4mm 7mm;
  }

  #expertise,
  #toolkit,
  #additional {
    break-inside: avoid;
  }
}
