/* =========================================================
   Мальцев Артём — резюме · Liquid Glass, тёмная тема
   Mobile-first, без сборки
   ========================================================= */

:root {
  --bg: #06070c;
  --bg-2: #0b0d16;
  --text: #f4f5fa;
  --muted: #bcc1d2;
  --faint: #9aa0b5;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);

  --violet: #8b6cff;
  --cyan: #38d6ff;
  --pink: #ff6aa8;
  --green: #3ee08f;

  --grad: linear-gradient(100deg, #b8a6ff 0%, #6fe0ff 48%, #ff9cc6 100%);

  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.035) 45%, rgba(255, 255, 255, 0.06) 100%), rgba(14, 16, 26, 0.42);
  --glass-blur: blur(26px) saturate(175%);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 24px rgba(255, 255, 255, 0.025),
    0 24px 60px -28px rgba(0, 0, 0, 0.75);

  --r-xl: 36px;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --font-display: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* отступ под шапку; используется и в main.js */
  background: var(--bg);
}
body {
  min-height: 100vh;
  font: 400 1rem/1.65 var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
::selection { background: rgba(139, 108, 255, 0.45); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: #fff;
  color: #0a0b10;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}

kbd {
  font: 600 0.8em/1 var(--font-body);
  padding: 0.2em 0.5em;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Gradient text ---------- */
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* =========================================================
   Background: liquid blobs
   ========================================================= */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, #141632 0%, transparent 60%),
    radial-gradient(90% 70% at 100% 100%, #1a0f24 0%, transparent 60%),
    var(--bg);
}
.bg__inner { position: absolute; inset: -10% -10% -25%; }
.blob {
  position: absolute;
  display: block;
  width: 62vmax;
  aspect-ratio: 1;
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
  animation: blob-a 28s ease-in-out infinite alternate;
}
.blob--1 { top: -18%; left: -22%; background: radial-gradient(circle at 35% 35%, #6b4dff 0%, rgba(107, 77, 255, 0) 68%); }
.blob--2 { top: 22%; right: -30%; background: radial-gradient(circle at 50% 50%, #0fa3d6 0%, rgba(15, 163, 214, 0) 66%); animation-name: blob-b; animation-duration: 34s; opacity: 0.42; }
.blob--3 { bottom: -12%; left: -12%; width: 52vmax; background: radial-gradient(circle at 50% 50%, #d23f86 0%, rgba(210, 63, 134, 0) 66%); animation-name: blob-c; animation-duration: 30s; opacity: 0.32; }
.blob--4 { top: 55%; left: 30%; width: 36vmax; background: radial-gradient(circle at 50% 50%, #2fbf88 0%, rgba(47, 191, 136, 0) 66%); animation-name: blob-b; animation-duration: 40s; animation-direction: alternate-reverse; opacity: 0.18; }

@keyframes blob-a {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(12vw, 8vh, 0) rotate(120deg) scale(1.12); }
  100% { transform: translate3d(-4vw, 18vh, 0) rotate(240deg) scale(0.94); }
}
@keyframes blob-b {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(-14vw, -6vh, 0) rotate(-140deg) scale(1.15); }
  100% { transform: translate3d(-6vw, 14vh, 0) rotate(-260deg) scale(0.9); }
}
@keyframes blob-c {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1.05); }
  50%  { transform: translate3d(16vw, -10vh, 0) rotate(160deg) scale(0.92); }
  100% { transform: translate3d(6vw, -2vh, 0) rotate(300deg) scale(1.12); }
}
.bg__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(6, 7, 12, 0.75) 100%);
}

/* =========================================================
   Liquid glass
   ========================================================= */
.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  box-shadow: var(--glass-shadow);
}
/* Блик-граница: градиентная обводка через маску */
.glass::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.08) 28%, rgba(255, 255, 255, 0.02) 60%, rgba(255, 255, 255, 0.28) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
/* Подсветка за курсором + верхний блик */
.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), rgba(160, 140, 255, 0.16), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, transparent 22%);
  opacity: 0.6;
  transition: opacity 0.4s var(--ease);
}
.spot:hover::after,
.spot:focus-within::after { opacity: 1; }

