/* ============================================================
   Personal website — layout styles (UI kit only).
   Composes the brand components; these classes handle page
   structure, bands, and grids. Tokens come from styles.css.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
/* overscroll-behavior: none — убирает «резиновый» оверскролл за подвал (иначе под
   футером можно «улистать» в пустой темный фон страницы) и отключает scroll-chaining */
html { scroll-behavior: smooth; overscroll-behavior: none; }
/* overflow-x: clip — страховка от горизонтального скролла (не ломает sticky-навбар) */
body { margin: 0; font-family: var(--font-sans); background: var(--canvas-dark);
       color: var(--on-dark); -webkit-font-smoothing: antialiased; overflow-x: clip;
       overscroll-behavior: none; }

.w-band { padding: var(--band-pad) var(--gutter); }
/* «Обо мне» — компактнее остальных полос */
#about.w-band { padding-top: clamp(52px, 6vw, 68px); padding-bottom: clamp(52px, 6vw, 68px); }
.w-band--dark { background: var(--canvas-dark); color: var(--on-dark); }
.w-band--light { background: var(--canvas-light); color: var(--ink-body); }
.w-inner { max-width: var(--container); margin: 0 auto; }
.w-inner--prose { max-width: 880px; }

.w-eyebrow-gap { margin-top: 22px; }

/* generic display heading */
.w-h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em;
        line-height: 1.0; margin: 0; font-size: clamp(46px, 7vw, 88px); }
.w-h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
        line-height: 1.05; margin: 0; font-size: clamp(32px, 4.4vw, 48px); }
.w-h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em;
        line-height: 1.15; margin: 0; font-size: 22px; }
.w-lead { font-size: 19px; line-height: 1.6; margin: 0; }
.w-muted { color: var(--ink-mute); }
.w-muted-dark { color: var(--on-dark-mute); }

/* ---------- Hero ---------- */
.w-hero { display: grid; grid-template-columns: 1.35fr 0.95fr; gap: 56px; align-items: center; }
.w-hero__badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.w-hero__role { font-size: 20px; line-height: 1.5; color: var(--on-dark-mute); margin: 26px 0 0;
                max-width: 30em; }
.w-hero__role b { color: var(--on-dark); font-weight: 600; }
.w-hero__cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.w-hero__meta { display: flex; gap: 28px; margin-top: 40px; padding-top: 26px;
                border-top: 1px solid var(--divider-soft); flex-wrap: wrap; }
.w-portrait { position: relative; aspect-ratio: 4 / 5; width: 100%; border-radius: var(--radius-xl);
              overflow: hidden; }
.w-portrait image-slot { width: 100%; height: 100%; display: block; }
.w-portrait__tag { position: absolute; left: 16px; bottom: 16px; z-index: 2;
                   font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
                   text-transform: uppercase; color: var(--on-dark); background: rgba(10,11,13,0.55);
                   backdrop-filter: blur(6px); padding: 7px 12px; border-radius: var(--radius-full); }

/* ---------- Proof strip ---------- */
.w-proof { display: flex; align-items: center; justify-content: space-between; gap: 32px;
           flex-wrap: wrap; }
.w-proof__stats { display: flex; gap: 52px; flex-wrap: wrap; }
.w-proof__firms { display: flex; align-items: center; gap: 26px; font-family: var(--font-mono);
                  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
                  color: var(--on-dark-soft); }
.w-proof__firms b { color: var(--on-dark-mute); font-weight: 500; }

/* ---------- About ---------- */
.w-about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: start; }
.w-about__body p { font-size: 18px; line-height: 1.65; color: var(--ink-body); margin: 0 0 18px; }
.w-about__body p:last-child { margin-bottom: 0; }
.w-about__body b { color: var(--ink); font-weight: 600; }
.w-facts { display: flex; flex-direction: column; gap: 0; }
.w-fact { display: flex; flex-direction: column; gap: 4px; padding: 16px 0;
          border-top: 1px solid var(--hairline-light); }
.w-fact:last-child { border-bottom: 1px solid var(--hairline-light); }
.w-fact__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
             text-transform: uppercase; color: var(--ink-soft); }
.w-fact__v { font-size: 16px; color: var(--ink); font-weight: 500; }

/* ---------- Experience timeline ---------- */
.w-exp { display: flex; flex-direction: column; gap: 0; margin-top: 44px; }
.w-exp__row { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 32px 0;
              border-top: 1px solid var(--hairline-dark); }
.w-exp__row:last-child { border-bottom: 1px solid var(--hairline-dark); }
.w-exp__when { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
               color: var(--on-dark-soft); line-height: 1.7; }
.w-exp__when b { color: var(--on-dark-mute); font-weight: 500; display: block; }
.w-exp__firm { font-family: var(--font-display); font-weight: 600; font-size: 13px;
               letter-spacing: 0.04em; text-transform: uppercase; color: var(--on-dark);
               margin-top: 10px; }
.w-exp__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.w-exp__list { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.w-exp__list li { position: relative; padding-left: 22px; font-size: 15.5px; line-height: 1.55;
                  color: var(--on-dark-mute); }
.w-exp__list li::before { content: ""; position: absolute; left: 2px; top: 0.62em;
                          width: 6px; height: 6px; border-radius: 50%; background: var(--signal-bright); }

/* ---------- Practice areas ---------- */
.w-areas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 44px; }
.w-area__n { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
             color: var(--ink-soft); }
.w-area h3 { margin: 14px 0 10px; }
.w-area p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-mute); }

