/* CV design B (modern): web page on screen, two A4 sheets in print / PDF.
   Screen and print layouts live in separate media blocks so that no screen rule
   (including the phone layout) can leak into Ctrl+P at any browser zoom. */
@font-face { font-family: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-latin-400.woff2') format('woff2'); font-weight: 400; 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: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-latin-500.woff2') format('woff2'); font-weight: 500; 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: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-latin-600.woff2') format('woff2'); font-weight: 600; 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: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-latin-700.woff2') format('woff2'); font-weight: 700; 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: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-latin-800.woff2') format('woff2'); font-weight: 800; 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: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-latin-ext-400.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-latin-ext-500.woff2') format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-latin-ext-600.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-latin-ext-700.woff2') format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans/PlusJakartaSans-latin-ext-800.woff2') format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #56636B;
  --text-2: #3D4A52;
  --accent: #0F766E;
  --tint: #EEF5F4;
  --chip-line: #CFE0DD;
  --rule: #D5E4E1;
  --card-line: #DCE8E6;
  --page: #EEF3F2;
  --foot: #5F6B72;
}

/* Shared: typography and components used by both layouts */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
h1, h2, h3, p, ul { margin: 0; }
a { color: inherit; text-decoration: none; }
sub { font-size: .72em; line-height: 0; vertical-align: -.2em; }
ul.bullets { padding-left: 18px; }
.bullets li::marker { color: var(--accent); }
.plain { padding: 0; list-style: none; }

