/* Modern Pastel Dark Theme & Mobile Resilient Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Unbounded:wght@400;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-dark: #0b0f17;
  --bg-card: rgba(18, 24, 38, 0.72);
  --border-card: rgba(255, 255, 255, 0.07);
  --border-card-hover: rgba(165, 180, 252, 0.35);

  /* Пастельные современные акценты */
  --pastel-indigo: #818cf8;
  --pastel-lavender: #c084fc;
  --pastel-cyan: #38bdf8;
  --pastel-amber: #fbbf24;
  --pastel-rose: #fda4af;
  --pastel-emerald: #34d399;

  --text-main: #f8fafc;
  --text-sub: #cbd5e1;
  --text-muted: #94a3b8;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .font-heading {
  font-family: 'Unbounded', sans-serif;
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Мягкий рассеянный градиент фона */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 10% 15%, rgba(129, 140, 248, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 90% 25%, rgba(192, 132, 252, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(56, 189, 248, 0.06) 0%, transparent 50%);
}

.relative-content {
  position: relative;
  z-index: 1;
}

/* Стеклянные карточки */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: var(--border-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* Пастельные градиенты текста */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 20%, #c7d2fe 60%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-lavender {
  background: linear-gradient(135deg, #fbcfe8 10%, #c084fc 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Аватарка AlexV */
.avatar-container {
  position: relative;
  display: inline-block;
}

.avatar-image {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(199, 210, 254, 0.35);
  box-shadow: 0 0 45px rgba(129, 140, 248, 0.35);
  transition: transform 0.4s ease;
}

.avatar-container:hover .avatar-image {
  transform: scale(1.03) rotate(1deg);
}

.online-dot {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #34d399;
  border: 4px solid var(--bg-dark);
  box-shadow: 0 0 14px #34d399;
}

/* Навигационные таблетки (Pills) */
.pill-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
}

.pill-tab:hover, .pill-tab.active {
  background: rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.45);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(129, 140, 248, 0.2);
}

/* Теги карточек */
.tag-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-sub);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
}

/* Кнопки */
.btn-pastel-primary {
  background: linear-gradient(135deg, #6366f1 0%, #38bdf8 100%);
  color: #ffffff;
  border: none;
  font-weight: 600;
  border-radius: 30px;
  padding: 10px 24px;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  touch-action: manipulation;
}

.btn-pastel-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.45);
  transform: translateY(-2px);
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-radius: 16px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Медиа-обёртка для картинок и видео (пропорции 3:3.5 по умолчанию) */
.project-media-box {
  width: 100%;
  aspect-ratio: 3 / 3.5;
  height: auto;
  border-radius: 16px;
  overflow: hidden;
  background: #0d121c;
  position: relative;
}

/* Модификатор для карточек формата 16:9 (AI Ассистенты, баннеры) */
.project-media-box.media-aspect-16-9 {
  aspect-ratio: 16 / 9;
}

/* Модификатор для сайтов и SaaS (16:10 / landscape) */
.project-media-box.media-aspect-landscape {
  aspect-ratio: 16 / 10;
}

.project-media-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover .project-media-box img {
  transform: scale(1.05);
}

/* Кнопка запуска видео в нижнем правом углу */
.play-btn-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  background: rgba(129, 140, 248, 0.9);
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(129, 140, 248, 0.6);
  transition: all 0.25s ease;
  z-index: 3;
  touch-action: manipulation;
}

.play-btn-overlay:hover {
  transform: scale(1.1);
  background: #6366f1;
}

.video-frame-hidden {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* Горизонтальный скролл фильтров на мобильных */
.filter-scroll-wrapper {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 6px;
}

.filter-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

/* Мобильная адаптивность */
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(22px, 6.5vw, 32px) !important;
    line-height: 1.35 !important;
  }
  .avatar-image {
    width: 180px;
    height: 180px;
  }
  .glass-card {
    padding: 1.25rem !important;
    border-radius: 20px;
  }
  .project-media-box {
    aspect-ratio: 3 / 3.5;
    height: auto;
  }
  .header-cta-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}
