/* ===== Сброс и базовые стили ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  /* Safari */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* IE/Edge */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #1a1a2e;
  background: #f8f9fa;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Навигация ===== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  padding: 0 2rem;
}

nav .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

nav .logo {
  font-style: italic;
  font-weight: bold;
}

nav .logo:hover {
  color: #31a599;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul li a {
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: #31a599;
}

/* ===== Top ===== */
.person {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #40e0d0 0%, #008b8b 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.person::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  top: -200px;
  right: -100px;
}

.person-content {
  position: relative;
  z-index: 1;
}

.person .avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.4);
  margin: 0 auto 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.person .avatar img {
  width: 96px;
  height: 96px;
}

.person h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.person .subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.person .btn {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.person .btn-primary {
  background: #fff;
  color: #31a599;
}

.person .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.person .btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  margin-left: 1rem;
}

.person .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ===== Общие секции ===== */
section {
  padding: 5rem 2rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

/* ===== Обо мне ===== */
.about {
  background: #fff;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1rem;
  color: #444;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.stat {
  text-align: center;
  padding: 1.2rem;
  background: #f8f9fa;
  border-radius: 12px;
}

.stat .number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #008b8b;
}

.stat .label {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.25rem;
}

.about-image {
  background: linear-gradient(135deg, #008b8b, #91e4e4);
  border-radius: 20px;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}

.about-image img {
  width: 256px;
  height: 256px;
}

.gradient-list {
  list-style: none;
  padding-left: 0;
}

.gradient-list li {
  margin-bottom: 5px;
  padding: 8px 10px 10px 15px;
  background: linear-gradient(90deg, #f0f0f0 0%, #ffffff 100%);
  border-radius: 30px;
  position: relative;
  transition: all 0.3s ease;
}

.gradient-list li:hover {
  transform: translateX(10px);
  background: linear-gradient(90deg, #ffffff 0%, #91e4e4 100%);
}


/* ===== Навыки ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.15);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.skill-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ===== Проекты ===== */
.projects {
  background: #fff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  background: #f8f9fa;
}

.project-card img {
  width: 128px;
  height: 128px;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.project-card a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #6c63ff;
  transition: color 0.3s;
}

.project-card a:hover {
  color: #31a599;
}

.project-thumb {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.project-card:nth-child(1) .project-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.project-card:nth-child(2) .project-thumb {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

.project-card:nth-child(3) .project-thumb {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tags span {
  background: #6c63ff15;
  color: #6c63ff;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ===== Контакты ===== */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s;
}

.contact-card:hover {
  transform: translateY(-3px);
}

.contact-card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.contact-card h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.contact-card p {
  color: #6c63ff;
  font-weight: 500;
  font-size: 0.95rem;
}

/* ===== Футер ===== */
footer {
  text-align: center;
  padding: 2rem;
  background: #1a1a2e;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

footer span {
  color: #31a599;
}

/* Стили для модального окна */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 80%;
  max-width: 800px;
  top: 50%;
  transform: translateY(-50%);
}

.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Кнопка закрытия */
.close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.close:hover {
  color: #ccc;
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
  .person h1 {
    font-size: 2rem;
  }

  .person .btn-outline {
    margin-left: 0;
    margin-top: 0.75rem;
  }

  .person .btn-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    height: 200px;
  }

  nav ul {
    gap: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}