/* ===== ОБЩИЕ СТИЛИ ===== */
html, body {
  margin: 0;
  padding: 0;
  font-family: "Abel", sans-serif;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* футер внизу */
  background: url("img-0.jpg") no-repeat center top;
  background-size: cover;
}

/* ===== HEADER ===== */
.header {
  background: rgba(240, 225, 184, 0.85);
  padding: 1.5vh 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2vw;
  flex-wrap: nowrap;
}

.nav img {
  height: 5vh; /* масштабируемый логотип */
  border-radius: 50%;
}

.menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2vw;
}

.menu li {
  margin: 0;
  padding: 0;
}

.menu a {
  text-decoration: none;
  color: black;
  font-weight: bold;
  font-size: clamp(0.9rem, 1.4vw, 1.4rem); /* текст масштабируется */
  transition: all 0.3s ease;
}

.menu a:hover {
  text-shadow: 0.2vw 0.2vw 0.5vw rgba(0,0,0,0.5);
  color: #333;
}

/* ===== MAIN ===== */
.main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2vh;
}

/* ===== MAIN-CONTENT для web-версии ===== */
.main-content {
  display: flex;
  justify-content: center; /* центрируем по горизонтали весь ряд */
  align-items: flex-start;
  gap: 5vw; /* расстояние между блоками, масштабируемое */
  width: 90vw; /* масштабируемая ширина */
  flex-wrap: nowrap; /* не переносим блоки на большой версии */
}

/* ===== PROFILE BLOCK ===== */
.profile-block {
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  padding: 2vh 2vw;
  border-radius: 2vw;
  max-width: 50vw;
  box-shadow: 0 0.5vw 1.5vw rgba(0,0,0,0.2);
}

.profile-block h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  margin: 0.5vh 0;
}

.profile-block h2 {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  margin: 0.5vh 0;
}

.profile-block h2:first-of-type {
  margin-bottom: 2vh; /* увеличиваем отступ, можно менять значение */
}

.cv-button {
  display: inline-block;
  margin: 2vh 0;
  padding: 1vh 2vw;
  border: 1px solid black;
  text-decoration: none;
  color: black;
  font-weight: bold;
  border-radius: 1vw;
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
}

.cv-button:hover {
  background-color: #dfdfdf;
  opacity: 0.9;
}

.avatar-wrapper {
  width: 20vw;
  height: 20vw;
  max-width: 250px; /* ограничение */
  max-height: 250px;
  border-radius: 50%;
  overflow: hidden;
  border: 0.4vw solid rgba(0,0,0,0.1);
  margin: 2vh auto;
}

.avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.short-info p {
  margin: 1.5vh 0;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 600;
}

/* ===== STACK / TAG LIST ===== */
.stack-list {
  max-width: 30vw;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.85);
  padding: 2vh 1.5vw;
  border-radius: 1.5vw;
  box-shadow: 0 0.3vw 1vw rgba(0,0,0,0.15);
  text-align: center; /* центрируем текст внутри блока */
}

.stack-list h3 {
  margin-bottom: 3vh;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
}

.stack-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stack-list li {
  padding: 0.5vh 0;
  border-bottom: 0.1vw solid rgba(0,0,0,0.1);
  font-weight: 600;
  font-size: clamp(0.9rem, 1.8vw, 1.2rem);
}

.stack-list li:last-child {
  border-bottom: none;
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(240, 225, 184, 0.85);
  text-align: center;
  padding: 1.5vh 0;
  flex-shrink: 0;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
}

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
  .main-content {
    flex-direction: row; /* profile и stack остаются в ряд */
    justify-content: space-around;
    width: 95vw;
  }

  .profile-block {
    max-width: 55vw;
  }

  .stack-list {
    max-width: 35vw;
  }
}

@media (max-width: 500px) {
  .main-content {
    flex-direction: column; /* на очень узких экранах stack под profile */
    align-items: center;
    width: 95vw;
  }

  .profile-block {
    max-width: 90vw;
  }

  .stack-list {
    max-width: 90vw;
    margin-top: 2vh;
  }
}
