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

:root {
  --color-bg: #FAFAFA;
  --color-text: #1A1A1A;
  --color-text-secondary: #6B7280;
  --color-accent: #2563EB;
  --color-accent-hover: #1D4ED8;
  --color-border: #E5E7EB;
  --color-card: #FFFFFF;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.3s ease;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Навигация ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
}

.nav__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.nav__logo:hover {
  color: var(--color-accent);
}

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

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav__link:hover {
  color: var(--color-text);
}

.nav__link:hover::after {
  width: 100%;
}

/* ===== Hero секция ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.hero__container {
  max-width: 700px;
}

.hero__label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 9999px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--color-accent);
  color: white;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== Секции ===== */
.section {
  padding: 6rem 2rem;
}

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

.section__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section__subtitle {
  color: var(--color-text-secondary);
  margin-bottom: 3rem;
}

/* ===== Обо мне ===== */
.about {
  background: var(--color-card);
}

.about__content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: start;
}

.about__avatar {
  display: flex;
  justify-content: center;
}

.avatar {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--color-accent), #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.avatar span {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}

.about__text p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.about__text p:last-of-type {
  margin-bottom: 2rem;
}

.about__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.about__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.5rem 0;
  transition: color var(--transition);
}

.about__link svg {
  color: var(--color-text-secondary);
  transition: color var(--transition);
}

.about__link:hover {
  color: var(--color-accent);
}

.about__link:hover svg {
  color: var(--color-accent);
}

/* ===== Навыки ===== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.75rem;
  position: relative;
  transition: all var(--transition);
  cursor: default;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.skill-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.skill-card__icon svg {
  width: 100%;
  height: 100%;
}

.skill-card__name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skill-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.skill-card__bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.skill-card__progress {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), #8B5CF6);
  border-radius: 3px;
  width: 0;
  transition: width 1s ease-out;
}

.skill-card__level {
  position: absolute;
  top: 1.75rem;
  right: 1.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* ===== Футер ===== */
.footer {
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  padding: 2rem;
}

.footer__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copy {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.footer__socials {
  display: flex;
  gap: 1rem;
}

.footer__social {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  transition: all var(--transition);
}

.footer__social:hover {
  color: var(--color-accent);
  background: rgba(37, 99, 235, 0.1);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-text);
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 200;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== Анимации ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger эффект для групп элементов */
.animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
  .nav__container {
    padding: 1rem;
  }

  .nav__links {
    gap: 1.5rem;
  }

  .hero {
    padding: 5rem 1.5rem 3rem;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .hero__subtitle {
    font-size: 1.1rem;
  }

  .section {
    padding: 4rem 1.5rem;
  }

  .about__content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .about__avatar {
    order: -1;
  }

  .avatar {
    width: 160px;
    height: 160px;
  }

  .avatar span {
    font-size: 2.5rem;
  }

  .about__links {
    justify-content: center;
  }

  .skills__grid {
    grid-template-columns: 1fr;
  }

  .skill-card__level {
    position: static;
    display: block;
    margin-top: 0.5rem;
  }

  .footer__container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav__logo {
    font-size: 1.1rem;
  }

  .nav__link {
    font-size: 0.85rem;
  }

  .section__title {
    font-size: 1.75rem;
  }

  .about__text p {
    font-size: 1rem;
  }

  .about__links {
    flex-direction: column;
    align-items: center;
  }
}