/* ---------- Writing ---------- */
.w-posts { display: flex; flex-direction: column; gap: 0; margin-top: 40px; }
.w-post { display: grid; grid-template-columns: 120px 1fr auto; gap: 32px; align-items: center;
          padding: 26px 0; border-top: 1px solid var(--hairline-dark); text-decoration: none;
          color: inherit; transition: padding-left 0.2s ease; }
.w-post:last-child { border-bottom: 1px solid var(--hairline-dark); }
.w-post:hover { padding-left: 10px; }
.w-post__date { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
                color: var(--on-dark-soft); }
.w-post__title { font-family: var(--font-display); font-weight: 500; font-size: 21px;
                 letter-spacing: -0.01em; color: var(--on-dark); line-height: 1.25; }
.w-post__arrow { color: var(--on-dark-soft); display: flex; transition: color 0.2s ease, transform 0.2s ease; }
.w-post:hover .w-post__arrow { color: var(--signal-bright); transform: translate(3px, -3px); }
.w-post__arrow svg { width: 22px; height: 22px; }

/* ---------- Contact ---------- */
.w-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.w-contact__form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.w-contact__form .w-col-2 { grid-column: 1 / -1; }
.w-links { display: flex; flex-direction: column; gap: 0; }
.w-link { display: flex; align-items: center; justify-content: space-between; gap: 16px;
          padding: 18px 0; border-top: 1px solid var(--hairline-light); text-decoration: none;
          color: var(--ink); font-size: 17px; font-weight: 500; transition: color 0.15s ease; }
.w-link:last-child { border-bottom: 1px solid var(--hairline-light); }
.w-link:hover { color: var(--signal); }
.w-link__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
             text-transform: uppercase; color: var(--ink-soft); font-weight: 400; }

/* Top nav — fixed overlay. Скрыта на первом экране (герой), выезжает при скролле
   вниз и снова прячется у самого верха страницы (классы навешивает App). */
.w-nav-sticky { position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease; }
.w-nav-sticky--hide { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.w-nav-sticky--show { transform: none; opacity: 1; }

/* «Листай» — указатель внизу первого экрана; гаснет, как только начался скролл */
.w-scrolldown { position: absolute; left: 50%; bottom: clamp(20px, 4vh, 38px);
  transform: translateX(-50%); z-index: 2; display: inline-flex; flex-direction: column;
  align-items: center; gap: 7px; text-decoration: none; color: var(--on-dark-soft);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease; }
.w-scrolldown:hover { color: var(--on-dark-mute); }
.w-scrolldown__arrow { display: inline-flex; animation: wScrollBob 1.8s ease-in-out infinite; }
.w-scrolldown__arrow svg { width: 22px; height: 22px; }
.w-scrolldown--hide { opacity: 0; pointer-events: none; transform: translate(-50%, 10px); }
@keyframes wScrollBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .w-scrolldown__arrow { animation: none; } }

@media (max-width: 920px) {
  .w-hero, .w-about, .w-contact { grid-template-columns: 1fr; gap: 36px; }
  .w-areas { grid-template-columns: 1fr; }
  .w-exp__row { grid-template-columns: 1fr; gap: 16px; }
  .w-post { grid-template-columns: 1fr auto; }
  .w-post__date { display: none; }
  .w-contact__form { grid-template-columns: 1fr; }
}

/* Custom brand cursor removed — the site uses the default system cursor. */

/* ============================================================
   v2 LAYOUT — restructured one-page portfolio.
   Hero (tagline + huge portrait) · Profile · Experience table ·
   Education · Distinctions · Practice & Projects · Writing cards ·
   Contact links. Tokens come from styles.css.
   ============================================================ */

/* ---------- Hero (tagline-led, bigger portrait) ---------- */
.w-hero { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
.w-hero__kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--signal-bright); margin: 0 0 22px; }
.w-hero__headline { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.035em;
  line-height: 1.0; margin: 0; font-size: clamp(40px, 6.4vw, 80px); color: var(--on-dark); }
.w-hero__headline em { font-style: normal; color: var(--signal-bright); }
.w-hero .w-portrait { aspect-ratio: 3 / 4; max-height: 560px; margin-left: auto; }

/* ---------- Profile (§01 — name reveal) ---------- */
.w-profile { display: grid; grid-template-columns: 1.2fr 0.88fr; gap: 30px; align-items: start; }
.w-profile__name { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.0; margin: 8px 0 0; font-size: clamp(30px, 3.4vw, 46px); color: var(--ink); }
.w-profile__desc { font-size: 17px; line-height: 1.6; color: var(--ink-body); margin: 0 0 18px; max-width: 36em; }
.w-profile__desc:first-child { margin-top: 0; }
.w-profile__desc b { color: var(--ink); font-weight: 600; }