.name { font-weight: 800; line-height: 1.05; }
.headline { font-weight: 600; color: var(--accent); }
.photo { display: block; border-radius: 50%; object-fit: cover; border: solid #fff; box-shadow: 0 0 0 2px var(--accent); }
.contacts { color: var(--text-2); }
.ci { width: 16px; height: 16px; flex: none; }
.label { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.sec-title { display: flex; align-items: center; gap: 14px; font-weight: 800; letter-spacing: -.01em; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.panel { background: var(--tint); display: grid; }
.panel-col { display: flex; flex-direction: column; }
.lang-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lang-row > span:first-child { font-weight: 600; }
.badge, .chip { background: #fff; border: 1px solid var(--chip-line); border-radius: 999px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.job-date, .edu-date { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.job-body { position: relative; min-width: 0; border-left: 2px solid var(--rule); }
.job-body::before { content: ""; position: absolute; left: -8px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }

.job h3 { font-weight: 700; }
.job h3 .org { font-weight: 500; color: var(--muted); }
.firms, .skill p, .edu-item p { color: var(--text-2); }
.skill h3, .edu-item h3 { font-weight: 700; }

/* ---------- Screen: web page ---------- */
@media screen {
  body { background: var(--page); font-size: 15px; line-height: 1.6; padding: 40px 16px 56px; }
  a:hover { color: var(--accent); }
  a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
  .print-only { display: none !important; }
  .skip-link { position: absolute; left: 12px; top: -100px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; }
  .skip-link:focus { top: 12px; color: #fff; }

  .cv { max-width: 960px; margin: 0 auto; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 16px 40px rgba(16, 24, 40, .08); }
  .topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 5% 0; }
  .lang-nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; font-weight: 700; }
  .lang-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; color: var(--text-2); }
  .lang-nav a:hover { background: var(--tint); color: var(--ink); }
  .lang-nav a[aria-current] { background: var(--ink); color: #fff; }
  .actions { display: flex; gap: 8px; }
  .icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 999px; border: 1px solid var(--chip-line); background: #fff; color: var(--accent); cursor: pointer; }
  .icon-btn svg { width: 20px; height: 20px; }
  .icon-btn:hover { background: var(--tint); color: var(--accent); }
  .icon-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
  .icon-btn--primary:hover { background: #0B5F58; color: #fff; }
  .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

  .head { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; padding: 32px 5% 8px; }
  .photo { width: 136px; height: 136px; border-width: 4px; }
  .head-text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
  .name { font-size: 46px; letter-spacing: -.03em; }
  .headline { font-size: 17px; }
  .contacts { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
  .contacts li, .contacts a { display: inline-flex; align-items: center; gap: 7px; }
  .contacts a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(15, 118, 110, .45); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
  .contacts a:hover { color: var(--accent); text-decoration-color: currentColor; }
  .contacts .ci { color: var(--accent); }
  .contact-note .ci { color: var(--muted); }

  .profile { padding: 28px 5% 0; }
  .profile .label { margin-bottom: 8px; }
  .profile p { font-size: 16.5px; line-height: 1.65; max-width: 760px; }
  .label { font-size: 13px; }

  .panel { margin: 28px 5% 0; border-radius: 14px; padding: 22px 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
  .panel-col { gap: 8px; }
  .panel-col .label { margin-bottom: 2px; }
  .badge { font-size: 13px; padding: 2px 10px; }
  .chip { font-size: 13px; padding: 3px 11px; }

  .sec-title { font-size: 22px; margin-bottom: 20px; }
  .exp { padding: 36px 5% 0; }
  .timeline-cont { padding: 0 5%; }
  .job { display: flex; flex-wrap: wrap; column-gap: 24px; }
  .job-date { flex: 0 0 140px; font-size: 14px; padding-top: 2px; }
  .job-body { flex: 1 1 360px; padding: 0 0 22px 22px; }
  .job-body::before { top: 5px; }
  .job h3 { font-size: 16px; }
  .firms { margin-top: 2px; }
  .job .bullets { margin-top: 4px; }
  .timeline-cont .job:last-child .job-body { padding-bottom: 4px; }

  .skills-sec { padding: 36px 5% 0; }
  .skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
  .skill { border: 1px solid var(--card-line); border-radius: 12px; padding: 16px 18px; }
  .skill h3 { font-size: 15px; margin-bottom: 4px; }
  .skill p { font-size: 14px; }

  .tools-sec, .edu-sec, .hobbies-sec { padding: 36px 5% 0; }
  .tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px 32px; }
  .tool-group h3 { margin-bottom: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
  .course-list { margin-top: 6px; font-size: 14px; color: var(--text-2); }
  .course-list li + li { margin-top: 2px; }
  .edu { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px 32px; }
  .edu-date { font-size: 14px; }
  .edu-item h3 { font-size: 16px; }
  .hobbies { display: flex; flex-wrap: wrap; gap: 14px 28px; }
  .hobbies li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
  .hobby-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--tint); color: var(--accent); }
  .hobby-icon svg { width: 20px; height: 20px; }

  .site-foot { margin-top: 40px; padding: 20px 5%; border-top: 1px solid #E3ECEA; font-size: 13px; color: var(--foot); }
}

/* Phones: one column, timeline date above its item */
@media screen and (max-width: 640px) {
  body { padding: 0; }
  .cv { border-radius: 0; box-shadow: none; }
  .topbar { padding: 14px 16px 0; }
  .head { gap: 18px; padding: 24px 16px 4px; }
  .photo { width: 112px; height: 112px; }
  .head-text { flex-basis: 100%; }
  .name { font-size: 36px; }
  .headline { font-size: 16px; }
  .contacts { flex-direction: column; gap: 4px; }
  .profile, .exp, .skills-sec, .tools-sec, .edu-sec, .hobbies-sec { padding-left: 16px; padding-right: 16px; }
  .profile p { font-size: 16px; }
  .panel { margin: 24px 16px 0; padding: 18px 16px; }
  .timeline-cont { padding: 0 16px; }
  .job-date { flex-basis: 100%; padding: 0 0 4px 0; }
  .job-body { padding-left: 18px; }
  .skills { grid-template-columns: minmax(0, 1fr); }
  .edu, .tools { grid-template-columns: minmax(0, 1fr); }
  .hobbies { gap: 12px 20px; }
  .site-foot { padding: 20px 16px; }
  /* print and download icons top right, next to the language pills */
  .topbar { flex-wrap: nowrap; gap: 8px; }
  .lang-nav { flex-wrap: nowrap; gap: 2px; }
  .lang-nav a { padding: 0 10px; }
  .actions { flex: none; margin-left: auto; gap: 6px; }
}

@media screen and (max-width: 360px) {
  .lang-nav a { padding: 0 8px; }
}

/* ---------- Print / PDF: two A4 sheets (794 × 1123 CSS px each) ---------- */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff; }
  body { font-size: 13px; line-height: 1.55; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .screen-only, .topbar, .skip-link, .site-foot { display: none !important; }

  /* Each sheet is exactly one page; the break between them sits between two experience items. */
  .sheet { width: 210mm; height: 296.8mm; overflow: hidden; display: flex; flex-direction: column; padding: 44px 56px 34px; break-after: page; }
  .sheet + .sheet { padding-top: 40px; break-after: auto; }

  .head { display: grid; grid-template-columns: minmax(0, 1fr) 124px; gap: 28px; align-items: center; }
  .photo { order: 2; width: 120px; height: 120px; border-width: 3px; }
  .head-text { display: flex; flex-direction: column; gap: 6px; }
  .name { font-size: 40px; letter-spacing: -.025em; }
  .headline { font-size: 14.5px; }
  .contacts { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); grid-auto-flow: column; column-gap: 20px; row-gap: 4px; font-size: 12.5px; }

  .ci { display: none; }
  .licence-row { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--chip-line); }
  .label { font-size: 12px; }
  .profile { margin-top: 22px; display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 20px; }
  .profile .label { margin-top: 2px; }
  .profile p { font-size: 13.5px; line-height: 1.6; }

  .panel { margin-top: 18px; border-radius: 12px; padding: 16px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
  .panel-col { gap: 6px; }
  .panel-col .label { margin-bottom: 2px; }
  .panel-hobbies { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid var(--chip-line); }
  .panel-hobbies .label { margin-right: 8px; }
  .badge { font-size: 12px; padding: 1px 9px; }
  .chip { font-size: 12px; padding: 2px 10px; }
  .chips { gap: 5px; }

  .sec-title { font-size: 18px; margin-bottom: 14px; }
  .exp { margin-top: 24px; }
  .page-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
  .page-head-name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
  .page-head-contact { font-size: 12.5px; color: var(--muted); }
  .timeline-cont { margin-top: 20px; }
  .job { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 20px; break-inside: avoid; }
  .job-date { font-size: 12.5px; padding-top: 1px; }
  .job-body { padding: 0 0 16px 20px; }
  .job-body::before { top: 3px; }
  .job:last-child .job-body { padding-bottom: 4px; }
  .job h3 { font-size: 14px; }
  .job .bullets { margin-top: 3px; padding-left: 16px; }
  .job .bullets li + li { margin-top: 2px; }

  .skills-sec { margin-top: 16px; }
  .skills-sec .sec-title { margin-bottom: 12px; }
  .skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
  .skill h3 { font-size: 13.5px; }
  .skill p { font-size: 12.5px; }

  .edu-sec { margin-top: 16px; }
  .hobbies-sec { display: none; }
  .edu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
  .edu-item { display: flex; flex-direction: column; gap: 1px; }
  .edu-date { font-size: 12.5px; }
  .edu-item h3 { font-size: 14px; }

  .qr { margin-top: 14px; display: flex; justify-content: flex-end; }
  .qr-grid { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px; }
  .qr-grid a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
  .qr-grid svg { display: block; width: 17mm; height: 17mm; }

  .page-foot { margin-top: auto; padding-top: 12px; font-size: 12px; color: var(--foot); text-align: right; }
}