/* Fallback: без backdrop-filter — плотное стекло */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), rgba(18, 20, 32, 0.94);
  }
}

/* =========================================================
   Navigation pill
   ========================================================= */
.nav {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 50;
  width: min(100% - 1.5rem, 760px);
  transform: translateX(-50%);
  transition: top 0.35s var(--ease);
}
.nav__pill {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 6px;
  border-radius: 999px;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.nav.is-scrolled .nav__pill {
  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)), rgba(10, 12, 20, 0.62);
}
.nav__brand {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font: 800 0.85rem/1 var(--font-display);
  letter-spacing: 0.02em;
  color: #0a0b10;
  background: linear-gradient(135deg, #d9cfff, #9fe9ff 55%, #ffc3dc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 18px -6px rgba(139, 108, 255, 0.8);
  transition: transform 0.3s var(--ease);
}
.nav__brand:hover { transform: rotate(-8deg) scale(1.05); }
.nav__links {
  position: relative;
  display: flex;
  flex: 1;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  mask: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  padding-inline: 6px;
}
.nav__links::-webkit-scrollbar { display: none; }
.nav__links a {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  font: 500 0.875rem/1.2 var(--font-body);
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.25s, background 0.25s;
}
.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav__links a[aria-current="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.nav__cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0 0.95rem 0 0.8rem;
  border-radius: 999px;
  font: 700 0.85rem/1 var(--font-display);
  color: #0a0b10;
  white-space: nowrap;
  background: linear-gradient(180deg, #ffffff 0%, #e4e8ff 100%);
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px -10px rgba(139, 108, 255, 0.9);
  transition: box-shadow 0.3s var(--ease), translate 0.3s var(--ease);
}
.nav__cta svg { width: 16px; height: 16px; flex: none; }
.nav__cta:hover { translate: 0 -1px; box-shadow: inset 0 1px 0 #fff, 0 10px 26px -8px rgba(56, 214, 255, 0.8); }

/* =========================================================
   Typography helpers
   ========================================================= */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 600 0.8rem/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.eyebrow__num {
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  letter-spacing: 0.04em;
}
.h2 {
  font: 800 clamp(2.1rem, 6.4vw, 4.25rem)/1.02 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.h2--xl { font-size: clamp(2.6rem, 9vw, 6rem); }
.section-lead {
  max-width: 40rem;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--muted);
  text-wrap: pretty;
}

.section { padding-block: clamp(5.5rem, 13vw, 10rem); }
.section-head {
  display: grid;
  gap: 1.1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.section-head--center { justify-items: center; text-align: center; }
.section-head--center .section-lead { margin-inline: auto; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 7.5rem 5rem;
  overflow-x: clip;
}
.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.hero__content { display: grid; gap: 1.6rem; justify-items: start; }
.hero__title {
  font: 800 clamp(2.9rem, 11.5vw, 7.4rem)/0.94 var(--font-display);
  letter-spacing: -0.045em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line__inner { display: inline-block; }

.hero__role {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.9rem;
  padding-bottom: 0.9rem;
  font: 600 clamp(1.15rem, 2.4vw, 1.5rem)/1.3 var(--font-display);
}
.hero__role strong { font-weight: 800; }
.hero__tags { color: var(--muted); font-weight: 500; }
.hero__tags i { font-style: normal; color: var(--faint); padding-inline: 0.15rem; }
.hero__squiggle {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(100%, 320px);
  height: 14px;
  overflow: visible;
}
.hero__lead {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 0.5rem; }

/* Контакт-пилюли под CTA */
.hero__contacts { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: -0.35rem; }
.cpill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 1rem 0 0.3rem;
  border-radius: 999px;
  font: 600 0.9rem/1.2 var(--font-display);
  color: var(--text);
  white-space: nowrap;
  transition: translate 0.35s var(--ease), border-color 0.35s var(--ease);
}
.cpill:hover {
  translate: 0 -2px;
  border-color: var(--line-strong);
  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)), rgba(14, 16, 26, 0.42);
}
.cpill__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(139, 108, 255, 0.4), rgba(56, 214, 255, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.4s var(--ease);
}
.cpill__icon svg { width: 17px; height: 17px; }
.cpill:hover .cpill__icon { transform: rotate(-8deg) scale(1.06); }

.hero__visual {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 440px);
  justify-content: center;
  gap: 1.5rem;
}

/* Фото в стеклянной рамке */
.hero__photo {
  justify-self: end;
  width: clamp(200px, 17vw, 240px);
  perspective: 900px;
}
.photo-card {
  padding: 8px;
  border-radius: 30px;
  box-shadow:
    var(--glass-shadow),
    0 30px 70px -28px rgba(139, 108, 255, 0.75),
    0 18px 40px -24px rgba(0, 0, 0, 0.9);
  will-change: transform;
}
.photo-card picture { display: block; }
.photo-card__img {
  width: 100%;
  height: auto;
  aspect-ratio: 722 / 900;
  object-fit: cover;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
}
/* Блик: диагональный отсвет + пятно, следующее за курсором */
.photo-card__shine {
  position: absolute;
  inset: 8px;
  border-radius: 22px;
  pointer-events: none;
  background:
    radial-gradient(260px circle at var(--sx, 30%) var(--sy, 10%), rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 70%, rgba(56, 214, 255, 0.12) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  mix-blend-mode: screen;
}
.hero__orb {
  position: absolute;
  inset: -10% -5% auto auto;
  width: min(92vw, 520px);
  z-index: -1;
  pointer-events: none;
}
.orb { width: 100%; height: auto; overflow: visible; }

.profile {
  width: 100%;
  max-width: 440px;
  padding: 1.75rem;
  border-radius: var(--r-xl);
}
.profile__label {
  font: 600 0.75rem/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile__text {
  margin-top: 0.9rem;
  font: 600 1.15rem/1.45 var(--font-display);
  letter-spacing: -0.01em;
}
.profile__facts { display: grid; gap: 0.85rem; margin-top: 1.5rem; }
.profile__facts > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.profile__facts dt { color: var(--faint); }
.profile__facts dd { color: var(--text); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  display: none;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
}
.hero__scroll span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--text);
  animation: scroll-hint 2s var(--ease) infinite;
}
@keyframes scroll-hint {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* =========================================================
   Buttons (magnetic)
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 56px;
  padding: 0 1.6rem;
  border-radius: 999px;
  font: 700 1rem/1 var(--font-display);
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: box-shadow 0.35s var(--ease), background 0.35s var(--ease), scale 0.25s var(--ease);
  will-change: transform;
}
.btn:active { scale: 0.97; }
.btn__label, .btn__icon { display: inline-block; pointer-events: none; }
.btn__icon { width: 20px; height: 20px; transition: transform 0.35s var(--ease); }
.btn--primary {
  color: #0a0b10;
  background: linear-gradient(180deg, #ffffff 0%, #e4e8ff 100%);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 6px rgba(139, 108, 255, 0.25),
    0 14px 34px -12px rgba(139, 108, 255, 0.85);
}
.btn--primary:hover { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 6px rgba(139, 108, 255, 0.3), 0 18px 44px -10px rgba(56, 214, 255, 0.75); }
.btn--primary:hover .btn__icon { transform: translate(2px, -2px); }
.btn--glass { color: var(--text); }
.btn--glass:hover { --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)), rgba(14, 16, 26, 0.42); }
.btn--glass:hover .btn__icon { transform: translateY(2px); }

