:root {
  --bg: #0b0c10;
  --card: #0f1720;
  --accent: #4a90e2;
  --accent-2: #9013fe;
  --muted: #9aa0a6;
  --glass: rgba(255, 255, 255, 0.04);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: linear-gradient(180deg, #07070a 0%, #0f0f14 100%);
  color: #e6eef8;
  line-height: 1.5;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* progress bar */
.progress-wrap {
  position: fixed;
  left: 0;
  top: 0;
  height: 6px;
  width: 100%;
  z-index: 9999;
}

.progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.1s linear;
}

/* header */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background: rgba(10, 10, 12, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.logo {
  position: relative;
  display: inline-block;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 15px rgba(255, 40, 40, 0.6);
  text-transform: uppercase;
  animation: glowPulse 3s infinite alternate;
}

.logo::before,
.logo::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  color: #fff;
  background: transparent;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}

.logo::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c8;
  animation: glitch-anim 2s infinite linear alternate-reverse;
}

.logo::after {
  left: -2px;
  text-shadow: 2px 0 #00fff9;
  animation: glitch-anim2 3s infinite linear alternate-reverse;
}
/* === НЕОНОВАЯ РАКЕТА === */
.glow-rocket {
  display: inline-block;
  margin-left: 8px;
  font-size: 2.8rem;
  filter: drop-shadow(0 0 8px #00fff2)
          drop-shadow(0 0 16px #00fff2)
          drop-shadow(0 0 32px #00fff2);
  animation: rocket-glow 2s infinite ease-in-out;
}

@keyframes rocket-glow {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 10px #00fff2); }
  50% { opacity: 0.6; filter: drop-shadow(0 0 25px #00fff2); }
}
/* 🔁 Анимации фрагментов */
@keyframes glitch-anim {
  0% { clip-path: inset(80% 0 0 0); transform: translate(-2px, -2px); }
  10% { clip-path: inset(10% 0 85% 0); transform: translate(2px, 2px); }
  20% { clip-path: inset(30% 0 55% 0); transform: translate(-3px, 2px); }
  30% { clip-path: inset(40% 0 43% 0); transform: translate(3px, -1px); }
  40% { clip-path: inset(60% 0 25% 0); transform: translate(-2px, 0); }
  50% { clip-path: inset(10% 0 85% 0); transform: translate(2px, -1px); }
  60% { clip-path: inset(40% 0 43% 0); transform: translate(-1px, 2px); }
  70% { clip-path: inset(60% 0 25% 0); transform: translate(1px, -2px); }
  80% { clip-path: inset(30% 0 55% 0); transform: translate(2px, 2px); }
  90% { clip-path: inset(10% 0 85% 0); transform: translate(-2px, 1px); }
  100% { clip-path: inset(80% 0 0 0); transform: translate(1px, -2px); }
}

@keyframes glitch-anim2 {
  0% { clip-path: inset(10% 0 85% 0); transform: translate(2px, -2px); }
  10% { clip-path: inset(30% 0 55% 0); transform: translate(-2px, 2px); }
  20% { clip-path: inset(60% 0 25% 0); transform: translate(2px, -3px); }
  30% { clip-path: inset(10% 0 85% 0); transform: translate(-3px, 3px); }
  40% { clip-path: inset(80% 0 0 0); transform: translate(3px, -1px); }
  100% { clip-path: inset(40% 0 43% 0); transform: translate(-1px, 1px); }
}

@keyframes glitch-skew {
  0%, 100% { transform: skew(0deg); }
  50% { transform: skew(2deg); }
}

/* nav links */
.nav {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  transition: 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent);
}
.nav-link {
  position: relative;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  transition: 0.3s;
}

.nav-link.active {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent-2);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px var(--accent-2);
  transition: transform 0.3s ease;
  border-radius: 2px;
}

.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}
/* profile button */
.btn-prof {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 0.6rem 1.6rem;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: 0.3s;
  box-shadow: 0 0 15px rgba(255, 40, 40, 0.5);
}

.btn-prof:hover {
  box-shadow: 0 0 25px rgba(255, 40, 40, 1);
  transform: scale(1.05);
}

/* sections */
.story-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* card */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  color: #e6eef8;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* hero */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__grad {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 30%, rgba(74, 144, 226, 0.2), transparent 60%);
  z-index: -1;
}

.kicker {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 700;
}

/* timeline */
.timeline {
  position: relative;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #ff4040, transparent);
}

.timeline-event {
  width: 50%;
  position: relative;
  margin-bottom: 2rem;
}

.timeline-event.left {
  left: 0;
}

.timeline-event.right {
  left: 50%;
}

.timeline-event .card {
  background: rgba(255, 255, 255, 0.04);
}

/* responsive timeline */
@media (max-width: 768px) {
  .timeline-event {
    width: 100%;
    left: 0 !important;
  }
  .timeline-line {
    left: 4%;
  }
}

/* fade / reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: revealIn 0.9s forwards;
}

@keyframes revealIn {
  to {
    opacity: 1;
    transform: none;
  }
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  opacity: 0.5;
}

.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
  color: #fff;
  z-index: 10;
}

.hero__content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 1.5s ease;
}

.glitch-text {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  text-transform: uppercase;
  position: relative;
  animation: glitch 2s infinite;
}

.subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 1rem 0 2rem;
}

.hero__buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.btn {
  padding: 0.8rem 2rem;
  font-size: 1rem;
  border-radius: 30px;
  text-decoration: none;
  transition: 0.3s;
  font-weight: 600;
}

.btn--red {
  background: linear-gradient(90deg, #ff2626, #ff5959);
  box-shadow: 0 0 15px rgba(255, 40, 40, 0.6);
  color: #fff;
}

.btn--red:hover {
  box-shadow: 0 0 25px rgba(255, 40, 40, 1);
  transform: scale(1.05);
}

.btn--outline {
  border: 2px solid #ff2626;
  color: #ff2626;
}

.btn--outline:hover {
  background: #ff2626;
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 40, 40, 0.8);
}

/* animations */
@keyframes glitch {
  0% { text-shadow: 2px 2px #ff4040, -2px -2px #ff4040; }
  20% { text-shadow: -2px 2px #ff4040, 2px -2px #ff4040; }
  40% { text-shadow: 2px -2px #ff4040, -2px 2px #ff4040; }
  60% { text-shadow: 0 0 10px #ff4040; }
  80% { text-shadow: -1px 1px #ff4040, 1px -1px #ff4040; }
  100% { text-shadow: 2px 2px #ff4040, -2px -2px #ff4040; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glitchTop {
  0% { clip: rect(0, 9999px, 0, 0); }
  10% { clip: rect(10px, 9999px, 50px, 0); transform: translate(-2px, -2px); }
  20% { clip: rect(85px, 9999px, 140px, 0); transform: translate(2px, 2px); }
  100% { clip: rect(0, 9999px, 0, 0); }
}

@keyframes glitchBottom {
  0% { clip: rect(0, 9999px, 0, 0); }
  10% { clip: rect(50px, 9999px, 90px, 0); transform: translate(2px, 2px); }
  20% { clip: rect(120px, 9999px, 170px, 0); transform: translate(-2px, -1px); }
  100% { clip: rect(0, 9999px, 0, 0); }
}

@keyframes glowPulse {
  from { text-shadow: 0 0 10px rgba(255, 40, 40, 0.5); }
  to { text-shadow: 0 0 25px rgba(255, 40, 40, 1); }
}

/* general section styles */
.story-section {
  position: relative;
  padding: 100px 0;
  color: #fff;
  background: rgba(17, 17, 19, 0.9);
  backdrop-filter: blur(4px);
  z-index: 5;
}

/* headings */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ff4040;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  text-shadow: 0 0 15px rgba(255, 40, 40, 0.6);
}

.section-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

/* learning */
.skills-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.skill {
  background: rgba(255, 40, 40, 0.1);
  border: 1px solid rgba(255, 40, 40, 0.6);
  border-radius: 30px;
  padding: 0.6rem 1.4rem;
  color: #ff4040;
  font-weight: 600;
  transition: 0.3s;
}

.skill:hover {
  background: rgba(255, 40, 40, 0.3);
  transform: scale(1.1);
}

/* timeline wrapper */
.timeline-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1rem 2rem;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
}

.timeline-content {
  background: rgba(255, 40, 40, 0.05);
  border: 1px solid rgba(255, 40, 40, 0.4);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 40, 40, 0.1);
  transition: 0.3s;
}

.timeline-content:hover {
  box-shadow: 0 0 25px rgba(255, 40, 40, 0.5);
  transform: translateY(-5px);
}

/* stats */
.stat-box {
  background: rgba(255, 40, 40, 0.05);
  border: 1px solid rgba(255, 40, 40, 0.3);
  border-radius: 15px;
  padding: 2rem;
  transition: 0.4s;
}

.stat-box:hover {
  box-shadow: 0 0 25px rgba(255, 40, 40, 0.6);
}

.stat-box h3 {
  font-size: 3rem;
  color: #ff4040;
  text-shadow: 0 0 10px rgba(255, 40, 40, 0.7);
}

/* growth */
.card.neon {
  background: rgba(255, 40, 40, 0.08);
  border: 1px solid rgba(255, 40, 40, 0.3);
  border-radius: 15px;
  transition: 0.3s;
}

.card.neon:hover {
  box-shadow: 0 0 30px rgba(255, 40, 40, 0.6);
  transform: scale(1.05);
}

/* future */
.future {
  background: linear-gradient(to bottom, rgba(17, 17, 19, 0.9), rgba(30, 0, 0, 1));
}
.quote {
  font-size: 1.4rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(90deg, #ff4040 0%, #ff8080 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: none;
  letter-spacing: 0.5px;
  margin-top: 2rem;
}

.code-manifest span {
  text-shadow: 0 0 10px rgba(255, 64, 64, 0.5);
}



/* responsive */
@media (max-width: 768px) {
  .nav {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .btn-prof {
    padding: 0.5rem 1.2rem;
  }
}
/* === БУРГЕР МЕНЮ === */
.burger-menu {
  width: 35px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: 0.3s;
  position: relative;
  z-index: 999;
}

.burger-menu span {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #ff004d, #00ffff);
  border-radius: 10px;
  transition: all 0.4s ease;
  box-shadow: 0 0 6px #ff004d, 0 0 12px #00ffff;
}

/* При активации */
.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
  background: #00ffff;
}
.burger-menu.active span:nth-child(2) {
  opacity: 0;
}
.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
  background: #ff004d;
}

/* Скрыть меню на десктопе */
@media (max-width: 991px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: -4px 0 20px rgba(255, 0, 77, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: right 0.4s ease-in-out;
    z-index: 900;
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 1.8rem;
    text-align: center;
  }

  .nav-menu .nav-link {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    transition: 0.3s;
    text-shadow: 0 0 10px #ff004d, 0 0 20px #00ffff;
  }

  .nav-menu .nav-link:hover {
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff, 0 0 40px #ff004d;
  }

  .btn-prof {
    display: none;
  }
}
/* === Видео только для первой секции === */
.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 90vh; /* ограничиваем только верхнюю часть */
  overflow: hidden;
  z-index: 0;
}

.hero__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35; /* полупрозрачное видео */
  filter: brightness(0.8);
  transform: scale(1.1);
  transition: transform 0.3s ease-out;
}

/* Canvas под видео и тянется по всей странице */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}

/* Контент поверх всего */
main, header {
  position: relative;
  z-index: 2;
}
/* === Видео фон === */
.hero__bg video {
  position: fixed;
  top: 150px; /* опустить видео на 100px */
  left: 0;
  width: 100%;
  height: 60vh;
  object-fit: cover;
  opacity: 0.25;
  z-index: 0;
}


/* === Canvas с частицами === */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.8; /* усиливает контраст частиц */
  mix-blend-mode: screen; /* частицы красиво взаимодействуют с видео */
}

/* === Общий фон страницы === */
body {
  background: radial-gradient(circle at 20% 20%, #111013 0%, #09090b 100%);
  overflow-x: hidden;
  color: #fff;
  font-family: 'Poppins', sans-serif;
}

/* === Дополнительно — плавный переход между секциями === */
.story-section {
  position: relative;
  z-index: 2;
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  margin: 4rem auto;
  padding: 3rem 1rem;
  width: 90%;
  max-width: 1200px;
  box-shadow: 0 0 25px rgba(255, 40, 40, 0.05);
}


#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  background: rgba(255, 40, 40, 0.8);
  border: none;
  color: #fff;
  font-size: 22px;
  padding: 10px 20px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 40, 40, 0.7);
  transition: all 0.4s ease;
}

#scrollTopBtn:hover {
  background: rgba(255, 80, 80, 1);
  box-shadow: 0 0 20px rgba(255, 40, 40, 1);
  transform: translateY(-3px);
}

#scrollTopBtn.show {
  opacity: 1;
  pointer-events: all;
}
/* === PARALLAX ЭФФЕКТ === */
.parallax {
  position: relative;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: background-position;
  transition: background-position 0.2s ease-out;
}

/* Для плавного контраста между секциями */
.parallax::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.5);
}
