/* saul.by – «Журнал» (терминал). Тёмная и светлая темы, одна вёрстка на
   все экраны: телефон, планшет, ноутбук, Full HD, 2K, 4K.

   Как растёт: все размеры в rem, а сам rem – от ширины окна:
   до ~1440 px это 16 px, на Full HD ~19, на 2K ~23, на 4K (масштаб 100%)
   ~31. Растёт мягче экрана: на 4K не мелочь посреди пустоты и не строки
   во весь монитор. Ширина содержимого ограничена в rem, поэтому растёт
   вместе с текстом. */

@font-face { font-family: "JetBrains Mono"; src: url(/assets/fonts/JetBrainsMono.woff2) format("woff2"); font-weight: 100 800; font-display: block; }
@font-face { font-family: "Golos Text"; src: url(/assets/fonts/GolosText.woff2) format("woff2"); font-weight: 400 900; font-display: block; }
/* Китайский – только когда на странице есть иероглифы (unicode-range):
   на остальных языках браузер его не скачивает */
@font-face { font-family: "Noto Sans SC"; src: url(/assets/fonts/NotoSansSC.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+3000-303F, U+4E00-9FFF, U+FF00-FFEF; }
/* Остальные письменности (языки добавляются в админке) – свои шрифты Noto.
   unicode-range: браузер скачивает шрифт, только если на странице есть его
   буквы. Японский и корейский (по 3,5–4 МБ) – только на своих страницах,
   в общем наборе их нет: иначе «日本語» в списке языков тянул бы 4 МБ */
@font-face { font-family: "Noto Sans Ext"; src: url(/assets/fonts/NotoSans.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0370-03FF, U+1F00-1FFF, U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+0300-0301, U+0303, U+0309, U+0323, U+018F, U+0259; }
@font-face { font-family: "Noto Sans Georgian"; src: url(/assets/fonts/NotoGeorgian.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+10A0-10FF, U+1C90-1CBF, U+2D00-2D2F; }
@font-face { font-family: "Noto Sans Armenian"; src: url(/assets/fonts/NotoArmenian.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0530-058F, U+FB13-FB17; }
@font-face { font-family: "Noto Sans Devanagari"; src: url(/assets/fonts/NotoDevanagari.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0900-097F, U+A8E0-A8FF, U+1CD0-1CFF, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Arabic"; src: url(/assets/fonts/NotoArabic.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Noto Sans Hebrew"; src: url(/assets/fonts/NotoHebrew.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0590-05FF, U+FB1D-FB4F; }
@font-face { font-family: "Noto Sans Thai"; src: url(/assets/fonts/NotoThai.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0E00-0E7F; }
@font-face { font-family: "Noto Sans JP"; src: url(/assets/fonts/NotoJP.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+3000-30FF, U+31F0-31FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF; }
@font-face { font-family: "Noto Sans KR"; src: url(/assets/fonts/NotoKR.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF; }

:root, [data-theme="dark"] {
  --bg: #0e1011; --panel: #15181a; --text: #e7e3d9; --muted: #8f8b81; --line: #2a2d30;
  --acc: #f2b544; --on-acc: #0e1011;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f5ef; --panel: #ffffff; --text: #1b1a17; --muted: #625e55; --line: #dcd8cd;
  --acc: #8f5600; --on-acc: #ffffff;
  color-scheme: light;
}

html { font-size: clamp(16px, calc(0.62vw + 7px), 32px); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  --scripts: "Noto Sans SC", "Noto Sans Ext", "Noto Sans Georgian", "Noto Sans Armenian", "Noto Sans Devanagari", "Noto Sans Thai", "Noto Sans Arabic", "Noto Sans Hebrew";
  --mono: "JetBrains Mono", var(--scripts), ui-monospace, monospace;
  --sans: "Golos Text", var(--scripts), system-ui, sans-serif;
  font-family: var(--mono); font-size: 0.875rem; line-height: 1.5;
}
[data-lang="zh"] body, html[data-lang="zh"] { --sans: "Noto Sans SC", "Golos Text", system-ui, sans-serif; }
[data-lang="ja"] body { --sans: "Golos Text", "Noto Sans JP", system-ui, sans-serif; --mono: "JetBrains Mono", "Noto Sans JP", ui-monospace, monospace; }
[data-lang="ko"] body { --sans: "Golos Text", "Noto Sans KR", system-ui, sans-serif; --mono: "JetBrains Mono", "Noto Sans KR", ui-monospace, monospace; }
a { color: inherit; text-decoration: none; }
:where(html:not(.touch)) a:hover { text-decoration: underline; }
.acc { color: var(--acc); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; line-height: 1.7; }
/* Внешняя ссылка в тексте (сертификат, публикация, организация): тонкая
   черта; при наведении поверх неё слева направо прорисовывается акцентная
   (на длинном названии – строка за строкой), стрелка ↗ чуть уходит вверх-вправо.
   Черта – фоном, а не border: так она идёт под каждой строкой переноса */
.ext { padding-bottom: 1px;
  background: linear-gradient(var(--acc), var(--acc)) 0 100% / 0 1px no-repeat, linear-gradient(var(--line), var(--line)) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.6s cubic-bezier(.2, .7, .2, 1), color 0.3s ease; }
.ext > [aria-hidden] { display: inline-block; transition: transform 0.35s cubic-bezier(.2, .7, .2, 1); }
:where(html:not(.touch)) .ext:hover { text-decoration: none; color: var(--acc); background-size: 100% 1px, 100% 1px; }
:where(html:not(.touch)) .ext:hover > [aria-hidden] { transform: translate(0.12em, -0.12em); }
@media (prefers-reduced-motion: reduce) { .ext, .ext > [aria-hidden] { transition: none; } }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
/* Переход по ссылке на раздел – с воздухом сверху и с запасом под
   приклеенную шапку (~4.6rem), чтобы её ничего не накрывало */
main [id], footer[id] { scroll-margin-top: 5.5rem; }

/* ---------- шапка ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1.75rem;
  /* Линия под шапкой – во всю ширину, а содержимое – по сетке страницы */
  padding: 1.75rem max(6rem, calc((100vw - 105rem) / 2 + 6rem)); border-bottom: 1px solid var(--line);
}
.logo { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.nav { display: flex; gap: 1.75rem; color: var(--muted); white-space: nowrap; flex: none; }
/* Пункты меню не влезли в строку (разделов больше, язык длиннее) – шапка
   сама переходит на кнопку меню, как на планшете. Класс ставит скрипт
   сразу после шапки (site.php), он же снимает его, когда место есть */
.top.nav-tight .nav:not(.open) { display: none; }
.top.nav-tight .burger { display: inline-flex; }
.top.nav-tight .nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
  background: var(--bg); border-bottom: 1px solid var(--line); padding: 0.5rem max(6rem, calc((100vw - 105rem) / 2 + 6rem)) 1rem; z-index: 5; }
.top.nav-tight .nav.open a { padding: 0.75rem 0; align-self: flex-start; }
.tools { display: flex; align-items: center; gap: 0.625rem; --ctl: 2.25rem; }
/* Язык, тема и меню – кнопки одной высоты (--ctl): на компьютере
   2.25rem, на планшете и телефоне – 2.75rem, под палец */
.tools .btn-ghost { height: var(--ctl); }
/* Выбор языка: кнопка «[RU] ▾» одной ширины на всех языках и список под
   ней – код и название на самом языке. Список растёт вниз и прокручивается,
   поэтому хоть 20 языков – шапка та же */
.lang-pick { position: relative; }
.lang-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-width: 7.5ch; list-style: none; user-select: none; }
.lang-btn::-webkit-details-marker { display: none; }
.lang-cur { white-space: nowrap; }
/* Стрелка – шеврон тонкой линией; при открытии разворачивается */
.chev { width: 0.75em; height: 0.75em; flex: none; color: var(--muted); transition: transform 0.25s cubic-bezier(.2, .7, .2, 1), color 0.2s ease; }
.lang-pick[open] .chev { color: var(--acc); }
:where(html:not(.touch)) .lang-btn:hover .chev { color: var(--acc); }
.lang-pick[open] .chev { transform: rotate(180deg); }
.lang-pick[open] .lang-btn { border-color: var(--acc); }
.langs {
  position: absolute; inset-inline-end: 0; top: calc(100% + 0.4rem); z-index: 60; min-width: 13rem; max-width: calc(100vw - 2rem);
  max-height: min(70vh, 26rem); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; padding: 0.3rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 0.75rem 2rem -0.75rem rgba(0, 0, 0, 0.45);
  font-size: 0.8125rem;
}
.langs a { display: flex; align-items: baseline; gap: 1rem; padding: 0.45rem 0.7rem; border-radius: 5px; color: var(--text); }
:where(html:not(.touch)) .langs a:hover { text-decoration: none; background: color-mix(in srgb, var(--acc) 12%, transparent); }
.lang-code { min-width: 3.5ch; color: var(--muted); }
.lang-name { font-family: var(--sans); }
.langs .on .lang-code, .langs .on .lang-name { color: var(--acc); }
.btn-ghost {
  height: 2.25rem; padding: 0 0.75rem; border: 1px solid var(--line); border-radius: 6px;
  background: transparent; color: var(--text); font: inherit; font-size: 0.75rem; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
/* Наведение – как у остальных кнопок: рамка и текст акцентом */
:where(html:not(.touch)) .btn-ghost:hover { border-color: var(--acc); color: var(--acc); }
.btn-ghost:active { background: color-mix(in srgb, var(--acc) 10%, transparent); }
/* Кнопка темы – одной ширины на всех языках и в обеих темах («тема:
   тёмная», «Design: dunkel»…): иначе от её смены прыгали языки рядом */
.theme { width: calc(15ch + 1.5rem); justify-content: center; white-space: nowrap; }
.theme-ico { display: none; }
.theme-ico svg { display: block; transition: transform 0.45s cubic-bezier(.2, .7, .2, 1); }
.theme:active .ico-sun { transform: rotate(45deg); }
:where(html:not(.touch)) .theme:hover .ico-sun { transform: rotate(45deg); }
.theme:active .ico-moon { transform: rotate(-20deg); }
:where(html:not(.touch)) .theme:hover .ico-moon { transform: rotate(-20deg); }
:root[data-theme="light"] .ico-moon, :root:not([data-theme="light"]) .ico-sun { display: none; }
@media (prefers-reduced-motion: reduce) { .theme-ico svg { transition: none; } }
.burger { display: none; width: var(--ctl); height: var(--ctl); padding: 0; align-items: center; justify-content: center; }

/* ---------- содержимое ---------- */
.wrap { --wrap-top: 4.5rem; --gap-y: 6.5rem; max-width: 105rem; margin: 0 auto; padding: var(--wrap-top) 6rem 0; display: flex; flex-direction: column; gap: var(--gap-y); }
.cmd { font-size: 0.9375rem; color: var(--muted); }
.cmd.gap { padding-top: 1rem; }
.cmd.head { padding-bottom: 1.5rem; }

/* Карточка справа – не уже 20rem: на 1100–1300 (планшет лёжа) треть
   ширины – это ~290px, и почта рвалась посреди слова */
/* Карточка – 2/7 ширины (была треть): на 2K справа от фото пустело
   (владелец, 01.10.2026) */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(20rem, 2fr); gap: 3rem; align-items: center; }  /* карточка с фото – по центру высоты шапки (владелец, 03.10.2026); 5fr/2fr – карточка 2/7 ширины, как до сегодняшнего уширения текста (владелец, 08.11.2026: «форму шире, примерно как была») */
.hero-main { display: flex; flex-direction: column; gap: 1.25rem; }
h1 { margin: 0; font-family: var(--sans); font-size: 5rem; line-height: 1; font-weight: 600; letter-spacing: -0.025em; }
/* Полное ФИО – имя в две строки, кегль меньше, чтобы шапка не раздулась */
h1.fio { font-size: 4rem; }
/* Строка условий под именем: мельче основного текста и не шире текста
   «о себе» – не выпирает вправо (владелец, 08.11.2026) */
.sub { font-size: 0.9375rem; color: var(--muted); max-width: 46rem; }
/* Статус поиска работы в строке под именем: точка как у сервиса –
   ищу: зелёная, дышит; не ищу: серая, текст остаётся приглушённым */
.js-dot { display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.45em; border-radius: 50%; vertical-align: 0.06em; }
.js-dot.on { background: #3fb950; animation: js-beat 2.4s ease-out infinite; }
.js-dot.off { background: var(--muted); opacity: 0.55; }
@keyframes js-beat { 0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.45); } 70% { box-shadow: 0 0 0 0.5em rgba(63, 185, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); } }
@media (prefers-reduced-motion: reduce) { .js-dot.on { animation: none; } }
.motto { margin: 0; font-family: var(--sans); font-size: 2.25rem; line-height: 1.2; font-weight: 500; text-wrap: balance; }
.caret { display: inline-block; width: 0.25em; height: 0.9em; margin-inline-start: 0.375rem; vertical-align: -0.1em; background: var(--acc); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
/* Абзацы «о себе» – одним блоком: отступ между ними свой, из «Шапки» (about_gap), а не общий 1.25rem колонки */
.leads { display: flex; flex-direction: column; gap: var(--para-gap, 0.45rem); }
.lead { margin: 0; max-width: 58rem; font-family: var(--sans); font-size: 1.125rem; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; gap: 0.625rem; padding-top: 0.75rem; }
.btn-acc, .btn-line { height: 3rem; padding: 0 1.25rem; display: inline-flex; align-items: center; border-radius: 6px; font-size: 0.875rem; }
.btn-acc { background: var(--acc); color: var(--on-acc); font-weight: 700; }
.btn-line { border: 1px solid var(--line); }
:where(html:not(.touch)) .btn-acc:hover, :where(html:not(.touch)) .btn-line:hover { text-decoration: none; }
:where(html:not(.touch)) .btn-line:hover { border-color: var(--acc); }

.card { margin-top: 0.5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.dots { display: flex; gap: 6px; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.dots i { width: 10px; height: 10px; border-radius: 5px; background: var(--line); }
.card-body { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.875rem; }
/* Фото в карточке: квадрат со скруглением, тонкая рамка в цвет линий */
/* Фото открывается крупно (окно просмотра, site.js) */
.avatar-link { display: block; width: fit-content; border-radius: 8px; cursor: zoom-in; }
.avatar-link .avatar { transition: transform 0.25s cubic-bezier(.2, .7, .2, 1), border-color 0.2s ease; }
:where(html:not(.touch)) .avatar-link:hover .avatar { transform: scale(1.02); border-color: var(--acc); }
.avatar-link:focus-visible { outline: 1px solid var(--acc); outline-offset: 3px; }
.avatar { display: block; width: 11rem; max-width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 0.5rem; background: var(--bg); }
.kv { display: flex; gap: 0.75rem; min-height: 1.75rem; align-items: center; overflow-wrap: anywhere; }
.kv span:first-child { flex: 0 0 4.75rem; color: var(--muted); }

.job { display: grid; grid-template-columns: 13.75rem minmax(0, 1fr); gap: 0.75rem 1.5rem; padding: 1.75rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.job:last-child { border-bottom: 1px solid var(--line); }
.when { display: flex; flex-direction: column; gap: 0.375rem; color: var(--muted); }
.what { display: flex; flex-direction: column; gap: 0.75rem; }
.what h3 { margin: 0; font-family: var(--sans); font-size: 1.5rem; font-weight: 600; }
.org { color: var(--muted); }
.what ul { margin: 0; padding-inline-start: 1.25rem; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; color: var(--muted); display: flex; flex-direction: column; gap: 0.25rem; }
/* Описание: абзацы и списки вперемешку, как в LinkedIn – одним блоком,
   с отступом между абзацем и списком чуть больше, чем между пунктами */
.desc { display: flex; flex-direction: column; gap: 0.6rem; }
/* Нумерованный список – как обычный, но с цифрами */
.desc ol { margin: 0; padding-inline-start: 1.5rem; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; color: var(--muted); display: flex; flex-direction: column; gap: 0.25rem; }
.proj-text .desc ol { font-size: 0.9375rem; gap: 0.2rem; }
.pub .desc ol { font-size: 0.875rem; line-height: 1.55; padding-inline-start: 1.3rem; gap: 0.15rem; }
.desc-p { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
/* Несколько должностей в одной компании (как в LinkedIn): сверху компания,
   ниже должности на вертикальной линии с точками, у каждой свой срок.
   Текущая должность – точка акцентом */
.org-head { font-size: 0.9375rem; }
.roles { list-style: none; margin: 0.25rem 0 0; padding: 0; display: flex; flex-direction: column; }
.role { position: relative; padding-inline-start: 1.75rem; padding-bottom: 1.75rem; display: flex; flex-direction: column; gap: 0.625rem; }
.role:last-child { padding-bottom: 0; }
.role::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.8rem; width: 0.625rem; height: 0.625rem; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); box-sizing: border-box; }
.role::after { content: ""; position: absolute; inset-inline-start: calc(0.3125rem - 1px); top: 1.65rem; bottom: 0.2rem; width: 2px; background: var(--line); }
.role:last-child::after { display: none; }
.role-now::before { border-color: var(--acc); background: var(--acc); }
.role-when { color: var(--muted); font-size: 0.8125rem; margin-top: -0.25rem; }
/* Срок работы (как в LinkedIn): слева – строкой под датами, у должности в
   блоке компании и на телефоне – в строку через точку */
.when .dur { font-size: 0.8125rem; opacity: 0.8; }
/* Даты – на линии названия должности (align-items: baseline у .job), срок
   под ними – на линии организации: иначе висел между строками справа */
.job > .when .dur { margin-top: 0.65rem; }
.role-when .dur::before { content: " · "; }
/* Тип занятости и формат работы: мельче названия компании, как срок, и
   приподняты – середина строчных на середине названия (JetBrains Mono:
   строчные 0.55, прописные 0.73); «· удалённо» не разрывается */
.terms { font-size: 0.8125rem; opacity: 0.8; position: relative; top: -0.07em; }
.org-head .terms { top: -0.09em; }
.role-when .terms { font-size: inherit; top: 0; }
.term { white-space: nowrap; }
.role ul { list-style: disc; }
/* Навыки к записи опыта – строкой под пунктами, как в LinkedIn */
.job-skills { font-size: 0.8125rem; color: var(--muted); line-height: 1.7; }
.job-skills-k { color: var(--text); } /* вложенный в список – иначе браузер рисует пустые кружки */
/* Проекты у записи опыта – ссылки на карточки ниже: пунктир, как у навыков с подробностями */
.job-projects a { color: inherit; text-decoration: underline dotted; text-underline-offset: 0.2em; }
.job-projects a:hover { color: var(--acc); }

.proj { display: grid; grid-template-columns: 13.75rem minmax(0, 1fr) 17.5rem; gap: 0.375rem 1.5rem; padding: 1.125rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.proj:last-child { border-bottom: 1px solid var(--line); }
.proj-name { font-weight: 700; }
.proj-text { font-family: var(--sans); font-size: 1.0625rem; }
.proj-when { display: block; margin-top: 0.3rem; font-weight: 400; font-size: 0.75rem; color: var(--muted); }
/* Описание проекта – под строкой, мельче и серее, как пункты опыта */
.proj-text .desc { margin-top: 0.6rem; }
.proj-text .desc-p, .proj-text ul { font-size: 0.9375rem; }
.proj-text ul { margin: 0; padding-inline-start: 1.25rem; line-height: 1.6; color: var(--muted); display: flex; flex-direction: column; gap: 0.2rem; }
.proj-stack { color: var(--muted); font-size: 0.8125rem; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.375rem; }
/* Технология – плашкой: длинный список переносится целиком, без точек в начале строки */
.proj-tag { font-size: 0.75rem; line-height: 1; padding: 0.25rem 0.45rem; border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; }
:where(html:not(.touch)) a.proj:hover { text-decoration: none; }
:where(html:not(.touch)) a.proj:hover .proj-name { color: var(--acc); }

.yml { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 1.75rem 2rem; font-size: 1rem; line-height: 2; }
/* На широком экране строки skills – в две колонки, чтобы не тянулись во всю ширину */
@media (min-width: 1100px) { .yml { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4rem; align-items: start; } }
/* Образование, языки, сертификаты, публикации – две колонки, блоки по ним
   раскладывает сервер (site.php) так, чтобы колонки вышли вровень. Каждая
   колонка живёт сама по себе: раскрытый список растёт вниз в своей, соседи
   не перескакивают. Сверху у блока – линия, как у строк опыта и проектов */
.info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4rem; align-items: start; }
.info-col { display: flex; flex-direction: column; gap: 2.5rem; min-width: 0; }
/* Промежутки между блоками – gap колонки: у последнего блока нет своего
   отступа снизу, иначе перед подвалом складывались два */
.blk { display: flex; flex-direction: column; gap: 0.625rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
/* Блок не шире своей колонки: длинное имя файла у сертификата иначе
   растягивало блок за край экрана телефона (04.10.2026) – оно режется
   многоточием (.doc), длинное название переносится */
.blk, .blk > * { min-width: 0; max-width: 100%; }
.cert .small, .pub .small, .edu-school { overflow-wrap: anywhere; }

/* Листы документов и фото не сохраняются простым способом (владелец,
   04.10.2026: «скачать, кроме резюме, ничего нельзя»): ни меню долгого
   нажатия на айфоне, ни перетаскивания. Правый щелчок – site.js */
.viewer-body img, .avatar { -webkit-touch-callout: none; -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }
/* Список с хвостом «ещё N»: отступы – полями, а не gap, чтобы свёрнутый
   хвост не оставлял лишней щели. Хвост раскрывается плавно (сетка 0fr →
   1fr), кнопка всегда под списком */
.fold > * + *, .fold-rest > div > * { margin-top: 0.625rem; }
.fold > .fold-rest { margin-top: 0; }
.fold-rest { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.4s cubic-bezier(.2, .7, .2, 1); }
.fold-rest > div { min-height: 0; overflow: hidden; }
.fold.shut .fold-rest { grid-template-rows: 0fr; }
.fold-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0; border: 0; background: none;
  font: inherit; font-size: 0.875rem; color: var(--acc); cursor: pointer;
}
.fold-btn[hidden] { display: none; }
:where(html:not(.touch)) .fold-btn:hover span { text-decoration: underline; }
.fold-btn .chev { transition: transform 0.3s ease; }
/* Хвост списка проявляется по очереди, а не разом; надпись кнопки сменяется
   мягко (владелец, 01.10.2026: «анимируй эти кнопки») */
.fold-rest > div > * { transition: opacity 0.35s ease, translate 0.4s cubic-bezier(.2, .7, .2, 1); }
.fold-rest > div > :nth-child(2) { transition-delay: 0.04s; }
.fold-rest > div > :nth-child(3) { transition-delay: 0.08s; }
.fold-rest > div > :nth-child(4) { transition-delay: 0.12s; }
.fold-rest > div > :nth-child(n+5) { transition-delay: 0.16s; }
.fold.shut .fold-rest > div > * { opacity: 0; translate: 0 -0.4rem; transition-delay: 0s; }
.fold-btn span { transition: opacity 0.18s ease; }
.fold-btn.swap span { opacity: 0; }
.fold:not(.shut) .fold-btn .chev { transform: rotate(180deg); }
/* Длинное описание должности или проекта (site.php, $clamp; site.js):
   свёрнуто до первого абзаца и одной бледной строки под ним (размытая
   копия текста – .clamp-blur). Было: полупрозрачное размытие поверх
   текста – на светлой теме мазня.
   --clamp-k – насколько последняя строка чёткая (1 – как весь текст, 0 –
   бледная и размытая). Анимируется он вместе с высотой: бледная строка
   стоит на своём месте (--cut – её верх, от верха блока), при «свернуть»
   она бледнеет, а всё ниже неё гаснет и уходит под край – одновременно.
   Было: маска у нижнего края – полоса пробегала по строкам; потом
   бледнела уже после сворачивания (владелец: «топорно») */
@property --clamp-k { syntax: '<number>'; inherits: true; initial-value: 1; }
.clamp { display: block; }
.clamp-body { --clamp-k: 1; display: block; position: relative; overflow: hidden;
  transition: max-height 0.55s cubic-bezier(.2, .7, .2, 1), --clamp-k 0.4s ease; }
.clamp.shut .clamp-body { --clamp-k: 0; transition: max-height 0.55s cubic-bezier(.2, .7, .2, 1), --clamp-k 0.5s ease; }
.clamp-text { display: block; overflow: hidden; transition: height 0.55s cubic-bezier(.2, .7, .2, 1);
  -webkit-mask: linear-gradient(#000, #000) left top / 100% var(--cut, 3em) no-repeat,
    linear-gradient(to right, rgba(0, 0, 0, calc(0.3 + 0.7 * var(--clamp-k))), rgba(0, 0, 0, var(--clamp-k)) 70%) left var(--cut, 3em) / 100% var(--fade, 1.6em) no-repeat,
    linear-gradient(rgba(0, 0, 0, var(--clamp-k)), rgba(0, 0, 0, var(--clamp-k))) left calc(var(--cut, 3em) + var(--fade, 1.6em)) / 100% 100% no-repeat;
  mask: linear-gradient(#000, #000) left top / 100% var(--cut, 3em) no-repeat,
    linear-gradient(to right, rgba(0, 0, 0, calc(0.3 + 0.7 * var(--clamp-k))), rgba(0, 0, 0, var(--clamp-k)) 70%) left var(--cut, 3em) / 100% var(--fade, 1.6em) no-repeat,
    linear-gradient(rgba(0, 0, 0, var(--clamp-k)), rgba(0, 0, 0, var(--clamp-k))) left calc(var(--cut, 3em) + var(--fade, 1.6em)) / 100% 100% no-repeat; }
.clamp-blur { position: absolute; inset: 0; overflow: hidden; pointer-events: none; user-select: none; filter: blur(1.2px); opacity: calc(1 - var(--clamp-k));
  -webkit-mask: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent 70%) left var(--cut, 3em) / 100% var(--fade, 1.6em) no-repeat;
  mask: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent 70%) left var(--cut, 3em) / 100% var(--fade, 1.6em) no-repeat; }
.clamp-btn { margin-top: 0.5rem; }
.clamp:not(.shut) .clamp-btn .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .clamp-body, .clamp.shut .clamp-body, .clamp-text { transition: none; } }
/* Сертификат – в две строки, как образование: название и под ним кто выдал, год */
.cert-meta { font-size: 0.8125rem; margin-top: 0.15rem; }
/* Описание публикации – мельче основного текста раздела */
.pub .desc { margin-top: 0.45rem; gap: 0.4rem; }
.pub .desc-p, .pub .desc ul { font-size: 0.875rem; line-height: 1.55; }
.pub .desc ul { margin: 0; padding-inline-start: 1.15rem; font-family: var(--sans); color: var(--muted); display: flex; flex-direction: column; gap: 0.15rem; }
@media (prefers-reduced-motion: reduce) { .fold-rest, .fold-btn .chev, .fold-rest > div > *, .fold-btn span { transition: none; } }
.hash { font-size: 0.8125rem; color: var(--muted); }
.edu { display: flex; flex-direction: column; gap: 0.25rem; }
.edu + .edu { padding-top: 0.5rem; }
.edu-school { font-family: var(--sans); font-size: 1.0625rem; font-weight: 500; }
.langs-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; font-size: 0.9375rem; }

/* ---------- услуги ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1.5rem; }
.svc { display: flex; flex-direction: column; gap: 0.875rem; padding: 1.75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  transition: border-color 0.25s ease, transform 0.25s cubic-bezier(.2, .7, .2, 1); }
:where(html:not(.touch)) .svc:hover { border-color: color-mix(in srgb, var(--acc) 55%, var(--line)); }
.svc-name { margin: 0; font-family: var(--sans); font-size: 1.375rem; font-weight: 600; line-height: 1.25; }
.svc-text { margin: 0; font-family: var(--sans); font-size: 1rem; line-height: 1.6; color: var(--muted); }
.svc-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.875rem; line-height: 1.5; }
.svc-items li { padding-inline-start: 1.25rem; position: relative; }
/* Галочка «входит в услугу» – рамкой, не знаком: стрелка «›» звала нажать
   (владелец, 02.10.2026: «открыть хочется») */
.svc-items li::before { content: ""; position: absolute; inset-inline-start: 0.2rem; top: 0.48em; width: 0.5rem; height: 0.25rem;
  border-left: 0.1rem solid var(--acc); border-bottom: 0.1rem solid var(--acc); transform: rotate(-45deg); }
/* Низ карточки – всегда внизу: цены и кнопки у соседних карточек на одной линии */
.svc-foot { margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.svc-price { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.svc-price .price { font-size: 1.125rem; font-weight: 700; color: var(--text); }
.svc-price .old { color: var(--muted); font-size: 0.875rem; }
.svc { position: relative; }
/* Скидка – значком в углу карточки: низ остаётся на одну строку «цена · кнопка» */
.svc .disc { align-self: flex-start; font-size: 0.75rem; color: var(--acc); border: 1px solid var(--acc); border-radius: 4px; padding: 0.1rem 0.45rem;
  background: color-mix(in srgb, var(--acc) 8%, transparent); }
.svc-order { height: 2.5rem; padding: 0 1.1rem; font-size: 0.875rem; gap: 0.45rem; flex: none; }
.svc-order span { display: inline-block; transition: transform 0.2s ease; }
:where(html:not(.touch)) .svc-order:hover span { transform: translateX(0.2rem); }

/* ---------- отзывы: ссылка на рекомендации в LinkedIn ---------- */
.rev { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 1.5rem 2rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.rev-text { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; flex: 1 1 20rem; }
.rev-link { flex: none; gap: 0.45em; }  /* флекс съедает пробел между «читать на LinkedIn» и ↗ */
/* Несколько площадок – блоки друг под другом */
.rev + .rev { margin-top: 0.75rem; }

/* ---------- документы и ссылки у записей ---------- */
.docs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.doc {
  display: inline-flex; align-items: center; gap: 0.4rem; max-width: 100%; padding: 0.25rem 0.6rem;
  border: 1px solid var(--line); border-radius: 6px; font-family: var(--mono); font-size: 0.75rem; line-height: 1.4; color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.doc span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:where(html:not(.touch)) .doc:hover { text-decoration: none; border-color: var(--acc); color: var(--acc); }
.doc-ico { flex: none; }
.what .docs { margin-top: 0; }
.langs-list .docs { margin-top: 0.35rem; }
.lang-proof { margin-top: 0.15rem; font-size: 0.8125rem; opacity: 0.85; }
/* Навыки с пояснением: ключ группы и навыки с пунктиром – кнопки, по
   щелчку под строкой раскрывается комментарий «# …» и плашки, как в YAML.
   Без скрипта пояснения видны сразу */
.sk-tog { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.sk-key { color: var(--acc); }
.sk-tok { text-decoration: underline dotted color-mix(in srgb, var(--acc) 70%, transparent); text-underline-offset: 0.3em; text-decoration-thickness: 1px; transition: color 0.2s ease; }
.sk-tok[aria-expanded="true"] { color: var(--acc); }
:where(html:not(.touch)) .sk-tok:hover { color: var(--acc); }
.sk-tog:focus-visible { outline: 1px solid var(--acc); outline-offset: 2px; border-radius: 3px; }
.sk-hint { color: var(--muted); opacity: 0.6; transition: opacity 0.2s ease, color 0.2s ease; }
.sk-hint[aria-expanded="true"] { opacity: 1; color: var(--acc); }
:where(html:not(.touch)) .sk-line:has(.sk-key:hover) .sk-hint, :where(html:not(.touch)) .sk-hint:hover { opacity: 1; color: var(--acc); }
.sk-body { padding-block: 0.15rem 0.75rem; padding-inline: 1.25rem 0; border-inline-start: 1px solid var(--line); margin-inline-start: 0.3rem; display: flex; flex-direction: column; gap: 0.25rem; }
.js .sk-body:not(.open) { display: none; }
.sk-note { font-size: 0.875rem; line-height: 1.6; color: var(--muted); white-space: pre-line; }
.sk-note::before { content: "# "; color: var(--acc); }
.sk-body.open { animation: sk-open 0.3s cubic-bezier(.2, .7, .2, 1); }
@keyframes sk-open { from { opacity: 0; transform: translateY(-0.3rem); } }

/* Просмотрщик документов – public/assets/css/doc-viewer.css (общий с админкой).
   Здесь – только то, что берёт у него окно заявки */
@keyframes viewer-in { from { opacity: 0; transform: translateY(0.75rem) scale(0.98); } }
.viewer-bar .dots { padding: 0; border: 0; flex: none; }
@media (prefers-reduced-motion: reduce) { .sk-body.open { animation: none; } }

/* ---------- заявка на услугу (кнопка «заказать» в услугах) ---------- */
button.btn-acc, button.btn-line { font-family: inherit; line-height: inherit; cursor: pointer; }
button.btn-acc { border: 0; }
button.btn-line { background: transparent; color: var(--text); }
.order {
  padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text);
  width: min(34rem, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); overflow: auto; overscroll-behavior: contain;
}
.order[open] { animation: viewer-in 0.28s cubic-bezier(.2, .8, .2, 1); }
.order:focus, .order:focus-visible { outline: none; }
.order::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.order .viewer-bar { position: sticky; top: 0; z-index: 1; background: var(--panel); }
.order-body { padding: 1.25rem 1.5rem 1.5rem; }
.order-name { margin: 0 0 1.25rem; font-family: var(--sans); font-size: 1.375rem; font-weight: 600; line-height: 1.25; }
.order-form { display: flex; flex-direction: column; gap: 1rem; }
.order-form[hidden] { display: none; }
.order-field { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.75rem; color: var(--muted); }
.order-field input, .order-field textarea {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 0.9375rem; line-height: 1.45; transition: border-color 0.2s ease;
}
.order-field input { height: 2.875rem; }
.order-field textarea { min-height: 5.5rem; resize: vertical; }
:where(html.touch) .order-field input, :where(html.touch) .order-field textarea { font-size: 1rem; }
.order-field input:focus, .order-field textarea:focus { outline: none; border-color: var(--acc); }
.order-field.bad input { border-color: #d9534f; }
/* Ловушка для роботов: человеку не видна ни глазом, ни экранным чтецом */
.order-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.order-note { margin: 0; font-size: 0.75rem; line-height: 1.6; color: var(--muted); }
.order-note a { color: var(--text); border-bottom: 1px solid var(--line); }
:where(html:not(.touch)) .order-note a:hover { text-decoration: none; border-color: var(--acc); color: var(--acc); }
.order-msg { margin: 0; font-size: 0.8125rem; color: #d9534f; }
.order-send { align-self: flex-start; gap: 0.45rem; }
.order-send span { display: inline-block; transition: transform 0.2s ease; }
:where(html:not(.touch)) .order-send:hover span { transform: translateX(0.2rem); }
.order-send:disabled { opacity: 0.6; cursor: progress; }
.order-done { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding: 0.5rem 0 0; animation: sk-open 0.3s cubic-bezier(.2, .7, .2, 1); }
.order-done[hidden] { display: none; }
.order-done p { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55; }
.order-ok { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: var(--on-acc); font-weight: 700; }
html.order-open { overflow: hidden; }
/* Политика обработки ПД (templates/privacy.php): одна колонка для чтения.
   Текст – свободная разметка (её можно править), поэтому номера разделов
   ставит CSS: первый абзац – вводный, h2 – раздел с номером */
.wrap.legal { --gap-y: 2.5rem; padding-bottom: 5rem; }
.legal-top { display: flex; flex-direction: column; gap: 0.35rem; }
.legal-back { align-self: flex-start; }
.legal-doc { max-width: 46rem; display: flex; flex-direction: column; gap: 1.25rem; }
.legal-doc h1 { font-size: 2.75rem; line-height: 1.1; text-wrap: balance; }
.legal-tr { margin: 0; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 8px; font-size: 0.8125rem; color: var(--muted); }
.legal-body { counter-reset: legal; font-family: var(--sans); font-size: 1rem; line-height: 1.65; }
.legal-body > :first-child { margin-top: 0; }
.legal-body > p:first-child { font-size: 1.125rem; line-height: 1.6; color: var(--muted); }
.legal-body p, .legal-body ul, .legal-body ol { margin: 0.75rem 0 0; text-wrap: pretty; }
.legal-body ul, .legal-body ol { padding-inline-start: 1.5rem; }
.legal-body li + li { margin-top: 0.35rem; }
.legal-body h2 { counter-increment: legal; margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.legal-body h2::before { content: counter(legal) ". "; color: var(--acc); }
.legal-body h3 { margin: 1.25rem 0 0; font-size: 1.0625rem; font-weight: 600; }
/* Ссылки в тексте – как внешние ссылки сайта: тонкая черта, акцент при наведении */
.legal-body a { color: var(--text); border-bottom: 1px solid var(--line); transition: color 0.2s ease, border-color 0.2s ease; }
:where(html:not(.touch)) .legal-body a:hover { text-decoration: none; color: var(--acc); border-color: var(--acc); }
@media (max-width: 599px) { .legal-doc h1 { font-size: 2rem; } .legal-body { font-size: 0.9375rem; } }

/* Правка политики владельцем (/admin/privacy/<язык>, privacy-edit.js) */
.legal-editing .wrap.legal { padding-bottom: 12rem; }
.legal-langs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0 0.25rem; font-size: 0.75rem; }
.legal-langs a { padding: 0.2rem 0.55rem; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); }
.legal-langs a i { font-style: normal; color: var(--acc); margin-inline-start: 0.2rem; }
.legal-langs a[aria-current] { border-color: var(--acc); color: var(--text); }
:where(html:not(.touch)) .legal-langs a:hover { text-decoration: none; color: var(--text); }
.legal-editing #legal-title, .legal-editing .legal-body { outline: 1px dashed color-mix(in srgb, var(--acc) 45%, transparent); outline-offset: 0.6rem; border-radius: 2px; }
.legal-editing #legal-title:focus, .legal-editing .legal-body:focus { outline-style: solid; outline-color: var(--acc); }
.legal-editing .legal-body a { cursor: text; }
.ph { padding: 0 0.3rem; border-radius: 4px; background: color-mix(in srgb, var(--acc) 16%, transparent); color: var(--text); white-space: nowrap; cursor: default; }
.legal-panel { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.25rem;
  padding: 0.75rem max(1rem, calc((100vw - 105rem) / 2 + 6rem)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 0.75rem; }
.legal-tools, .legal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.legal-tools .sep { width: 1px; height: 1.25rem; margin: 0 0.25rem; background: var(--line); }
.legal-tools button, .legal-ph-menu button { height: 2.1rem; padding: 0 0.65rem; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text); font: inherit; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease; }
.legal-tools button.on { border-color: var(--acc); color: var(--acc); }
:where(html:not(.touch)) .legal-tools button:hover, :where(html:not(.touch)) .legal-ph-menu button:hover { border-color: var(--acc); color: var(--acc); }
.legal-ph-wrap { position: relative; }
.legal-ph-menu { position: absolute; bottom: calc(100% + 0.4rem); inset-inline-start: 0; display: flex; flex-direction: column; gap: 0.25rem; padding: 0.4rem; min-width: 12rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 0.75rem 2rem -0.75rem rgba(0, 0, 0, 0.5); }
.legal-ph-menu[hidden] { display: none; }
.legal-ph-menu button { text-align: start; border-color: transparent; }
.legal-actions .btn-acc, .legal-actions .btn-line { height: 2.4rem; padding: 0 1rem; font-size: 0.8125rem; }
.legal-note { color: var(--muted); margin-inline-end: 0.5rem; }
.legal-note.ok { color: var(--acc); }
.legal-note.bad { color: #d9534f; }
@media (max-width: 599px) {
  .legal-panel { padding: 0.6rem 0.75rem; }
  .legal-actions { width: 100%; }
  .legal-actions .btn-acc, .legal-actions .btn-line { flex: 1; justify-content: center; }
  .legal-note { width: 100%; }
}
@media (max-width: 599px) {
  .order { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .order .viewer-bar .dots { display: none; }
  .order-body { padding: 1rem 1rem 1.25rem; }
  .order-send { align-self: stretch; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .order[open], .order-done { animation: none; } }

/* Контакты спрятаны и фото нет – первый экран в одну колонку, а в подвале
   остаётся только строка «© · обновлено» без второй линии */
.hero.solo { grid-template-columns: minmax(0, 1fr); }
/* Карточка – по центру видимой части шапки (motion.js, alignCard) */
.hero.card-line > .card, .hero.card-line > .hero-main { align-self: start; }
.foot > .foot-meta:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

/* ---------- подвал ---------- */
/* Линия над подвалом – по ширине содержимого, как остальные разделители:
   во всю ширину окна она читалась как край страницы (владелец, 01.10.2026) */
.foot { --foot-x: max(6rem, calc((100vw - 105rem) / 2 + 6rem)); margin: 5rem 0 0; padding: 3rem var(--foot-x) 3rem; display: flex; flex-direction: column; gap: 1.75rem;
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 2 * var(--foot-x)) 1px no-repeat; }
.foot-title { font-family: var(--sans); font-size: 2.25rem; font-weight: 600; letter-spacing: -0.02em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.9375rem; }
/* Линия над «© …» – с воздухом от кнопок контактов: было 1.75rem, строка
   года прилипала к блоку (владелец, 01.10.2026) */
.foot-meta { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
.foot-side { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.foot-legal { color: inherit; border-bottom: 1px solid var(--line); transition: color 0.2s ease, border-color 0.2s ease; }
:where(html:not(.touch)) .foot-legal:hover { text-decoration: none; color: var(--acc); border-color: var(--acc); }

/* ---------- небольшой ноутбук, планшет лёжа ---------- */
/* Поля и просвет уже, чем на широком экране: иначе между текстом шапки
   и карточкой зияла пустота (владелец, 08.11.2026) */
@media (max-width: 1399px) and (min-width: 1100px) {
  .top { padding: 1.75rem 3rem; }
  .wrap { padding: var(--wrap-top) 3rem 0; }
  .foot { --foot-x: 3rem; }
  .hero { gap: 2rem; }
}

/* ---------- планшет ---------- */
@media (max-width: 1099px) {
  .top { padding: 1.25rem 2.5rem; }
  /* Строка меню или кнопка ☰ – по месту в самой шапке (скрипт nav-tight
     в site.php), а не по ширине экрана: на планшете стоя короткие пункты
     помещаются строкой. Промежутки между пунктами – чуть уже */
  .nav { gap: 1.25rem; }
  .tools { --ctl: 2.75rem; gap: 0.5rem; }
  .wrap { --wrap-top: 3.5rem; --gap-y: 5rem; padding: var(--wrap-top) 2.5rem 0; gap: var(--gap-y); }
  .foot { --foot-x: 2.5rem; padding: 2.75rem var(--foot-x) 2.25rem; margin-top: 4rem; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  /* Одна колонка: карточка не тянется на всю ширину, остаётся «карточкой» */
  .card { margin-top: 0; max-width: 22rem; }
  h1 { font-size: 3.75rem; }
  h1.fio { font-size: 3rem; }
  .motto { font-size: 1.875rem; }
  .job { grid-template-columns: 9.5rem minmax(0, 1fr); }
  .proj { grid-template-columns: 9.5rem minmax(0, 1fr); }
  .proj-stack { grid-column: 2; justify-content: flex-start; }
  .info { column-gap: 2.5rem; }
  /* Меню разделов – раскрывается кнопкой */
  .nav.open { display: flex; position: absolute; top: 4.5rem; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 0.5rem 2.5rem 1rem; z-index: 5; }
  .nav.open a { padding: 0.75rem 0; align-self: flex-start; }
  .top { position: relative; }
}

/* ---------- телефон ---------- */
@media (max-width: 599px) {
  .top { padding: 0.875rem 1.25rem; gap: 0.75rem; }
  .nav { display: none; }
  .burger { display: inline-flex; }
  .langs a { padding: 0.65rem 0.8rem; }
  /* Вместо «тема: тёмная» – значок: луна в тёмной теме, солнце в светлой */
  .theme-text { display: none; }
  .theme-ico { display: inline-flex; }
  .theme { width: var(--ctl); padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  .wrap { --wrap-top: 2.5rem; --gap-y: 4rem; padding: var(--wrap-top) 1.25rem 0; gap: var(--gap-y); }
  .foot { --foot-x: 1.25rem; padding: 2.5rem var(--foot-x) 2rem; margin-top: 3.5rem; }
  /* Одна колонка: блоки по исходному порядку, а не колонка за колонкой */
  .info { display: flex; flex-direction: column; gap: 1.75rem; }
  .info-col { display: contents; }
  .info .blk { order: var(--o, 0); }
  .nav.open { padding: 0.5rem 1.25rem 1rem; top: 4rem; }
  h1 { font-size: 2.625rem; }
  h1.fio { font-size: 2.125rem; }
  .motto { font-size: 1.5rem; }
  .lead { font-size: 1rem; }
  .job, .proj { grid-template-columns: minmax(0, 1fr); }
  .when { flex-direction: row; gap: 0.625rem; flex-wrap: wrap; }
  .when .dur::before { content: "· "; }
  .job > .when .dur { margin-top: 0; }
  .proj-stack { grid-column: auto; }
  .yml { padding: 1.25rem; font-size: 0.875rem; }
  .svc { padding: 1.25rem; }
  .rev { padding: 1.25rem; }
  .svc-foot .svc-order, .rev-link { width: 100%; justify-content: center; }
  .foot-title { font-size: 1.5rem; }
  .btn-acc, .btn-line { height: 3rem; }
}
/* Самые маленькие телефоны (320–359): шапка остаётся в одну строку, кнопки
   чуть плотнее. Список языков под кнопкой вылез бы за край экрана, поэтому
   он – под всей шапкой, во всю ширину */
@media (max-width: 359px) {
  .top { gap: 0.5rem; padding-inline: 1rem; }
  .tools { gap: 0.375rem; }
  .lang-pick { position: static; }
  .langs { inset-inline: 1rem; top: calc(100% - 0.25rem); max-width: none; }
}

/* ---------- ИИ-бот: кнопка в углу и окно разговора (site.js) ---------- */
.bot-btn { position: fixed; inset-inline-end: 1.5rem; bottom: 1.5rem; z-index: 41; width: 3.25rem; height: 3.25rem; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: var(--acc); color: var(--on-acc, #111); cursor: pointer;
  box-shadow: 0 0.6rem 1.5rem -0.6rem rgba(0, 0, 0, 0.5); transition: transform 0.25s cubic-bezier(.3, 1.5, .5, 1), box-shadow 0.2s ease; }
.bot-btn-ico { display: inline-flex; align-items: center; justify-content: center; }
.bot-btn-ico .bot-ico { width: 1.6rem; height: 1.6rem; }
/* Аватарка бота у реплик и в шапке окна */
.bot-ava { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--acc) 18%, var(--bg)); color: var(--acc); border: 1px solid color-mix(in srgb, var(--acc) 35%, var(--line)); }
.bot-ava .bot-ico { width: 1.1rem; height: 1.1rem; }
.bot-row { display: flex; align-items: flex-end; gap: 0.5rem; align-self: flex-start; max-width: 94%; }
.bot-row .bot-msg { max-width: none; min-width: 0; }
/* Реплика бота – пузырь с хвостиком к его иконке, как в мессенджере
   (владелец, 01.10.2026): повёрнутый квадрат того же фона с рамкой слева и
   снизу, середина – на середине иконки (1.9rem / 2) */
.bot-row .bot-msg { position: relative; border-bottom-left-radius: 4px; }
.bot-row .bot-msg::before { content: ""; position: absolute; left: -5px; bottom: calc(0.95rem - 5px); width: 9px; height: 9px;
  background: inherit; border-left: inherit; border-bottom: inherit; transform: rotate(45deg); border-radius: 0 0 0 2px; }
.bot-row .bot-msg.e::before { display: none; } /* ошибка – пунктиром без фона, хвостик не к месту */
.bot-title { display: flex; align-items: center; gap: 0.6rem; }
:where(html:not(.touch)) .bot-btn:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 0.8rem 1.75rem -0.6rem rgba(0, 0, 0, 0.55); }
.bot-btn:active { transform: scale(0.94); }
.bot-btn[aria-expanded="true"] { display: none; }
body:has(.bot-btn) .to-top { bottom: 5.5rem; inset-inline-end: 1.625rem; }
.bot { position: fixed; inset-inline-end: 1.5rem; bottom: 1.5rem; z-index: 70; width: min(25rem, calc(100vw - 2rem)); height: min(36rem, calc(100dvh - 3rem));
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  box-shadow: 0 1rem 3rem -1rem rgba(0, 0, 0, 0.55); overflow: hidden; }
.bot[hidden] { display: none; }
.bot-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem 0.625rem 1rem; border-bottom: 1px solid var(--line); }
.bot-title { flex: 1; font-size: 0.8125rem; color: var(--muted); }
.bot-x { width: 2.25rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.bot-x svg { display: block; }
.bot-new:disabled { opacity: 0.35; cursor: default; border-color: var(--line); color: var(--text); }
/* Кнопки шапки бота: крестик прорисовывается при открытии окна, при
   наведении поворачивается; у «нового разговора» (облачко с плюсом)
   поворачивается плюс. Нажатие – лёгкое сжатие */
.bot-x svg, .bot-plus { transition: transform 0.35s cubic-bezier(.2, .8, .2, 1.3); }
.bot-plus { transform-origin: 11.75px 11px; transform-box: view-box; }
.bot-x:not(:disabled):active svg { transform: scale(0.85); }
:where(html:not(.touch)) .bot-close:hover svg { transform: rotate(90deg); }
:where(html:not(.touch)) .bot-new:not(:disabled):hover .bot-plus { transform: rotate(90deg); }
@media (prefers-reduced-motion: no-preference) {
  .bot:not([hidden]) .bot-close path { stroke-dasharray: 1; animation: bot-x-draw 0.4s cubic-bezier(.3, .7, .3, 1) 0.15s both; }
  .bot:not([hidden]) .bot-close path + path { animation-delay: 0.27s; }
}
@keyframes bot-x-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .bot-x svg, .bot-plus { transition: none; } }
.bot-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; display: flex; flex-direction: column; gap: 0.625rem; }
.bot-msg { max-width: 88%; padding: 0.55rem 0.8rem; border-radius: 10px; font-family: var(--sans); font-size: 0.8125rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bot-msg.a { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.bot-msg.u { align-self: flex-end; background: color-mix(in srgb, var(--acc) 16%, var(--panel)); }
.bot-msg.e { align-self: flex-start; color: var(--muted); font-size: 0.875rem; background: none; border: 1px dashed var(--line); }
/* Кнопки под репликой бота: вопросы дальше и действия на сайте */
.bot-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-inline-start: 2.4rem; margin-top: -0.15rem; }
.bot-chip { display: inline-flex; align-items: center; min-height: 1.9rem; padding: 0.3rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--text); font-family: var(--sans); font-size: 0.75rem; line-height: 1.3; text-align: start; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease; }
.bot-chip.act { border-color: color-mix(in srgb, var(--acc) 55%, var(--line)); color: var(--acc); }
:where(html:not(.touch)) .bot-chip:hover { text-decoration: none; border-color: var(--acc); color: var(--acc); background: color-mix(in srgb, var(--acc) 8%, var(--panel)); }
.bot-chip:active { background: color-mix(in srgb, var(--acc) 16%, var(--panel)); }
.bot-chips.new .bot-chip { animation: bot-chip-in 0.32s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes bot-chip-in { from { opacity: 0; transform: translateY(0.35rem) scale(0.96); } }
/* Раздел, к которому прокрутил бот, – коротко подсвечен */
.bot-flash { animation: bot-flash 2s ease-out; border-radius: 10px; }
@keyframes bot-flash { 0%, 30% { box-shadow: 0 0 0 0.5rem color-mix(in srgb, var(--acc) 18%, transparent); background: color-mix(in srgb, var(--acc) 6%, transparent); } 100% { box-shadow: 0 0 0 0.5rem transparent; } }
/* «Думает» – три точки волной: подпрыгивают и светлеют по очереди */
.bot-msg.wait { display: flex; gap: 0.32rem; align-items: center; height: 2.5rem; padding-inline: 0.95rem; }
.bot-msg.wait i { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--acc); opacity: 0.35;
  animation: bot-dot 1.2s cubic-bezier(.45, 0, .55, 1) infinite; }
.bot-msg.wait i:nth-child(2) { animation-delay: 0.16s; }
.bot-msg.wait i:nth-child(3) { animation-delay: 0.32s; }
@keyframes bot-dot { 0%, 55%, 100% { transform: none; opacity: 0.35; } 22% { transform: translateY(-0.32rem) scale(1.12); opacity: 1; } }
/* Окно – из угла кнопки */
.bot { transform-origin: bottom right; animation: bot-in 0.3s cubic-bezier(.2, .9, .25, 1.05); }
[dir="rtl"] .bot { transform-origin: bottom left; }
.bot.out { animation: bot-out 0.18s ease-in forwards; }
@keyframes bot-in { from { opacity: 0; transform: translateY(0.75rem) scale(0.92); } }
@keyframes bot-out { to { opacity: 0; transform: translateY(0.5rem) scale(0.95); } }
/* Отправленное – «вылетает» из поля: снизу справа, с лёгкой пружинкой */
.bot-msg.u.new { transform-origin: 100% 100%; animation: bot-send 0.42s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes bot-send { from { opacity: 0; transform: translate(0.4rem, 1.4rem) scale(0.85); } 60% { opacity: 1; } }
/* Ответ – робот появляется, пузырь раскрывается от него */
.bot-row.new .bot-msg { transform-origin: 0 100%; animation: bot-recv 0.38s cubic-bezier(.2, .9, .3, 1.12); }
.bot-row.new .bot-ava { animation: bot-ava-in 0.45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bot-recv { from { opacity: 0; transform: translateY(0.5rem) scale(0.9); } }
@keyframes bot-ava-in { from { transform: scale(0.3) rotate(-25deg); opacity: 0; } }
.bot-msg.e.new, .bot-row.new .bot-msg.e { animation: bot-recv 0.38s cubic-bezier(.2, .9, .3, 1.12), bot-shake 0.4s 0.3s ease-in-out; }
@keyframes bot-shake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
/* Самолётик: улетает вправо-вверх и прилетает обратно снизу-слева */
.bot-send.fly svg { animation: bot-fly 0.55s cubic-bezier(.4, 0, .2, 1); }
@keyframes bot-fly { 40% { transform: translate(0.9rem, -0.9rem) scale(0.8); opacity: 0; } 41% { transform: translate(-0.9rem, 0.9rem) scale(0.8); opacity: 0; } 100% { transform: none; opacity: 1; } }
.bot-send:active svg { transform: scale(0.88); }
/* Кнопка выезжает после загрузки; робот иногда моргает и приподнимается */
.bot-btn { animation: bot-btn-in 0.5s cubic-bezier(.2, .9, .25, 1.1) 0.8s backwards; }
@keyframes bot-btn-in { from { opacity: 0; transform: translateY(1rem) scale(0.9); } }
.bot-btn.seen { animation: bot-btn-in 0.3s cubic-bezier(.2, .9, .25, 1.1); }
:where(html:not(.touch)) .bot-btn:hover .bot-btn-ico { transform: rotate(-8deg); }
.bot-btn-ico { transition: transform 0.25s cubic-bezier(.3, 1.5, .5, 1); }
.bot-eye { transform-box: fill-box; transform-origin: center; animation: bot-eye 5s infinite; }
.bot-ava .bot-eye { animation-delay: 1.7s; }
@keyframes bot-eye { 0%, 94%, 100% { transform: none; } 96% { transform: scaleY(0.15); } }
.bot-form { position: relative; display: flex; gap: 0.5rem; align-items: flex-end; padding: 0.75rem 0.75rem 0.25rem; border-top: 1px solid var(--line); }
/* Ручка над полем: тянуть вверх – поле выше (окно прижато к низу, так
   удобнее родного уголка, которого на iPhone и нет) */
.bot-grab { position: absolute; left: 50%; top: -0.6rem; transform: translateX(-50%); width: 4rem; height: 1.2rem; display: flex; align-items: center; justify-content: center;
  cursor: ns-resize; touch-action: none; z-index: 1; }
.bot-grab span { width: 2.25rem; height: 4px; border-radius: 2px; background: var(--line); transition: background-color 0.2s ease, width 0.2s ease; }
:where(html:not(.touch)) .bot-grab:hover span, .bot-grab.on span { background: var(--acc); width: 2.75rem; }
.bot-form textarea { flex: 1; min-width: 0; height: 3.5rem; min-height: 3.5rem; max-height: 14rem; padding: 0.55rem 0.75rem; resize: none; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 0.875rem; line-height: 1.45; }
/* На сенсорных экранах – 16px: мельче iPhone при касании приближает страницу */
:where(html.touch) .bot-form textarea { font-size: 1rem; }
.bot-form textarea:focus { outline: none; border-color: var(--acc); }
.bot-send { width: 3rem; height: 3.5rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; border: 0; border-radius: 8px; cursor: pointer; }
.bot-send svg { display: block; margin: 0 0.1rem 0 0; }
.bot-send:disabled { opacity: 0.5; cursor: default; }
.bot-note { margin: 0; padding: 0.25rem 0.875rem 0.75rem; font-size: 0.6875rem; line-height: 1.5; color: var(--muted); }
/* Фон под окном – только на телефоне, где окно – шторка снизу: страница
   под ней приглушена и не прокручивается, щелчок по фону – закрыть */
.bot-back { display: none; }
@media (max-width: 599px) {
  .bot-back { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; touch-action: none; }
  html.bot-open .bot-back { opacity: 1; pointer-events: auto; }
  html.bot-open, html.bot-open body { overflow: hidden; overscroll-behavior: none; }
  .bot-btn { inset-inline-end: 1rem; bottom: 1rem; }
  body:has(.bot-btn) .to-top { bottom: 5rem; inset-inline-end: 1.125rem; }
  .bot { inset: auto 0 0 0; width: 100%; height: min(85dvh, 40rem); border-radius: 14px 14px 0 0; border-inline: 0; border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bot, .bot.out, .bot-btn, .bot-log *, .bot-eye, .bot-send svg, .bot-flash { animation: none !important; }
  .bot-back { transition: none; }
  .bot-btn-ico { transition: none; }
}
@media print { .bot, .bot-btn { display: none !important; } }

/* ---------- первый экран во всю высоту ----------
   Имя, девиз и карточка – по центру окна, следующие разделы – ниже, при
   прокрутке. Высота = окно − шапка (--top-h, меряет motion.js) − верхний
   отступ страницы. Где первый экран длиннее окна (телефон) – как было */
.hero { position: relative; }
.hero-next { display: none; }
@media (min-width: 600px) and (min-height: 520px) {
  /* Содержимое – по центру между шапкой и стрелкой (стрелка – нижние
     3.5rem): от шапки 3rem, снизу 3rem + 3.5rem. Было: сверху весь отступ
     страницы, снизу 5rem – на 2K содержимое сидело ниже середины, сверху
     пустовато (владелец, 01.10.2026). Места под содержимое – как было */
  .hero { margin-top: calc(3rem - var(--wrap-top)); min-height: calc(100svh - var(--top-h, 6rem) - 3rem); align-content: center; padding-bottom: 6.5rem; }
  .hero.fits .hero-next { display: inline-flex; }
  /* Не уместился, но низ окна под стрелкой пуст – стрелка внизу окна (motion.js) */
  .hero.float .hero-next { display: inline-flex; position: fixed; }
}
/* Планшет стоя: колонка одна, текст и карточка друг под другом выше
   экрана – «первый экран во всю высоту» не работает, а его место под
   стрелку давало зияющую пустоту перед «опытом» (владелец, 08.11.2026).
   Правило после блока выше: при пересечении условий побеждает оно */
@media (min-width: 600px) and (max-width: 1099px) {
  .hero { margin-top: 0; min-height: 0; padding-bottom: 0; }
}
/* Планшет лёжа: ширина уже «ноутбучья» (1100+), но экран низкий и шапка
   его заполняет – то же отключение по классу touch (его по hover: none
   до стилей ставит bootstrap.php). Специфичность выше .hero – побеждает
   блок выше без учёта порядка. Ноутбуки с мышью не задеты */
html.touch .hero { margin-top: 0; min-height: 0; padding-bottom: 0; }
.hero-next { position: absolute; left: 50%; bottom: 0.75rem; width: 2.75rem; height: 2.75rem; margin-left: -1.375rem; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer;
  animation: hero-next 2.4s ease-in-out 1.6s infinite;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.35s ease, translate 0.45s cubic-bezier(.2, .7, .2, 1), visibility 0s linear 0s; }
/* Начали листать – стрелка тает и уходит вниз, вернулись наверх – обратно */
.hero-next.gone { opacity: 0; translate: 0 0.9rem; visibility: hidden; pointer-events: none; animation-play-state: paused;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.35s ease, translate 0.45s cubic-bezier(.2, .7, .2, 1), visibility 0s linear 0.45s; }
.hero-next svg { display: block; }
:where(html:not(.touch)) .hero-next:hover { color: var(--acc); border-color: var(--acc); }
@keyframes hero-next { 0%, 55%, 100% { transform: none; } 25% { transform: translateY(0.4rem); } }
@media (prefers-reduced-motion: reduce) { .hero-next { animation: none; } }
@media print { .hero-next { display: none !important; } .hero { min-height: 0; padding-bottom: 0; } }

/* ---------- разделы ----------
   30.09.2026 разделы снова естественной высоты – на весь экран только
   первый. Было «по экранам»: каждый раздел не ниже окна, содержимое по
   центру, своё листание, у каждого эффектный вход и уход (наклон, размытие,
   пролёт) и стрелки «дальше/назад». Это слайды; при обычной прокрутке
   (владелец: «надо силу прикладывать, чтобы пролистать» – листание убрано)
   короткие разделы давали пустые поля в пол-экрана, а раздел, на котором
   остановился, бывал наполовину размыт или наклонён. Теперь – обычная
   прокрутка, у каждого раздела свой въезд (ниже), ухода нет. Стрелка
   вниз – только на первом экране, наверх – кнопка в углу */
@media (min-width: 700px) and (min-height: 520px) {
  .hero { scroll-margin-top: calc(var(--top-h, 6rem) + var(--wrap-top)); }
}

/* Въезд разделов по прокрутке (scroll-driven animations: Chrome, Edge,
   Safari 26+; где их нет – остаются появления блоков из motion.css).
   Только вход, ухода нет: раздел въехал и стоит (владелец, 30.09.2026).
     опыт – слева; проекты – справа с поворотом; навыки – приближаются из
     размытия; квалификация – поднимается страницей; услуги и отзывы – из
     размытия; подвал – снизу.
   Длина въезда – 40% окна, а не доля раздела: разделы теперь разной
   высоты, короткий проскочил бы за щелчок колеса, длинный висел бы
   полупрозрачным пол-экрана. На телефоне тоже (с 01.10.2026; раньше только
   от 700px – наследие экранов), сдвиги вбок вдвое меньше: экран узкий */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .wrap > section, .foot { animation: scr-in-up linear both; animation-timeline: view(); animation-range: entry 0% entry 40vh; transform-origin: 50% 50%; }
    .wrap > .hero, .wrap > .hero section { animation: none; }
    #experience { animation-name: scr-in-left; }
    #projects { animation-name: scr-in-right; }
    #skills { animation-name: scr-in-zoom; }
    #education { animation-name: scr-in-page; transform-origin: 50% 0; }
    #services, #reviews { animation-name: scr-in-blur; }
  }
}
:root { --scr-dx: 6rem; --scr-dy: 5rem; }
@media (max-width: 699px) { :root { --scr-dx: 3rem; --scr-dy: 3rem; } }
@keyframes scr-in-up { from { opacity: 0; transform: translateY(var(--scr-dy)); } }
@keyframes scr-in-left { from { opacity: 0; transform: translateX(calc(-1 * var(--scr-dx))); } }
@keyframes scr-in-right { from { opacity: 0; transform: translateX(var(--scr-dx)) rotate(-1.5deg); } }
@keyframes scr-in-zoom { from { opacity: 0; transform: scale(0.85); filter: blur(6px); } }
@keyframes scr-in-page { from { opacity: 0; transform: perspective(1400px) translateY(4rem) rotateX(-14deg); } }
@keyframes scr-in-blur { from { opacity: 0; filter: blur(8px); transform: translateY(2rem); } }

/* ---------- шрифты на планшете ----------
   Планшет держат в руках близко к глазам – размеры, рассчитанные на
   монитор, там крупные (имя 60–80px, девиз 30–36px). Сенсорный экран от
   700px (класс touch – theme.js) – своя шкала; компьютер и телефон – как были */
@media (min-width: 700px) {
  :where(html.touch) h1 { font-size: 3rem; }
  :where(html.touch) h1.fio { font-size: 2.5rem; }
  :where(html.touch) .motto { font-size: 1.5rem; }
  :where(html.touch) .lead { font-size: 1rem; }
  :where(html.touch) .cmd { font-size: 0.875rem; }
  :where(html.touch) .what h3 { font-size: 1.25rem; }
  :where(html.touch) .proj-text { font-size: 1rem; }
  :where(html.touch) .yml { font-size: 0.9375rem; }
  :where(html.touch) .foot-title { font-size: 1.75rem; }
}
@media (min-width: 1100px) {
  :where(html.touch) h1 { font-size: 3.75rem; }
  :where(html.touch) h1.fio { font-size: 3rem; }
  :where(html.touch) .motto { font-size: 1.75rem; }
}

/* Планшет: кнопка темы – значком, как на телефоне; место в шапке – пунктам
   меню */
@media (min-width: 600px) {
  :where(html.touch) .theme-text { display: none; }
  :where(html.touch) .theme-ico { display: inline-flex; }
  :where(html.touch) .theme { width: var(--ctl); padding: 0; display: inline-flex; align-items: center; justify-content: center; }
}
.legal-ask .legal-ask-text { margin: 0 0 1rem; font-family: var(--sans); font-size: 1rem; line-height: 1.5; }
.legal-ask .legal-actions { justify-content: flex-end; margin-top: 1rem; }

/* Отклик на касание на телефоне и планшете (владелец, 04.10.2026: «клик
   по ссылке проходит тихо»). Синей подсветки браузера нет – вместо неё на
   время нажатия: ссылка – акцентом и чуть бледнее, кнопка слегка
   «вдавливается», карточка проекта – подложкой, как при наведении мышью */
@media (hover: none) {
  a:active { color: var(--acc); opacity: 0.75; transition: none; }
  .ext:active { background-size: 100% 1px, 100% 1px; }
  :is(.btn-acc, .btn-line, .btn-ghost, .vw-btn, .bot-chip, .fold-btn, .svc-order, .rev-link, .lang-pick summary, .bot-btn, .to-top, .hero-next):active {
    transform: scale(0.96); transition: transform 0.08s ease; }
  a.proj:active::before { opacity: 1; transition: none; }
  a.proj:active { opacity: 1; color: inherit; }
  a.proj:active .proj-name { color: var(--acc); }
}
