*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
  overflow-x: hidden;
  background: #000;
}

/* =============================================
   ВИДЕО-ФОН
   ============================================= */
#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center 10%;
  z-index: -2;
  display: block;
  pointer-events: none;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
  pointer-events: none;
}

/* =============================================
   КНОПКА ЗВУКА
   ============================================= */
.sound-btn {
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 100;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: rgba(255,255,255,0.4);
  transition: opacity 0.3s, transform 0.3s, color 0.2s;

  svg {
    width: 22px;
    height: 22px;
    display: block;
  }

  .sound-icon--on  { display: none; }
  .sound-icon--off { display: block; }

  &:hover { color: rgba(255,255,255,0.85); }

  &.is-active {
    color: #fff;
    .sound-icon--off { display: none; }
    .sound-icon--on  { display: block; }
  }

  &.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
  }
}

/* =============================================
   БУРГЕР-КНОПКА
   ============================================= */
.burger {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  transition: opacity 0.3s, transform 0.3s;

  span {
    display: block;
    width: 28px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: background 0.2s;
  }

  &:hover span {
    background: #ccc;
  }

  /* Скрываем бургер когда меню открыто */
  &.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
  }
}

/* =============================================
   КНОПКА ЗВУКА
   ============================================= */
.sound-btn {
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 100;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: rgba(255,255,255,0.4);
  transition: opacity 0.3s, transform 0.3s, color 0.2s;

  svg {
    width: 22px;
    height: 22px;
    display: block;
  }

  /* По умолчанию — показываем только muted иконку */
  .sound-icon--on  { display: none; }
  .sound-icon--off { display: block; }

  &:hover {
    color: rgba(255,255,255,0.8);
  }

  /* Активное состояние — звук включён */
  &.is-active {
    color: #fff;

    .sound-icon--off { display: none; }
    .sound-icon--on  { display: block; }
  }

  /* Скрытое состояние — меню открыто */
  &.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-10px);
  }
}


.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  height: 100vh;
  z-index: 200;

  /* Стекло как на референсе */
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid rgba(255,255,255,0.08);

  display: flex;
  flex-direction: column;
  padding: 24px 28px 40px;

  /* Изначально скрыто — уехало влево */
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  border-radius: 0 16px 16px 0;

  &.is-open {
    transform: translateX(0);
  }
}

/* Крестик */
.sidebar__close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  line-height: 1;
  padding: 4px;

  &:hover {
    opacity: 1;
  }
}

/* Аватар */
.sidebar__avatar {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 24px;

  /* Круглый контейнер обрезает картинку по кругу */
  .avatar-wrap {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      display: block;
    }
  }
}

/* Разделители */
.sidebar__divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,0.25) 30%,
    rgba(255,255,255,0.25) 70%,
    transparent
  );
  margin: 8px 0;
  position: relative;

  /* Декоративная точка посередине как на референсе */
  &::after {
    content: '◈';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    background: transparent;
  }
}

/* Список пунктов меню */
.sidebar__nav {
  list-style: none;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;

  li a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 12px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: color 0.2s, padding-left 0.2s;

    &:hover,
    &.is-active {
      color: #fff;
      padding-left: 18px;
    }

    &.is-active {
      color: #c9a84c;
      border-bottom-color: rgba(201,168,76,0.3);

      .sidebar__icon {
        border-color: rgba(201,168,76,0.6);
        color: #c9a84c;
      }
    }
  }
}

/* Иконки пунктов */
.sidebar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  flex-shrink: 0;

  svg {
    width: 16px;
    height: 16px;
  }
}

/* =============================================
   ЗАТЕМНЕНИЕ ЗА МЕНЮ (клик закрывает)
   ============================================= */
.sidebar__backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;

  &.is-visible {
    opacity: 1;
    pointer-events: all;
  }
}

/* =============================================
   КОНТЕНТ
   ============================================= */
.content {
  position: relative;
  z-index: 1;
}

.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 20px;
}

/* =============================================
   ПРОФИЛЬ — HERO СЕКЦИЯ
   ============================================= */

/* Большая аватарка */
.profile__avatar {
  margin-bottom: 20px;

  .avatar-wrap {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      display: block;
    }
  }
}

/* Имя */
.profile__name {
  font-size: 2.4rem;
  font-weight: 700;
  color: #c9a84c;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  text-shadow: 0 0 30px rgba(201,168,76,0.4);
}

