/* =========================================================
   1. ТОКЕНЫ: цвета, шрифты, отступы
   ========================================================= */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  /* Тёмная тема (по умолчанию) */
  --bg: #0a0a12;
  --bg-soft: #0f0f19;
  --surface: #14141f;
  --surface-2: #1c1c2b;
  --border: #262638;
  --border-strong: #34344b;
  --text: #ededf5;
  --muted: #9b9bb4;
  --faint: #6b6b85;

  /* Акцент — Electric Violet (меняется через data-accent) */
  --accent: #8b5cf6;
  --accent-2: #c084fc;
  --accent-ink: #ffffff;
  --accent-soft: rgb(139 92 246 / 0.14);

  /* Отдельная «AI»-палитра — одинакова при любом акценте */
  --ai-1: #22d3ee;
  --ai-2: #a855f7;
  --ai-3: #f472b6;
  --ai-gradient: linear-gradient(120deg, var(--ai-1), var(--ai-2), var(--ai-3));

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --shadow: 0 20px 50px -20px rgb(0 0 0 / 0.6);
  --ease: cubic-bezier(.2, .8, .2, 1);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f7fb;
  --bg-soft: #efeff6;
  --surface: #ffffff;
  --surface-2: #f2f2f8;
  --border: #e3e3ee;
  --border-strong: #d0d0e0;
  --text: #13131d;
  --muted: #5d5d75;
  --faint: #8a8aa0;
  --shadow: 0 20px 50px -24px rgb(30 30 60 / 0.25);
  color-scheme: light;
}

/* Варианты акцентного цвета */
[data-accent="lime"]   { --accent: #a3e635; --accent-2: #d9f99d; --accent-ink: #10140a; --accent-soft: rgb(163 230 53 / 0.14); }
[data-accent="cyan"]   { --accent: #22d3ee; --accent-2: #67e8f9; --accent-ink: #04161a; --accent-soft: rgb(34 211 238 / 0.14); }
[data-accent="orange"] { --accent: #fb923c; --accent-2: #fdba74; --accent-ink: #1a0d03; --accent-soft: rgb(251 146 60 / 0.14); }
[data-theme="light"][data-accent="lime"] { --accent: #65a30d; --accent-2: #84cc16; --accent-ink: #fff; }
[data-theme="light"][data-accent="cyan"] { --accent: #0891b2; --accent-2: #06b6d4; --accent-ink: #fff; }
[data-theme="light"][data-accent="orange"] { --accent: #ea580c; --accent-2: #f97316; --accent-ink: #fff; }
[data-theme="light"] { --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent); }

/* =========================================================
   2. БАЗА
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; }
.about-text { max-width: 720px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }
.page-title { font-size: clamp(2rem, 4.5vw, 3.2rem); }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 10vw, 120px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head h2 { margin: 0; }
.section-head p { max-width: 520px; margin: .6em 0 0; color: var(--muted); }
.text-gradient { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-gradient-text { background: var(--ai-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* =========================================================
   3. КНОПКИ
   ========================================================= */
.btn {
  --_bg: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .85em 1.4em; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--_bg); font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, border-color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .25s var(--ease); }
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn--primary { --_bg: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 30px -10px var(--accent); }
.btn--primary:hover { box-shadow: 0 14px 40px -10px var(--accent); border-color: transparent; }
.btn--ghost { --_bg: transparent; }
.btn--sm { padding: .55em 1em; font-size: .85rem; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* =========================================================
   4. ШАПКА
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); font-size: .9rem;
  transition: transform .4s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: .94rem; font-weight: 500;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.burger { display: none; }

@media (max-width: 880px) {
  .burger { display: grid; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 4px;
    padding: 16px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .3s var(--ease);
  }
  .nav-links a { padding: 14px 16px; font-size: 1.05rem; border-radius: 12px; }
  .nav.is-open .nav-links { transform: none; opacity: 1; visibility: visible; }
  .nav-actions .btn { display: none; }
}

/* =========================================================
   5. HERO
   ========================================================= */
.hero { position: relative; padding-block: clamp(56px, 10vw, 120px) clamp(64px, 10vw, 110px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .45;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; animation: float 14s ease-in-out infinite; }
.blob--1 { width: 420px; height: 420px; background: var(--accent); top: -120px; right: -80px; }
.blob--2 { width: 340px; height: 340px; background: var(--ai-1); bottom: -140px; left: -100px; opacity: .25; animation-delay: -6s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px, 40px) scale(1.1); } }

.hero-inner { display: grid; grid-template-columns: 1.3fr .9fr; gap: 48px; align-items: center; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: .85rem; color: var(--muted); margin-bottom: 24px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgb(34 197 94 / .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgb(34 197 94 / 0); } 100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0); } }
.hero h1 { margin-bottom: .35em; }
.hero-lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--muted); max-width: 560px; margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: clamp(20px, 5vw, 48px); margin-top: 48px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.8rem; line-height: 1.1; }
.hero-stats span { font-size: .85rem; color: var(--muted); }