/* About intro — relatively large text with a SplitText word-reveal on scroll */
.w-split { font-size: clamp(19px, 1.65vw, 25px); line-height: 1.5; max-width: 22em; }
.w-split__w { display: inline-block; opacity: 0; transform: translateY(0.6em); }
.w-split.is-in .w-split__w { animation: wSplitIn 0.62s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.w-split__w--b { font-weight: 600; color: var(--ink); }
.w-split__w--i { font-style: italic; color: var(--ink); }
/* Маркерное «рисованное» подчеркивание (как в Magic UI Highlighter, action="underline").
   Текст остается обычным темным, под фразой проходит синяя линия от руки (Signal Blue).
   Цвет линии зашит в SVG (#2E5CFF = --signal) — иначе var() в data-URI не работает.
   В About класс висит на каждом слове-внутри-фразы (.w-split__w), поэтому линия
   проявляется ровно вместе с появлением слова. w-marker--cont добавляет правый отступ,
   чтобы линия шла непрерывно сквозь пробел до следующего слова фразы. */
.w-marker {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%2014'%20preserveAspectRatio='none'%3E%3Cpath%20d='M3,8%20C60,3%20120,11.5%20180,6.5%20C232,2.5%20270,10%20297,7'%20fill='none'%20stroke='%232E5CFF'%20stroke-width='3.4'%20stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 100%;
  background-size: 100% 0.42em;
  padding-bottom: 0.12em;
}
.w-marker--cont { padding-right: 0.3em; }
@keyframes wSplitIn { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .w-split__w { opacity: 1; transform: none; }
  .w-split.is-in .w-split__w { animation: none; }
}
.w-profile__portrait { aspect-ratio: 4 / 5; width: 100%; max-width: 460px;
  border-radius: var(--radius-xl); overflow: hidden; position: relative; }
.w-profile__portrait image-slot, .w-profile__portrait img { width: 100%; height: 100%; display: block; object-fit: cover; }
.w-profile__facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; }

/* ---------- Experience — table ---------- */
.w-table { margin-top: 44px; border-top: 1px solid var(--hairline-dark); }
.w-trow { display: grid; grid-template-columns: 1fr 1.7fr; gap: 40px; padding: 36px 0;
  border-bottom: 1px solid var(--hairline-dark); }
.w-trow__co { display: flex; flex-direction: column; gap: 10px; }
.w-trow__name { font-family: var(--font-display); font-weight: 600; font-size: 20px;
  letter-spacing: -0.01em; color: var(--on-dark); }
.w-trow__when { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--on-dark-soft); line-height: 1.7; }
.w-trole { padding: 0 0 18px; }
.w-trole:last-child { padding-bottom: 0; }
.w-trole__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.w-trole__title { font-family: var(--font-sans); font-weight: 600; font-size: 16px; color: var(--on-dark); }
.w-trole__when { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--on-dark-soft); }
.w-trole__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-width: 62ch; }
.w-trole__list li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.55; color: var(--on-dark-mute); }
.w-trole__list li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--signal-bright); }

/* ---------- Education / Distinctions — generic row table ---------- */
.w-rows { margin-top: 40px; }
.w-row { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: 40px; padding: 28px 0; align-items: start; }
.w-row__k { display: flex; flex-direction: column; gap: 8px; }
.w-row__title { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.w-row__meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; }
.w-row__v p { margin: 0 0 10px; font-size: 16px; line-height: 1.6; }
.w-row__v p:last-child { margin-bottom: 0; }
/* dark variant */
.w-band--dark .w-rows { border-top: 1px solid var(--hairline-dark); }
.w-band--dark .w-row { border-bottom: 1px solid var(--hairline-dark); }
.w-band--dark .w-row__title { color: var(--on-dark); }
.w-band--dark .w-row__meta { color: var(--on-dark-soft); }
.w-band--dark .w-row__v p { color: var(--on-dark-mute); }
/* light variant */
.w-band--light .w-rows { border-top: 1px solid var(--hairline-light); }
.w-band--light .w-row { border-bottom: 1px solid var(--hairline-light); }
.w-band--light .w-row__title { color: var(--ink); }
.w-band--light .w-row__meta { color: var(--ink-soft); }
.w-band--light .w-row__v p { color: var(--ink-body); }

/* ---------- Practice & Projects ---------- */
.w-prac { margin-top: 44px; border-top: 1px solid var(--hairline-light); }
.w-pracline { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--hairline-light); }
.w-pracline__h { display: flex; align-items: center; gap: 12px; }
.w-pracline__h h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 19px;
  letter-spacing: -0.01em; color: var(--ink); }
.w-pracline__body { font-size: 16px; line-height: 1.6; color: var(--ink-mute); margin: 0; max-width: 58ch; }
.w-projects { margin-top: 52px; }
.w-projects__head { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 18px; }
.w-projgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.w-proj h3 { margin: 0 0 8px; font-size: 17px; }
.w-proj p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-mute); }
.w-proj__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; display: block; }

/* ---------- Writing — category legend + cards ---------- */
.w-cats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 28px; }
.w-cat { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-mute); }
.w-cat__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.w-cat--arbitration .w-cat__dot { background: var(--area-arbitration); }
.w-cat--itip .w-cat__dot { background: var(--area-itip); }
.w-cat--crypto .w-cat__dot { background: var(--area-crypto); }
.w-cat--ai .w-cat__dot { background: var(--area-ai); }
/* Категории-чипы (Tag) — единый капс-режим по всему сайту, шрифт чипа сохраняем. */
.ad-tag { text-transform: uppercase; letter-spacing: 0.04em; }

.w-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 40px; }
.w-card { display: flex; flex-direction: column; gap: 14px; padding: 26px; text-decoration: none;
  background: var(--surface-elevated); border: 1px solid var(--hairline-dark); border-radius: var(--radius-lg);
  color: inherit; transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease; }
.w-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.22); background: #1b1e24; }
.w-card__top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.w-card__src { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-soft); }
.w-card__title { font-family: var(--font-display); font-weight: 500; font-size: 21px; letter-spacing: -0.01em;
  line-height: 1.25; color: var(--on-dark); }