/* Локация */
.profile__location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  color: #c9a84c;
  margin-bottom: 6px;
  opacity: 0.9;

  .pin-icon {
    width: 16px;
    height: 16px;
    fill: #c9a84c;
    flex-shrink: 0;
  }
}

/* Линия под локацией */
.profile__location::after {
  content: '';
  display: block;
}

.profile__location + * {
  margin-top: 8px;
}

/* Разделитель под локацией */
.profile__divider {
  width: 220px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.5), transparent);
  margin: 8px auto 24px;
}

/* Карточка статуса */
.profile__card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(20, 20, 20, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 16px;
  padding: 14px 20px;
  width: 380px;
  max-width: 90vw;
  margin-bottom: 28px;
}

.profile__card-avatar {
  .avatar-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
  }
}

.profile__card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.profile__card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile__card-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.profile__card-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 2px 8px;

  svg { opacity: 0.7; }
}

.profile__card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  flex-shrink: 0;
  box-shadow: 0 0 6px #4caf50;
}

/* Соцсети */
.profile__socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 64px;
  height: 64px;
  background: rgba(20,20,20,0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 16px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;

  svg {
    width: 24px;
    height: 24px;
  }

  &:hover {
    border-color: rgba(201,168,76,0.7);
    color: #c9a84c;
    transform: translateY(-2px);
  }
}

/* =============================================
   СЕКЦИЯ ПРОЕКТОВ
   ============================================= */
.projects__title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #c9a84c;
  margin-bottom: 8px;
  text-shadow: 0 0 30px rgba(201,168,76,0.3);
}

.projects__subtitle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 48px;
  letter-spacing: 0.05em;
}

.projects__grid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1000px;
  width: 100%;
}

/* Карточка проекта — горизонтальный акцент, другой стиль чем услуги */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 290px;
  min-height: 300px;
  padding: 24px;
  text-decoration: none;
  color: #fff;
  cursor: pointer;

  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  /* Левая золотая полоска — отличие от карточек услуг */
  border: 1px solid rgba(255,255,255,0.07);
  border-left: 3px solid rgba(201,168,76,0.4);
  border-radius: 16px;

  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1),
              border-color 0.3s,
              border-left-color 0.3s,
              box-shadow 0.3s,
              background 0.3s;

  &:hover {
    transform: translateY(-6px) scale(1.02);
    background: rgba(20, 18, 10, 0.7);
    border-color: rgba(201,168,76,0.2);
    border-left-color: #c9a84c;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5),
                -4px 0 20px rgba(201,168,76,0.15);

    .project-card__icon {
      color: #c9a84c;
      transform: scale(1.1);
    }

    .project-card__arrow {
      opacity: 1;
      transform: translate(2px, -2px);
    }

    .project-card__title {
      color: #c9a84c;
    }

    .project-card__tags span {
      border-color: rgba(201,168,76,0.4);
      color: rgba(201,168,76,0.8);
    }
  }
}

/* WIP карточка — не кликабельная, приглушённая */
.project-card--wip {
  cursor: default;
  border-left-color: rgba(255,255,255,0.1);
  opacity: 0.65;

  &:hover {
    transform: none;
    box-shadow: none;
    border-left-color: rgba(255,255,255,0.2);
    background: rgba(10, 10, 10, 0.55);

    .project-card__icon { transform: none; color: rgba(255,255,255,0.5); }
    .project-card__title { color: #fff; }
  }
}

/* Хедер карточки */
.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.project-card__badge {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9a84c;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 20px;
  padding: 3px 10px;
}

.project-card__badge--wip {
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

/* Мигающая точка для WIP */
.project-card__wip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,200,50,0.6);
  animation: wip-pulse 2s ease-in-out infinite;
}

@keyframes wip-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1.2); }
}

/* Стрелка */
.project-card__arrow {
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.3);
  opacity: 0.4;
  transition: opacity 0.3s, transform 0.3s;
  flex-shrink: 0;
}

/* Иконка */
.project-card__icon {
  width: 40px;
  height: 40px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
  transition: color 0.3s, transform 0.3s;

  svg {
    width: 100%;
    height: 100%;
  }
}

/* Заголовок */
.project-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
  transition: color 0.3s;
}

/* Описание */
.project-card__desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
  flex: 1;
  margin-bottom: 18px;
}

/* Теги */
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;

  span {
    font-size: 0.7rem;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.05em;
    transition: border-color 0.3s, color 0.3s;
  }
}

/* =============================================
   СЕКЦИЯ УСЛУГ
   ============================================= */
