/* === PRINT STYLESHEET for Resume === */
/* === A4 Vertical, Single-Page Main + Page 2 ATS === */
/* === Typography: two-layer token system === */
/*   Base → % tokens → elements. Change base, everything scales. === */

@media print {
  /* === Page Setup === */
  @page {
    size: A4;
    margin: 14mm 16mm;
  }

  /* === Color Tokens (forced light for print) === */
  :root {
    --fg: #000;
    --fg-secondary: #333;
    --fg-tertiary: #555;
    --bg: #fff;
    --bg-tag: transparent;
    --accent: #c0392b;
    --border: #bbb;
    --border-light: #ddd;
  }

  /* === BASE TIER: absolute values === */
  /* Change these two numbers to rescale the entire print layout */
  body {
    font-family: 'Geist';
    font-size: 9pt;           /* ← base font size */
    line-height: 160%;          /* ← base line height */
    word-spacing: -1%;
  }

  /* === PERCENTAGE TIER: tokens as % of body === */
  /* These are the knobs you tweak for rapid manual adjustment */
  :root {
    /* --- Font-size scale (% of body font-size) --- */
    --print-h1-size: 200%;          /* 14pt */
    --print-title-size: 110%;        /* 8pt */
    --print-intro-size: 90%;        /* 7.5pt */
    --print-contact-size: 70%;      /* 7pt */
    --print-section-label-size: 90%; /* 9pt */
    --print-exp-company-size: 90%; /* 10pt */
    --print-exp-role-size: 70%;     /* 7pt */
    --print-exp-period-size: 65%;   /* 6.5pt */
    --print-exp-context-size: 70%;  /* 7pt */
    --print-exp-bullet-size: 70%;   /* 7pt */
    --print-tag-size: 65%;          /* 6.5pt */
    --print-meta-size: 100%;         /* 7pt */
    --print-meta-dt-size: 65%;      /* 6.5pt */
    --print-ats-size: 70%;          /* 7pt */

    /* --- Line-height scale (multiplier of body line-height) --- */
    --print-h1-lh: 1.4;           /* 1.1 */
    --print-title-lh: 2;          /* 1.4 */
    --print-intro-lh: 1.2;        /* 1.3 */
    --print-exp-company-lh: 0.857;  /* 1.2 */
    --print-exp-context-lh: 1.4;  /* 1.35 */
    --print-exp-bullet-lh: 1.3;   /* 1.3 */
    --print-ats-lh: 0.929;          /* 1.3 */
  }

  /* === Layout === */
  .page {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  /* === Hide Screen-Only Elements === */
  .theme-toggle,
  .lang-switch {
    display: none !important;
  }

  /* === HEADER === */
  header {
    margin-bottom: 8pt;
  }

  .header-inner {
    display: flex;
    flex-direction: row-reverse;
    gap: 10pt;
    align-items: flex-start;
  }

  .header-photo-wrap {
    display: flex;
    flex: 0 0 auto;
  }

  .header-photo {
    width: 48pt;
    height: 48pt;
    border: 0.75pt solid var(--border);
  }

  .header-photo-inline-mobile {
    display: none;
  }

  .header-text {
    flex: 1 1 0;
    min-width: 0;
  }

  h1 {
    font-size: var(--print-h1-size);
    line-height: var(--print-h1-lh);
    margin: 0;
  }

  .title {
    font-size: var(--print-title-size);
    margin-top: 1pt;
    line-height: var(--print-title-lh);
  }

  .intro {
    font-size: var(--print-intro-size);
    margin-top: 2pt;
    line-height: var(--print-intro-lh);
    max-width: none;
  }

  /* Reset pretext wrapping for print */
  .intro.pretext-wrapped {
    margin-right: 0;
  }

  .intro-line {
    white-space: normal;
    display: inline;
    width: auto;
  }

  .contact {
    font-size: var(--print-contact-size);
    margin-top: 2pt;
    grid-template-columns: repeat(6, max-content);
    column-gap: 6pt;
    row-gap: 0;
  }

  /* === SECTIONS === */
  .section-label {
    font-size: var(--print-section-label-size);
    margin-bottom: 3pt;
    padding-bottom: 2pt;
    border-bottom: 1pt solid var(--accent);
    letter-spacing: 0.8pt;
  }

  section {
    margin-bottom: 6pt;
  }

  /* === EXPERIENCE === */
  .exp {
    margin-bottom: 5pt;
    padding-bottom: 5pt;
    border-bottom: 0.5pt solid var(--border-light);
  }

  .exp-top {
    margin-bottom: 0.5pt;
    gap: 1pt;
  }

  .exp-company {
    font-size: var(--print-exp-company-size);
    line-height: var(--print-exp-company-lh);
  }

  .exp-role {
    font-size: var(--print-exp-role-size);
  }

  .exp-period {
    font-size: var(--print-exp-period-size);
    margin-bottom: 1pt;
  }

  .exp-context {
    font-size: var(--print-exp-context-size);
    line-height: var(--print-exp-context-lh);
    margin-bottom: 1pt;
  }

  .exp-bullets {
    margin-top: 0.5pt;
  }

  .exp-bullets li {
    font-size: var(--print-exp-bullet-size);
    padding-left: 6pt;
    margin-bottom: 0.5pt;
    line-height: var(--print-exp-bullet-lh);
  }

  .exp-bullets li::before {
    top: 3pt;
    width: 2pt;
    height: 2pt;
  }

  /* === TAGS === */
  .tags {
    gap: 1.5pt;
    line-height:100%;
  }

  .tag {
    background: none;
    border: none !important;
    font-size: var(--print-tag-size);
    padding: 0 1px;

  }

  /* === META / EDUCATION === */
  .meta-row {
    gap: 8pt;
    font-size: var(--print-meta-size);
  }

  .meta-row dt {
    font-size: var(--print-meta-dt-size);
    letter-spacing: 0.5pt;
    margin-bottom:0;
  }

  .meta-row dd {
    margin-bottom: 0;
  }
  .meta-row > div:nth-child(1) > dd:nth-child(2) {
    margin-bottom: 0 !important;
  }
  /* === ATS SECTION (Page 2) === */
  .ats-plaintext,
  .ats-keywords {
    page-break-before: always;
    break-before: page;
  }

  .ats-plaintext {
    display: block !important;
    font-size: var(--print-ats-size);
    color: #000;
    line-height: var(--print-ats-lh);
    white-space: pre-wrap;
    margin-top: 4pt;
    padding-top: 3pt;
    border-top: 0.5pt solid #ccc;
  }

  .ats-keywords {
    display: block !important;
    font-size: 1pt;
    color: #fff;
    line-height: 1;
  }

  .ats-plaintext .ats-link {
    color: #000;
    text-decoration: none;
    border-bottom: none;
  }
}

.contact .p-tel .hang-plus {
  position: relative;
  left: 0;
}
