/* cv.karha.ru — resume pages. Uses tokens and fonts from site.css; built to print on A4 as well. */

.cv-wrap { max-width: 860px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.cv-switch { background: var(--night); border-bottom: 1px solid var(--night-line); }
.cv-switch .cv-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding-block: 12px; font-size: 14px; }
.cv-switch a { color: var(--night-muted); text-decoration: none; }
.cv-switch a:hover, .cv-switch a:focus-visible, .cv-switch a[aria-current] { color: var(--morning); outline: none; }
.cv-switch .home { color: var(--night-ink); font-family: var(--font-display); letter-spacing: 0.04em; margin-right: auto; }

.cv { background: var(--surface); margin: 32px auto 48px; border: 1px solid var(--line); border-radius: 12px; padding: 40px 44px 44px; }
.cv-head { display: grid; gap: 8px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.cv-head h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.12; }
.cv-role { font-size: 18px; font-weight: 600; color: var(--accent); }
.cv-tagline { color: var(--muted); font-style: italic; }
.cv-contacts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; color: var(--muted); margin-top: 4px; }
.cv-contacts a { text-decoration: none; }
.cv-contacts a:hover { text-decoration: underline; }
.cv-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.cv-pdf { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--surface); text-decoration: none; font-weight: 600; font-size: 14px; }
.cv-pdf:hover, .cv-pdf:focus-visible { background: var(--accent); outline: none; }

.cv section { margin-top: 26px; }
.cv h2 { font-family: var(--font-display); font-size: 17px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cv h3 { font-size: 17px; font-weight: 600; margin-top: 16px; }
.cv h4 { font-size: 15.5px; font-weight: 600; margin-top: 14px; }
.cv .when { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-top: 2px; }
.cv p { margin-top: 8px; }
.cv ul { margin-top: 8px; padding-left: 20px; display: grid; gap: 5px; }
.cv li b, .cv p b { font-weight: 600; }
.cv .note { color: var(--muted); font-size: 15px; }

.cv-skills { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; }
.cv-skills th { text-align: left; vertical-align: top; width: 11.5em; padding: 7px 14px 7px 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.cv-skills td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.cv-skills tr:last-child td { border-bottom: 0; }

@media (max-width: 640px) {
  .cv { padding: 24px 18px 28px; margin: 16px auto 32px; border-radius: 10px; }
  .cv-skills th { display: block; width: auto; padding-bottom: 0; }
  .cv-skills td { display: block; }
}

@page { size: A4; margin: 14mm 14mm 16mm; }
@media print {
  :root { color-scheme: light; --bg: #fff; --surface: #fff; --ink: #111; --muted: #444; --line: #ccc; --accent: #1f4fb0; }
  body { background: #fff; font-size: 9.6pt; line-height: 1.42; }
  .cv-head { gap: 4px; padding-bottom: 12px; }
  .cv-head h1 { font-size: 22pt; }
  .cv-role { font-size: 12.5pt; }
  .cv-contacts { font-size: 9.6pt; }
  .cv section { margin-top: 12px; }
  .cv h2 { font-size: 11pt; padding-bottom: 3px; }
  .cv h3 { font-size: 11pt; margin-top: 9px; }
  .cv h4 { font-size: 10pt; margin-top: 8px; }
  .cv .when { font-size: 8.5pt; }
  .cv p { margin-top: 4px; }
  .cv ul { margin-top: 4px; gap: 2px; padding-left: 16px; }
  .cv-skills { font-size: 9.4pt; margin-top: 6px; }
  .cv-skills th, .cv-skills td { padding-top: 3px; padding-bottom: 3px; }
  .cv-switch, .cv-actions, .skip { display: none !important; }
  .cv { border: 0; margin: 0; padding: 0; border-radius: 0; max-width: none; }
  .cv-wrap { max-width: none; padding: 0; }
  .cv section { break-inside: auto; }
  .cv h2, .cv h3, .cv h4 { break-after: avoid; }
  .cv li, .cv-skills tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
