:root {
  /* Балтика: холодный графит, стальное небо, янтарь */
  --bg-dark: #101215;
  --bg-deep: #0b0d0f;
  --text-primary: #e8eaed;
  --text-secondary: #9aa4ae;

  /* Стекло: светлее и заметнее, чем было — чтобы читалось как стекло, а не как тёмный блок */
  --glass-bg: rgba(255, 255, 255, 0.055);
  --glass-bg-strong: rgba(255, 255, 255, 0.085);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-bright: rgba(255, 255, 255, 0.22);

  /* Акценты */
  --accent-primary: #d9a066;   /* янтарь */
  --accent-secondary: #8fa8bf; /* балтийская сталь */
  --accent-amber-deep: #b87d43;
  --badge-mine: #93aec4;
  --badge-client: #d9a066;

  --spacing: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* Свет за стеклом: холодная сталь + тёплый янтарь, без фиолетового */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 22% 28%, rgba(143, 168, 191, 0.22) 0%, transparent 42%),
    radial-gradient(circle at 74% 62%, rgba(217, 160, 102, 0.20) 0%, transparent 44%),
    radial-gradient(circle at 88% 16%, rgba(120, 145, 170, 0.16) 0%, transparent 40%),
    radial-gradient(circle at 12% 82%, rgba(184, 125, 67, 0.14) 0%, transparent 42%);
  filter: blur(110px);
  animation: blob-drift 34s ease-in-out infinite;
  z-index: -2;
  pointer-events: none;
  will-change: transform;
}

/* Зернистость поверх всего — то, что делает стекло «настоящим», а не плоским */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.34'/%3E%3C/svg%3E");
}

/* Уважаем системную настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cycle-chip,
  .cycle-arrow,
  .post-card {
    opacity: 1 !important;
    transform: none !important;
  }
}

@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -50px) scale(1.05); }
  50% { transform: translate(-20px, 30px) scale(0.95); }
  75% { transform: translate(50px, 20px) scale(1.02); }
}

/* Hero section */
.hero {
  padding: 3rem var(--spacing);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.hero-content {
  margin-bottom: 2rem;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  /* margin auto — без него block-элемент не центрируется, даже при text-align:center у родителя */
  margin: 0 auto 1.5rem;
  display: block;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.hero-title {
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  color: var(--accent-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
}

.hero-bio {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.65;
}

/* Ключевые цифры под био */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-metric {
  padding: 1rem 0.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px) saturate(150%);
}

.hero-metric-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-metric-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--text-secondary);
}

.hero-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  text-decoration: none;
  border-radius: 24px;
  font-weight: 600;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
  box-shadow: 0 8px 24px rgba(217, 160, 102, 0.25);
  margin-bottom: 1.5rem;
}

.hero-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(217, 160, 102, 0.35);
}

.hero-contacts {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 44px — минимальная комфортная зона тапа на телефоне */
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 200ms ease-out;
}

.contact-link:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-4px);
}

.icon {
  width: 20px;
  height: 20px;
}

/* Full cycle block */
.cycle-block {
  margin-top: 2.5rem;
  /* Вырываемся из 600px колонки hero: цепочке из четырёх этапов с торцами
     нужно больше места, иначе она ломается на две строки */
  width: min(760px, calc(100vw - 2rem));
  margin-left: 50%;
  transform: translateX(-50%);
  padding: 1.5rem;
  /* Торцы подсвечены изнутри стекла: слева стальная замысел-сторона,
     справа янтарная результат-сторона. Плюс верхний блик и нижняя тень —
     та же схема стекла, что у карточек работ. */
  background:
    linear-gradient(90deg,
      rgba(143, 168, 191, 0.2) 0%,
      rgba(143, 168, 191, 0.05) 12%,
      transparent 26%,
      transparent 74%,
      rgba(217, 160, 102, 0.06) 88%,
      rgba(217, 160, 102, 0.22) 100%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025) 45%),
    var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 10px 30px rgba(0, 0, 0, 0.22);
}

.cycle-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Цепочка этапов зажата между целью и результатом: слева вход, справа выход.
   Торцы намеренно не чипы — это не этапы работы, а рамка, в которой она идёт. */
/* Заголовок внутри той же сетки: торцы занимают обе строки и потому
   стоят по вертикальному центру всей плашки, а не по центру одной цепочки */
