/* --- НОВЫЙ БЛОК: ИМПОРТ ШРИФТА SOUTHGHETTO --- */
/* Убедитесь, что файлы SouthGhetto-Regular.woff2 и .woff лежат в этой же папке */
@font-face {
    font-family: 'SouthGhetto';
    src: url('SouthGhetto-Regular.woff2') format('woff2'),
         url('SouthGhetto-Regular.woff') format('woff');
    font-weight: normal; /* 'Regular' начертание */
    font-style: normal;
    font-display: swap; /* Плавная загрузка */
}
/* ------------------------------------------- */


/* Авторские права из оригинального файла */
/* Copyright (c) 2025 by Kevin Levron (https://codepen.io/soju22/pen/qEbdVjK) */

/* Оригинальные стили */
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #000; /* важный фон, чтобы не было белого */
}

body {
  touch-action: none;
  color: white; 
}

#app {
  width: 100%;
  min-height: 100vh;
  /* Стандартный шрифт - Montserrat */
  font-family: "Montserrat", serif;
  position: relative;
  overflow-x: hidden;
  box-sizing: border-box;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

#app a {
  text-decoration: none;
  color: #fff;
}

/* Оригинальные стили для текста */
h1, h2, p {
  margin: 0;
  padding: 0;
  color: white;
  line-height: 1.4;
  user-select: none;
}

h1 {
  font-size: 50px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}

h2 {
  font-size: 36px;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 25px;
}

p {
  font-size: 16px;
  font-weight: 500;
}

/* --- НОВЫЙ БЛОК: СТИЛИ ДЛЯ РУССКОГО ШРИФТА --- */
/* Этот CSS применяется, только если <html lang="ru"> */
:lang(ru) body,
:lang(ru) h1,
:lang(ru) h2,
:lang(ru) h3,
:lang(ru) p,
:lang(ru) a,
:lang(ru) button {
    /* Применяем SouthGhetto, с fallback на Montserrat (для символов, которых нет) */
    font-family: 'SouthGhetto', "Montserrat", sans-serif;
    font-weight: normal; /* У SouthGhetto Regular нет 500/700 */
}

/* Корректировка размеров, т.к. SouthGhetto может быть крупнее */
:lang(ru) h1 {
    font-size: 45px; 
    text-transform: none; /* Убираем UPPERCASE для русского */
}
:lang(ru) h2 {
    font-size: 32px;
    text-transform: none;
}
:lang(ru) p, :lang(ru) a, :lang(ru) .btn-project {
    font-size: 18px; /* Делаем текст чуть крупнее для читаемости */
}
/* ------------------------------------------- */


/* Оригинальный стиль для Canvas (ФОН) */
#canvas {
  position: fixed;
  inset: 0;        /* top/right/bottom/left: 0 */
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;      /* canvas под контентом, но над фоном */
  pointer-events: none; /* пропускаем клики к контенту */
}

/* Стеклянный эффект (Glassmorphism) */
.glass-panel {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
}

/* Контент-обертка и секции */
.content-wrapper {
  margin-top: 80px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  z-index: 2;
}

section {
  width: 100%;
  max-width: 900px;
  scroll-margin-top: 80px; 
}

/* Навигация */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

nav a {
  font-weight: 500;
  font-size: 16px;
  transition: transform 0.2s, color 0.2s;
}

nav a:hover {
  transform: scale(1.1);
  color: #f967fb;
}

/* Переключатель языка */
.lang-switcher {
  position: absolute;
  right: 30px;
  display: flex;
  gap: 5px;
}

.lang-switcher button {
  background: none;
  border: 1px solid white;
  color: white;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 5px;
  font-family: "Montserrat", serif; /* Оставляем Montserrat для кнопок */
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}
/* Восстанавливаем шрифт кнопок RU/EN */
:lang(ru) .lang-switcher button {
    font-family: "Montserrat", serif;
}


.lang-switcher button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lang-switcher button.active {
  background: white;
  color: black;
}

/* Секция 1: Home (Фото) */
.home-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.home-text {
  flex: 2;
}

