/* ============================================================
   ThrustCMS — современный дизайн сайта v2
   ============================================================ */

:root {
  /* Brand — глубокий синий с голубым (чёрный + голубой, светлее) */
  --accent: #23407e;
  --accent-2: #3c5792;
  --accent-3: #6f86c4;
  --accent-soft: rgba(68, 110, 200, 0.12);
  --accent-grad: linear-gradient(120deg, #1c2b55 0%, #2e4178 48%, #4a67b0 100%);
  --accent-glow: rgba(70, 110, 210, 0.34);
  --accent-glow-soft: rgba(70, 110, 210, 0.16);

  /* Surfaces */
  --bg: #ffffff;
  --bg-soft: #f3f6fd;
  --bg-elev: #ffffff;
  --card: #ffffff;
  --line: #e2e7f4;
  --line-strong: #cfd7ea;

  /* Text */
  --text: #1b2238;
  --text-2: #505a7a;
  --muted: #8a91ad;
  --on-accent: #ffffff;

  /* Decorative */
  --success: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;

  /* Shape / depth */
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 38, 0.05), 0 6px 18px rgba(20, 22, 38, 0.05);
  --shadow: 0 4px 10px rgba(20, 22, 38, 0.05), 0 18px 44px rgba(20, 22, 38, 0.10);
  --shadow-lg: 0 8px 22px rgba(20, 22, 38, 0.08), 0 34px 80px rgba(20, 22, 38, 0.16);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --font-code: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c9cde0; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

:focus-visible { outline: 3px solid var(--accent-glow-soft); outline-offset: 2px; border-radius: 6px; }

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; color: var(--accent-2); }

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

.container {
  width: min(1366px, calc(100% - 40px));
  margin: 0 auto;
}

.section { padding: 96px 0; position: relative; }
.page-main { padding: 64px 0 104px; }

