/* ===== Базовые стили ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --surface: #0d1117;
  --surface-dark: #080b10;
  --card: #161b22;
  --card-hover: #1c2333;
  --green: #3fb950;
  --green-glow: rgba(63, 185, 80, 0.3);
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.3);
  --blue: #58a6ff;
  --blue-glow: rgba(88, 166, 255, 0.3);
  --orange: #f97316;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #30363d;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'SN Pro', system-ui, sans-serif;
  background: var(--surface);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

.accent {
  color: var(--green);
}

/* ===== Фоновые частицы ===== */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ===== Навигация ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.nav__links {
  display: flex;
  gap: 1.5rem;
}

.nav__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--green);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 3rem;
  gap: 1rem;
}

.hero__avatar {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 1rem;
}

.hero__avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(var(--green), var(--purple), var(--blue), var(--green));
  animation: spin 3s linear infinite;
}

.hero__avatar-emoji {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--card);
  border-radius: 50%;
  border: 3px solid var(--surface);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero__name {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero__age {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.tag {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid;
}

.tag--green {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-glow);
}

.tag--purple {
  color: var(--purple);
  border-color: var(--purple);
  background: var(--purple-glow);
}

.tag--blue {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--blue-glow);
}

.hero__scroll-hint {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: bounce 2s ease infinite;
}

.hero__scroll-arrow {
  font-size: 1.2rem;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ===== Секции ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem;
}

.section--dark {
  background: var(--surface-dark);
}

.section__container {
  max-width: 900px;
  margin: 0 auto;
}

.section__title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section__subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* ===== Карточки ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
}

.card--green:hover {
  box-shadow: 0 8px 30px var(--green-glow);
  border-color: var(--green);
}

.card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== Школа ===== */
.school-block {
  margin-top: 2.5rem;
}

.school-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.school-info__item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s;
}

.school-info__item:hover {
  transform: scale(1.03);
}

.school-info__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.school-info__value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
}

.school-fun {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.fun-card {
  background: linear-gradient(135deg, var(--card), var(--card-hover));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.fun-card__emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.fun-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Мини-игра ===== */
.game-area {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 250px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(180deg, #1a2332 0%, #0f1923 100%);
  border: 2px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}

.game-goal {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 60px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 18px,
    rgba(255,255,255,0.08) 18px,
    rgba(255,255,255,0.08) 20px
  );
}

.game-ball {
  position: absolute;
  font-size: 2.5rem;
  transition: none;
  user-select: none;
  filter: drop-shadow(0 2px 8px rgba(255,255,255,0.2));
  cursor: grab;
  z-index: 2;
}

.game-ball:active {
  cursor: grabbing;
}

.game-effect {
  position: absolute;
  font-size: 2rem;
  display: none;
  pointer-events: none;
  z-index: 3;
  animation: goalPop 0.8s ease-out forwards;
}

@keyframes goalPop {
  0% { transform: scale(0.5); opacity: 1; }
  50% { transform: scale(1.5); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

.game-reset {
  display: block;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.game-reset:hover {
  background: var(--card-hover);
  border-color: var(--green);
}

/* ===== Контакт ===== */
.contact-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px var(--blue-glow);
  border-color: var(--blue);
}

.contact-card__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== Футер ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ===== Адаптив ===== */
@media (max-width: 600px) {
  .nav__links {
    gap: 0.8rem;
  }
  .nav__links a {
    font-size: 0.78rem;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .school-fun {
    grid-template-columns: 1fr;
  }
  .contact-block {
    grid-template-columns: 1fr;
  }
  .game-area {
    height: 200px;
  }
  .game-goal {
    width: 140px;
    height: 50px;
  }
}

/* ===== Scroll reveal ===== */
.section__title,
.card,
.school-info__item,
.fun-card,
.contact-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section__title.visible,
.card.visible,
.school-info__item.visible,
.fun-card.visible,
.contact-card.visible {
  opacity: 1;
  transform: translateY(0);
}