.w-card__excerpt { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--on-dark-soft);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.w-card__foot { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.w-card__date { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--on-dark-soft); }
.w-card__more { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-dark);
  transition: color 0.2s ease; }
.w-card:hover .w-card__more { color: var(--signal-bright); }
.w-card__arrow { color: inherit; display: flex; transition: color 0.2s ease, transform 0.2s ease; }
.w-card:hover .w-card__arrow { color: var(--signal-bright); transform: translate(3px, -3px); }
.w-card__arrow svg { width: 18px; height: 18px; }

/* ---------- AI content — «coming soon» guide card ---------- */
.w-card--soon { cursor: default; }
.w-card--soon:hover { transform: none; border-color: var(--hairline-dark); background: var(--surface-elevated); }
.w-card__cover { position: relative; overflow: hidden; border-radius: var(--radius-md);
  aspect-ratio: 16 / 9; background: var(--canvas-light); }
.w-card__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Фолбэк «Introducing Claude Cowork», если файла фото еще нет (img onError→display:none) */
.w-cowork { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; background: var(--canvas-light); color: #1a1c20; }
.w-cowork__intro { font-family: var(--font-sans); font-size: 14px; color: rgba(10,11,13,0.55); }
.w-cowork__name { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em; }
.w-cowork__name::before { content: "§ "; color: var(--signal); }
/* «Скоро» badge на обложке (с замком) */
.w-soon { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: var(--radius-full); font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: rgba(10,11,13,0.82);
  backdrop-filter: blur(4px); }
/* «Заблокированный» текст-анонс — размыт, как в референсе */
.w-card__excerpt--locked { filter: blur(3px); opacity: 0.55; user-select: none; }
/* «Скоро» pill в подвале карточки */
.w-soon-pill { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--signal-bright); background: rgba(46,92,255,0.14); border: 1px solid rgba(46,92,255,0.32);
  border-radius: var(--radius-full); padding: 6px 13px; }

.w-writing__links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }

/* ---------- Contact — links only ---------- */
.w-contact--links { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
/* Centered contact block — heading + buttons in a horizontal row */
.w-contact--center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 36px; }
.w-contact__btns { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 14px; }

@media (max-width: 920px) {
  .w-hero, .w-profile, .w-contact--links { grid-template-columns: 1fr; gap: 36px; }
  .w-hero .w-portrait { max-height: 460px; }
  .w-trow, .w-row, .w-pracline { grid-template-columns: 1fr; gap: 14px; }
  .w-projgrid, .w-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   Portrait treatment — black & white + film grain.
   Applies to the hero and profile photos (rendered via <image-slot>,
   styled from outside its shadow DOM through ::part).
   ============================================================ */

/* B&W, slightly punchier to sit against the near-black canvas */
.w-portrait image-slot::part(image),
.w-profile__portrait image-slot::part(image) {
  filter: grayscale(1) contrast(1.06) brightness(0.98);
}

/* Film grain (по мотивам React Bits <Noise/>) — анимированный зернистый шум
   поверх фото. ПЕРЕИСПОЛЬЗУЕМЫЙ КЛАСС .w-grain — кладется внутрь любого фото-контейнера
   (position:relative; overflow:hidden) и по умолчанию применяется ко всем фото, КРОМЕ
   логотипов/эмблем. На портретах тот же эффект дает ::after. */
.w-portrait::after,
.w-profile__portrait::after,
.w-grain {
  content: "";
  position: absolute;
  inset: -25%;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  animation: wGrain 0.45s steps(1) infinite;
}
.w-portrait::after, .w-profile__portrait::after { z-index: 1; opacity: 0.42; }
.w-grain { z-index: 2; opacity: 0.5; }
@keyframes wGrain {
  0%   { background-position: 0 0; }
  20%  { background-position: -32px 18px; }
  40%  { background-position: 24px -28px; }
  60%  { background-position: -18px 34px; }
  80%  { background-position: 30px 12px; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .w-portrait::after, .w-profile__portrait::after, .w-grain { animation: none; }
}

/* A faint vignette to seat the photo into the dark canvas */
.w-portrait::before,
.w-profile__portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 70px rgba(10, 11, 13, 0.55);
}

/* Click-to-open overlay on the About portrait — same lightbox idea as the hero avatar */
.w-portrait-open { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center;
  border: 0; padding: 0; cursor: zoom-in; background: transparent; color: #fff;
  transition: background 0.25s ease; -webkit-appearance: none; appearance: none; }
.w-portrait-open svg { opacity: 0; transform: scale(0.9); transition: opacity 0.25s ease, transform 0.25s ease;
  filter: drop-shadow(0 2px 6px rgba(10,11,13,0.5)); }
.w-profile__portrait:hover .w-portrait-open { background: rgba(10, 11, 13, 0.28); }
.w-profile__portrait:hover .w-portrait-open svg { opacity: 1; transform: scale(1); }
.w-portrait-open:focus-visible { outline: 2px solid var(--signal-bright); outline-offset: -4px; }

/* ============================================================
   Russian edition — Cyrillic display fallback + layout tweaks.
   Space Grotesk has no Cyrillic glyphs, so Manrope (loaded in
   index.html) carries Cyrillic display text; Latin still uses
   Space Grotesk. Body/mono = IBM Plex (Cyrillic native).
   ============================================================ */
:root {
  --font-display: "Space Grotesk", "Manrope", "Inter Display", system-ui, sans-serif;
}

/* ---------- Hero — centered, no portrait ---------- */
/* min-width:0 — flex-item не должен растягиваться под интринсик-ширину контента */
#top > .w-inner { min-width: 0; }
.w-hero--center { display: block; text-align: center; max-width: 1000px; margin: 0 auto; min-width: 0; }
.w-hero--center .w-hero__kicker { color: var(--signal-bright); }
.w-hero--center .w-hero__headline { font-size: clamp(40px, 6vw, 74px); }
/* Заголовок в одну строку: «Юрист, возраст которого — преимущество».
   Шрифт подобран так, чтобы строка укладывалась в общий контейнер сайта. */
/* НЕ используем white-space: nowrap — иначе интринсик-ширина строки растягивает
   весь документ за пределы экрана. Шрифт подобран так, что на десктопе текст
   укладывается в одну строку сам, а на узких окнах аккуратно переносится. */
.w-hero__headline--oneline { font-size: clamp(19px, 2.5vw, 31px); max-width: 100%;
  letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: break-word; }
.w-hero--center .w-hero__headline em { font-style: italic; color: var(--signal-bright); }
.w-hero--center .w-hero__role { margin-left: auto; margin-right: auto; max-width: 34em; }
.w-hero--center .w-hero__cta { justify-content: center; }

/* Scroll-reveal — элементы плавно появляются при входе во вьюпорт и убираются при выходе.
   Класс навешивает reveal.js; до этого контент виден (без JS / при reduce-motion). */
.w-reveal { opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.w-reveal.w-reveal--in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .w-reveal { opacity: 1; transform: none; transition: none; }
}

/* Hero avatar — круглый портрет-медальон над заголовком. Светлый кадр на темном
   канвасе работает как акцент; тонкая обводка хайрлайном + сдержанный signal-ринг.
   Цветокоррекция фильтром: чуть холоднее и контрастнее, под общую палитру. */
.w-hero__avatar { display: block; width: clamp(132px, 16vw, 200px); aspect-ratio: 1;
  border-radius: var(--radius-full); overflow: hidden; position: relative;
  margin: 0 auto clamp(28px, 3.6vw, 42px); padding: 0; border: 0; background: none;
  cursor: pointer; -webkit-appearance: none; appearance: none;
  box-shadow: 0 0 0 1px var(--hairline-dark), 0 0 0 7px rgba(46, 92, 255, 0.10);
  transition: box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.w-hero__avatar::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: var(--inset-hairline-dark); pointer-events: none; }
.w-hero__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%;
  filter: contrast(1.06) saturate(0.9) brightness(1.01) hue-rotate(-4deg);
  transition: filter 0.3s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.w-hero__avatar:hover { transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--signal), 0 0 0 7px rgba(46, 92, 255, 0.18); }