.services__title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #c9a84c;
  margin-bottom: 8px;
  text-shadow: 0 0 30px rgba(201,168,76,0.3);
}

.services__subtitle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 48px;
  letter-spacing: 0.05em;
}

.services__grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 960px;
  width: 100%;
}

/* Карточка */
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 280px;
  min-height: 320px;
  padding: 32px 28px 24px;
  text-decoration: none;
  color: #fff;
  overflow: hidden;

  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 20px;

  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
              border-color 0.35s,
              box-shadow 0.35s;

  /* Блик сверху */
  &::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(201,168,76,0.5), transparent);
    opacity: 0;
    transition: opacity 0.35s;
  }

  /* Золотое свечение снизу при ховере */
  &::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 80px;
    background: radial-gradient(ellipse, rgba(201,168,76,0.35), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s, bottom 0.4s;
    pointer-events: none;
  }

  &:hover {
    transform: translateY(-8px);
    border-color: rgba(201,168,76,0.5);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(201,168,76,0.1);

    &::before { opacity: 1; }
    &::after  { opacity: 1; bottom: -10px; }

    .service-card__icon {
      border-color: rgba(201,168,76,0.6);
      color: #c9a84c;
      box-shadow: 0 0 16px rgba(201,168,76,0.3);
    }

    .service-card__title { color: #c9a84c; }

    .service-card__footer span {
      color: #c9a84c;
      letter-spacing: 0.08em;
    }
  }
}

/* Номер */
.service-card__num {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(201,168,76,0.08);
  line-height: 1;
  user-select: none;
  transition: color 0.35s;
}

.service-card:hover .service-card__num {
  color: rgba(201,168,76,0.15);
}

/* Иконка */
.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.7);
  transition: border-color 0.35s, color 0.35s, box-shadow 0.35s;

  svg {
    width: 22px;
    height: 22px;
  }
}

/* Заголовок */
.service-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  transition: color 0.35s;
  letter-spacing: 0.01em;
}

/* Описание */
.service-card__desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  flex: 1;
}

/* Футер карточки */
.service-card__footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.07);

  span {
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.35);
    transition: color 0.35s, letter-spacing 0.35s;
    text-transform: uppercase;
  }
}

@media (prefers-reduced-motion: reduce) {
  #bg-video { display: none; }
  body { background: #111; }
}

/* =============================================
   ЗАСТАВКА "CLICK TO ENTER" (только мобильные)
   ============================================= */
.enter-screen {
  display: none; /* скрыта на ПК */
}

@media (max-width: 768px) {

  /* Показываем заставку только на мобильных */
  .enter-screen {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    background: transparent;
    transition: opacity 0.8s ease;

    &.is-gone {
      opacity: 0;
      pointer-events: none;
    }
  }

  /* Размытие фона под заставкой */
  .enter-screen__blur {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
  }

  /* Текст заставки */
  .enter-screen__text {
    position: relative;
    z-index: 1;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c9a84c;
    text-shadow: 0 0 30px rgba(201,168,76,0.6), 0 0 60px rgba(201,168,76,0.2);
    animation: enter-pulse 2s ease-in-out infinite;
  }

  .enter-screen__sub {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
  }

  @keyframes enter-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.98); }
    50%       { opacity: 1;   transform: scale(1.02); }
  }

  /* ===== МОБИЛЬНЫЙ АДАПТИВ ===== */

  /* Меню на всю ширину */
  .sidebar {
    width: 100vw;
    border-radius: 0;
  }

  /* Аватарка меньше */
  .sidebar__avatar .avatar-wrap {
    width: 100px;
    height: 100px;
  }

  /* Профиль */
  .profile__avatar .avatar-wrap {
    width: 140px;
    height: 140px;
  }

  .profile__name {
    font-size: 1.8rem;
  }

  .profile__card {
    width: 90vw;
    padding: 12px 14px;
  }

  /* Соцсети — мельче */
  .social-btn {
    width: 52px;
    height: 52px;
  }

  /* Секции */
  .section {
    padding: 60px 16px;
  }

  /* Карточки проектов и услуг — полная ширина */
  .project-card {
    width: 90vw;
    max-width: 360px;
  }

  .service-card {
    width: 90vw;
    max-width: 360px;
  }

  /* Сетки */
  .projects__grid,
  .services__grid {
    gap: 16px;
  }

  /* Заголовки секций */
  .projects__title,
  .services__title {
    font-size: 1.6rem;
  }

  .projects__subtitle,
  .services__subtitle {
    margin-bottom: 28px;
  }
}