/* =====================================================================
   ALEX.T — онлайн-резюме (/ і /en/cv/). Analytical Minimalism.
   Один файл для обох мов, 404 і 410.
   0. Шрифт  1. Токени  2. База  3. Компоненти  4. Розділи
   5. Адаптив  6. Доступність  7. Друк (A4, один стовпець, ATS)
   ===================================================================== */

/* ---------- 0. Шрифт: Inter (SIL OFL 1.1, assets/fonts/OFL.txt), variable 400–700 ---------- */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  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: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/inter-symbols.woff2") format("woff2");
  unicode-range: U+2192, U+2248;
}

/* ---------- 1. Токени ---------- */
:root {
  /* палітра */
  --bg: #FAFAF9;            /* основний фон */
  --bg-2: #F3F3F0;          /* вторинний фон */
  --surface: #FFFFFF;       /* картки */
  --dark: #101623;          /* темні аналітичні картки */
  --accent: #2454CB;
  --accent-hover: #1C43A6;
  --accent-line: #C9D4F1;   /* тонка синя рамка */
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --muted-on-alt: #596274;  /* #667085 на #F3F3F0 = 4.46:1 (< AA); цей — 5.52:1 */
  --good: #28765C;
  --line: #E5E7EB;
  --line-strong: #D0D5DD;
  --on-dark: #FFFFFF;
  --on-dark-2: #C4CBD9;
  --on-dark-muted: #9AA4B8;
  --on-dark-line: rgba(255, 255, 255, .12);
  --on-dark-accent: #9DB4FF;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* типографіка */
  --fs-h1: clamp(34px, 1.6rem + 2.6vw, 54px);
  --fs-h2: clamp(26px, 1.25rem + 1.4vw, 36px);
  --fs-h3: clamp(20px, 1.15rem + .25vw, 22px);
  --fs-body: clamp(16px, .95rem + .1vw, 17px);
  --fs-lead: clamp(17px, 1rem + .2vw, 18px);
  --fs-card: 15px;
  --fs-sm: 14px;
  --fs-xs: 13px;
  --fs-kpi: clamp(40px, 2rem + 1.1vw, 48px);
  --fs-stat: clamp(24px, 1.3rem + .5vw, 28px);
  --lh: 1.65;

  /* відступи, сітка, форма */
  --gutter: clamp(16px, 3.2vw, 40px);
  --container: 1200px;
  --section-y: clamp(56px, 2.5rem + 4vw, 96px);
  --gap: clamp(16px, 1.6vw, 20px);
  --pad-card: clamp(20px, 2vw, 28px);
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;
  --topbar-h: 64px;
  --tap: 44px;
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --ease: .15s ease;
}

/* ---------- 2. База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--fs-body)/var(--lh) var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--font); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
p { margin: 0 0 .9em; }
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.print-only { display: none; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-md); z-index: 100; text-decoration: none; font-weight: 600; }
.skip:focus { top: 8px; color: #fff; }
.for-company { background: var(--accent); color: #fff; font-size: var(--fs-sm); padding: 8px 0; text-align: center; }

/* сторінки 404 / 410 */
.status-page { padding: clamp(56px, 10vw, 120px) 0; }
.status-page h1 { font-size: var(--fs-h2); margin-bottom: 12px; }

/* ---------- 3. Компоненти ---------- */

/* кнопки (a і button) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 20px; border-radius: var(--r-md);
  font: 600 15px/1.2 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
/* прозорий outline лишається видимим у forced-colors, коли box-shadow вимикається */
.btn:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--focus-ring); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--dark); }
.btn-light:hover { background: #E8ECF5; color: var(--dark); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.contact .btn:focus-visible, .kpi-card .btn:focus-visible { box-shadow: 0 0 0 2px var(--dark), 0 0 0 4px #fff; }

/* мітки */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 var(--fs-xs)/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--good); margin: 0; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.case-date { font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.tag { background: rgba(255, 255, 255, .1); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }

/* картка — спільна база */
.case, .step, .job, .skill, .note {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--pad-card); min-width: 0;
}

/* чипи */
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: var(--fs-sm); line-height: 1.4; padding: 5px 12px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }

/* числа */
.case-metrics b, .facts b, .kpi-value, .kpi-num, .num, .edu li span, .step-num, .job-date { font-variant-numeric: tabular-nums; }