.section--soft {
  background:
    radial-gradient(38% 55% at 100% 0%, rgba(90, 130, 235, 0.08), transparent 70%),
    radial-gradient(30% 45% at 0% 100%, rgba(70, 105, 215, 0.09), transparent 70%),
    var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ============================================================
   Заголовки секций
   ============================================================ */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 52px;
}
.section-head__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #3a6bd8;
  background: rgba(88, 120, 220, 0.13);
  border: 1px solid rgba(88, 120, 220, 0.38);
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin-bottom: 0.4em;
  background: linear-gradient(120deg, var(--text) 0%, #33518f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-head p { color: var(--text-2); margin: 0; font-size: 1.02rem; }

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.45s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
}
.btn--primary {
  background: var(--accent-grad);
  color: var(--on-accent);
  box-shadow: 0 10px 26px var(--accent-glow-soft), 0 4px 12px var(--accent-glow-soft);
  position: relative;
  overflow: hidden;
}
.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.28) 50%, transparent 60%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.btn--primary:hover::after { transform: translateX(130%); }
.btn--primary:hover {
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px var(--accent-glow), 0 6px 14px var(--accent-glow-soft);
}
.btn--ghost {
  background: var(--bg);
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--dark {
  background: #1a2340;
  color: #fff;
  box-shadow: 0 10px 24px rgba(26, 35, 64, 0.28);
}
.btn--dark:hover { background: #24365c; color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(26, 35, 64, 0.34); }
.btn--light { background: #fff; color: #171a2b; box-shadow: 0 14px 34px rgba(10, 12, 20, 0.35); }
.btn--light:hover { background: #eef0f6; color: #171a2b; transform: translateY(-2px); }
.btn--light-outline { background: rgba(255, 255, 255, 0.07); color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn--light-outline:hover { background: rgba(255, 255, 255, 0.16); color: #fff; transform: translateY(-2px); }

/* ============================================================
   Навигация
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  transition: top 0.35s ease, margin 0.35s ease, border-radius 0.35s ease,
              box-shadow 0.35s ease, background-color 0.35s ease, border-color 0.35s ease;
}
.navbar.is-scrolled {
  top: 12px;
  margin: 0 14px 14px;
  border-radius: 18px;
  border-bottom-color: transparent;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 30px rgba(50, 70, 140, 0.14);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 70px;
  transition: height 0.35s ease;
}
.navbar.is-scrolled .navbar__inner { height: 62px; }

/* В суженной шапке слегка уменьшаем содержимое — чтобы не прижималось к краям */
.navbar.is-scrolled .brand { font-size: 1.1rem; }
.navbar.is-scrolled .nav__links a { padding: 0.42rem 0.85rem; font-size: 0.93rem; }
.navbar.is-scrolled .nav__cta { padding: 0.6rem 1.22rem; font-size: 0.9rem; }
.navbar.is-scrolled .nav__toggle { width: 42px; height: 42px; }
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-grad);
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 14px var(--accent-glow-soft);
}
.brand:hover { color: var(--text); }
.brand__logo {
  width: 120px;
  height: auto;
  transition: width 0.35s ease;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  transition: color 0.15s ease, background 0.15s ease, padding 0.35s ease, font-size 0.35s ease;
}
.nav__links a:hover { color: var(--accent); background: var(--accent-soft); }
.nav__links a.is-active { color: var(--accent); background: var(--accent-soft); }

.nav__cta {
  margin-left: 0.5rem;
  transition: padding 0.35s ease, font-size 0.35s ease, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.45s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Mobile burger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: width 0.35s ease, height 0.35s ease;
}
.nav__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s ease, border-color 0.28s ease;
}
.mobile-menu a {
  padding: 0.95rem 1.3rem;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a.is-active { color: var(--accent); background: var(--accent-soft); }
.mobile-menu a:hover { color: var(--accent); background: var(--bg-soft); }
.mobile-menu__cta { margin: 12px 16px 16px; justify-content: center; border-bottom: none !important; }
.mobile-menu__cta:hover { background: var(--accent-grad) !important; color: #fff !important; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 112px 0 104px;
  background:
    radial-gradient(46% 55% at 82% 4%, rgba(90, 130, 235, 0.14), transparent 70%),
    radial-gradient(42% 52% at 6% 96%, rgba(70, 105, 215, 0.13), transparent 68%),
    radial-gradient(30% 40% at 55% 50%, rgba(120, 150, 240, 0.08), transparent 70%),
    var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(70, 110, 220, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 110, 220, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.hero__blob--a {
  width: 420px;
  height: 420px;
  top: -90px;
  right: 2%;
  background: radial-gradient(circle at 35% 35%, rgba(110, 145, 235, 0.5), transparent 68%);
  animation: blobDrift 20s ease-in-out infinite alternate;
}
.hero__blob--b {
  width: 360px;
  height: 360px;
  bottom: -120px;
  left: -60px;
  background: radial-gradient(circle at 60% 60%, rgba(90, 120, 220, 0.45), transparent 68%);
  animation: blobDrift 24s ease-in-out infinite alternate-reverse;
}
@keyframes blobDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(46px, 34px) scale(1.18); }
}
.hero__content { position: relative; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}
.hero__dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hero__dot--green { background: var(--success); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); animation: dotPulse 2.4s ease-in-out infinite; }
.hero__dot--violet { background: var(--accent-3); box-shadow: 0 0 0 4px rgba(88, 120, 220, 0.2); }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.05); }
}
.hero__title {
  font-size: clamp(2.2rem, 5.2vw, 3.9rem);
  line-height: 1.08;
  margin-bottom: 0.45em;
  letter-spacing: -0.035em;
}
.hero__title .accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__lead {
  color: var(--text-2);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  max-width: 100%;
  margin-bottom: 2rem;
  padding: 1.1rem 1.3rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.5rem;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__actions .btn { padding: 0.9rem 1.9rem; font-size: 1rem; }

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero__avatar-wrap {
  position: relative;
  width: min(340px, 78%);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 8px;
  background: var(--accent-grad);
  box-shadow: 0 24px 60px var(--accent-glow-soft), 0 8px 20px var(--accent-glow-soft);
}
.hero__avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -34px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-glow-soft), transparent 70%);
  z-index: -1;
  animation: heroPulse 5s ease-in-out infinite;
}
.hero__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid #fff;
}

.hero__card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: var(--shadow);
  white-space: nowrap;
  animation: heroFloat 6s ease-in-out infinite;
  z-index: 2;
}
.hero__card--left { left: -6px; bottom: 26px; }
.hero__card--right { right: -10px; top: 34px; animation-delay: 2.4s; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes heroPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* ============================================================
   Направления / Услуги
   ============================================================ */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  position: relative;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.55s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 100% 0%, rgba(72, 92, 138, 0.10), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(70, 100, 200, 0.28);
}
.service-card:hover::before { opacity: 1; }
.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(88, 120, 220, 0.12);
  color: #3a6bd8;
  margin-bottom: 1.2rem;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), background 0.35s ease, color 0.3s ease;
  box-shadow: inset 0 0 0 1px rgba(88, 120, 220, 0.22);
}
.service-card__icon svg { width: 26px; height: 26px; }
.service-card:hover .service-card__icon {
  background: var(--accent-grad);
  color: #fff;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 24px var(--accent-glow-soft);
}
.service-card h5 { margin-bottom: 0.45em; font-size: 1.08rem; }
.service-card p { color: var(--text-2); font-size: 0.94rem; margin: 0; }

/* ============================================================
   Процесс работы
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  position: relative;
}
.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.55s ease, border-color 0.3s ease;
}
.step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 100% 0%, rgba(72, 92, 138, 0.10), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.step-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(70, 100, 200, 0.28);
}
.step-card:hover::before { opacity: 1; }
.step-card__num {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 10px 22px var(--accent-glow-soft);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.35s ease;
}
.step-card:hover .step-card__num {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 14px 28px var(--accent-glow);
}
.step-card h5 { margin-bottom: 0.45em; font-size: 1.08rem; }
.step-card p { color: var(--text-2); font-size: 0.94rem; margin: 0; }

/* ============================================================
   Технологии
   ============================================================ */