/* Декоративная «консоль» справа */
.hero-card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); font-family: var(--font-mono); font-size: .85rem;
  transform: rotate(2deg); transition: transform .5s var(--ease);
}
.hero-card:hover { transform: rotate(0) translateY(-4px); }
.hero-card .dots { display: flex; gap: 6px; margin-bottom: 16px; }
.hero-card .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.hero-card .dots i:nth-child(1) { background: #f87171; } .hero-card .dots i:nth-child(2) { background: #fbbf24; } .hero-card .dots i:nth-child(3) { background: #4ade80; }
.hero-card .line { white-space: pre-wrap; color: var(--muted); min-height: 1.6em; }
.hero-card .line b { color: var(--accent); font-weight: 500; }
.hero-card .line .ai-gradient-text { font-weight: 600; }
.caret { display: inline-block; width: 8px; height: 1.1em; background: var(--accent); vertical-align: -3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-card .floating-badge { position: absolute; bottom: -18px; left: -18px; }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { transform: none; }
  .hero-card .floating-badge { left: 16px; }
}

/* =========================================================
   6. БЕЙДЖИ И ТЕГИ
   ========================================================= */
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 500; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }

.ai-badge {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  color: #fff; background: var(--ai-gradient); background-size: 200% 100%;
  animation: shimmer 4s linear infinite; box-shadow: 0 6px 20px -6px var(--ai-2);
}
.ai-badge svg { width: 14px; height: 14px; }
.ai-badge .spark { transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
.ai-badge .spark--small { animation-delay: -1.2s; }
@keyframes shimmer { to { background-position: 200% 0; } }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.6) rotate(45deg); opacity: .6; } }

/* =========================================================
   7. КАРТОЧКИ ПРОЕКТОВ
   ========================================================= */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 24px; }
.project-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s var(--ease);
}
.project-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }

/* AI-проекты: вращающаяся градиентная рамка */
.project-card.is-ai { border-color: transparent; background:
  linear-gradient(var(--surface), var(--surface)) padding-box,
  conic-gradient(from var(--angle), var(--ai-1), var(--ai-2), var(--ai-3), var(--ai-1)) border-box;
  border: 1.5px solid transparent;
  animation: spin-border 6s linear infinite;
}
.project-card.is-ai:hover { box-shadow: 0 24px 60px -24px var(--ai-2); }
@keyframes spin-border { to { --angle: 360deg; } }

.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card-media img, .card-media .cover { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-card:hover .card-media img, .project-card:hover .card-media .cover { transform: scale(1.06); }
.card-media .ai-badge { position: absolute; top: 14px; left: 14px; z-index: 2; }
.card-media .cat-label {
  position: absolute; top: 14px; right: 14px; z-index: 2; font-size: .72rem; font-family: var(--font-mono);
  padding: 4px 10px; border-radius: 999px; background: rgb(0 0 0 / .45); color: #fff; backdrop-filter: blur(6px);
}

/* Сгенерированное превью, если нет скриншота */
.cover {
  display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 30% 20%, var(--c1), transparent 60%), radial-gradient(circle at 80% 90%, var(--c2), transparent 55%), #0d0d16;
}
.cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgb(255 255 255 / .06) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.cover-icon { font-size: clamp(3rem, 8vw, 4.5rem); filter: drop-shadow(0 10px 24px rgb(0 0 0 / .5)); z-index: 1; transition: transform .5s var(--ease); }
.project-card:hover .cover-icon { transform: scale(1.12) rotate(-6deg); }

