/* =========================================
   1. ПЕРЕМЕННЫЕ И СИСТЕМНЫЕ ШРИФТЫ
   ========================================= */
:root {
  /* Палитра: Нуарная основа + Неоновые акценты */
  --bg-color: #050505;
  --surface-color: #0f0f0f;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  
  /* Неоновые цвета для свечения */
  --neon-pink: #ff0055;
  --neon-cyan: #00f3ff;
  --neon-purple: #bc13fe;
  
  --border-color: #333333;

  /* Системные шрифты (гарантированно есть везде) */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Times New Roman", Times, Baskerville, Georgia, serif; /* Для готической элегантности */
  --font-mono: "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace; /* Для техно-вайба */
}

/* =========================================
   2. БАЗОВЫЕ НАСТРОЙКИ И НУАРНЫЙ ФОН
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1rem;
  
  /* Нуарный эффект: градиент сверху + встроенный SVG-шум (зернистость пленки) */
  /* SVG закодирован прямо в CSS, внешние запросы отсутствуют */
  background-image: 
    radial-gradient(circle at 50% 0%, #1a0b1a 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
}

/* =========================================
   3. КОНТЕЙНЕР (ОСНОВНАЯ РАМКА)
   ========================================= */
.container {
  max-width: 800px;
  width: 100%;
  background: rgba(15, 15, 15, 0.7);
  backdrop-filter: blur(8px); /* Эффект матового стекла */
  -webkit-backdrop-filter: blur(8px); /* Для Safari */
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 2px; /* Острые углы для готической строгости */
  padding: 3rem 2.5rem;
  box-shadow: 
    0 0 30px rgba(0, 0, 0, 0.9),
    0 0 60px rgba(188, 19, 254, 0.05); /* Едва заметное фиолетовое свечение */
  position: relative;
  overflow: hidden;
}

/* Декоративная неоновая линия сверху контейнера */
.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-pink), var(--neon-purple), transparent);
  box-shadow: 0 0 10px var(--neon-pink);
}

/* =========================================
   4. ШАПКА И ЗАГОЛОВКИ (ГОТИКА + НЕОН)
   ========================================= */
header {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 4px; /* Широкий интервал имитирует элегантность готических шрифтов */
  text-transform: uppercase;
  color: var(--text-primary);
  
  /* Эффект мерцающей неоновой вывески */
  text-shadow: 
    0 0 5px rgba(255, 255, 255, 0.5),
    0 0 10px rgba(255, 255, 255, 0.3),
    0 0 20px var(--neon-purple),
    0 0 40px var(--neon-purple);
  animation: flicker 4s infinite alternate;
}

/* Анимация легкого мерцания неона */
@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 
      0 0 5px rgba(255, 255, 255, 0.5),
      0 0 10px rgba(255, 255, 255, 0.3),
      0 0 20px var(--neon-purple),
      0 0 40px var(--neon-purple);
    opacity: 1;
  }
  20%, 24%, 55% {
    text-shadow: none;
    opacity: 0.85;
  }
}

/* Анимация парения для бабочки */
h1 span {
  display: inline-block;
  filter: drop-shadow(0 0 8px var(--neon-cyan));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* =========================================
   5. ОСНОВНОЙ КОНТЕНТ
   ========================================= */
main {
  margin-bottom: 3rem;
}

section {
  margin-bottom: 2.5rem;
}

h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Декоративный ромб перед заголовками разделов */
h2::before {
  content: '♦';
  color: var(--neon-pink);
  font-size: 0.7rem;
  text-shadow: 0 0 8px var(--neon-pink);
}

#about p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  /*text-align: justify; /* Выключка по ширине для газетной/нуарной строгости */
}

/* =========================================
   6. ПРОЕКТЫ (КАРТОЧКИ)
   ========================================= */
#projects ul {
  list-style: none;
}

#projects li {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 4px solid slategray;/*var(--neon-purple); /* Неоновый акцент слева */
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
  transition: all 0.3s ease;
}

/* Эффект при наведении на проект */
#projects li:hover {
  background: rgba(188, 19, 254, 0.05);
  border-left-color: var(--neon-purple);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(188, 19, 254, 0.15);
  transform: translateX(5px); /* Легкий сдвиг вправо */
}

#projects a {
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

#projects a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.6);
}

.project-desc {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Стиль для тегов технологий */
.tech-stack {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-pink);
  background: rgba(255, 0, 85, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 0, 85, 0.3);
  text-shadow: 0 0 5px rgba(255, 0, 85, 0.4);
}

/* =========================================
   7. ФУТЕР И КОНТАКТЫ
   ========================================= */
footer {
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

footer h2 {
  justify-content: center;
  border-bottom: none;
  margin-bottom: 1.5rem;
}

footer h2::before {
  display: none;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 1.5rem;
}

.contact-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 1px;
  position: relative;
  transition: all 0.3s ease;
}

/* Анимация подчеркивания ссылок */
.contact-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  transition: width 0.3s ease;
}

.contact-links a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.6);
}

.contact-links a:hover::after {
  width: 100%;
}

#years {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #666;
  margin-top: 1rem;
}

/* =========================================
   8. КАСТОМНЫЙ СКРОЛЛБАР И АДАПТИВ
   ========================================= */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-purple);
  box-shadow: 0 0 8px var(--neon-purple);
}

/* Адаптация под мобильные устройства */
@media (max-width: 600px) {
  body {
    padding: 1.5rem 1rem;
  }
  .container {
    padding: 2rem 1.5rem;
  }
  h1 {
    font-size: 1.8rem;
    letter-spacing: 2px;
  }
  .contact-links {
    flex-direction: column;
    gap: 1.2rem;
  }
}