.techs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.5rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.55s ease, border-color 0.3s ease;
  font-weight: 600;
  color: var(--text-2);
}
.tech-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(70, 100, 200, 0.25);
  color: var(--text);
}
.tech-item img {
  width: 100px;
  height: 68px;
  object-fit: contain;
  filter: grayscale(0.8);
  transition: filter 0.3s ease, transform 0.3s ease;
}
.tech-item:hover img { filter: grayscale(0); transform: scale(1.08); }

/* ============================================================
   Карточки контента (блог / проекты)
   ============================================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.55s ease, border-color 0.3s ease;
  position: relative;
}
.post-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: rgba(70, 100, 200, 0.25); }
.post-card__media { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-soft); position: relative; }
.post-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.18) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.post-card:hover .post-card__media::after { opacity: 1; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .post-card__media img { transform: scale(1.06); }
.post-card__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-size: 0.78rem; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.6rem; }
.post-card__title { font-size: 1.15rem; margin-top: 0.45em; margin-bottom: 0.45em; }
.post-card__title a { color: var(--text); transition: color 0.18s ease; }
.post-card__title a:hover { color: var(--accent); }
.post-card__excerpt { color: var(--text-2); font-size: 0.92rem; flex: 1; }
.post-card__link {
  margin-top: 1.1rem;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-card__link::after { content: '→'; transition: transform 0.2s ease; }
.post-card__link:hover::after { transform: translateX(4px); }

.badge {
  background: rgba(88, 120, 220, 0.13);
  color: #3a6bd8;
  border: 1px solid rgba(88, 120, 220, 0.32);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.badge--soft {
  background: rgba(88, 120, 220, 0.1);
  color: #3a6bd8;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(88, 120, 220, 0.24);
}
.post-card__body .badge--soft { align-self: flex-start; margin-bottom: 0.6rem; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 4.5rem 1.5rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1.5px dashed var(--line-strong);
}

/* ============================================================
   CTA
   ============================================================ */