.card-body { display: flex; flex-direction: column; gap: 12px; padding: 22px; flex: 1; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* вся карточка кликабельна */
.card-year { font-family: var(--font-mono); font-size: .78rem; color: var(--faint); font-weight: 400; }
.card-desc { color: var(--muted); font-size: .95rem; margin: 0; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.card-links { display: flex; gap: 6px; position: relative; z-index: 2; }
.card-links a {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); color: var(--muted); transition: .2s;
}
.card-links a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.card-links svg { width: 17px; height: 17px; }
.card-price { font-weight: 600; font-size: .9rem; }
.card-price.is-free { color: #22c55e; }

/* Фильтры */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 500; font-size: .92rem;
  transition: .2s;
}
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.filter-btn[data-filter="ai"][aria-pressed="true"] { background: var(--ai-gradient); color: #fff; }
.filter-btn .count { font-family: var(--font-mono); font-size: .75rem; opacity: .7; }
.filter-btn svg { width: 15px; height: 15px; }
.empty-state { text-align: center; padding: 60px 0; color: var(--muted); }

.projects-grid .project-card.is-entering { animation: card-in .5s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* =========================================================
   8. СТРАНИЦА ПРОЕКТА
   ========================================================= */
.breadcrumbs { display: flex; gap: 8px; font-size: .88rem; color: var(--faint); margin-bottom: 24px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--accent); }
.project-hero { display: grid; gap: 20px; margin-bottom: 40px; }
.project-hero .meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.project-hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 720px; margin: 0; }
.project-cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 8; border: 1px solid var(--border); margin-bottom: 48px; }
.project-cover.is-ai { border: 2px solid transparent; background: conic-gradient(from var(--angle), var(--ai-1), var(--ai-2), var(--ai-3), var(--ai-1)) border-box; animation: spin-border 6s linear infinite; }
.project-cover img, .project-cover .cover { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius) - 2px); }
.project-cover .cover-icon { font-size: clamp(4rem, 12vw, 8rem); }

.project-layout { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.prose p { color: var(--muted); font-size: 1.05rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.ai-note {
  position: relative; padding: 20px 22px 20px 56px; border-radius: var(--radius-sm); margin: 28px 0;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--ai-gradient) border-box; border: 1px solid transparent;
}
.ai-note svg { position: absolute; left: 20px; top: 22px; width: 22px; height: 22px; color: var(--ai-2); }
.ai-note strong { display: block; margin-bottom: 4px; }
.ai-note p { margin: 0; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery img { border-radius: var(--radius-sm); border: 1px solid var(--border); aspect-ratio: 16/10; object-fit: cover; cursor: zoom-in; transition: transform .3s var(--ease); }
.gallery img:hover { transform: scale(1.02); }
.video-wrap { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.placeholder-box { padding: 28px; border-radius: var(--radius-sm); border: 1px dashed var(--border-strong); color: var(--faint); text-align: center; font-size: .92rem; }

.sidebar { position: sticky; top: 96px; display: grid; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.panel h3 { font-size: .8rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 14px; font-weight: 500; }
.panel .btn { width: 100%; }
.panel-links { display: grid; gap: 10px; }
.facts { display: grid; gap: 10px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 500; text-align: right; }
.price-panel { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), var(--surface) 60%); }
.price-panel .amount { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; margin-bottom: 6px; }
.price-panel p { color: var(--muted); font-size: .9rem; margin: 10px 0 16px; }

.project-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; }
.project-nav a { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: .25s; }
.project-nav a:hover { border-color: var(--accent); transform: translateY(-3px); }
.project-nav small { color: var(--faint); display: block; font-size: .8rem; }
.project-nav strong { font-family: var(--font-display); font-weight: 600; }
.project-nav a:last-child { text-align: right; }

@media (max-width: 960px) {
  .project-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* Лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgb(0 0 0 / .88); display: grid; place-items: center; padding: 16px; opacity: 0; visibility: hidden; transition: .25s; cursor: zoom-out; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 90vh; border-radius: var(--radius-sm); }

/* =========================================================
   9. «ОБО МНЕ», НАВЫКИ, ПОДХОД
   ========================================================= */
.about-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.avatar {
  width: 112px; height: 112px; border-radius: 28px; display: grid; place-items: center; font-size: 2.6rem; font-family: var(--font-display);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); flex: none; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-strip h2 { font-size: 1.6rem; }
.about-strip p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .about-strip { grid-template-columns: 1fr; text-align: left; } }