.cycle-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas:
    "start label end"
    "start chain end";
  align-items: center;
  gap: 0 0.9rem;
}

.cycle-label { grid-area: label; }
.cycle-chain { grid-area: chain; }
.cycle-edge-start { grid-area: start; }
.cycle-edge-end { grid-area: end; }

/* Торцы занимают всю краевую зону целиком и центрируют текст внутри.
   Так зазоры до цепочки и отступы от краёв одинаковы с обеих сторон —
   при shrink-to-fit они разъезжались из-за разной длины подписей */
.cycle-edge {
  justify-self: stretch;
  text-align: center;
}

.cycle-edge {
  line-height: 1.2;
  /* min-width: 0 обязателен: иначе 1fr-колонка раздувается до min-content
     торца, боковые перестают быть равными и цепочка съезжает с центра */
  min-width: 0;
}

.cycle-edge-title {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.cycle-edge-start .cycle-edge-title {
  color: var(--accent-secondary);
}

.cycle-edge-end .cycle-edge-title {
  color: var(--accent-primary);
}

.cycle-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.cycle-chip {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  animation: fade-in-up 0.6s ease-out forwards;
  opacity: 0;
}

.cycle-chip:nth-child(1) { animation-delay: 0.1s; }
.cycle-chip:nth-child(3) { animation-delay: 0.3s; }
.cycle-chip:nth-child(5) { animation-delay: 0.5s; }
.cycle-chip:nth-child(7) { animation-delay: 0.7s; }

.cycle-arrow {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0;
  animation: fade-in 0.6s ease-out forwards;
}

.cycle-arrow:nth-child(2) { animation-delay: 0.2s; }
.cycle-arrow:nth-child(4) { animation-delay: 0.4s; }
.cycle-arrow:nth-child(6) { animation-delay: 0.6s; }

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Балтийская волна между секциями */
.wave-divider {
  max-width: 1000px;
  margin: 1rem auto 0;
  padding: 0 var(--spacing);
  line-height: 0;
}

.wave-divider svg {
  width: 100%;
  height: 46px;
}

/* Заголовки секций */
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.75rem;
  letter-spacing: -0.3px;
}

/* Инструменты */
.tools {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem var(--spacing) 1rem;
}

.tools-group {
  margin-bottom: 1.5rem;
}

.tools-group-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 0.85rem;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem 0.6rem 0.6rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 6px 20px rgba(0, 0, 0, 0.3);
  transition: transform 200ms ease-out, border-color 200ms ease-out, box-shadow 200ms ease-out;
}

.tool:hover {
  transform: translateY(-3px);
  border-color: var(--glass-border-bright);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 26px rgba(0, 0, 0, 0.4),
    0 0 24px color-mix(in srgb, var(--tool-color) 30%, transparent);
}

.tool-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  /* Контур снаружи, а не inset: у непрозрачных лого (CapCut) тёмный фон
     иначе проваливается в тёмный фон страницы */
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.tool-name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Нейросети — намеренно сбоку и мелко, без акцента */
.tools-aside {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
  letter-spacing: 0.3px;
}

/* Опыт — таймлайн строками */
.experience {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem var(--spacing) 1rem;
}

.exp-list {
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
}

/* Вертикальная нить таймлайна */
.exp-list::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg,
    var(--accent-primary) 0%,
    var(--glass-border) 45%,
    transparent 100%);
}

.exp-item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.exp-item:last-child {
  border-bottom: none;
}

/* Точка на нити */
.exp-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 1.35rem;
  width: 9px;
  height: 9px;
  margin-left: 0.5px;
  border-radius: 50%;
  background: var(--bg-dark);
  box-shadow: inset 0 0 0 1.5px var(--text-secondary);
}

/* Текущее место — янтарная точка со свечением */
.exp-item-current::before {
  background: var(--accent-primary);
  box-shadow:
    inset 0 0 0 1.5px var(--accent-primary),
    0 0 12px rgba(217, 160, 102, 0.7);
}

.exp-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.exp-role {
  font-weight: 600;
  font-size: 0.95rem;
}