.w-hero__avatar:hover img { transform: scale(1.04); filter: contrast(1.06) saturate(1) brightness(1.03) hue-rotate(-4deg); }
.w-hero__avatar:focus-visible { outline: 2px solid var(--signal-bright); outline-offset: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .w-hero--portrait .w-hero__avatar { animation: wRise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: 0s; }
}

/* Lightbox — фото в полном размере поверх затемненного фона. */
.w-lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center;
  justify-content: center; padding: clamp(20px, 5vw, 64px);
  background: rgba(10, 11, 13, 0.86); backdrop-filter: blur(6px); cursor: zoom-out;
  animation: wFade 0.24s ease both; }
.w-lightbox__img { max-width: min(92vw, 720px); max-height: 90vh; width: auto; height: auto;
  object-fit: contain; border-radius: var(--radius-lg); cursor: default;
  box-shadow: 0 0 0 1px var(--hairline-dark); animation: wRise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.w-lightbox__close { position: absolute; top: clamp(16px, 3vw, 28px); right: clamp(16px, 3vw, 28px);
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  color: var(--on-dark); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-full); transition: background 0.2s ease; }
.w-lightbox__close:hover { background: rgba(255, 255, 255, 0.14); }
@keyframes wFade { from { opacity: 0; } to { opacity: 1; } }

/* Typing effect (по мотивам React Bits TextType): «преимущество» печатается в Signal Blue
   с мигающим курсором. Курсор мигает CSS-анимацией (без gsap). */
.w-type { display: inline; white-space: normal; }
.w-type__text { color: inherit; }
.w-type__hl { color: var(--signal-bright); }
.w-type__cursor { display: inline-block; margin-left: 0.04em; color: var(--signal-bright);
  font-weight: 300; animation: wCaret 1s step-end infinite; }
@keyframes wCaret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .w-type__cursor { animation: none; opacity: 0; } }

/* ---------- Profile — practice areas as a full-width labeled row ---------- */
.w-practice-col { margin-top: 40px; }
.w-practice-col__h { font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 16px; }
/* Practice areas as large cards (2×2) — в стиле карточек блога, но на светлом фоне.
   Порядок внутри: цветная плашка → иконка → название (описание убрано). */
.w-areacards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.w-areacard { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px;
  min-height: 158px; background: #fff; border: 1px solid var(--hairline-light); border-radius: var(--radius-lg);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.w-areacard:hover { transform: translateY(-3px); border-color: rgba(10,11,13,0.16);
  box-shadow: 0 10px 28px rgba(10,11,13,0.08); }
.w-areacard__dot { width: 30px; height: 8px; border-radius: var(--radius-full); flex: none; }
.w-areacard__dot--arbitration { background: var(--area-arbitration); }
.w-areacard__dot--itip { background: var(--area-itip); }
.w-areacard__dot--crypto { background: var(--area-crypto); }
.w-areacard__dot--other { background: var(--area-other); }
.w-areacard__icon { width: 32px; height: 32px; object-fit: contain; display: block; }
.w-areacard__title { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 21px;
  letter-spacing: -0.01em; line-height: 1.25; color: var(--ink); }
