<!DOCTYPE html>
<html lang="{{LANG}}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{NAME}} — CV</title>
<style>
  @font-face {
    font-family: 'Space Grotesk';
    src: url('./fonts/space-grotesk-latin.woff2') format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }

  @font-face {
    font-family: 'Space Grotesk';
    src: url('./fonts/space-grotesk-latin-ext.woff2') format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  }

  @font-face {
    font-family: 'DM Sans';
    src: url('./fonts/dm-sans-latin.woff2') format('woff2');
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }

  @font-face {
    font-family: 'DM Sans';
    src: url('./fonts/dm-sans-latin-ext.woff2') format('woff2');
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    line-height: 1.5;
    color: #1a1a2e;
    background: #ffffff;
    padding: 0;
    margin: 0;
  }

  .page {
    width: 100%;
    max-width: {{PAGE_WIDTH}};
    margin: 0 auto;
    padding: 2px 0;
  }

  /* === HEADER === */
  .header {
    margin-bottom: 20px;
  }

  .header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    line-height: 1.1;
  }

  .header-gradient {
    height: 2px;
    background: linear-gradient(to right, hsl(187, 74%, 32%), hsl(270, 70%, 45%));
    border-radius: 1px;
    margin-bottom: 10px;
  }

  .contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 10.5px;
    line-height: 1.4;
    color: #555;
  }

  .contact-row a {
    color: #555;
    text-decoration: none;
  }

  .contact-row .separator {
    color: #ccc;
  }

  /* === SECTIONS === */
  .section {
    margin-bottom: 18px;
  }

  .section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: hsl(187, 74%, 32%);
    border-bottom: 1.5px solid #e2e2e2;
    padding-bottom: 4px;
    margin-bottom: 10px;
    line-height: 1.2;
  }

  /* === PROFESSIONAL SUMMARY === */
  .summary-text {
    font-size: 11px;
    line-height: 1.7;
    color: #2f2f2f;
  }

  /* Links must never break across lines */
  a {
    white-space: nowrap;
  }

  /* === CORE COMPETENCIES === */
  .competencies-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .competency-tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: hsl(187, 74%, 28%);
    background: hsl(187, 40%, 95%);
    padding: 4px 10px;
    border-radius: 3px;
    border: 1px solid hsl(187, 40%, 88%);
  }

  /* === WORK EXPERIENCE === */
  .job {
    margin-bottom: 14px;
  }

  .job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
  }

  .job-company {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: hsl(270, 70%, 45%);
  }

  .job-period {
    font-size: 10.5px;
    color: #777;
    white-space: nowrap;
  }

  .job-role {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
  }

  .job-location {
    font-size: 10px;
    color: #888;
  }

  .job ul {
    padding-left: 18px;
    margin-top: 6px;
  }

  .job li {
    font-size: 10.5px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 4px;
  }

  .job li strong {
    font-weight: 600;
  }

  /* === PROJECTS === */
  .project {
    margin-bottom: 12px;
  }

  .project-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    color: hsl(270, 70%, 45%);
  }

  .project-badge {
    font-size: 9px;
    font-weight: 500;
    color: hsl(187, 74%, 32%);
    background: hsl(187, 40%, 95%);
    padding: 1px 6px;
    border-radius: 2px;
    margin-left: 6px;
  }

  .project-desc {
    font-size: 10.5px;
    color: #444;
    margin-top: 3px;
    line-height: 1.55;
  }

  .project-tech {
    font-size: 9.5px;
    color: #888;
    margin-top: 3px;
  }

  /* === EDUCATION === */
  .edu-item {
    margin-bottom: 8px;
  }

  .edu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
  }

  .edu-title {
    font-weight: 600;
    font-size: 11px;
    color: #333;
  }

  .edu-org {
    color: hsl(270, 70%, 45%);
    font-weight: 500;
  }

  .edu-year {
    font-size: 10px;
    color: #777;
    white-space: nowrap;
  }

  .edu-desc {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
    line-height: 1.5;
  }

  /* === CERTIFICATIONS === */
  .cert-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
  }

  .cert-title {
    font-size: 10.5px;
    font-weight: 500;
    color: #333;
  }

  .cert-org {
    color: hsl(270, 70%, 45%);
  }

  .cert-year {
    font-size: 10px;
    color: #777;
    white-space: nowrap;
  }

  /* === SKILLS === */
  .skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
  }

  .skill-item {
    font-size: 10.5px;
    color: #444;
  }

  .skill-category {
    font-weight: 600;
    color: #333;
    font-size: 10.5px;
  }

  /* === PRINT === */
  @media print {
    body {
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }

    .page {
      padding: 0;
    }
  }

  /* === PAGE BREAK CONTROL === */
  .avoid-break,
  .job,
  .project,
  .edu-item,
  .cert-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }
</style>
</head>
<body>
<div class="page">

  <!-- HEADER -->
  <div class="header avoid-break">
    <h1>{{NAME}}</h1>
    <div class="header-gradient"></div>
    <div class="contact-row">
      <span>{{PHONE}}</span>
      <span class="separator">|</span>
      <span>{{EMAIL}}</span>
      <span class="separator">|</span>
      <a href="{{LINKEDIN_URL}}">{{LINKEDIN_DISPLAY}}</a>
      <span class="separator">|</span>
      <a href="{{PORTFOLIO_URL}}">{{PORTFOLIO_DISPLAY}}</a>
      <span class="separator">|</span>
      <span>{{LOCATION}}</span>
    </div>
  </div>

  <!-- PROFESSIONAL SUMMARY -->
  <div class="section avoid-break">
    <div class="section-title">{{SECTION_SUMMARY}}</div>
    <div class="summary-text">{{SUMMARY_TEXT}}</div>
  </div>

  <!-- CORE COMPETENCIES -->
  <div class="section">
    <div class="section-title">{{SECTION_COMPETENCIES}}</div>
    <div class="competencies-grid">
      {{COMPETENCIES}}
    </div>
  </div>

  <!-- WORK EXPERIENCE -->
  <div class="section">
    <div class="section-title">{{SECTION_EXPERIENCE}}</div>
    {{EXPERIENCE}}
  </div>

  <!-- PROJECTS -->
  <div class="section avoid-break">
    <div class="section-title">{{SECTION_PROJECTS}}</div>
    {{PROJECTS}}
  </div>

  <!-- EDUCATION -->
  <div class="section avoid-break">
    <div class="section-title">{{SECTION_EDUCATION}}</div>
    {{EDUCATION}}
  </div>

  <!-- CERTIFICATIONS -->
  <div class="section avoid-break">
    <div class="section-title">{{SECTION_CERTIFICATIONS}}</div>
    {{CERTIFICATIONS}}
  </div>

  <!-- SKILLS -->
  <div class="section avoid-break">
    <div class="section-title">{{SECTION_SKILLS}}</div>
    {{SKILLS}}
  </div>

</div>
</body>
</html>