.exp-place {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.exp-period {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0.85;
}

@media (max-width: 560px) {
  .exp-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .exp-period {
    order: -1;
    color: var(--accent-primary);
    opacity: 0.9;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
  }
}

/* Filters */
.filters-section {
  padding: 2rem var(--spacing);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.filter-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* display:flex у класса перебивает браузерный [hidden] — возвращаем скрытие явно */
.filter-group[hidden] {
  display: none;
}

.filter-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 100px;
}

.filter-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 200ms ease-out;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-btn:hover {
  border-color: var(--accent-primary);
  background: rgba(217, 160, 102, 0.1);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
  color: white;
  box-shadow: 0 8px 20px rgba(217, 160, 102, 0.3);
}

/* Плашка «не только видео»: то же стекло, что у остального сайта,
   но узкое и без иконок — это приписка к инструментам, а не отдельный раздел */
.skills-extra {
  max-width: 520px;
  margin: 2rem auto 0;
  padding: 1.1rem 1.5rem 1.2rem;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025) 45%),
    var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 10px 28px rgba(0, 0, 0, 0.2);
}

.skills-extra-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.7rem;
}

.skills-extra-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.skills-extra-item {
  padding: 0.45rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.skills-extra-text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Posts grid */
.posts-section {
  padding: 2rem var(--spacing);
  max-width: 1400px;
  margin: 0 auto;
}

/* Сетка рядами: порядок работ задан вручную и читается слева направо,
   поэтому grid, а не кладка колонками — у колонок рядов нет.
   Строка сетки мелкая (8px), а каждая карточка занимает столько строк,
   сколько нужно её высоте (span считает JS). Так следующая карточка
   подтягивается вверх сразу под предыдущую в своей колонке и дыр
   до конца самого высокого поста в ряду не остаётся. */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  column-gap: 2rem;
  row-gap: 0;
  grid-auto-rows: 8px;
  max-width: 400px;
  margin: 0 auto;
}

@media (min-width: 816px) {
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 832px;
  }
}

@media (min-width: 1200px) {
  .posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1264px;
  }
}

/* Post card */
.post-card {
  position: relative;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03) 45%),
    var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  overflow: hidden;
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  display: flex;
  flex-direction: column;
  transition: transform 300ms ease-out, box-shadow 300ms ease-out,
              border-color 300ms ease-out, opacity 300ms ease-out;
  /* Внешняя тень + внутренние блики: светлый сверху, тёмный снизу — объём стекла */
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

/* Класс reveal ставит JS. Без него карточка просто видна — сайт работает и без скриптов */
.post-card.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.post-card.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.post-card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border-bright);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.55),
    0 0 45px rgba(217, 160, 102, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

/* Блик по верхней кромке — «свет, поймавшийся на грани стекла» */
.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  pointer-events: none;
  z-index: 2;
}

.post-media {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.post-youtube {
  aspect-ratio: 16 / 9;
  background: #000;
}

.post-youtube-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  position: relative;
}

.post-youtube-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease-out;
  animation: pulse 2s ease-in-out infinite;
}

.post-youtube:hover .post-youtube-play {
  background: rgba(255, 0, 0, 0.8);
  transform: translate(-50%, -50%) scale(1.1);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
  50% { box-shadow: 0 0 0 15px rgba(255, 0, 0, 0); }
}

.post-video {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
}

.post-phone-wrapper {
  display: flex;
  justify-content: center;
  /* align-items обязателен: без него flex растягивает телефон и ломает его aspect-ratio */
  align-items: flex-start;
  padding: 2rem 1.5rem 1.5rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(217, 160, 102, 0.14), transparent 62%),
    rgba(0, 0, 0, 0.22);
}

/* iPhone 16 Pro Max, Desert Titanium */
.phone-mockup {
  position: relative;
  width: 100%;
  max-width: 252px;
  aspect-ratio: 9 / 19.5;
  flex: 0 0 auto;
  border-radius: 48px;
  /* Desert Titanium — приглушённый бежево-серый, а не золото.
     Свет ловится по граням, середина уходит в тень. */
  background: linear-gradient(155deg,
    #d5c6b5 0%,
    #b8a693 14%,
    #9c8b7a 38%,
    #8a7a6b 58%,
    #ab9a88 80%,
    #cfc0af 100%);
  padding: 4px;
  box-shadow:
    0 0 0 0.5px rgba(60, 52, 44, 0.8),
    0 30px 70px -24px rgba(0, 0, 0, 0.85),
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    inset 0 -1px 1px rgba(55, 46, 38, 0.5);
}

/* Экран: inset внутри рамки, без calc-подгонок */
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  overflow: hidden;
  background: #000;
  box-shadow:
    inset 0 0 0 1.5px rgba(0, 0, 0, 0.95),
    inset 0 0 22px rgba(0, 0, 0, 0.55);
}