.w-areacard__desc { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-body); }
@media (max-width: 720px) { .w-areacards { grid-template-columns: 1fr; } }

/* ---------- Experience — company logos + career track ---------- */
/* company logos sit on a light chip → original colours, no distortion, correct aspect */
.w-colo-chip { display: inline-flex; align-items: center; justify-content: center; height: 56px;
  padding: 0 18px; background: #fff; border-radius: 12px; margin-bottom: 16px; }
.w-colo-chip img { display: block; width: auto; object-fit: contain; }
.w-colo-chip--al img { height: 38px; }
.w-colo-chip--revera img { height: 22px; }
.w-track { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.w-track__step { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--on-dark-soft); white-space: nowrap; display: inline-flex;
  align-items: center; gap: 7px; }
.w-track__step::before { content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--on-dark-soft); flex: none; }
.w-track__step--now { color: var(--on-dark); }
.w-track__step--now::before { background: var(--signal-bright); box-shadow: 0 0 0 4px rgba(46,92,255,0.18); }
.w-track__line { flex: 1; height: 1px; min-width: 28px;
  background: linear-gradient(90deg, var(--hairline-dark), var(--signal)); }

/* ---------- Education, achievements & hobbies — full-width category flow ---------- */
.w-edu-meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--ink-soft); margin: 14px 0 0; }
/* Эмблема БГУ по центру + годы/город под ней */
.w-edu-uni { display: flex; flex-direction: column; align-items: center; text-align: center;
  margin-top: 36px; }
.w-edu-uni__logo { width: 100%; max-width: 460px; height: auto; display: block; }
.w-edu-uni__meta { font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: -0.01em; color: var(--signal); margin: 16px 0 0; }
/* По центру — только заголовок секции, эмблема БГУ и строка «2023 — 2027 · Минск».
   Сами категории (Университетские активности и далее) — по левому краю. */
#education .w-section-title { text-align: center; }
/* Колонка идет одной лентой вниз по центру страницы; текст внутри — слева */
.w-edu-flow { max-width: 760px; margin: 44px auto 0; display: flex; flex-direction: column;
  text-align: left; }
.w-edu-block { padding: 30px 0; border-top: 1px solid var(--hairline-light); }
.w-edu-block:first-child { padding-top: 4px; border-top: 0; }
.w-edu-block:last-child { padding-bottom: 0; }
.w-edu-cat { display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); }
.w-edu-cat__s { color: var(--signal); font-weight: 600; }
.w-edu-block > p { font-size: clamp(16px, 1.12vw, 18px); line-height: 1.7; color: var(--ink-body); margin: 0 0 16px; }
.w-edu-block > p:last-child { margin-bottom: 0; }
.w-edu-prose__label { font-weight: 600; color: var(--ink) !important; margin: 0 0 16px !important;
  font-size: clamp(16px, 1.12vw, 18px); }
.w-edu-block a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.w-edu-block a:hover { color: var(--ink-soft); }
/* Ссылка «Ознакомиться с текстом работы» — после точки, со стрелкой как на карточках постов */
.w-edu-doclink { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  text-decoration: none !important; font-weight: 400; }
.w-edu-doclink .w-edu-arrow { transition: transform 0.2s ease; }
.w-edu-doclink:hover .w-edu-arrow { transform: translate(2px, -2px); }
/* § marker hangs left; текст обернут в span и течет ровным абзацем (не ломается флексом) */
.w-achlist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.w-achlist li { display: flex; gap: 12px; font-size: clamp(15px, 1.05vw, 17px); line-height: 1.65; color: var(--ink-body); }
.w-achlist li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal); margin-top: 0.62em; }
.w-achlist li > span { flex: 1; min-width: 0; }
.w-achlist a { color: var(--ink); text-underline-offset: 2px; }

/* ---------- Contact — link icons ---------- */
.w-link__icon { display: inline-flex; width: 18px; height: 18px; color: var(--ink-soft);
  flex: none; margin-right: 14px; transition: color 0.15s ease; }
.w-link__icon svg { width: 100%; height: 100%; }
.w-link:hover .w-link__icon { color: var(--signal); }
.w-link__main { display: flex; align-items: center; min-width: 0; }
.w-link__main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 920px) {
  .w-hero--center .w-hero__headline { font-size: clamp(34px, 9vw, 52px); }
}

/* ============================================================
   v3 — custom nav, fullscreen hero, bold section titles,
   vertical career track, footer trim.
   ============================================================ */

/* ---------- Custom top nav (logo + glow, no locale) ---------- */
.w-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 88px; padding: 0 var(--gutter); background: var(--canvas-dark); color: var(--on-dark);
  border-bottom: 1px solid var(--divider-soft); }
.w-nav__logo { display: inline-flex; align-items: center; }
/* logo is dark monochrome → recolor to white for the dark nav, keep a signal glow */
.w-nav__logo img { height: 68px; width: auto; display: block;
  filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(46, 92, 255, 0.5)); }
/* Pill nav ("tubelight") — rounded container, active tab gets a glowing lamp */
.w-navpill { display: flex; align-items: center; gap: 4px; padding: 5px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-full); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
/* Expandable tabs: по умолчанию виден только значок, при наведении (или на активной
   секции) ярлык выезжает справа — «пояснялочка» к иконке. */
