html {
  scrollbar-gutter: stable;
}

/* Хедер */
header {
  background-color: #000000;
  padding: 15px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  border-bottom: 1px solid #1c1c1c;
}

nav {
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  position: relative;
}

.logo {
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
}

nav a {
  color: #ccc;
  text-decoration: none;
  margin-left: 20px;
  font-size: 1rem;
  transition: color 0.3s;
}

nav a:hover {
  color: #fff;
}

/* Футер */
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background-color: #000000;
  padding: 1px;
  text-align: center;
  color: #888;
  font-size: 1rem;
  border-top: 1px solid #1c1c1c;
  flex-shrink: 0;
}


body {
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
}

.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #fff;
  margin-top: 0px;
}

.card {
  background-color: #0e0e0e;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 0 12px rgba(0,0,0,0.6);
  transition: all 0.3s ease;
  text-align: center; /*центрирование*/
}

.toggle-btn {
  position: relative; /* нужно для позиционирования .icon внутри */
  background-color: #1c1c1c;
  color: #fff;
  border: none;
  padding: 12px 18px;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: block;
  width: 100%;
  text-align: center; /* текст по центру */
}

.icon {
  position: absolute;
  right: 18px; /* выравниваем плюсик по правому краю кнопки */
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  transition: transform 0.3s ease;
  pointer-events: none; /* чтобы не мешал клику по кнопке */
}

.icon.rotated {
  transform: translateY(-50%) rotate(45deg);
}

.toggle-btn:hover {
  background-color: #555;
}

.subtitle {
  font-size: 0.9rem;
  color: #aaa;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 15px 0 0px 0;
}

.content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.5s ease;
  margin-top: 15px;
}

.content.active {
  opacity: 1;
}

h2, h3 {
  color: #f5f5f5;
}

p {
  line-height: 1.6;
}

img {
  margin-top: 15px;
  max-width: 100%;
  border-radius: 8px;
  opacity: 0.85;
}

img:hover {
  opacity: 1;
}

@media (max-width: 800px) {
  .toggle-btn {
    width: 100%;
    font-size: 1rem;
  }
}

/* Стек технологий */
.stack {
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px 0;
}

.stack-item {
  background-color: #333;
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: background 0.3s ease;
}

.stack-item:hover {
  background-color: #555;
}

/* Чтобы избежать слипания плашек с текстом */
.content p:last-of-type {
  margin-bottom: 10px;
}

/* Кнопка "Отправить сообщение" */
.resume-btn {
  position: relative;
  display: inline-block;
  overflow: hidden;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  color: #fff;
  border: 1px solid #555;
  background-color: transparent;
  z-index: 1;
}

.resume-btn canvas.button-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.resume-btn span {
  position: relative;
  z-index: 1;
}

.resume-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}




/* Кнопка показать изображение */
.show-img-btn {
  background-color: #000000;
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  margin: 15px auto 0;
  display: block;
  transition: background 0.3s ease;
  text-align: center;
}


.show-img-btn:hover {
  background-color: #000000;

}

/* Скрытое изображение */
.hidden-img {
  display: none;
  margin-top: 15px;
  max-width: 100%;
  border-radius: 8px;
  opacity: 0.85;
}

.hidden-img.visible {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 0.85; }
}

/* Попап оверлей */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.popup-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
}

.close-btn {
  margin-top: 15px;
  background-color: #333;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.close-btn:hover {
  background-color: #555;
}

.section {
  text-align: center;
  border-top: 1px solid #ddd;
  padding: 20px 0;
  margin-top: 20px;
}

.section:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.show-img-btn {
  background-color: #000000;
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  text-align: center;
  flex: 1 1 calc(33.333% - 24px); /* 3 кнопки в ряд с отступами */
  max-width: calc(33.333% - 24px);
  box-sizing: border-box;
}

.show-img-btn:hover {
  background-color: #555;
}

@media (max-width: 768px) {
  .show-img-btn {
    flex: 1 1 calc(50% - 24px); /* 2 в ряд на планшетах */
    max-width: calc(50% - 24px);
  }
}

@media (max-width: 480px) {
  .show-img-btn {
    flex: 1 1 100%; /* по одной на мобильных */
    max-width: 100%;
  }
}

.content h2, .content h3 {
  text-align: center;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 50vh;
}

main {
  flex: 1;
}

#intro {
  position: fixed;
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: -1;
}

.text {
  text-align: center;
  max-width: 1000px; /* ограничивает ширину текста */
  margin: 0 auto;   /* центрирует сам блок по горизонтали */
  margin-bottom: 40px;
}

.chat-button {
  position: sticky;
  bottom: 20px;
  display: block;
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  padding: 10px 20px;
  background-color: transparent;
  color: #ddd;
  text-align: center;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 12px;
  overflow: hidden;
  z-index: 10;
}

.chat-button canvas.button-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.chat-button i {
  position: relative;
  z-index: 1;
}



.chat-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.9); /* усиленное свечение */
}

.cat{
color:#fff;

}