.link-btn {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.25s;
}
.link-btn:hover { background: rgba(255, 255, 255, 0.12); }

/* =========================================================
   Live status
   ========================================================= */
.live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem 0.4rem 0.6rem;
  border-radius: 999px;
  font: 700 0.72rem/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9af5c6;
  background: rgba(62, 224, 143, 0.1);
  border: 1px solid rgba(62, 224, 143, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.live__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: breathe 2.6s ease-in-out infinite;
}
.live__dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  opacity: 0;
  animation: ripple 2.6s ease-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(0.82); box-shadow: 0 0 0 0 rgba(62, 224, 143, 0); }
  50% { transform: scale(1.12); box-shadow: 0 0 14px 3px rgba(62, 224, 143, 0.55); }
}
@keyframes ripple {
  0% { transform: scale(0.5); opacity: 0.8; }
  80%, 100% { transform: scale(1.7); opacity: 0; }
}

/* =========================================================
   «Сейчас»
   ========================================================= */
.now-grid { display: grid; gap: 1.25rem; }
.now-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-radius: var(--r-xl);
  transition: translate 0.45s var(--ease), border-color 0.45s var(--ease);
}
.now-card:hover { translate: 0 -4px; border-color: var(--line-strong); }
.now-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.now-card__dur { font-size: 0.85rem; color: var(--muted); }
.now-card__title {
  font: 800 clamp(1.6rem, 4vw, 2.3rem)/1.05 var(--font-display);
  letter-spacing: -0.03em;
}
.now-card__org { color: var(--muted); font-size: 0.95rem; }
.now-card__role {
  font: 600 1.05rem/1.4 var(--font-display);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.now-card__text { color: var(--muted); margin-top: 0.5rem; }

.timeline {
  position: relative;
  display: grid;
  gap: 1.4rem;
  margin-top: 1.5rem;
  padding-left: 1.4rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--violet), var(--cyan), rgba(62, 224, 143, 0.6));
}
.timeline__item { position: relative; display: grid; gap: 0.25rem; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1.4rem - 1px);
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--cyan);
}
.timeline__item:last-child::before { border-color: var(--green); box-shadow: 0 0 10px rgba(62, 224, 143, 0.6); }
.timeline__when {
  font: 600 0.75rem/1.3 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.timeline__what { font: 700 1.05rem/1.3 var(--font-display); }
.timeline__item p { color: var(--muted); font-size: 0.97rem; }

.mini-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; padding-top: 1.25rem; }
.mini-tags li {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}
.mini-tags--lg li { font-size: 0.95rem; padding: 0.55rem 1rem; }

