:root {
  --bg-main: #0a0a0a; /* Глубокий черный фон */
  --bg-card: #141414; /* Фон для карточек */
  --text-main: #d1d5db; /* Текст */
  --text-muted: #9ca3af; /* Приглушенный текст */
  --accent: #00ffcc; /* Неоновый акцент */
  --accent-hover: #00ccaa;

  --font-text: "Inter", sans-serif;
  --font-mono: "Fira Code", monospace;

  --container-width: 1100px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3,
.logo,
.nav__link {
  font-family: var(--font-mono);
  color: #ffffff;
}

h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

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

/*============= НАВИГАЦИЯ =============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
}

.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
  width: 30px;
  height: 25px;
  position: relative;
}

.burger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--accent);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-radius: 2px;
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  display: flex;
}

/* Адаптивность */
@media (max-width: 767px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-main);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    gap: 1.5rem;
    padding: 2rem;
    overflow-y: auto;
  }

  .nav.active {
    right: 0;
  }

  .nav__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    padding: 12px 24px;
    min-width: 160px;
    text-align: center;
    border-radius: 8px;

    -webkit-tap-highlight-color: transparent;
  }

  .nav__link:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
  }

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

@media (min-width: 768px) {
  .burger {
    display: none;
  }

  .nav {
    gap: 2rem;
  }

  .nav__link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
  }

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

/*============= ОБЩИЕ КОМПОНЕНТЫ =============*/
.section-title {
  font-size: 1.75rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 4px;
  transition: var(--transition);
  cursor: pointer;
}

.btn--primary {
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.1);
}

.btn--primary:hover {
  background-color: var(--accent);
  color: var(--bg-main);
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
}

/*============= ГЛАВНЫЙ ЭКРАН =============*/
.hero {
  padding: 120px 0 80px 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.hero__badge {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero__title {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}

.terminal {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.terminal__header {
  background-color: #1a1a1a;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.terminal__dot--red {
  background-color: #ff5f56;
}
.terminal__dot--yellow {
  background-color: #ffbd2e;
}
.terminal__dot--green {
  background-color: #27c93f;
}

.terminal__title {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: 10px;
}

.terminal__body {
  padding: 20px;
  color: #f1f1f1;
}

.terminal__line {
  margin-bottom: 8px;
}

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

.terminal__output {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.terminal__code {
  color: #e2e8f0;
  margin-bottom: 12px;
  display: block;
  line-height: 1.4;
}

/* Анимация мигающего курсора */
.terminal__cursor {
  font-weight: bold;
  color: var(--accent);
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/*============= О СЕБЕ =============*/
.about {
  padding: 80px 0;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.about__card {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 2.5rem 2rem;
  transition: var(--transition);
}

.about__card:hover {
  border-color: rgba(0, 255, 204, 0.2);
  transform: translateY(-2px);
}

.about__card-num {
  font-family: var(--font-mono);
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
}

.about__card-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

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

.about__list {
  list-style: none;
}

.about__list-item {
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Адаптивность */
@media (min-width: 768px) {
  .about__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .hero__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .hero__content {
    flex: 1;
    max-width: 55%;
  }

  .hero__visual {
    flex: 1;
    max-width: 40%;
  }

  .hero__title {
    font-size: 2.75rem;
  }
}

/*============= КАК Я РАБОТАЮ =============*/
.approach {
  padding: 80px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.approach__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.approach__col {
  background: linear-gradient(
    135deg,
    rgba(20, 20, 20, 0.6) 0%,
    rgba(10, 10, 10, 0.8) 100%
  );
  border-left: 2px solid var(--accent);
  padding: 1.5rem 0 1.5rem 1.5rem;
}

.approach__tag {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.8rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.approach__subtitle {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.approach__text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/*============= КЕЙСЫ И ОПЫТ =============*/
.projects {
  padding: 80px 0;
}

.projects__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.projects__card {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  transition: var(--transition);
}

.projects__card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 255, 204, 0.03);
  transform: translateY(-4px);
}

.projects__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.projects__type {
  color: var(--accent);
  background: rgba(0, 255, 204, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.projects__tech {
  color: var(--text-muted);
}

.projects__title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

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

.projects__link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.projects__link:hover {
  text-decoration: underline;
}

/* Адаптивность */
@media (min-width: 768px) {
  .approach__grid {
    grid-template-columns: repeat(2, 1fr); /* Подход в две колонки */
    gap: 4rem;
  }

  .projects__grid {
    grid-template-columns: repeat(
      2,
      1fr
    ); /* Проекты по две карточки на планшете */
  }
}

@media (min-width: 1024px) {
  .projects__grid {
    grid-template-columns: repeat(3, 1fr); /* На ПК — 3 карточки в ряд */
  }
}

/*============= БЛОК КОНТАКТОВ =============*/
.contact {
  padding: 80px 0 120px 0;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

.contact__subtitle {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.contact__text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 450px;
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__link {
  font-family: var(--font-mono);
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact__link:hover {
  color: #ffffff;
  transform: translateX(4px);
}

/*============= FORM =============*/
.form {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 2.5rem 2rem;
}

.form__group {
  position: relative;
  margin-bottom: 2rem;
}

.form__group-row {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form__input {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.95rem;
  font-family: var(--font-text);
  outline: none;
  transition: var(--transition);
}

.form__textarea {
  min-height: 48px;
  resize: vertical;
  overflow: hidden;
}

.form__input:focus {
  border-bottom-color: var(--accent);
}

.form__label {
  position: absolute;
  top: 12px;
  left: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  transition: var(--transition);
}

.form__input:focus ~ .form__label,
.form__input:not(:placeholder-shown) ~ .form__label {
  top: -12px;
  font-size: 0.75rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.form__disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  text-align: center;
}

.form__btn {
  width: 100%;
  margin-top: 1rem;
}

/* Сообщения об отправке */
.form__response {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  border-radius: 4px;
  transition: var(--transition);
  display: none; /* по умолчанию скрыто */
}

.form__response--success {
  display: block;
  color: #27c93f;
}

.form__response--error {
  display: block;
  color: #ff5f56;
}

/* Стили ошибок валидации */
.form__input.form__input--error {
  border-bottom-color: #ff5f56;
}

.form__input.form__input--error ~ .form__label {
  color: #ff5f56;
}

.form__error {
  display: block;
  color: #ff5f56;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-top: 4px;
  height: 14px;
  transition: var(--transition);
  opacity: 0;
}

.form__error.form__error--active {
  opacity: 1;
}

/*============= FOOTER =============*/
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px 0;
  background-color: #050505;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer__copy,
.footer__tech {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Адаптивность */
@media (min-width: 768px) {
  .contact__grid {
    grid-template-columns: 4fr 6fr;
  }

  .form__group-row {
    flex-direction: row;
    gap: 2rem;
  }

  .form__group-row .form__group {
    flex: 1;
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