/* Диагональный блик по стеклу экрана — то, что читается как «стекло» */
.phone-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(118deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 22%,
    transparent 42%,
    transparent 100%);
  pointer-events: none;
  z-index: 4;
}

/* Dynamic Island — не notch: плавающая пилюля с отступом сверху */
.phone-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 31%;
  height: 23px;
  background: #000;
  border-radius: 999px;
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Камера в островке */
.phone-island::after {
  content: '';
  position: absolute;
  right: 16%;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2b3d52 0%, #0a0f16 65%);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}

/* Боковые кнопки — заподлицо с гранью, а не нашлёпками поверх корпуса */
.phone-mockup::before,
.phone-mockup::after {
  content: '';
  position: absolute;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(180deg, #b3a291, #8a7a6b);
  opacity: 0.9;
}

.phone-mockup::before {
  left: -1px;
  top: 22%;
  height: 7%;
}

.phone-mockup::after {
  right: -1px;
  top: 25%;
  height: 11%;
}

.post-video-mobile {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: cover;
  border-radius: inherit;
}

/* Карусель-«шторка»: свайп через scroll-snap, работает и без JS */
.post-carousel {
  position: relative;
  width: 100%;
  background: #000;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  scroll-snap-align: center;
  user-select: none;
}

/* Стрелки — только там, где есть мышь; на тач-экранах свайп удобнее */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(18, 18, 20, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  z-index: 3;
  transition: background 200ms ease-out, opacity 200ms ease-out;
}

.carousel-nav svg {
  width: 20px;
  height: 20px;
}

.carousel-nav:hover:not(:disabled) {
  background: rgba(18, 18, 20, 0.75);
}

.carousel-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

@media (hover: hover) and (pointer: fine) {
  .carousel-nav { display: flex; }
}

/* Счётчик слайдов, как в Инсте */
.carousel-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(18, 18, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  z-index: 3;
  pointer-events: none;
}

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 3;
  pointer-events: none;
}

.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  transition: background 200ms ease-out, transform 200ms ease-out;
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* Горизонтальный ролик — кадром 16:9, без телефонного мокапа */
.post-landscape {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  overflow: hidden;
}

.post-video-wide {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Кнопка запуска поверх постера — вместо нативной панели плеера */
.phone-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.42);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  color: #fff;
  cursor: pointer;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  transition: transform 200ms ease-out, background 200ms ease-out;
}

/* [hidden] сам по себе не пересилит display у кнопки */
.phone-play[hidden] {
  display: none;
}

.phone-play svg {
  width: 26px;
  height: 26px;
}

.phone-play:hover {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(20, 20, 22, 0.6);
}

.post-image {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
}

/* Reposts block */
.post-reposts-block {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.reposts-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.75rem;
}

.reposts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Чип нарочно почти без контура: рамка чипа спорила с обводкой логотипа,
   и блок из семи таких превращался в рябь. Акцент — на самих логотипах. */
.repost-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem 0.4rem 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  transition: background 200ms ease-out, border-color 200ms ease-out, transform 200ms ease-out;
}

.repost-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(217, 160, 102, 0.45);
  transform: translateY(-2px);
}

/* Логотип и кольцо разведены: в картинке остаётся только сама аватарка,
   обрезанная по кругу, а градиентное кольцо с тёмным зазором рисуется здесь.
   Поэтому кольцо одинаковое у всех, хотя скриншоты сняты по-разному.
   padding-box даёт зазор цвета блока, border-box — сам градиент. */
.repost-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  /* без padding: тёмный зазор между кольцом и логотипом Даня забраковал —
     кольцо должно лежать вплотную к аватарке */
  border: 3px solid transparent;
  background:
    conic-gradient(from 210deg,
      #f9ce34 0%,
      #ff8a3d 20%,
      #ee2a7b 45%,
      #d62976 65%,
      #ff8a3d 85%,
      #f9ce34 100%) border-box;
}

.repost-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
}

.repost-handle {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
}

.repost-icon {
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
}