#contact { padding: 48px 0 24px; }
#projects { padding-bottom: 56px; }
.cta {
  background: var(--accent-grad);
  border-radius: calc(var(--radius) + 10px);
  padding: 60px 68px;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 44px;
  text-align: left;
  box-shadow: 0 30px 70px var(--accent-glow-soft);
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 70% at 0% 100%, rgba(255, 255, 255, 0.22), transparent 60%),
    radial-gradient(32% 55% at 100% 0%, rgba(255, 255, 255, 0.14), transparent 60%);
}
.cta::after {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  pointer-events: none;
  border: 50px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  right: -110px;
  bottom: -150px;
}
.cta__body { position: relative; z-index: 1; }
.cta h3 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.35em; }
.cta p { color: rgba(255, 255, 255, 0.88); margin-bottom: 0; max-width: 560px; font-size: 1.05rem; }
.cta__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.cta .btn--dark {
  background: #fff;
  color: #171a2b;
  box-shadow: 0 14px 34px rgba(10, 12, 20, 0.35);
}
.cta .btn--dark:hover { background: #eef0f6; color: #171a2b; transform: translateY(-2px); }
.cta__note { font-size: 0.9rem; color: rgba(255, 255, 255, 0.82); }

/* ============================================================
   Контакты (страница)
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.7rem;
  padding: 2.4rem 1.6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.55s ease, border-color 0.3s ease;
}
.contact-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(70, 100, 200, 0.28);
  color: var(--text);
}
.contact-card__icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(88, 120, 220, 0.12);
  color: #3a6bd8;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), background 0.35s ease, color 0.3s ease;
  box-shadow: inset 0 0 0 1px rgba(88, 120, 220, 0.22);
}
.contact-card__icon svg { width: 26px; height: 26px; }
.contact-card:hover .contact-card__icon { background: var(--accent-grad); color: #fff; transform: translateY(-3px) scale(1.05); }
.contact-card h3 { font-size: 1.1rem; margin: 0; }
.contact-card p { color: var(--text-2); margin: 0; word-break: break-all; font-size: 0.96rem; }

/* ============================================================
   Баннер внутренних страниц
   ============================================================ */
.page-hero {
  position: relative;
  padding: 0 0 44px;
}
.page-hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  letter-spacing: -0.035em;
  margin-top: 14px;
  background: linear-gradient(120deg, var(--text) 0%, #33518f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-hero__content { max-width: 720px; }
.page-hero__content--center { text-align: center; margin-inline: auto; }
.page-hero__content--center .page-hero__meta { justify-content: center; }
.page-hero__lead { margin-top: 14px; color: var(--text-2); font-size: 1.1rem; max-width: 640px; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(88, 120, 220, 0.13);
  color: #3a6bd8;
  border: 1px solid rgba(88, 120, 220, 0.32);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.chip svg { width: 16px; height: 16px; }
.chip--link {
  color: #3d567f;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.chip--link:hover { border-color: var(--accent-3); background: rgba(88, 120, 220, 0.2); color: #31486e; transform: translateY(-2px); }
.chip--active { background: #3a6bd8; border-color: #3a6bd8; color: #fff; }
.chip--active:hover { color: #fff; }

/* ============================================================
   Фильтр по категориям и тегам (страницы архивов)
   ============================================================ */
.tax-filter {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: -20px 0 36px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.tax-filter__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tax-filter__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-right: 6px;
}

/* Архивные списки: категории/теги в правой колонке на десктопе,
   сверху — на мобильных (обычный поток DOM). */
.list-layout { display: grid; }
.list-layout--side {
  grid-template-columns: minmax(0, 1fr) 280px;
  grid-template-areas:
    "head head"
    "grid side";
  column-gap: 48px;
  align-items: start;
}
.list-layout--side .list-head { grid-area: head; }
.list-layout--side .post-grid { grid-area: grid; }
.list-layout--side .tax-filter {
  grid-area: side;
  position: sticky;
  top: 92px;
  margin: 0;
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.list-layout--side .tax-filter__row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.list-layout--side .tax-filter__label { flex-basis: 100%; margin: 10px 0 0; }

/* ============================================================
   Списки / заголовки страниц
   ============================================================ */
.list-head {
  margin-bottom: 44px;
  max-width: 100% !important;
  padding: 30px 34px;
  background:
    radial-gradient(70% 130% at 0% 0%, var(--accent-soft), transparent 70%),
    var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.list-head h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--text) 0%, #33518f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.list-head .meta { color: var(--text-2); font-size: 1.05rem; }

/* ============================================================
   Статья / Проект / Страница
   ============================================================ */
.page-body { max-width: 760px; font-size: 1.05rem; }
.page-body .cover { border-radius: var(--radius); margin-bottom: 2rem; width: 100%; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
}
.article { max-width: 1120px; }
.article-header { margin-bottom: 2.2rem; }
.article-header h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.03em; }
.article__cover {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2.2rem;
  box-shadow: var(--shadow-lg);
}
.article__meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
  font-weight: 600;
  margin-bottom: 20px;
}
.article__meta .sep { opacity: 0.5; }

.badge--soft { /* описано выше */ }

.content { line-height: 1.78; color: var(--text); font-size: 1.03rem; min-width: 0; overflow-wrap: break-word; }
.article, .page-body { min-width: 0; }
.content h2 { font-size: 1.55rem; margin-top: 2.1rem; }
.content h3 { font-size: 1.25rem; margin-top: 1.7rem; }
.content a { border-bottom: 1px solid rgba(70, 100, 200, 0.3); transition: color 0.18s ease, border-color 0.18s ease; }
.content a:hover { border-color: var(--accent); }
.content ul, .content ol { padding-left: 1.4rem; }
.content li { margin-bottom: 0.4rem; }
.content blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg-soft);
  margin: 1.6rem 0;
  padding: 1.1rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2);
  font-size: 1.02rem;
}
.content img { border-radius: var(--radius-sm); margin: 1.4rem 0; box-shadow: var(--shadow-sm); }
.content code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 7px; padding: 0.12rem 0.45rem; font-family: var(--font-code); font-size: 0.9em; }
.content pre {
  background: #141c36;
  color: #e6e8f2;
  padding: 1.3rem 1.5rem;
  border-radius: var(--radius-sm);
  overflow: auto;
  max-width: 100%;
  font-family: var(--font-code);
  box-shadow: var(--shadow-sm);
}
.content pre code { background: none; border: none; color: inherit; padding: 0; }

/* Sidebar */
.sidebar { position: sticky; top: 92px; display: grid; gap: 20px; }
.side-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.side-box h4 { font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 1.1rem; }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.side-list a { display: flex; gap: 0.8rem; align-items: center; padding: 0.5rem; color: var(--text-2); font-size: 0.92rem; border-radius: 10px; transition: background 0.3s ease, color 0.3s ease; }
.side-list a:hover { color: var(--accent); background: var(--bg-soft); }
.side-list .thumb {
  width: 48px; height: 48px; flex: none; border-radius: 10px; object-fit: cover; background: var(--bg-soft);
}
.side-list .lbl { line-height: 1.35; }

/* ============================================================
   Коллекции / список записей
   ============================================================ */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.entry-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.55s ease, border-color 0.3s ease;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.entry-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); border-color: rgba(70, 100, 200, 0.25); color: var(--text); }
