* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #f3f4f6;
  background: #0b0d10;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #0b0d10;
  border-bottom: 1px solid #1f2937;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
}

.logo-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.motto {
  margin-top: 2px;
  font-size: 13px;
  color: #9ca3af;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
}

.menu a {
  text-decoration: none;
  color: #e5e7eb;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.menu a:hover {
  color: #2563eb;
}

section {
  padding: 60px 24px;
  max-width: 1100px;
  margin: 0 auto;
  scroll-margin-top: 120px;
}

section h2 {
  margin-bottom: 16px;
  font-size: 32px;
}

section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #2563eb;
  margin-top: 12px;
  border-radius: 2px;
}

.lead,
.about-text {
  font-size: 18px;
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 24px;
  color: #d1d5db;
}

.lead a {
  color: #2563eb;
}

.contact-form {
  max-width: 520px;
  margin-bottom: 32px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
}
.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: #f3f4f6;
  background: #111418;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 10px 12px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #2563eb;
}
.contact-form .more-btn {
  margin-top: 8px;
}
.form-error {
  min-height: 18px;
  margin-top: 4px;
  color: #fda4af;
  font-size: 13px;
  font-weight: 700;
}
.form-success {
  margin-top: 12px;
  color: #34d399;
  font-weight: 700;
}
/* О команде */
#about {
  background: #141820;
  border-radius: 16px;
  margin: 40px auto;
  padding: 48px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

#about h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.about-text {
  margin-bottom: 40px;
}

.about-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stat {
  background: #1c212b;
  padding: 20px 28px;
  border-radius: 12px;
  min-width: 140px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-btn,
.more-btn,
.skill-btn {
  font-family: inherit;
  cursor: pointer;
}

.filter-btn {
  border: 1px solid #374151;
  background: #141820;
  color: #e5e7eb;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
}

.filter-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.skill-btn {
  text-align: left;
  color: inherit;
  font-size: 16px;
}

.skill-btn.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #2563eb;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.card {
  flex: 1 1 300px;
  max-width: 340px;
  background: #141820;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.project-card {
  flex: 1 1 340px;
  max-width: 520px;
}
#members-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
#members-grid .card {
  grid-column: span 2;
  max-width: none;
}
#members-grid .card:nth-child(4) {
  grid-column: 2 / span 2;
}
#members-grid .card:nth-child(5) {
  grid-column: 4 / span 2;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 12px;
}

.avatar-photo {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 12px;
  display: block;
}
.avatar-photo[hidden] {
  display: none;
}

.card h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.card-role {
  color: #2563eb;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-meta {
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 8px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.tag {
  background: #1e3a5f;
  color: #93c5fd;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
}

.more-btn {
  border: none;
  background: #2563eb;
  color: #ffffff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
}

.skill-card h3,
.project-card h3 {
  margin-bottom: 8px;
}

.project-status {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #9ca3af;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal[hidden] {
  display: none;
}

.modal-window {
  width: min(440px, 100%);
  background: #141820;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 24px;
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.modal-window h3 {
  font-size: 24px;
}

.modal-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.modal-nav .more-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.footer {
  border-top: 1px solid #1f2937;
  padding: 28px 16px 36px;
  text-align: center;
  color: #9ca3af;
}

.footer-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin: 0 auto 10px;
  display: block;
  object-fit: cover;
}

.footer a {
  color: #2563eb;
}

/* Анимация */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Адаптив */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 12px 16px;
  }

  .menu {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    width: 100%;
    gap: 8px;
  }

  .menu a {
    grid-column: span 2;
    text-align: center;
    padding: 8px 4px;
    border: 1px solid #374151;
    border-radius: 10px;
    background: #141820;
    font-size: 14px;
  }

  .menu a:nth-child(4),
  .menu a:nth-child(5) {
    grid-column: span 3;
  }
  .reveal {
    transform: translateY(8px);
    transition-duration: 0.2s;
  }

  section {
    padding: 40px 16px;
    scroll-margin-top: 180px;
  }

  #about {
    margin: 24px 16px;
    padding: 32px 20px;
    border-radius: 12px;
  }

  #about h2 {
    font-size: 28px;
  }

  .about-stats {
    gap: 16px;
  }

  .stat {
    flex: 1;
    min-width: 120px;
    padding: 16px;
  }

  section h2 {
    font-size: 26px;
  }

  .lead,
  .about-text {
    font-size: 16px;
  }

  #members-grid {
    grid-template-columns: 1fr 1fr;
  }
  #members-grid .card,
  #members-grid .card:nth-child(4),
  #members-grid .card:nth-child(5) {
    grid-column: auto;
  }
  #members-grid .card:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 10px);
  }
}
@media (max-width: 520px) {
  #members-grid {
    grid-template-columns: 1fr;
  }

  #members-grid .card:nth-child(5) {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
  }

  .menu a {
    font-size: 13px;
  }
  .logo-mark {
    width: 44px;
    height: 44px;
  }
  .logo-name {
    font-size: 18px;
  }
}
