/* Основные переменные и сброс стилей */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #10b981;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray: #94a3b8;
  --dark-gray: #334155;
  --card-bg: rgba(255, 255, 255, 0.85);
  --glass: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Базовые стили тела документа */
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Частицы (должны быть под основным контентом) */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}

/* Основная сетка и секции */
main {
  max-width: 1200px;
  margin: -40px auto 60px;
  padding: 0 20px;
  position: relative;
}

section {
  margin-bottom: 60px;
  position: relative;
}

/* Заголовки секций */
h2 {
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  color: white;
  font-size: 2em;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-radius: 2px;
}

/* Анимации */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-15px) translateX(-50%); }
  60% { transform: translateY(-7px) translateX(-50%); }
}

.floating {
  animation: float 6s ease-in-out infinite;
}

/* Адаптивность */
@media (max-width: 992px) {
  .portfolio {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  header {
    padding: 50px 20px 70px;
  }
  
  header h1 {
    font-size: 2em;
  }
  
  .position {
    font-size: 1em;
  }
  
  .avatar-container {
    width: 120px;
    height: 120px;
  }
  
  .social-links a {
    width: 45px;
    height: 45px;
    font-size: 1.1em;
  }
  
  .about {
    padding: 30px;
  }
  
  .card-image {
    height: 160px;
  }
}

@media (max-width: 576px) {
  header {
    padding: 40px 15px 60px;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
  }
  
  header h1 {
    font-size: 1.8em;
  }
  
  .portfolio {
    grid-template-columns: 1fr;
  }
  
  .about {
    padding: 25px;
  }
  
  .modal-content {
    width: 95%;
  }
  
  .modal-image {
    height: 200px;
  }
}