.entry-card__cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: calc(var(--radius-sm) - 4px); }
.entry-card time { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.entry-card h2 { font-size: 1.15rem; margin: 0; }
.entry-card p { color: var(--text-2); font-size: 0.92rem; margin: 0; }

/* ============================================================
   Формы (опубликованные)
   ============================================================ */
.site-form-wrap { margin: 24px 0; }
.site-form-wrap.is-inline { width: 100%; }
.site-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.site-form--dark { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.08); }
.site-form__title { margin: 0 0 2px; font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.site-form__intro { margin: 0 0 6px; color: var(--text-2); font-size: 0.98rem; }
.site-form__desc { margin: 2px 0 12px; font-size: 0.92rem; color: var(--text-2); }

.site-form__field { display: flex; flex-direction: column; gap: 6px; }
.site-form__label { font-size: 0.9rem; font-weight: 600; }
.site-form__label .req { color: #e11d48; margin-left: 2px; }
.site-form__input,
.site-form__select,
.site-form__textarea {
  font: inherit;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: inherit;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.site-form__textarea { min-height: 100px; resize: vertical; }
.site-form__input:focus, .site-form__select:focus, .site-form__textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow-soft);
}
.site-form__radios { display: flex; flex-direction: column; gap: 8px; }
.site-form__radio { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.site-form__radio input { width: 16px; height: 16px; }
.site-form__check { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.site-form__check input { width: 16px; height: 16px; }
.site-form__check a { color: var(--site-accent, #2a6dff); text-decoration: underline; }
.site-form__label.is-invalid { color: #e11d48; }
.site-form__input.is-invalid, .site-form__select.is-invalid,
.site-form__textarea.is-invalid { border-color: #e11d48; box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12); }
.site-form__check.is-invalid span { color: #e11d48; }
.site-form__check a:hover { opacity: .8; }

.site-form__actions { margin-top: 4px; }
.site-form__submit {
  font: inherit; font-weight: 700; color: #fff; cursor: pointer;
  background: var(--accent-grad); border: none; border-radius: 999px;
  padding: 12px 28px; transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 8px 20px var(--accent-glow-soft);
}
.site-form__submit:hover { transform: translateY(-2px); box-shadow: 0 14px 30px var(--accent-glow); }
.site-form__submit:active { transform: translateY(1px); }
.site-form__submit:disabled { opacity: 0.6; cursor: not-allowed; }

.site-form__field--captcha { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.site-form__captcha-row { display: flex; align-items: center; gap: 10px; }
.site-form__captcha-question {
  flex: 1; font-size: 0.95rem; line-height: 1.45; color: var(--text);
  background: rgba(127, 127, 127, 0.08); border: 1px dashed rgba(127, 127, 127, 0.35);
  border-radius: 12px; padding: 10px 14px;
}
.site-form__captcha-refresh {
  font-size: 1.15rem; line-height: 1; color: var(--text); cursor: pointer;
  background: transparent; border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: 10px; width: 40px; height: 40px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.15s, border-color 0.2s, color 0.2s;
}
.site-form__captcha-refresh:hover { transform: rotate(35deg); border-color: var(--site-accent, #2a6dff); color: var(--site-accent, #2a6dff); }
.site-form__input--captcha { max-width: 180px; }
.site-form__field--captcha > .site-form__label.is-invalid { color: #e11d48; }

.site-form__status { display: none; align-items: center; gap: 8px; font-size: 0.92rem; border-radius: 10px; padding: 10px 12px; }
.site-form__status.ok { display: flex; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.site-form__status.err { display: flex; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.site-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============================================================
   Футер
   ============================================================ */
.site-footer {
  background: #141c36;
  background-image:
    radial-gradient(42% 55% at 100% 0%, rgba(90, 120, 220, 0.18), transparent 70%),
    radial-gradient(38% 50% at 0% 100%, rgba(70, 100, 200, 0.2), transparent 70%);
  color: #b9bdd8;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(72, 92, 138, 0.6), transparent);
}
.site-footer__top {
  padding: 60px 0 36px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 44px;
}
.site-footer h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer a { color: #a9add4; }
.site-footer a:hover { color: #fff; }
.site-footer__about p { color: #a9add4; font-size: 0.93rem; }
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.site-footer__links a { font-size: 0.94rem; transition: color 0.15s ease, padding-left 0.15s ease; }
.site-footer__links a:hover { padding-left: 4px; }
.site-footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.site-footer__cta:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.35); color: #fff; transform: translateY(-2px); }
.site-footer__cred {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 0;
  font-size: 0.84rem;
  color: #787ea8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================================
   Анимации появления при загрузке/скролле
   ============================================================ */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
.js .hero__content > *, .js .hero__visual { animation: riseIn 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.js .hero__content > *:nth-child(1) { animation-delay: 0.05s; }
.js .hero__content > *:nth-child(2) { animation-delay: 0.12s; }
.js .hero__content > *:nth-child(3) { animation-delay: 0.19s; }
.js .hero__content > *:nth-child(4) { animation-delay: 0.26s; }
.js .hero__visual { animation-delay: 0.16s; }

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease var(--reveal-delay, 0ms),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) var(--reveal-delay, 0ms),
    box-shadow 0.5s ease,
    border-color 0.3s ease;
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Адаптивность
   ============================================================ */
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .hero__lead { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__card--left { left: 8px; bottom: -20px; }
  .hero__card--right { right: 0px; top: -10px; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .techs { grid-template-columns: repeat(3, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .entry-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; grid-template-columns: repeat(2, 1fr); }
  .list-layout--side {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "side"
      "grid";
    column-gap: 0;
  }
  .list-layout--side .tax-filter {
    position: static;
    margin: -8px 0 36px;
    padding: 16px 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
  }
  .list-layout--side .tax-filter__row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .list-layout--side .tax-filter__label { flex-basis: 100%; margin: 10px 0 0; }
  .site-footer__top { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 64px 0 100px; }
  #contact { padding: 36px 0 20px; }
  #projects { padding-bottom: 40px; }
}

@media (max-width: 820px) {
  .cta { grid-template-columns: 1fr; text-align: center; padding: 46px 30px; gap: 26px; justify-items: center; }
  .cta p { margin-inline: auto; }
  .cta__actions { align-items: center; width: 100%; }
  .cta__actions .btn { width: 100%; max-width: 320px; justify-content: center; }
}

@media (max-width: 620px) {
  .container { width: min(1120px, calc(100% - 32px)); }
  .section { padding: 68px 0; }
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__cta { display: none; }
  .mobile-menu { display: flex; }
  .services { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .techs { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
  .entry-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .site-footer__top { grid-template-columns: 1fr; gap: 32px; }

  .hero__title { font-size: clamp(2rem, 9vw, 2.7rem); }
  .hero__avatar-wrap { width: 190px; }
  .hero__card { font-size: 0.8rem; padding: 0.6rem 0.85rem; }
  .hero__card--left { left: 0; bottom: -6px; }
  .hero__card--right { right: 0; top: 4px; }
  .section-head { margin-bottom: 36px; }
  .page-main { padding: 32px 0 72px; }
  .list-head { padding: 22px 20px; margin-bottom: 32px; }
  .page-hero__meta { margin-top: 16px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 1.6rem 1.2rem; }
  .cta { padding: 38px 22px; }
  .cta h3 { font-size: 1.5rem; }
  .cta::after { width: 240px; height: 240px; right: -90px; bottom: -120px; }
  #contact { padding: 32px 0 16px; }
  #projects { padding-bottom: 32px; }
  .site-form { padding: 20px; }
  .site-form__submit { width: 100%; }
  .site-footer__cred { flex-direction: column; text-align: center; gap: 6px; }
  .content { font-size: 1rem; }
  .article-layout { gap: 32px; }
}

@media (max-width: 380px) {
  .hero__avatar-wrap { width: 160px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
/* Блок автора в конце статьи */
.author_block {
    display: flex; align-items: center; gap: 1.2rem;
    margin-top: 1.5rem; padding: 1.3rem 1.4rem;
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: var(--radius);
}
.author_block img {
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none;
    box-shadow: var(--shadow-sm);
}
.author_block h4 { margin: 0 0 0.25rem; font-size: 1.05rem; color: var(--text); }
.author_block p  { margin: 0; font-size: 0.9rem; color: var(--text-2); }
@media (max-width: 640px) {
  .author_block { flex-direction: column; text-align: center; }
}

/* ============================================================
   Типографика контента: жирный/курсив гарантированно
   ============================================================ */
.content b, .content strong { font-weight: 700; }
.content i, .content em { font-style: italic; }
.content del, .content s, .content strike { text-decoration: line-through; }

/* ============================================================
   Таблицы в контенте (Markdown-таблицы и из визуального редактора)
   ============================================================ */
.content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 1.9rem;
  font-size: 0.95rem;
  line-height: 1.55;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.content caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 0.45rem;
  font-weight: 700;
  color: var(--text-2);
}
.content th,
.content td {
  padding: 0.72rem 1rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.content thead th {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--line-strong);
}
.content tbody tr:nth-child(even) { background: rgba(243, 246, 253, 0.55); }
.content tbody tr:hover td { background: var(--accent-soft); }
.content table code { font-size: 0.88em; white-space: nowrap; }

@media (max-width: 720px) {
  .content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================================
   v3 — современный редизайн (dev / design / AI)
   Дополнения поверх базовой темы. Палитра прежняя.
   ============================================================ */

/* ---------- Hero: код-окно и теги ---------- */
.hero__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 1.4rem 0 0; padding: 0; }
.hero__tags li {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-2); background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.32rem 0.75rem;
  backdrop-filter: blur(6px);
}

.hero__visual--code { position: relative; display: flex; justify-content: center; }
.code-window {
  position: relative; width: min(500px, 100%);
  background: #0f1730; border: 1px solid rgba(120, 150, 240, 0.28);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 34px 80px rgba(20, 30, 70, 0.45), 0 8px 24px rgba(20, 30, 70, 0.3);
}
.code-window__bar {
  display: flex; align-items: center; gap: 8px; padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(120, 150, 240, 0.16);
}
.code-window__bar span { width: 11px; height: 11px; border-radius: 50%; background: #3b4a7a; }
.code-window__bar span:nth-child(1) { background: #ff5f57; }
.code-window__bar span:nth-child(2) { background: #febc2e; }
.code-window__bar span:nth-child(3) { background: #28c840; }
.code-window__bar em { margin-left: auto; font-style: normal; font-size: 0.76rem; color: #8290c4; font-family: var(--font-code); }
.code-window pre { margin: 0; padding: 1.15rem 1.3rem; overflow: auto; }
.code-window code { font-family: var(--font-code); font-size: 0.85rem; line-height: 1.72; color: #cfd6f5; background: none; border: none; padding: 0; }
.tok-key { color: #8ab4ff; } .tok-str { color: #7ee0b0; } .tok-fn { color: #ffd479; }
.tok-com { color: #5b6693; } .tok-num { color: #ff9e9e; }

.hero-badge {
  position: absolute; display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 14px; padding: 0.7rem 1rem;
  font-size: 0.88rem; font-weight: 700; color: var(--text);
  box-shadow: var(--shadow); white-space: nowrap; z-index: 3;
  animation: heroFloat 6s ease-in-out infinite;
}
.hero-badge--a { left: -14px; bottom: -14px; }
.hero-badge--b { right: -10px; top: -12px; animation-delay: 2.2s; }

@media (max-width: 920px) {
  .code-window { margin-inline: auto; }
  .hero__tags { justify-content: center; }
  .hero-badge--a { left: 2px; bottom: -16px; }
  .hero-badge--b { right: 2px; top: -12px; }
}

/* ---------- Полоса показателей ---------- */
.stats { position: relative; z-index: 4; margin-top: -72px; padding: 0 0 8px; }
@media (max-width: 920px) { .stats { margin-top: -52px; } }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--accent-grad); color: #fff;
  border-radius: calc(var(--radius) + 6px); overflow: hidden;
  box-shadow: 0 24px 60px var(--accent-glow-soft);
}
.stat { padding: 2rem 1.6rem; text-align: center; border-right: 1px solid rgba(255, 255, 255, 0.14); }
.stat:last-child { border-right: none; }
.stat b { display: block; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; color: #fff; line-height: 1; }
.stat span { display: block; margin-top: 0.5rem; font-size: 0.86rem; color: rgba(255, 255, 255, 0.82); font-weight: 600; }
@media (max-width: 920px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
}
@media (max-width: 520px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .stat:last-child { border-bottom: none; }
}

/* ---------- Bento-сетка направлений ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bento__cell {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px); padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.55s ease, border-color 0.3s ease;
}
.bento__cell::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 100% 0%, rgba(72, 92, 138, 0.1), transparent 70%);
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.bento__cell:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: rgba(70, 100, 200, 0.28); }
.bento__cell:hover::before { opacity: 1; }
.bento__cell--wide { grid-column: span 2; grid-row: span 2; justify-content: flex-end; }
.bento__cell--grad { background: var(--accent-grad); border-color: transparent; color: #fff; }
.bento__cell--grad::after {
  content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%;
  border: 46px solid rgba(255, 255, 255, 0.09); right: -100px; bottom: -120px; pointer-events: none;
}
.bento__cell--grad h3, .bento__cell--grad p { color: #fff; }
.bento__cell.bento__cell--grad p { color: #fff; font-size: 1.08rem; line-height: 1.62; }
.bento__icon {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  background: rgba(88, 120, 220, 0.12); color: #3a6bd8; margin-bottom: 1.1rem;
  box-shadow: inset 0 0 0 1px rgba(88, 120, 220, 0.22); position: relative; z-index: 1;
}
.bento__icon svg { width: 26px; height: 26px; }
.bento__cell--grad .bento__icon { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; }
.bento__cell h3 { font-size: 1.2rem; margin-bottom: 0.5em; position: relative; z-index: 1; }
.bento__cell--wide h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.bento__cell p { color: var(--text-2); font-size: 0.95rem; margin: 0; position: relative; z-index: 1; }
.bento__tag {
  margin-top: auto; padding-top: 1.1rem; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.03em; color: #3a6bd8; position: relative; z-index: 1;
}
.bento__cell--grad .bento__tag { color: rgba(255, 255, 255, 0.9); }
@media (max-width: 920px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__cell--wide { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .bento__cell--wide { grid-column: auto; }
}

/* ---------- Таймлайн процесса ---------- */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.timeline::before {
  content: ''; position: absolute; top: 26px;
  left: calc((100% - 72px) / 8); right: calc((100% - 72px) / 8);
  height: 2px;
  background: linear-gradient(90deg, var(--accent-3), rgba(110, 140, 220, 0.22)); z-index: 0;
}
.timeline__item { position: relative; z-index: 1; }
.timeline__num {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px;
  background: var(--accent-grad); color: #fff; font-weight: 800;
  box-shadow: 0 12px 26px var(--accent-glow-soft); margin-bottom: 1.1rem;
}
.timeline__item h4 { font-size: 1.05rem; margin-bottom: 0.4em; }
.timeline__item p { color: var(--text-2); font-size: 0.93rem; margin: 0; }
@media (min-width: 921px) {
  .timeline__item { text-align: center; }
  .timeline__num { margin-left: auto; margin-right: auto; }
}
@media (max-width: 920px) {
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before { top: 0; bottom: 0; left: 26px; right: auto; width: 2px; height: auto; }
  .timeline__item { display: grid; grid-template-columns: 54px 1fr; column-gap: 16px; padding-bottom: 28px; }
  .timeline__num { margin-bottom: 0; }
  .timeline__body { grid-column: 2; }
  .timeline__item h4 { margin: 0.25rem 0 0.3em; }
}

/* ---------- Бегущая строка технологий ---------- */
.marquee {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; gap: 14px; padding-right: 14px; }
.tech-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 0.8rem 1.3rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  font-weight: 700; color: var(--text-2); box-shadow: var(--shadow-sm); white-space: nowrap;
}
.tech-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-grad); display: inline-block; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 620px) { .marquee__track { animation-duration: 22s; } }

/* ---------- Мелкие улучшения карточек ---------- */
.post-card__media--cover { background: var(--accent-grad); }

/* ============================================================
   v3 — доработка внутренних страниц (статьи, проекты, страницы, контакты)
   ============================================================ */

.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 0.86rem; color: var(--muted); font-weight: 600; margin-bottom: 22px;
}
.breadcrumbs a { color: var(--text-2); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { opacity: 0.45; }
.breadcrumbs .current { color: var(--text); }

.list-head {
  position: relative; overflow: hidden;
  padding: 40px 40px 42px;
  background:
    radial-gradient(80% 140% at 0% 0%, var(--accent-soft), transparent 65%),
    linear-gradient(180deg, #ffffff, var(--bg-soft));
  box-shadow: var(--shadow);
}
.list-head::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(70, 110, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 110, 220, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(70% 80% at 100% 0%, #000, transparent 75%);
  mask-image: radial-gradient(70% 80% at 100% 0%, #000, transparent 75%);
}
.list-head > * { position: relative; z-index: 1; }
.list-head h1 { margin-bottom: 0.35em; }
.list-head .page-hero__meta { margin-top: 22px; }

.article-header h1 {
  background: linear-gradient(120deg, var(--text) 0%, #33518f 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.article__cover { border: 1px solid var(--line); }

.side-box { transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.5s ease, border-color 0.3s ease; }
.side-box:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(70, 100, 200, 0.22); }

.contact-card { position: relative; overflow: hidden; }
.contact-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent-grad); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
}
.contact-card:hover::before { transform: scaleX(1); }

@media (max-width: 620px) {
  .list-head { padding: 26px 22px 28px; }
}

/* Hero: на мобильных текст идёт первым */
@media (max-width: 920px) {
  .hero__visual { order: 0; }
  .hero__content { order: -1; }
}

/* ---------- Плавающая панель контактов ---------- */
.contact-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateY(150%); opacity: 0; pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.4s ease;
}
.contact-dock.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.contact-dock__inner {
  display: flex; align-items: center; gap: 16px;
  max-width: 940px; margin: 0 auto;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 12px 10px 22px;
  box-shadow: 0 20px 50px rgba(25, 40, 90, 0.18), 0 4px 14px rgba(25, 40, 90, 0.1);
}
.contact-dock__status {
  display: inline-flex; align-items: center; gap: 9px;
  margin-right: auto; font-weight: 700; font-size: 0.9rem; color: var(--text); white-space: nowrap;
}
.contact-dock__status i {
  width: 9px; height: 9px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); animation: dotPulse 2.4s ease-in-out infinite;
}
.contact-dock__links { display: flex; gap: 8px; }
.contact-dock__link {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-2);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.contact-dock__link:hover { background: var(--accent-grad); color: #fff; border-color: transparent; transform: translateY(-2px); }
.contact-dock__link svg { width: 19px; height: 19px; }
.contact-dock__cta { white-space: nowrap; }
@media (max-width: 620px) {
  .contact-dock__status { display: none; }
  .contact-dock__inner { gap: 10px; padding: 8px 8px 8px 10px; }
  .contact-dock__cta { flex: 1; justify-content: center; }
}