/* Прогресс обучения */
.study { margin-top: auto; padding-top: 1.75rem; }
.study__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.85rem; }
.study__label { font-size: 0.9rem; color: var(--muted); }
.study__value {
  font: 800 clamp(1.8rem, 4vw, 2.4rem)/1 var(--font-display);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.study__track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.study__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b6cff 0%, #38d6ff 65%, #3ee08f 100%);
  box-shadow: 0 0 18px rgba(56, 214, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  overflow: hidden;
}
.study__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: shimmer 2.8s var(--ease) infinite 1.8s;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.study__tick {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: rgba(6, 7, 12, 0.6);
}
.study__scale {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--faint);
}
.study__scale [data-study-left] { color: var(--muted); text-align: center; }

/* =========================================================
   Навыки
   ========================================================= */
.skills { display: grid; gap: 1.25rem; }
.skills__group {
  padding: clamp(1.4rem, 3.5vw, 2rem);
  border-radius: var(--r-lg);
}
.skills__title {
  margin-bottom: 1.1rem;
  font: 600 0.8rem/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips li { display: flex; }
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.55rem;
  min-height: 44px;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  text-align: left;
  font: 600 0.97rem/1.3 var(--font-display);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), translate 0.3s var(--ease);
}
.chip:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-strong); translate: 0 -2px; }
.chip--rich { flex-direction: column; align-items: flex-start; border-radius: var(--r-md); padding: 0.75rem 1.1rem; }
.chip__sub { font: 400 0.82rem/1.4 var(--font-body); color: var(--muted); }
.chip__note {
  font: 500 0.72rem/1 var(--font-body);
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  color: #ffd7a8;
  background: rgba(255, 180, 94, 0.12);
  border: 1px solid rgba(255, 180, 94, 0.3);
}
.chip__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.45rem;
  height: 1.45rem;
  padding-inline: 0.35rem;
  border-radius: 999px;
  font: 700 0.72rem/1 var(--font-body);
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}
.chip--rich .chip__count { position: absolute; top: 0.7rem; right: 0.7rem; }
.chip--rich .chip__name { padding-right: 2rem; }
.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(139, 108, 255, 0.42), rgba(56, 214, 255, 0.26));
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px -10px rgba(139, 108, 255, 0.9);
}
.chip[aria-pressed="true"] .chip__count { background: #fff; color: #0a0b10; }
.chip[aria-pressed="true"] .chip__sub { color: #e2e5f0; }

.skills__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  min-height: 44px;
  color: var(--muted);
}
.skills__status a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   Кейсы
   ========================================================= */
.cases {
  display: grid;
  gap: 1.25rem;
}
.case {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: clamp(1.5rem, 3.5vw, 2rem);
  border-radius: var(--r-lg);
  transition:
    opacity 0.5s var(--ease),
    filter 0.5s var(--ease),
    scale 0.5s var(--ease),
    translate 0.45s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.5s var(--ease);
}
.case:hover { translate: 0 -4px; border-color: var(--line-strong); }
.case__meta {
  font: 600 0.75rem/1.4 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.case__title {
  font: 800 clamp(1.3rem, 2.6vw, 1.55rem)/1.15 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.case__metric {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.65rem;
  margin-top: 0.3rem;
}
.case__metric .grad {
  font: 800 clamp(1.7rem, 4vw, 2.2rem)/1.05 var(--font-display);
  letter-spacing: -0.03em;
}
.case__metric-note { font-size: 0.92rem; color: var(--muted); }

.star { margin-top: 0.4rem; border-top: 1px solid var(--line); }
.star summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding-top: 0.75rem;
  font: 600 0.95rem/1.3 var(--font-display);
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
}
.star summary::-webkit-details-marker { display: none; }
.star summary::after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(currentColor, currentColor) center / 10px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 10px no-repeat;
  transition: transform 0.4s var(--ease), background-color 0.3s;
}
.star summary:hover::after { background-color: rgba(255, 255, 255, 0.08); }
.star[open] summary::after { transform: rotate(135deg); }
.star__list { display: grid; gap: 0.9rem; padding-top: 1rem; }
.star__list > div { display: grid; gap: 0.2rem; }
.star__list dt {
  font: 700 0.72rem/1.3 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b7a8ff;
}
.star__list > div:last-child dt { color: #8ef5bf; }
.star__list dd { font-size: 0.95rem; color: var(--muted); }
.star[open] .star__list { animation: star-in 0.5s var(--ease); }
@keyframes star-in { from { opacity: 0; transform: translateY(-6px); } }

.case__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.9rem; }
.case__tags li {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}
.case__tags li.is-hit {
  color: #0a0b10;
  background: linear-gradient(135deg, #d6ccff, #a8ecff);
  border-color: transparent;
}

/* Состояние фильтра */
.cases[data-filter] .case:not(.is-match) {
  opacity: 0.4;
  filter: saturate(0.3);
  scale: 0.97;
}
.cases[data-filter] .case.is-match {
  border-color: rgba(190, 175, 255, 0.55);
  box-shadow: var(--glass-shadow), 0 0 0 1px rgba(139, 108, 255, 0.35), 0 26px 70px -26px rgba(139, 108, 255, 0.85);
}

/* =========================================================
   Образование и языки
   ========================================================= */
.edu-grid { display: grid; gap: 1.25rem; }
.edu-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.5rem, 3.5vw, 2rem);
  border-radius: var(--r-lg);
  transition: translate 0.45s var(--ease), border-color 0.4s var(--ease);
}
.edu-card:hover { translate: 0 -4px; border-color: var(--line-strong); }
.edu-card__meta {
  font: 600 0.75rem/1.3 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.edu-card__title {
  font: 800 clamp(1.5rem, 3.6vw, 2.3rem)/1.08 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.edu-card__text { color: var(--muted); font-size: 1.02rem; }
.edu-list { display: grid; gap: 0.85rem; }
.edu-list li { display: grid; gap: 0.1rem; }
.edu-list strong { font: 700 1.08rem/1.3 var(--font-display); }
.edu-list span { color: var(--muted); font-size: 0.92rem; }
.langs { display: grid; gap: 1.1rem; }
.langs__row { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.langs__row strong { font: 700 1.08rem/1.3 var(--font-display); }
.langs__row span { color: var(--muted); }
.langs__bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.langs__bar::before {
  content: "";
  position: absolute;
  inset: 0;
  width: calc(var(--v) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}

/* =========================================================
   Контакты
   ========================================================= */
.section--contacts { padding-bottom: clamp(4rem, 9vw, 7rem); }
.contacts { display: grid; gap: 1rem; }
.contact {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon label" "icon value";
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.15rem;
  width: 100%;
  padding: 1.25rem 1.4rem;
  border-radius: var(--r-lg);
  text-align: left;
  transition: translate 0.4s var(--ease), border-color 0.4s var(--ease);
}
.contact:hover { translate: 0 -4px; border-color: var(--line-strong); }
.contact__icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(139, 108, 255, 0.35), rgba(56, 214, 255, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.45s var(--ease);
}
.contact__icon svg { width: 24px; height: 24px; }
.contact:hover .contact__icon { transform: rotate(-8deg) scale(1.06); }
.contact__label { grid-area: label; font-size: 0.85rem; color: var(--muted); }
.contact__value {
  grid-area: value;
  font: 700 clamp(1rem, 2.4vw, 1.15rem)/1.3 var(--font-display);
  overflow-wrap: anywhere;
}

/* =========================================================
   Footer & toast
   ========================================================= */
.footer { padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.footer a:hover { text-decoration-color: currentColor; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  z-index: 80;
  max-width: calc(100% - 2rem);
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  transform: translate(-50%, 140%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease), visibility 0s linear 0.5s;
  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)), rgba(14, 16, 26, 0.75);
}
.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease), visibility 0s;
}
.toast::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 0.6rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  vertical-align: middle;
}