.w-navpill__item { position: relative; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  color: var(--on-dark-mute); text-decoration: none; padding: 9px 12px; border-radius: var(--radius-full);
  transition: color 0.18s ease, background 0.18s ease; }
.w-navpill__item:hover { color: var(--on-dark); background: rgba(255, 255, 255, 0.06); }
.w-navpill__item--active { color: var(--signal-bright); background: rgba(46, 92, 255, 0.10); }
.w-navpill__icon { display: inline-flex; }
.w-navpill__icon svg { display: block; width: 19px; height: 19px; }
.w-navpill__label { display: inline-block; max-width: 0; margin-left: 0; opacity: 0; overflow: hidden;
  white-space: nowrap; transition: max-width 0.42s cubic-bezier(0.2, 0.7, 0.2, 1),
  margin-left 0.42s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease; }
.w-navpill__item:hover .w-navpill__label,
.w-navpill__item--active .w-navpill__label { max-width: 200px; margin-left: 8px; opacity: 1; }
/* the lamp: a small bar on the top edge of the active tab, glowing upward */
.w-navpill__lamp { position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  width: 32px; height: 4px; background: var(--signal-bright); border-radius: 0 0 6px 6px; }
.w-navpill__lamp > span { position: absolute; left: 50%; top: -7px; transform: translateX(-50%);
  width: 48px; height: 16px; background: var(--signal-bright); opacity: 0.35;
  border-radius: 50%; filter: blur(10px); }
.w-nav__right { display: flex; align-items: center; }
/* On touch screens hover не срабатывает — на узких экранах ярлык активной секции
   все равно раскрыт благодаря .w-navpill__item--active. */
@media (max-width: 540px) { .w-nav__right { display: none; } }

/* ---------- Fullscreen hero + entrance animation ---------- */
@keyframes wRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.w-hero--center .w-hero__headline,
.w-hero--center .w-hero__role,
.w-hero--center .w-hero__cta { animation: wRise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.w-hero--center .w-hero__headline { animation-delay: 0.05s; }
.w-hero--center .w-hero__role { animation-delay: 0.24s; }
.w-hero--center .w-hero__cta { animation-delay: 0.42s; }
@media (prefers-reduced-motion: reduce) {
  .w-hero--center .w-hero__headline,
  .w-hero--center .w-hero__role,
  .w-hero--center .w-hero__cta { animation: none; }
}

/* ---------- Bold section titles (replace § kickers) ---------- */
.w-section-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.07; font-size: clamp(28px, 3.2vw, 40px); margin: 0; }
.w-band--dark .w-section-title { color: var(--on-dark); }
.w-band--light .w-section-title { color: var(--ink); }
.w-subhead { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 0 14px; }
.w-band--dark .w-subhead { color: var(--on-dark-soft); }

/* ---------- Vertical career track (trainee → assistant) ---------- */
/* Roles without a vertical track (single role) align to the same left line
   as the tracked roles above, so all bullet paragraphs share one column. */
.w-vsolo { padding-left: 30px; margin-top: 4px; }
.w-vtrack { margin-top: 4px; }
.w-vtrack__item { position: relative; padding-left: 30px; padding-bottom: 26px; }
.w-vtrack__item:last-child { padding-bottom: 0; }
.w-vtrack__item::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: -4px;
  width: 1.5px; background: linear-gradient(var(--hairline-dark), var(--signal)); }
.w-vtrack__item:last-child::before { display: none; }
.w-vtrack__dot { position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--on-dark-soft); }
.w-vtrack__item--now .w-vtrack__dot { background: var(--signal-bright); box-shadow: 0 0 0 4px rgba(46,92,255,0.18); }

/* ---------- Footer trim — hide the "Built with intent" mark ---------- */
.ad-footer__bottom .ad-footer__legal:last-child { display: none; }

/* ---------- Custom footer (big Демченко Legal logo) ---------- */
.w-footer { background: var(--canvas-dark); color: var(--on-dark-mute);
  padding: var(--space-9) var(--gutter) var(--space-6); }
.w-footer__inner { max-width: var(--container); margin: 0 auto; }
.w-footer__top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap;
  padding-bottom: var(--space-8); }
.w-footer__brand { max-width: 380px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
/* height-driven, width:auto, never stretched → native aspect ratio always preserved */
.w-footer__logo { height: 104px; width: auto; max-width: 100%; object-fit: contain; align-self: flex-start; display: block;
  filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(46, 92, 255, 0.4)); }
.w-footer__tag { font-family: var(--font-sans); font-size: 15px; line-height: 1.6; color: var(--on-dark-mute); margin: 0; }
.w-footer__cols { display: flex; gap: 64px; flex-wrap: wrap; }
.w-footer__col { display: flex; flex-direction: column; gap: 14px; }
.w-footer__h { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--on-dark-soft); }
.w-footer__link { font-family: var(--font-sans); font-size: 14px; color: var(--on-dark-mute);
  text-decoration: none; transition: color 0.14s ease; }
.w-footer__link:hover { color: var(--on-dark); }
.w-footer__bottom { padding-top: var(--space-5); border-top: 1px solid var(--divider-soft); }
.w-footer__legal { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--on-dark-soft); }

