@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('fonts/inter-tight-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('fonts/inter-tight-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; }

:root {
  --ink: #2d2d2d;
  --ink-50: rgba(45, 45, 45, .5);
  --ink-10: rgba(45, 45, 45, .1);
  --line: #cbcbcb;
  --gutter: 19px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: #fff;
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.21;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { display: block; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Кнопки и метки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 30px;
  border: 1px solid var(--line); border-radius: 20px;
  background: #fff;
  font-size: 20px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  flex: none;
  transition: border-color .15s ease;
}
.btn:hover { border-color: var(--ink); }
.btn-icon { width: 46px; padding: 0; }
.pill {
  display: inline-flex; align-items: center;
  min-height: 39px; padding: 10px 20px; border-radius: 20px;
  font-size: 16px; font-weight: 600; line-height: 1.2;
}
.pill-level { background: var(--ink-50); color: #fff; }
.pill-skill { background: var(--ink-10); }

/* Шапка всегда на месте, контент уходит под неё и растворяется в градиенте */
.top {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: center; gap: 16px;
  padding: 41px var(--gutter) 10px;
  background: linear-gradient(#fff, rgba(255, 255, 255, 0));
  pointer-events: none;
}
.top .btn { pointer-events: auto; }

/* Сетка */
.page { padding: 39px var(--gutter) 64px; }
.intro { margin-bottom: 39px; }

/* Имя: на телефоне фото в строке с именем, должность ниже */
.name {
  position: relative;
  font-size: min(47px, calc((100vw - 2 * var(--gutter)) * .129));
}
.photo {
  position: absolute; left: 0; top: .05em;
  width: .936em; height: .936em;
  border: 1px solid var(--line); border-radius: 20px;
  object-fit: cover;
}
h1 { font-size: inherit; font-weight: 500; line-height: 1.05; text-indent: 1.21em; }
.dim { color: var(--ink-50); display: block; text-indent: 0; }
.levels { display: flex; gap: 10px; margin-top: 20px; }
.lead { font-size: 20px; line-height: 1.25; margin-top: 20px; }
.skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* Места работы */
.job { display: flex; flex-direction: column; gap: 22px; }
.job + .job { margin-top: 32px; }
.job::after { content: ''; width: 234px; max-width: 100%; border-top: 1px solid #000; }
.job-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; }
.job-logo { flex: 0 1 auto; min-width: 0; }
.job-logo img { max-width: 100%; height: auto; max-height: 41px; }
.company { display: flex; flex-direction: column; gap: 3px; }
.company h2 { font-size: 20px; font-weight: 500; line-height: 1.25; }
.role { font-size: 18px; }
.tasks { display: flex; flex-direction: column; gap: 12px; }

/* Телефоны уже макета: шапка должна остаться в одну строку */
@media (max-width: 401px) {
  .top { gap: 8px; }
  .top .btn:not(.btn-icon) { padding-inline: 20px; }
}
@media (max-width: 339px) {
  :root { --gutter: 16px; }
  .top .btn:not(.btn-icon) { padding-inline: 14px; font-size: 18px; }
  .job-head .btn { padding-inline: 20px; }
}

/* Планшет: одна колонка, заголовок и размеры как на десктопе */
@media (min-width: 768px) {
  :root { --gutter: 48px; }
  .top { gap: 26px; padding-bottom: 0; }
  .page { padding-top: 72px; padding-bottom: 96px; }
  .intro { margin-bottom: 64px; }
  .name { display: flex; align-items: center; gap: 16px; font-size: 56px; }
  .photo { position: static; flex: none; width: 50px; height: 50px; }
  h1 { text-indent: 0; }
  .dim { display: inline; }
  .levels { margin-top: 17px; }
  .pill { min-height: 44px; padding-inline: 30px; font-size: 20px; }
  .lead { font-size: 24px; margin-top: 40px; max-width: 844px; }
  .skills { margin-top: 34px; row-gap: 22px; max-width: 800px; }
  .jobs { max-width: 720px; }
  .company h2 { font-size: 24px; }
  .role { font-size: 20px; }
}

/* Десктоп: две колонки, как в макете 1728 */
@media (min-width: 1200px) {
  :root {
    --gutter: clamp(48px, calc(48px + (100vw - 1200px) * .1818), 144px);
    --page-top: clamp(72px, 10.2vw, 177px);
  }
  .page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 468px;
    column-gap: clamp(48px, 4.17vw, 72px);
    align-items: start;
    max-width: 1728px; margin-inline: auto;
    padding-top: var(--page-top);
    padding-bottom: 87px;
  }
  .intro { margin: -19px 0 0; }
  .name { font-size: clamp(48px, 3.7vw, 64px); }
  .lead { font-size: clamp(21px, 1.39vw, 24px); }
  .jobs { max-width: none; }
}
@media (min-width: 1200px) and (min-height: 700px) {
  /* Левый блок стоит ровно там, где был при загрузке: 87 — высота шапки, 19 — сдвиг из макета */
  .intro { position: sticky; top: calc(87px + var(--page-top) - 19px); }
}
@media (min-width: 1200px) and (max-width: 1339px) {
  .pill { min-height: 39px; padding-inline: 20px; font-size: 16px; }
}

@media print {
  .top { display: none; }
}