/* таблиці */
.table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.45; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--bg); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--bg); }
tfoot th { color: var(--ink); font-weight: 700; border-top: 1px solid var(--line-strong); border-bottom: 0; background: var(--bg); }
.num { text-align: right; white-space: nowrap; }
table:has(th:nth-child(4)) td:first-child { white-space: nowrap; }  /* широкі фінансові таблиці: країна в один рядок */
.small { font-size: var(--fs-xs); line-height: 1.55; color: var(--muted); }

/* розкривні блоки */
details { margin-top: auto; border-top: 1px solid var(--line); }
details + details { margin-top: 0; }
summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--tap); padding: 10px 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: var(--fs-sm); color: var(--ink); transition: color var(--ease);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); color: var(--muted);
}
details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
summary:hover { color: var(--accent); }
summary:focus-visible { outline-offset: 2px; }
details[open] { padding-bottom: 8px; }
details > .small { margin: 8px 0 4px; }

/* маркований список */
.bullets { margin: 0; padding-left: 18px; color: var(--ink-2); }
.bullets li { margin-bottom: 8px; padding-left: 2px; }
.bullets li:last-child { margin-bottom: 0; }
.bullets li::marker { color: var(--accent); }

/* ---------- 4. Розділи ---------- */

/* шапка */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; border-radius: var(--r-md); }
.brand:hover { color: var(--ink); }
.brand-logo { width: 36px; height: 36px; border-radius: var(--r-md); display: block; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.brand-text small { color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; padding: 6px 10px; border-radius: var(--r-sm); white-space: nowrap; transition: color var(--ease), background-color var(--ease); }
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav a:focus-visible { outline-offset: -2px; }
.topbar-cta { display: flex; gap: 8px; flex: none; }

/* головний екран */
.hero { padding: clamp(40px, 1.5rem + 4vw, 80px) 0 clamp(40px, 1rem + 3vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.hero-id { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.avatar { width: clamp(80px, 4rem + 2vw, 104px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; flex: none; border: 1px solid var(--line); background: var(--bg-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); display: block; }
.hero h1 { font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 20px; }
.h1-accent { color: var(--accent); }
.lead { font-size: var(--fs-lead); line-height: 1.65; color: var(--ink-2); max-width: 620px; margin-bottom: 0; }
.lead + .lead { margin-top: 12px; }
.lead-2 { font-weight: 400; color: var(--ink); }
.hero-meta { color: var(--muted); font-size: 15px; margin: 14px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* темна KPI-картка */
.kpi-card { background: var(--dark); color: var(--on-dark); border-radius: var(--r-xl); padding: clamp(22px, 2.2vw, 32px); }
.kpi-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: var(--fs-sm); color: var(--on-dark-2); }
.kpi-main { margin: 20px 0 22px; }
.kpi-value { font-size: var(--fs-kpi); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.kpi-label { font-size: var(--fs-xs); line-height: 1.4; color: var(--on-dark-muted); margin-top: 6px; }
.kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 18px 0; border-top: 1px solid var(--on-dark-line); border-bottom: 1px solid var(--on-dark-line); }
.kpi-num { font-size: clamp(20px, 1.1rem + .4vw, 24px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.kpi-note { font-size: var(--fs-xs); line-height: 1.55; color: var(--on-dark-muted); margin: 16px 0 0; }
.kpi-note a { color: var(--on-dark-accent); }
.kpi-note a:hover { color: #fff; }
.kpi-card :focus-visible, .rules :focus-visible { outline-color: #fff; }

/* смуга фактів */
.facts { list-style: none; padding: 0; margin: clamp(40px, 4vw, 56px) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.facts li { padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.facts li + li { border-left: 1px solid var(--line); }
.facts b { font-size: var(--fs-stat); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.facts span { font-size: var(--fs-sm); line-height: 1.45; color: var(--muted); }

/* мотивація */
.motivation { padding: 0 0 var(--section-y); }
.motivation-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: clamp(16px, 4vw, 56px); align-items: start; }
.motivation h2 { font-size: clamp(24px, 1.2rem + 1vw, 30px); }
.motivation-text { border-left: 2px solid var(--accent); padding-left: clamp(16px, 2vw, 28px); }
.motivation-text p { color: var(--ink-2); max-width: 68ch; }
.motivation-text p:last-child { margin: 0; }

/* розділи */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); --muted: var(--muted-on-alt); }
.sec-head { max-width: 760px; margin-bottom: clamp(28px, 3vw, 40px); }
.sec-num { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.sec-head h2 { font-size: var(--fs-h2); letter-spacing: -0.025em; }
.sec-sub { color: var(--ink-2); margin: 12px 0 0; max-width: 68ch; }

/* кейси */
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.cases-1 { grid-template-columns: minmax(0, 1fr); }
.cases-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.print-project-row { display: contents; }
.cases + .cases, .case-feature + .cases { margin-top: var(--gap); }
.case { display: flex; flex-direction: column; }
.case-top h3 { font-size: var(--fs-h3); margin: 8px 0 18px; }
.case-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 16px 24px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.case-metrics div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.case-metrics b { font-size: var(--fs-stat); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; white-space: nowrap; }
.case-metrics span { font-size: var(--fs-xs); line-height: 1.4; color: var(--muted); }
.case-body { margin-bottom: 16px; }
.case-body:last-child { margin-bottom: 0; }
.case-body p { font-size: var(--fs-card); line-height: 1.6; color: var(--ink-2); }
.case-body p:last-child { margin-bottom: 0; }
.case-tags { margin: 0 0 16px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* головний кейс: метрики в ряд, як у звіті */
.case-feature .case-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 20px 0; }
.case-feature .case-metrics b { font-size: clamp(26px, 1.4rem + .8vw, 32px); }
.case-feature .case-metrics div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.case-feature .case-body { max-width: 820px; }

/* другорядні картки — нейтральний фон */
.case-insight { background: var(--bg); }

.numbers-note { margin: 28px 0 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--muted); max-width: 820px; padding-left: 16px; border-left: 2px solid var(--line-strong); }
.numbers-note b { color: var(--ink); }

/* як працював */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.step-num { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.step h3 { font-size: var(--fs-h3); margin: 10px 0; }
.step p { font-size: var(--fs-card); line-height: 1.6; color: var(--ink-2); margin: 0; }
.rules { margin-top: var(--gap); background: var(--dark); color: var(--on-dark); border-radius: var(--r-xl); padding: var(--pad-card); }
.rules h3 { font-size: 18px; color: var(--on-dark); margin-bottom: 8px; }
.rule-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.rule-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--on-dark-line); font-size: var(--fs-card); align-items: center; }
.rule-list .if { color: var(--on-dark-2); }
.rule-list .then { font-weight: 600; color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid var(--on-dark-line); padding: 4px 12px; border-radius: 999px; font-size: var(--fs-xs); white-space: nowrap; }
.rule-list .then::before { content: "→ "; color: var(--on-dark-accent); }

/* досвід */
.timeline { display: grid; gap: 12px; }
.job { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
/* основне місце роботи: акцентна смуга всередині картки, обрізана її радіусом (без артефакту на куті) */
.job-main { position: relative; overflow: hidden; border-color: var(--accent-line); }
.job-main::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); }
.job-meta { display: flex; flex-direction: column; gap: 4px; }
.job-date { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.job-co { font-size: 17px; font-weight: 700; line-height: 1.27; letter-spacing: -0.01em; }
.job h3 { font-size: clamp(18px, 1.05rem + .2vw, 20px); margin-bottom: 12px; }
.job p { color: var(--ink-2); margin: 0; }

/* навички */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.skill-main { border-color: var(--accent-line); }
.skill h3 { font-size: 18px; margin-bottom: 14px; }
.skill p { color: var(--ink-2); font-size: var(--fs-card); line-height: 1.6; margin: 0; }
.skill-main .tags li { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--accent); }
.edu { margin-top: clamp(32px, 3vw, 48px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.edu h3 { font-size: 18px; margin-bottom: 12px; grid-row: 1; }
.edu ul { list-style: none; padding: 0; margin: 0; grid-row: 2; }
.edu-lang { margin-top: 0; }
.edu li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-strong); color: var(--ink-2); font-size: var(--fs-card); }
.edu li span { color: var(--muted); }

/* нотатки (картки без посилань, поки статті недоступні) */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--gap); }
.note { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.note h3 { font-size: var(--fs-h3); line-height: 1.25; }
.note p { color: var(--ink-2); font-size: var(--fs-card); line-height: 1.6; margin: 0; }

/* контакт і футер */
.contact { background: var(--dark); color: var(--on-dark); padding: var(--section-y) 0; }
.contact-in { max-width: 760px; }
.contact h2 { font-size: clamp(30px, 1.5rem + 2vw, 44px); color: var(--on-dark); letter-spacing: -0.03em; margin-bottom: 16px; }
.contact p { color: var(--on-dark-2); font-size: var(--fs-lead); }
.contact .contact-extra { font-size: var(--fs-sm); margin-top: 16px; }
.contact-extra a { color: var(--on-dark-accent); }
.contact-extra a:hover { color: #fff; }
.contact :focus-visible, .footer :focus-visible { outline-color: #fff; }
.contact .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.contact .btn-ghost:hover { border-color: #fff; color: #fff; }
.footer { background: var(--dark); color: var(--on-dark-muted); font-size: var(--fs-sm); border-top: 1px solid var(--on-dark-line); }
.footer-in { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.footer a { color: var(--on-dark-2); text-decoration: none; }
.footer a:hover { color: #fff; }

/* поява при скролі (resume.js) — лише прозорість */
.reveal { opacity: 0; transition: opacity .4s ease; }
.reveal.in { opacity: 1; }

/* ---------- 5. Адаптив ---------- */
@media screen and (max-width: 1120px) {
  :root { --topbar-h: 108px; }
  .topbar-in { flex-wrap: wrap; row-gap: 0; min-height: 0; padding-top: 10px; }
  .topbar-cta { margin-left: auto; }
  /* навігація — другий рядок, горизонтальна прокрутка; край з підказкою, що є ще пункти */
  .nav {
    order: 3; flex-basis: 100%; min-width: 0; gap: 2px;
    margin: 6px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 6px calc(var(--gutter) - 10px);
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { min-height: 40px; font-size: 15px; }
}
@media screen and (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .lead { max-width: 680px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cases-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-list { grid-template-columns: minmax(0, 1fr); }
  .motivation-in { grid-template-columns: minmax(0, 1fr); }
  .case-feature .case-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .case-feature .case-metrics div + div { border-left: 0; padding-left: 0; }
}
@media screen and (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li { padding: 16px; }
  .facts li:nth-child(3) { border-left: 0; }
  .facts li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .job { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .edu { grid-template-columns: minmax(0, 1fr); }
  .edu h3, .edu ul { grid-row: auto; }
  .edu-lang { margin-top: 28px; }
}
@media screen and (max-width: 680px) {
  :root { --topbar-h: 104px; }
  .brand-text small { display: none; }
  .steps, .cases, .cases-3, .skills { grid-template-columns: minmax(0, 1fr); }
  .case-feature .case-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-list li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .rule-list .then { white-space: normal; }
  .footer-in { flex-direction: column; }
  .btn { white-space: normal; text-align: center; }
  .topbar .btn { white-space: nowrap; }
  .nav a { min-height: var(--tap); }
}
@media screen and (max-width: 420px) {
  .brand-text { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .kpi-row { gap: 10px; }
  .kpi-head { flex-wrap: wrap; }
  .edu li { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
}

/* ---------- 6. Доступність ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; }
}
@media (forced-colors: active) {
  .btn, .tags li, .rule-list .then, .tag { border: 1px solid CanvasText; }
  .job-main::before, .eyebrow .dot { background: Highlight; forced-color-adjust: none; }
  .nav { -webkit-mask-image: none; mask-image: none; }
  :focus-visible { outline-color: Highlight; }
}

/* =================================================================
   7. ДРУК / "Зберегти PDF" — A4, Swiss Minimalism: ліва темна колонка + досвід (макет .cv-print з resume.js).
   Публічних PDF і кнопок PDF на сайті немає; PDF генерується локально: bash scripts/make-pdf.sh.
   ================================================================= */
@page { size: A4; margin: 0; }
/* PDF — Swiss Minimalism: ліва темна колонка 32 % + права біла 68 %.
   Друкується лише .cv-print, який assets/resume.js збирає з елементів цієї ж сторінки. */
.cv-print { display: none; }
@media print {
  /* фон сторінки: темна смуга 32 % ліворуч на кожній сторінці (жорстка межа, не градієнт) */
  html { background: linear-gradient(to right, #111B38 0 32%, #FFFFFF 32% 100%) !important; }
  body { width: auto; min-width: 0; margin: 0; background: transparent !important; }
  body > :not(.cv-print) { display: none !important; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

  .cv-print {
    --cv-side: #111B38; --cv-accent: #2454CB; --cv-head-dark: #9DB7FF;
    --cv-ink: #101828; --cv-muted: #667085; --cv-line: #D8DDE6;
    display: grid; grid-template-columns: 32% 68%; align-items: start;
    font: 400 10pt/1.32 var(--font); color: var(--cv-ink); -webkit-font-smoothing: antialiased;
  }
  .cv-side, .cv-main { box-decoration-break: clone; -webkit-box-decoration-break: clone; }
  .cv-side { padding: 11mm 6.5mm 10mm 8mm; color: #E6EAF3; }
  .cv-main { padding: 11mm 10mm 10mm 8mm; }
  .cv-print a { color: inherit; text-decoration: none; }
  .cv-print p { margin: 0 0 1.4mm; orphans: 2; widows: 2; }
  .cv-print ul { list-style: none; margin: 0; padding: 0; }

  /* заголовки розділів: uppercase, тонка лінія */
  .cv-sec { margin-top: 5mm; }
  .cv-h { font-size: 10pt; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 2.2mm; padding-bottom: 1.2mm; border-bottom: .5pt solid var(--cv-line); color: var(--cv-accent); break-after: avoid; }
  .cv-side .cv-h { color: var(--cv-head-dark); border-bottom-color: rgba(157, 183, 255, .28); }
  .cv-muted { color: #A9B3C7; }

  /* --- ліва колонка --- */
  .cv-side .avatar { display: block; width: 30mm; height: 30mm; border: 0; border-radius: 50%; overflow: hidden; margin: 0 0 4mm; }
  .cv-side .avatar img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
  .cv-name { font-size: 23pt; font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; color: #fff; margin: 0 0 1.5mm !important; }
  .cv-role { font-size: 10.5pt; font-weight: 600; color: var(--cv-head-dark); margin: 0 !important; }
  .cv-contacts li { font-size: 9pt; line-height: 1.35; margin-bottom: 1.2mm; overflow-wrap: anywhere; }
  .cv-contacts a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: 1.5pt; }
  .cv-kpi-cap { font-size: 8.5pt; color: #A9B3C7; margin-bottom: 2mm !important; }
  .cv-kpi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5mm 3mm; }
  .cv-kpi div { display: flex; flex-direction: column; min-width: 0; }
  .cv-kpi b { font-size: 18pt; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .cv-kpi span { font-size: 8pt; line-height: 1.25; color: #A9B3C7; margin-top: .6mm; }
  .cv-facts { margin-top: 3mm !important; }
  .cv-facts li { font-size: 8.5pt; line-height: 1.3; color: #C9D0DE; padding: .9mm 0; border-top: .5pt solid rgba(255, 255, 255, .12); }
  .cv-facts b { color: #fff; font-weight: 600; }
  .cv-skill { margin-bottom: 2mm; break-inside: avoid; }
  .cv-skill h3 { font-size: 9pt; font-weight: 600; color: #fff; margin: 0 0 .5mm; }
  .cv-skill p { font-size: 8.5pt; line-height: 1.3; color: #C9D0DE; margin: 0 !important; }
  .cv-list li { display: grid; grid-template-columns: 17mm minmax(0, 1fr); gap: 2mm; font-size: 8.5pt; line-height: 1.3; color: #C9D0DE; padding: .9mm 0; border-top: .5pt solid rgba(255, 255, 255, .12); }
  .cv-list li:first-child { border-top: 0; padding-top: 0; }
  .cv-list b { color: #fff; font-weight: 600; }

  /* --- права колонка --- */
  .cv-main > .cv-sec:first-child { margin-top: 0; }
  .cv-main p { font-size: 10pt; line-height: 1.32; }
  .cv-job { padding: 2.6mm 0 2.4mm; border-top: .5pt solid var(--cv-line); break-inside: avoid; }
  .cv-job:first-of-type { border-top: 0; padding-top: 0; }
  .cv-job-main { break-inside: auto; }
  .cv-job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4mm; }
  .cv-job-head h3 { font-size: 11pt; font-weight: 600; line-height: 1.25; margin: 0; }
  .cv-date { flex: none; font-size: 9pt; color: var(--cv-muted); white-space: nowrap; text-align: right; }
  .cv-co { font-size: 10pt; font-weight: 600; color: var(--cv-accent); margin: .3mm 0 1.2mm !important; }
  .cv-bullets { margin: 1mm 0 0 !important; }
  .cv-bullets li { position: relative; padding-left: 3.6mm; font-size: 10pt; line-height: 1.32; margin-bottom: .9mm; }
  .cv-bullets li::before { content: ""; position: absolute; left: .4mm; top: .62em; width: 1.4mm; height: 1.4mm; border-radius: 50%; background: var(--cv-accent); }
  .cv-cases li { font-size: 9.5pt; }
  .cv-cases b { font-weight: 600; }
  .cv-note { font-size: 8.5pt !important; line-height: 1.3 !important; color: var(--cv-muted); margin: 1.5mm 0 0 !important; }
  .cv-more { margin-top: 4mm !important; padding-top: 2mm; border-top: .5pt solid var(--cv-line); font-size: 9.5pt !important; color: var(--cv-muted); }
  .cv-more a { color: var(--cv-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 1.5pt; }
}
