/* =========================================
   Секция Skills (полный исправленный CSS)
   ========================================= */
.skills {
  position: relative;
  min-height: 950px;          /* увеличена высота */
  overflow: visible;          /* линии не обрезаются */
  background-color: #150027;
}

.skills::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #150027;
  background-image: url('../../img/skills.png');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  background-attachment: scroll;
  background-blend-mode: overlay;
  pointer-events: none;
  overflow: hidden;          /* фон остаётся обрезанным */
}

.skills__inner {
  position: relative;
  z-index: 1;
  max-width: 1700px;
  margin: 0 auto;
  padding: 40px 20px 100px;  /* увеличен нижний отступ */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skills__header {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 40px;
  gap: 60px;
}

.skills__title {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 50px;
  line-height: 1.2;
  color: #FFFFFF;
  text-align: left;
  white-space: nowrap;
}

.skills__title--yellow {
  color: #FFCD02;
}

.skills__desc {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: #FFFFFF;
  text-align: left;
  max-width: 480px;
}

.skills__circle-container {
  position: relative;
  width: 100%;
  max-width: 1300px;         /* чуть шире */
  height: 850px;             /* увеличена высота */
  margin: 0 auto;
  overflow: visible;         /* гарантированно не обрезает */
}

/* Размытый магический круг позади иконки */
.skills__aura {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(145, 66, 255, 0.2) 0%,
    rgba(63, 2, 148, 0.08) 40%,
    transparent 70%
  );
  filter: blur(20px);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 60px rgba(145, 66, 255, 0.15);
}

/* Центральная иконка */
.skills__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  background: transparent;
}

.skills__center-img {
  max-width: 80%;
  max-height: 80%;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 2;
}

/* Пункты меню */
.skills__item {
  position: absolute;
  width: auto;
  max-width: 190px;
  padding: 0;
  background: none;
  backdrop-filter: none;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 2;
  color: #FFFFFF;
  text-align: left;
}

.skills__item h4 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 26px;
  color: #FFCD02;
  margin-bottom: 4px;
  transition: color 0.3s;
  line-height: 1.2;
}

.skills__item p {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s;
}

.skills__item:hover h4,
.skills__item--active h4 {
  color: #FFE55C;
  text-shadow: 0 0 15px rgba(255, 205, 2, 0.6);
}

.skills__item:hover p,
.skills__item--active p {
  color: #FFFFFF;
}

/* Магическая лиана (SVG) */
.magic-vine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.magic-vine-path {
  fill: none;
  stroke: url(#vineGradient);
  stroke-width: 2.5;
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  filter: drop-shadow(0 0 8px rgba(255, 205, 2, 0.6));
}

/* Частицы (магическая пыльца) */
.vine-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #FFCD02;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 205, 2, 1), 0 0 25px rgba(255, 205, 2, 0.6);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}

/* Анимации */
@keyframes drawVine {
  to { stroke-dashoffset: 0; }
}

@keyframes floatParticle {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.8);
  }
  50% {
    opacity: 0.9;
    transform: translate(var(--dx), var(--dy)) scale(1.3);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dx) * 2), calc(var(--dy) * 2)) scale(0.3);
  }
}

/* Новая анимация затухания всей линии */
@keyframes fadeOutVine {
  to { opacity: 0; }
}


/* =========================================
   Адаптив: планшеты (≤1024px)
   ========================================= */
@media (max-width: 1024px) {
  .skills {
    overflow-x: hidden;          /* убираем горизонтальный скролл */
  }

  .skills__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
  }
  .skills__title {
    font-size: 40px;
    white-space: normal;
  }
  .skills__desc {
    text-align: center;
    max-width: 100%;
  }

  .skills__circle-container {
    height: 550px;
    max-width: 800px;
    overflow: hidden;           /* обрезаем линии, чтобы не выходили за границы */
  }
  .skills__center {
    width: 280px;
    height: 280px;
  }
  .skills__aura {
    width: 400px;
    height: 400px;
  }

  .skills__item {
    max-width: 160px;
  }
  .skills__item h4 {
    font-size: 22px;
  }
  .skills__item p {
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .skills {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .skills__inner {
    padding: 30px 15px 40px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }

  .skills__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    width: 100%;
    padding: 0;
  }

  .skills__title {
    font-size: 24px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: center;
    max-width: 100%;
    width: 100%;
  }

  .skills__desc {
    font-size: 12px;
    text-align: center;
    max-width: 100%;
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .skills__circle-container {
    height: 400px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;    
  }

  .skills__center {
    width: 180px;
    height: 180px;
  }

  .skills__aura {
    width: 250px;
    height: 250px;
  }

  .skills__item {
    max-width: 100px;       
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .skills__item h4 {
    font-size: 13px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
  }

  .skills__item p {
    font-size: 10px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
  }

  .magic-vine,
  .vine-particle {
    display: none !important;
  }
}