.about-hero { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }
.about-hero .avatar { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--radius); font-size: 5rem; }
@media (max-width: 760px) { .about-hero { grid-template-columns: 1fr; } .about-hero .avatar { max-width: 200px; } }

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.skill-group { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.skill-group h3 { display: flex; align-items: center; gap: 10px; }
.skill-bar { margin-top: 14px; }
.skill-bar .label { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.skill-bar .label span:last-child { color: var(--faint); font-family: var(--font-mono); font-size: .8rem; }
.skill-bar .track { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.skill-bar .fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1.2s var(--ease); }
.skill-group.is-ai .fill { background: var(--ai-gradient); }
.is-visible .skill-bar .fill { width: var(--w); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { position: relative; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); counter-increment: step; transition: transform .3s var(--ease), border-color .3s; }
.step:hover { transform: translateY(-4px); border-color: var(--accent); }
.step::before { content: "0" counter(step); font-family: var(--font-mono); color: var(--accent); font-size: .85rem; display: block; margin-bottom: 14px; }
.step h3 { font-size: 1.05rem; }
.step p { color: var(--muted); font-size: .94rem; margin: 0; }
.step .who { display: inline-block; margin-top: 14px; font-size: .75rem; font-family: var(--font-mono); padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.step .who.ai { background: var(--ai-gradient); color: #fff; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border-strong); }
.timeline li { position: relative; padding: 0 0 28px 28px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.timeline time { font-family: var(--font-mono); font-size: .8rem; color: var(--faint); }
.timeline h3 { font-size: 1rem; margin: 2px 0 4px; }
.timeline p { color: var(--muted); margin: 0; font-size: .94rem; }

/* =========================================================
   10. ЦЕНЫ
   ========================================================= */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; padding: 32px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .35s var(--ease), box-shadow .35s; }
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.price-card.is-highlight { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, conic-gradient(from var(--angle), var(--ai-1), var(--ai-2), var(--ai-3), var(--ai-1)) border-box; animation: spin-border 6s linear infinite; }
.price-card .ribbon { position: absolute; top: -13px; left: 28px; }
.price-card h3 { font-size: 1.15rem; margin-top: 6px; }
.price-card .price { font-family: var(--font-display); font-size: 2.1rem; margin: 10px 0 4px; line-height: 1.1; }
.price-card .price small { font-family: var(--font-body); font-size: .9rem; color: var(--muted); font-weight: 400; }
.price-card > p { color: var(--muted); font-size: .95rem; }
.checklist { list-style: none; padding: 0; margin: 8px 0 28px; display: grid; gap: 10px; flex: 1; }
.checklist li { display: flex; gap: 10px; font-size: .94rem; }
.checklist svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 3px; }

.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 0 22px; transition: border-color .2s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* =========================================================
   11. КОНТАКТЫ
   ========================================================= */
.contact-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
@media (max-width: 880px) { .contact-layout { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; padding: clamp(22px, 4vw, 36px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field label { font-size: .88rem; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-soft);
  transition: border-color .2s, box-shadow .2s; font-size: 1rem; /* 16px — без зума на iOS */
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field .error { color: #f87171; font-size: .82rem; min-height: 1em; }
.field.has-error input, .field.has-error textarea { border-color: #f87171; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); font-size: .88rem; color: var(--muted); transition: .2s; }
.chips input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-status { font-size: .92rem; min-height: 1.4em; margin: 0; }
.form-status.ok { color: #22c55e; } .form-status.err { color: #f87171; }

.contact-list { display: grid; gap: 10px; }
.contact-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease), border-color .25s;
}
.contact-item:hover { transform: translateX(4px); border-color: var(--accent); }
.contact-item .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); flex: none; }
.contact-item .ico svg { width: 20px; height: 20px; }
.contact-item small { display: block; color: var(--faint); font-size: .8rem; }
.contact-item strong { font-weight: 500; font-size: .95rem; word-break: break-all; }
.booking { margin-top: 20px; }

/* =========================================================
   12. CTA И ФУТЕР
   ========================================================= */
.cta-band {
  position: relative; overflow: hidden; text-align: center; padding: clamp(40px, 7vw, 80px) var(--gutter);
  border-radius: calc(var(--radius) + 8px); background: var(--surface); border: 1px solid var(--border);
}
.cta-band::before { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(ellipse at center, var(--accent-soft), transparent 60%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band p { color: var(--muted); max-width: 540px; margin: 0 auto 28px; }
.cta-band .hero-cta { justify-content: center; }

.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: clamp(64px, 10vw, 120px); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-block: 56px 40px; }
.footer-top h4 { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 16px; font-weight: 500; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-top ul a { color: var(--muted); transition: color .2s; }
.footer-top ul a:hover { color: var(--accent); }
.footer-about p { color: var(--muted); font-size: .94rem; margin: 14px 0 20px; max-width: 320px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); color: var(--muted); transition: .25s var(--ease); }
.socials a:hover { color: var(--accent-ink); background: var(--accent); border-color: transparent; transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }
.accent-picker { display: flex; gap: 8px; margin-top: 4px; }
.accent-picker button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; background: var(--sw); transition: transform .2s; }
.accent-picker button:hover { transform: scale(1.12); }
.accent-picker button[aria-pressed="true"] { border-color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 24px; border-top: 1px solid var(--border); font-size: .86rem; color: var(--faint); }
.footer-bottom .made-with { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 880px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }

/* =========================================================
   13. АНИМАЦИИ ПРИ СКРОЛЛЕ
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   14. ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА
   ========================================================= */
.lang-switch { position: relative; }
.lang-btn {
  height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); font-family: var(--font-mono); font-size: .82rem; font-weight: 500;
  transition: border-color .2s;
}
.lang-btn:hover, .lang-switch.is-open .lang-btn { border-color: var(--accent); }
.lang-btn svg { width: 17px; height: 17px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .2s var(--ease); z-index: 60;
}
.lang-switch.is-open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 10px;
  background: none; cursor: pointer; text-align: left; font-size: .94rem; color: var(--muted); transition: .15s;
}
.lang-menu button:hover { background: var(--surface-2); color: var(--text); }
.lang-menu button[aria-checked="true"] { color: var(--text); background: var(--accent-soft); }
.lang-menu .code { font-family: var(--font-mono); font-size: .75rem; color: var(--accent); width: 22px; }

/* =========================================================
   15. ПЛИТКИ С ЛОГОТИПАМИ (контакты)
   ========================================================= */
.brand-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.brand-tile {
  --brand: var(--accent);
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  aspect-ratio: 1; padding: 20px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s var(--ease);
}
.brand-tile::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--brand) 35%, transparent), transparent 70%);
}
.brand-tile:hover { transform: translateY(-6px); border-color: var(--brand); box-shadow: 0 20px 44px -20px var(--brand); }
.brand-tile:hover::before { opacity: 1; }
.brand-logo {
  position: relative; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 20px;
  background: var(--brand); color: #fff; transition: transform .4s var(--ease);
}
.brand-tile:hover .brand-logo { transform: scale(1.08) rotate(-4deg); }
.brand-logo svg { width: 38px; height: 38px; }
.brand-name { position: relative; font-weight: 600; font-size: .95rem; }
.brand-tile--github   { --brand: #6e5494; }
.brand-tile--telegram { --brand: #26a5e4; }
.brand-tile--discord  { --brand: #5865f2; }
.brand-tile--itch     { --brand: #fa5c5c; }
.brand-tile--twitter  { --brand: #1d1d1f; }
.brand-tile--email    { --brand: var(--accent); }
.brand-tile--github .brand-logo { background: #181717; }
[data-theme="light"] .brand-tile--github .brand-logo { background: #181717; }
@media (max-width: 420px) { .brand-tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; } .brand-logo { width: 60px; height: 60px; } .brand-logo svg { width: 32px; height: 32px; } }

.contact-form-wrap { margin-top: 56px; max-width: 760px; }
.contact-form-wrap h2 { font-size: 1.5rem; margin-bottom: 20px; }
@media (max-width: 880px) { .nav-actions .lang-btn span { display: inline; } }

/* =========================================================
   16. КАРТОЧКА-КНОПКА ПРОЕКТА + МЕТКА «ИИ»
   ========================================================= */
a.project-card { color: inherit; cursor: pointer; }
a.project-card .card-body { gap: 10px; }
a.project-card .card-title { font-size: 1.15rem; }
a.project-card .tag { align-self: flex-start; }
a.project-card:focus-visible { outline-offset: 4px; }

/* AI-проекты: белый контур вместо обычной рамки */
.project-card.is-ai {
  animation: none;
  background: var(--surface);
  border: 2px solid #fff;
}
.project-card.is-ai:hover { border-color: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / .12), 0 24px 60px -24px rgb(255 255 255 / .35); }

/* Маленькая надпись «ИИ» */
.ai-label {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px 3px 6px; border-radius: 8px;
  background: #fff; color: #0a0a12;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700; letter-spacing: .04em; line-height: 1.2;
}
.ai-label svg { width: 12px; height: 12px; }
.ai-label .spark { transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
.ai-label .spark--small { animation-delay: -1.2s; }
.project-card > .ai-label { position: absolute; right: 14px; bottom: 14px; z-index: 2; }
.project-card.is-ai .card-body { padding-right: 64px; }

/* Страница проекта */
.project-hero .hero-cta { margin-top: 8px; }
.project-cover.is-ai { animation: none; background: none; border: 2px solid #fff; }
.tag--version { color: var(--text); border-color: var(--border-strong); font-family: var(--font-mono); }
.feature-list { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 12px; }
.feature-list li { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.feature-list strong { display: block; margin-bottom: 4px; }
.feature-list span { color: var(--muted); font-size: .97rem; }
.gallery .shot { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-sm); }
.gallery .shot img { width: 100%; aspect-ratio: auto; object-fit: contain; }
.panel-links .btn { width: 100%; }
.panel-links .btn svg { width: 16px; height: 16px; }
.facts dd { max-width: 60%; }

/* =========================================================
   17. ИСТОРИЯ ИЗМЕНЕНИЙ И РОАДМАП
   ========================================================= */
.changelog { list-style: none; padding: 0; margin: 0 0 1.4em; border-left: 1px solid var(--border-strong); }
.changelog > li { position: relative; padding: 0 0 26px 26px; }
.changelog > li::before { content: ""; position: absolute; left: -6px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 4px var(--bg); }
.changelog > li.is-current::before { background: var(--accent); }
.changelog .ver-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.changelog .ver-head time { font-family: var(--font-mono); font-size: .8rem; color: var(--faint); }
.changelog .current-pill { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.changelog ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.changelog ul li { margin-bottom: 4px; }
.changelog .empty, .roadmap-empty { color: var(--faint); font-size: .94rem; margin: 0; }

.roadmap { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 10px; }
.roadmap li { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.roadmap .status { flex: none; font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; margin-top: 2px; }
.roadmap .status--done     { background: rgb(34 197 94 / .15);  color: #4ade80; }
.roadmap .status--progress { background: rgb(251 191 36 / .15); color: #fbbf24; }
.roadmap .status--planned  { background: var(--surface-2); color: var(--muted); }
.roadmap li.is-done .rm-text { color: var(--muted); }
.roadmap .rm-text strong { display: block; font-weight: 600; }
.roadmap .rm-text span { color: var(--muted); font-size: .94rem; }
