/* The CV page: a document first, printable as one. */

.cv-page {
  padding-block: clamp(28px, 4vw, 48px) var(--section-y);
}

.cv-wrap {
  max-width: calc(900px + 2 * var(--gutter));
}

.cv-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.cv-tools .back {
  margin: 0;
}

.cv {
  padding: clamp(24px, 5vw, 56px);
}

.cv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 32px;
  padding-bottom: 26px;
  border-bottom: 2px solid var(--ink);
}

.cv-head h1 {
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.cv-role {
  margin: 8px 0 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.cv-contact {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: right;
}

.cv-contact a {
  color: var(--ink-2);
  text-decoration: none;
}

.cv-contact a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.cv-section {
  padding-top: 28px;
}

.cv-section h2 {
  margin-bottom: 14px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cv-section p {
  color: var(--ink-2);
  font-size: 0.98rem;
}

.cv-job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.cv-job-head h3 {
  font-size: 1.2rem;
}

.cv-when {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.cv-org {
  margin: 4px 0 14px;
  font-weight: 500;
}

.cv-points {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 1.1em;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
}

.cv-points li::marker {
  color: var(--accent);
}

.cv-skills {
  display: grid;
  gap: 0;
  margin: 0;
}

.cv-skills div {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.cv-skills dt {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.cv-skills dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.cv-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 640px) {
  .cv-contact {
    text-align: left;
  }

  .cv-skills div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .cv-two {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm 14mm 16mm;
  }

  :root {
    --ink: #000;
    --ink-2: #222;
    --ink-3: #555;
    --line: #ccc;
    --accent: #0b6e4f;
  }

  .cv-tools {
    display: none !important;
  }

  .cv-page {
    padding: 0;
  }

  .cv {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .cv-points li,
  .cv-skills div {
    break-inside: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