/* =========================================================
   Начальные состояния анимаций (только при работающем JS)
   ========================================================= */
.js-anim [data-reveal]:not(.is-revealed),
.js-anim [data-hero]:not(.is-revealed) { opacity: 0; }
.js-anim .line__inner:not(.is-revealed) { transform: translateY(110%); }

/* =========================================================
   Breakpoints (mobile-first)
   ========================================================= */
/* Мобильный hero: фото над именем, профиль — после текста */
@media (max-width: 899.98px) {
  .hero { isolation: isolate; padding-top: 6.25rem; }
  .hero__grid { gap: 2.5rem; }
  .hero__visual { display: contents; }
  .hero__photo {
    order: -1;
    justify-self: start;
    width: clamp(118px, 34vw, 168px);
    margin-bottom: -1rem;
  }
  .photo-card { padding: 6px; border-radius: 24px; }
  .photo-card__img, .photo-card__shine { border-radius: 18px; }
  .photo-card__shine { inset: 6px; }
  .profile { justify-self: center; }
  .hero__orb { inset: 3.5rem -22% auto auto; width: min(78vw, 420px); }
}

/* Узкие экраны: пилюли-контакты сеткой (Telegram | Instagram, ниже телефон и email во всю ширину) */
@media (max-width: 639.98px) {
  .hero__contacts { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 0.5rem; }
  .hero__contacts li:nth-child(1) { order: 1; }
  .hero__contacts li:nth-child(4) { order: 2; }
  .hero__contacts li:nth-child(3) { order: 3; grid-column: 1 / -1; }
  .hero__contacts li:nth-child(2) { order: 4; grid-column: 1 / -1; }
  .cpill { width: 100%; font-size: 0.88rem; }
  .nav__cta { padding-inline: 0.85rem; }
  .nav__cta svg { display: none; }
}
/* Совсем узко: в шапке только иконка, подпись остаётся для скринридеров */
@media (max-width: 380px) {
  .nav__cta { width: 40px; padding: 0; justify-content: center; }
  .nav__cta svg { display: block; }
  .nav__cta-label {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (min-width: 640px) {
  .contacts { grid-template-columns: repeat(2, 1fr); }
  .cases { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-card--main { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.25fr 1fr; gap: 4rem; }
  /* -6rem с учётом gap 1.5rem = перекрытие профиля на 4.5rem */
  .hero__photo { margin-bottom: -6rem; margin-right: -1rem; position: relative; z-index: 1; }
  /* фото заходит на правый верх профиля: метка слева от него, текст — ниже */
  .profile__text { margin-top: 2.9rem; }
  .hero__orb { inset: -30% -15% auto auto; width: 560px; }
  .hero__scroll { display: block; }

  .now-grid { grid-template-columns: repeat(12, 1fr); }
  .now-card--wide { grid-column: 1 / span 7; grid-row: 1 / span 2; }
  .now-card:not(.now-card--wide) { grid-column: 8 / span 5; }

  .skills { grid-template-columns: repeat(2, 1fr); }
  .skills__group:first-child { grid-column: 1 / -1; }
  .skills__status { grid-column: 1 / -1; }

  .edu-grid { grid-template-columns: repeat(3, 1fr); }
  .edu-card--main { grid-column: span 2; }
}

@media (min-width: 1080px) {
  .cases { grid-template-columns: repeat(3, 1fr); }
  .contacts { grid-template-columns: repeat(4, 1fr); }
  .contact {
    grid-template-columns: 1fr;
    grid-template-areas: "icon" "label" "value";
    row-gap: 0.35rem;
    padding: 1.6rem;
  }
  .contact__icon { margin-bottom: 1.25rem; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .blob { animation: none; }
  .live__dot { transform: none; box-shadow: 0 0 8px 2px rgba(62, 224, 143, 0.5); }
  .live__dot::after { display: none; }
  .hero__squiggle path, .orb g { filter: none; }
}

@media (forced-colors: active) {
  .grad, .now-card__role { color: CanvasText; background: none; }
  .glass { border: 1px solid CanvasText; }
}

/* Панель выбранного навыка и сброс
   (отступ под шапку задаёт html { scroll-padding-top }; scroll-margin здесь не нужен — он бы суммировался) */
.cases-bar {
  position: sticky;
  top: 76px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: 0.7rem 0.8rem 0.7rem 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
}
.cases-bar[hidden], .cases-foot[hidden] { display: none; }
.cases-bar__label { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; margin: 0; }
.cases-bar__chip { font-weight: 600; }
.cases-bar__chip strong { background: linear-gradient(90deg, #b9a8ff, #7fd7ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cases-bar__count { color: var(--muted); font-size: 0.9rem; }
.btn-reset {
  padding: 0.65rem 1.2rem;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0a0b10;
  background: #fff;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 30px -8px rgba(139, 108, 255, 0.7);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.btn-reset:hover { transform: translateY(-2px); }
.btn-reset:focus-visible { outline: 2px solid #b9a8ff; outline-offset: 3px; }
.cases-foot { display: flex; justify-content: center; margin-top: 2rem; }
.btn-reset--lg { padding: 0.9rem 1.6rem; }
@media (max-width: 640px) {
  .cases-bar { border-radius: 22px; top: 70px; padding: 0.6rem; }
  .cases-bar .btn-reset { width: 100%; }
  .btn-reset--lg { width: 100%; }
}