/* ---------- AI page — kicker + light module cards (placeholders) ---------- */
.w-kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal-bright); margin: 0 0 20px; }
.w-soon { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; margin-top: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--signal-bright); border: 1px solid rgba(46,92,255,0.5); border-radius: var(--radius-full); }
.w-lcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.w-lcard { display: flex; flex-direction: column; gap: 12px; padding: 26px; background: #fff;
  border: 1px solid var(--hairline-light); border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.w-lcard:hover { transform: translateY(-3px); border-color: rgba(10,11,13,0.16); box-shadow: 0 12px 30px rgba(10,11,13,0.08); }
.w-lcard__n { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--signal); }
.w-lcard__t { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
.w-lcard__d { font-size: 15px; line-height: 1.6; color: var(--ink-mute); margin: 0; }
@media (max-width: 860px) { .w-lcards { grid-template-columns: 1fr; } }

/* ---------- Blog — category filter ---------- */
.w-catfilter { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.w-catbtn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 15px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--on-dark-mute); background: transparent; border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-full); cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.w-catbtn:hover { color: var(--on-dark); border-color: rgba(255,255,255,0.3); }
.w-catbtn--active { color: var(--on-dark); border-color: var(--signal); background: rgba(46,92,255,0.12); }
/* Метки категорий в самих карточках — тот же mono, что и фильтры (единый «околокомпьютерный» шрифт) */
.w-card .ad-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; }
.w-catbtn__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.w-catbtn__dot--arbitration { background: var(--area-arbitration); }
.w-catbtn__dot--itip { background: var(--area-itip); }
.w-catbtn__dot--crypto { background: var(--area-crypto); }
.w-catbtn__dot--ai { background: var(--area-ai); }
.w-catbtn__dot--other { background: var(--area-other); }
/* Метка «Иное» в карточках поста (Tag area="other" — нет в базовом компоненте, задаем тут) */
.ad-tag--other .ad-tag__dot { background: var(--area-other); }
.w-cards-empty { margin-top: 32px; color: var(--on-dark-soft); font-size: 15px; }

/* «Посмотреть все» — раскрывает остальные карточки */
.w-writing__more { display: flex; justify-content: center; margin-top: 28px; }
.w-morebtn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 22px;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px; color: var(--on-dark);
  background: transparent; border: 1px solid var(--hairline-dark); border-radius: var(--radius-md);
  cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.w-morebtn:hover { border-color: rgba(255,255,255,0.32); background: rgba(255,255,255,0.04); }
.w-morebtn__chev { display: inline-flex; color: var(--on-dark-soft); transition: transform .2s ease; }
.w-morebtn__chev--up { transform: rotate(180deg); }

/* ============================================================
   Mobile responsive improvements
   ============================================================ */

/* ---------- 768px and below — general layout ---------- */
@media (max-width: 768px) {
  :root {
    --band-pad: 56px;
    --band-pad-hero: 80px;
  }

  /* Nav: compact height + smaller logo */
  .w-nav { height: 68px; }
  .w-nav__logo img { height: 46px; }

  /* Hero: tighten internal spacing */
  .w-hero__cta { margin-top: 22px; }
  .w-hero__meta { margin-top: 24px; padding-top: 18px; }

  /* About: tighten top margin */
  .w-profile { margin-top: 28px !important; }

  /* Experience: no left-indent in 1-column layout — wastes horizontal space */
  .w-vsolo { padding-left: 0; }
  .w-vtrack__item { padding-left: 22px; padding-bottom: 18px; }

  /* Experience table: less vertical padding per row */
  .w-trow { padding: 24px 0; }

  /* Education: tighter flow + cap BSU logo so it doesn't dominate the screen */
  .w-edu-flow { margin-top: 28px; }
  .w-edu-block { padding: 22px 0; }
  .w-edu-uni { margin-top: 24px; }
  .w-edu-uni__logo { max-width: 240px; }

  /* Writing cards: smaller title on narrow */
  .w-card__title { font-size: 18px; }

  /* Footer: smaller logo, stack cols */
  .w-footer { padding-top: var(--space-7); }
  .w-footer__logo { height: 72px; }
  .w-footer__top { gap: 32px; flex-direction: column; }
  .w-footer__cols { gap: 32px; }
}

/* ---------- 540px and below — phone-specific ---------- */
@media (max-width: 540px) {
  .w-nav__right { display: none; }

  /* Pill nav: icon-only on mobile.
     Without this fix the active tab expands its label and the last
     icon clips off-screen on 390px devices. */
  .w-navpill__item--active .w-navpill__label,
  .w-navpill__item:hover .w-navpill__label {
    max-width: 0 !important;
    margin-left: 0 !important;
    opacity: 0 !important;
  }
  .w-navpill__item { padding: 8px 10px; }
  .w-navpill { padding: 4px; gap: 2px; }

  /* Tighter horizontal gutter on small phones */
  :root { --gutter: 18px; }

  /* Hero: role text slightly smaller */
  .w-hero__role { font-size: 17px; }
  .w-hero__avatar { width: clamp(100px, 26vw, 140px); }

  /* About: portrait doesn't need to be as tall */
  .w-profile__portrait { max-width: 100%; }

  /* Section title: clamp for very narrow */
  .w-section-title { font-size: clamp(22px, 7.5vw, 36px); }

  /* Company logo chips: full width looks odd, cap them */
  .w-colo-chip { width: auto; align-self: flex-start; }

  /* Writing section: category filter wraps cleanly */
  .w-catfilter { gap: 8px; }
  .w-catbtn { font-size: 11px; padding: 0 12px; }

  /* Blog cards: full excerpt on small screens */
  .w-card { padding: 20px; }

  /* Footer */
  .w-footer__logo { height: 56px; }
}