/* Post content */
.post-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-platform {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.badge-owner-mine {
  background: rgba(143, 168, 191, 0.2);
  color: var(--badge-mine);
  border: 1px solid rgba(143, 168, 191, 0.4);
}

.badge-owner-client {
  background: rgba(201, 138, 74, 0.2);
  color: var(--badge-client);
  border: 1px solid rgba(201, 138, 74, 0.4);
}

.badge-icon {
  width: 12px;
  height: 12px;
}

.post-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.post-description {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.post-date {
  margin-left: auto;
  align-self: center;
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Просмотры — главная цифра карточки */
.post-views {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.post-views-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.post-views-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Сетка 2x2: четыре метрики не влезают в ряд, а 3+1 смотрится как ошибка */
.post-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.post-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.post-stat-icon {
  width: 17px;
  height: 17px;
  color: var(--accent-secondary);
  flex-shrink: 0;
}

/* Итог по всем работам над сеткой */
.works-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  max-width: 620px;
  margin: 0 auto 2rem;
  padding: 1rem 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px) saturate(150%);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

.works-summary strong {
  color: var(--text-primary);
  font-weight: 700;
}

.works-summary-sep {
  opacity: 0.4;
}

/* Призыв к действию */
/* Веб-проект в общей ленте. Стекло и скругления берёт от .post-card,
   своё — только стальная рамка и обложка 16:10 вместо мокапа телефона:
   среди вертикальных видео карточка должна читаться как другой тип работы. */
.post-card--project {
  border-color: rgba(143, 168, 191, 0.3);
}

.badge-web {
  white-space: nowrap;
  background: rgba(143, 168, 191, 0.16);
  border-color: rgba(143, 168, 191, 0.42);
  color: #c6d7e5;
}

@media (hover: hover) and (pointer: fine) {
  .post-card--project:hover { border-color: rgba(143, 168, 191, 0.5); }
  .post-card--project:hover .project-cover img { transform: scale(1.035); }
}

.project-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--glass-border);
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 450ms ease-out;
}

.project-stars {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(12, 14, 17, 0.62);
  border: 1px solid rgba(217, 160, 102, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.project-stars svg { width: 11px; height: 11px; }

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.25rem 1.25rem;
}

.project-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.project-tagline {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.project-description {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.15rem;
}

.project-tag {
  padding: 0.25rem 0.6rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  font-size: 0.68rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* margin-top: auto — ссылки прижаты к низу, поэтому у карточек с описанием
   разной длины кнопки стоят на одной линии */
.project-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

.project-link-main {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: 14px;
  text-align: center;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 6px 18px rgba(217, 160, 102, 0.22);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.project-link-main:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(217, 160, 102, 0.32);
}

.project-link-code {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: color 200ms ease-out, border-color 200ms ease-out;
  white-space: nowrap;
}

.project-link-code:hover {
  color: var(--text-primary);
  border-bottom-color: var(--accent-primary);
}

.cta {
  padding: 4rem var(--spacing) 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.cta-inner {
  padding: 2.5rem 2rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(217, 160, 102, 0.18), transparent 70%),
    var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.cta-title {
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

.cta-text {
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.75rem;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  border-radius: 24px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out, background 200ms ease-out;
}

.cta-btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  box-shadow: 0 10px 30px rgba(217, 160, 102, 0.3);
}

.cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(217, 160, 102, 0.42);
}

/* Круглая печать «AI-генерация» на поле рядом с мокапом. Текст по окружности
   при таком диаметре нечитаем в принципе — поэтому две крупные строки по центру. */
.ai-badge {
  position: absolute;
  top: 12px;
  right: 10px;
  z-index: 3;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: rgba(12, 14, 17, 0.62);
  border: 1px solid rgba(217, 160, 102, 0.45);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.ai-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-primary);
}

.ai-badge-top svg {
  width: 11px;
  height: 11px;
}

.ai-badge-bottom {
  font-size: 0.42rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-align: center;
  color: #d8ccbc;
}

/* Аудио-дорожка поста — узкая полоса между медиа и текстом,
   ровно там же, где Inst показывает трек под каруселью */
.post-audio {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem 0.7rem;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid var(--glass-border);
}

.audio-play {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--glass-border-bright);
  background: var(--glass-bg-strong);
  color: var(--accent-primary);
  cursor: pointer;
  transition: background 200ms ease-out, color 200ms ease-out, transform 200ms ease-out;
}

.audio-play:hover {
  background: var(--accent-primary);
  color: #17191c;
  transform: scale(1.06);
}

.audio-play:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.audio-icon {
  width: 15px;
  height: 15px;
  /* иконка play зрительно легче паузы — сдвигаем на пиксель, чтобы стояла по центру */
  margin-left: 1px;
}

.audio-icon-pause,
.post-audio.playing .audio-icon-play {
  display: none;
}

.post-audio.playing .audio-icon-pause {
  display: block;
  margin-left: 0;
}

.audio-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  line-height: 1.25;
}

.audio-title,
.audio-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.audio-artist {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Эквалайзер: пока пауза — ровные короткие штрихи, на воспроизведении оживают */
.audio-wave {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.audio-wave span {
  width: 2px;
  border-radius: 1px;
  background: var(--accent-secondary);
  opacity: 0.55;
  transform-origin: bottom;
  transition: height 200ms ease-out, opacity 200ms ease-out;
}

/* На паузе — застывшая волна разной высоты: одинаковые коротышки
   читались как четыре случайные пылинки, а не как эквалайзер */
.audio-wave span:nth-child(1) { height: 5px; }
.audio-wave span:nth-child(2) { height: 11px; }
.audio-wave span:nth-child(3) { height: 7px; }
.audio-wave span:nth-child(4) { height: 13px; }

.post-audio.playing .audio-wave span {
  height: 16px;
  opacity: 1;
  background: var(--accent-primary);
  animation: audio-bounce 900ms ease-in-out infinite;
}

.post-audio.playing .audio-wave span:nth-child(2) { animation-delay: 150ms; }
.post-audio.playing .audio-wave span:nth-child(3) { animation-delay: 300ms; }
.post-audio.playing .audio-wave span:nth-child(4) { animation-delay: 450ms; }

@keyframes audio-bounce {
  0%, 100% { transform: scaleY(0.28); }
  50%      { transform: scaleY(1); }
}

.audio-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.audio-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
}

@media (prefers-reduced-motion: reduce) {
  .post-audio.playing .audio-wave span {
    animation: none;
  }
}

/* Пустой результат фильтрации */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

/* Подвал */
.site-footer {
  text-align: center;
  padding: 3rem var(--spacing) 2.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 2rem;
}

.footer-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 200ms ease-out;
}

.footer-links a:hover {
  color: var(--accent-secondary);
}

.post-link {
  margin-top: auto;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  transition: all 200ms ease-out;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-link:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(217, 160, 102, 0.3);
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 2rem var(--spacing);
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .filters-section {
    padding: 1.5rem var(--spacing);
  }

  .filter-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .cycle-chain {
    font-size: 0.8rem;
  }

  .cycle-flow {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "start"
      "chain"
      "end";
    gap: 0.9rem;
    justify-items: center;
  }

  /* hero центрирует текст — торцам это ломает связку с янтарной линией */
  /* justify-self с десктопа растаскивал торцы по углам */
  .cycle-edge-start,
  .cycle-edge-end {
    justify-self: center;
  }

  .cycle-edge {
    text-align: center;
  }

  .cycle-chain {
    justify-content: flex-start;
  }

  /* В строку четыре блока не помещаются, а перенос оставлял стрелку
     висеть в конце строки — на узком экране разворачиваем цепочку вниз */
  .cycle-chain {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }

  .cycle-arrow {
    transform: rotate(90deg);
  }

  .cycle-edge {
    white-space: normal;
  }

  .cycle-edge-end {
    text-align: center;
  }

  .cycle-block {
    background:
      linear-gradient(180deg,
        rgba(143, 168, 191, 0.18) 0%,
        transparent 22%,
        transparent 78%,
        rgba(217, 160, 102, 0.2) 100%),
      linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025) 45%),
      var(--glass-bg);
  }
}

@media (max-width: 480px) {
  .hero-avatar {
    width: 104px;
    height: 104px;
  }

  .cycle-block {
    padding: 1rem;
  }

  .post-card {
    border-radius: 16px;
  }

  .post-content {
    padding: 1rem;
  }

  /* Три метрики в ряд на узком экране не помещаются — оставляем две колонки */
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-metric:last-child {
    grid-column: 1 / -1;
  }

  .post-views-value {
    font-size: 1.75rem;
  }

  .post-stat {
    font-size: 0.875rem;
    padding: 0.45rem 0.6rem;
  }

  /* Мокап телефона крупнее на мобильном — он тут главный герой */
  .phone-mockup {
    max-width: 230px;
  }
}
