/* --- Переменные --- */
:root {
  --neon-green: #39ff14; /* Цвет свечения */
  --text-color: #b8d6c0; /* Цвет текста */
  --bg-color: #020201; /* Цвет фона */
}

/* --- Базовые стили body --- */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  height: 100vh;
  font-family: "Google Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "GRAD" 0;
  text-align: left;
  overflow: hidden;
}

/* --- Loader (экран загрузки) --- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;

  background-color: var(--bg-color);

  display: flex;
  align-items: center;
  justify-content: center;

  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Контент загрузчика */
.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;

  color: var(--text-color);
  font-size: 1rem;
  letter-spacing: 0.05em;
}

/* SVG-заглушка */
#loader-svg {
  height: auto;
  width: 500px;
}

#loader-svg path {
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  transition: stroke-dashoffset 1s ease;
}

/* Проценты */
#loader-percent {
  font-size: 1.25rem;
  color: #7dff9a;
  text-shadow: 0 0 6px rgba(125, 255, 154, 0.6);
}

.frames {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.frame {
  position: absolute;
  left: 0;
  right: 0;
  height: 80px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  transition: transform 0.6s ease;
}

/* верх */
.frame.top {
  top: 0;
  background-image: url("/images/embellishment-1.svg");
  transform: translateY(0);
}

/* низ */
.frame.bottom {
  bottom: 0;
  background-image: url("/images/embellishment-1.svg");
  transform: scaleY(-1) translateY(0);
}

.frames.out .top {
  transform: translateY(-100%);
}

.frames.out .bottom {
  transform: scaleY(-1) translateY(-100%);
}

/* --- Меню секций --- */
nav.menu {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 20;
}

nav.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  cursor: pointer;
}

/* Название */
.menu-label {
  font-size: 0.875rem;
  color: #7dff9a;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}

/* Кружок */
.menu-dot {
  display: block;
  width: 5px;
  height: 5px;
  border: 3px solid #7dff9a;
  border-radius: 50%;
  box-sizing: border-box;
  transition: all 0.2s;
}

/* --- Состояния --- */

/* Активный пункт */
.menu-item.active .menu-label {
  opacity: 1;
  font-weight: bold;
}

.menu-item.active .menu-dot {
  width: 10px;
  height: 10px;
  margin-right: -2px;
}

/* При наведении */
.menu-item:not(.active):hover .menu-label {
  opacity: 1;
}

.menu-item:not(.active):hover .menu-dot {
  width: 5px;
  height: 5px;
}

/* --- Секция блоки --- */
.block {
  display: flex;
  min-height: 100vh; /* на всю высоту экрана */
  flex-direction: column;
  justify-content: center; /* вертикальное центрирование */
  align-items: center; /* горизонтальное центрирование */
  max-width: 1020px; /* ограничение ширины контента */
  margin: 0 auto;
  padding: 80px 20px; /* место для SVG сверху/снизу */
  box-sizing: border-box;
}

/* --- Hero --- */
.hero h1 {
  font-size: 1.5rem;
  color: #ffffff;
  line-height: 1.2;
  margin: 0.5rem 0;
  text-align: center;
  text-transform: uppercase;
}

.hero h2 {
  display: block;
  font-size: 1.25rem;
  color: var(--text-color);
  margin: 0.5rem 0;
}

.hero h2::before,
.hero h2::after {
  content: none;
  text-align: center;
}

/* --- Заголовки h2 с SVG линиями --- */
h2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #7dff9a;
  font-size: 1.25rem;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 2px rgba(125, 255, 154, 0.6);
}

h2::before,
h2::after {
  content: '';
  flex-grow: 1;
  height: 25px;
  background-image: url("/images/header-divider.svg");
  background-position: right center;
  background-repeat: no-repeat;
  background-size: auto 100%;
}

h2::after {
  transform: scaleX(-1);
}

h3 {
  text-align: center;
}

a {
  color: var(--text-color);
  font-weight: bold;
  text-decoration: none;
}

a:hover {
  color: white;
}

/* --- Абзацы и списки --- */
p {
  margin: 0.5rem auto;
  line-height: 1.6;
  text-align: left;
}

ul {
  list-style: disc;
  padding-left: 1.5rem;
  text-align: left;
  max-width: 500px;
}

/* --- About / Обо мне --- */
.block.about p,
.block.about ul {
  margin: 0 25%;
}

.block.about p {
  margin-bottom: 1rem;
  text-indent: 0em;
}

/* --- Stack / Технологии --- */
.technologies .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.technologies h2 {
  grid-column: 1 / -1;
}

.technologies-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-content: start;
  grid-auto-rows: min-content;
}

.technologies-buttons button {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 100px;
  height: 75px;
  opacity: 0.5;
}

.technologies-buttons button:hover {
  opacity: 1;
}

/* Картинка */
.technologies-buttons button img {
  max-width: 90%;
  max-height: 90%;
  pointer-events: none;
}

/* Рамка */
.technologies-buttons button::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background: url("/images/logos/frame.svg") no-repeat;
  background-size: 100% 100%;
}

.technologies-description {
  display: block;
}

.technologies-description .technology {
  display: none;
  width: 100%;
}

.technologies-description .technology.is-active {
  display: block;
}

/* --- Contacts --- */
.contacts .links {
  justify-content: center;
  margin-bottom: 2rem;
}

.contacts .links div {
  text-align: left;
  margin: 0 35%;
}

.contacts h3 {
  margin-bottom: 2rem;
}

.contacts .form-label {
  font-weight: 500;
}

.contacts .form-check {
  display: block;
  align-items: center;
  margin-bottom: 0.5rem;
}

.contacts .form-check-input {
  margin-right: 0.5rem;
}

input.form-control, textarea.form-control {
  background-color: #0d0d0d;
  border: 1px solid #7dff9a;
  color: var(--text-color);
}

input.form-control::placeholder,
textarea.form-control::placeholder {
  color: rgba(184, 214, 192, 0.6);
}

button.btn-primary {
  background-color: #7dff9a;
  border: none;
  color: #0d0d0d;
  font-weight: 600;
}

button.btn-primary:hover {
  background-color: #39ff14;
}

/* --- Дополнительно --- */
.mirror {
  transform: scaleY(-1);
}

p, li, label {
  font-size: 1rem;
  color: var(--text-color);
}