.home-photo {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Секция 2: Skills (КАРТОЧКИ) */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 25px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  padding: 20px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(249, 103, 251, 0.4);
}

.skill-item i {
  font-size: 56px;
}

.skill-item p {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
/* Корректировка шрифта для RU */
:lang(ru) .skill-item p {
    font-size: 16px;
}

/* Секция 3: Projects (Слайдер) */
.slider-container {
  position: relative;
  width: 100%;
}

.slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 20px;
  padding: 10px 0 20px 0;
  scrollbar-width: none;
}

.slider::-webkit-scrollbar {
  display: none;
}

.project-slide {
  scroll-snap-align: start;
  flex: 0 0 70%;
  min-width: 300px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s;
}

.project-slide:hover {
    transform: translateY(-5px);
}

.project-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.project-slide h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 15px 20px 10px 20px;
}

.project-slide p {
  font-size: 14px;
  margin: 0 20px 20px 20px;
}

.btn-project {
  display: inline-block;
  background: #f967fb;
  color: white;
  padding: 10px 15px;
  margin: 0 20px 20px 20px;
  border-radius: 5px;
  font-weight: 700;
  transition: background 0.2s;
}

.btn-project:hover {
  background: #c753c9;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.3);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: white;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

#prevBtn {
  left: -20px;
}

#nextBtn {
  right: -20px;
}

/* Секция 4: Education (СВЕТЯЩИЙСЯ Timeline) */
.timeline {
  position: relative;
  padding-left: 40px;
  border-left: 3px solid rgba(255, 255, 255, 0.5);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -52px;
  top: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  border: 3px solid #f967fb;
  animation: glow 2.5s infinite linear;
}

.timeline-date {
  font-weight: 700;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 5px;
}
:lang(ru) .timeline-date {
    font-size: 16px;
}

.timeline-content {
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 6px;
  left: -10px;
  width: 0; 
  height: 0; 
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid rgba(255, 255, 255, 0.1);
}

.timeline-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 5px;
}

.timeline-content p {
  font-size: 16px;
}

/* Секция 5: Languages (ПРОГРЕСС-БАРЫ) */
.lang-list {
  display: flex;
  flex-direction: column;
  gap: 20px; 
}
.lang-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lang-item p {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
:lang(ru) .lang-item p {
    font-size: 18px;
}

.lang-bar-container {
  width: 100%;
  height: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

.lang-bar {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #6958d5, #f967fb);
  transition: width 0.8s ease-out; 
  box-shadow: 0 0 10px #f967fb;
}


/* Секция 6: Contact (Карта) */
.contact-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.contact-info p {
    font-size: 16px;
}
:lang(ru) .contact-info p {
    font-size: 18px;
}

.contact-map {
  flex: 1;
  min-width: 250px;
}
.contact-map iframe {
  width: 100%;
  height: 250px;
  border: 0;
  border-radius: 10px;
}


/* --- АДАПТИВНОСТЬ (Телефоны/Планшеты) --- */

@media (max-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
  
  :lang(ru) h1 { font-size: 38px; }
  :lang(ru) h2 { font-size: 28px; }
  
  .content-wrapper {
    margin-top: 120px; 
  }

  nav {
    flex-wrap: wrap; 
    justify-content: center;
    gap: 15px;
  }
  .lang-switcher {
    position: static; 
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }
  
  .home-layout {
    flex-direction: column-reverse; 
    text-align: center;
  }
  .home-photo img {
    width: 150px;
    height: 150px;
  }
  
  .project-slide {
    flex-basis: 90%; 
  }
  .slider-btn {
      display: none; 
  }
  
  .contact-layout {
    flex-direction: column;
  }
  .contact-map {
      width: 100%;
  }
}

/* Анимация свечения для точек таймлайна */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px #f967fb;
  }
  50% {
    box-shadow: 0 0 20px #f967fb, 0 0 30px #f967fb;
  }
  100% {
    box-shadow: 0 0 5px #f967fb;
  }
}