html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.8;
  background-color: #121212;
  color: #e0e0e0;
  transition: background-color 0.3s, color 0.3s;
}

header {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(45deg, #1e3c72, #2a5298);
  color: white;
  position: relative;
}

header p {
  font-size: 1.25rem;
  font-weight: 300;
  color: #e0e0e0;
  margin-top: 4px;
}

header nav {
  position: absolute;
  top: 20px;
  right: 20px;
}

header nav a {
  color: white;
  margin: 0 5px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s, background-color 0.3s;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

header nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
}

main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.two-column-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 60px;
}

.left-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.right-column {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

section {
  margin-bottom: 60px;
  padding: 40px;
  background-color: #1e1e1e;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.two-column-layout section {
  margin-bottom: 0;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.arrow {
  transition: transform 0.3s;
  display: inline-block;
}

.arrow.open {
  transform: rotate(90deg);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

#json-viewer {
  background-color: #282c34;
  color: #61dafb;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 14px;
  border: 1px solid #333;
  margin-top: 20px;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

footer {
  text-align: center;
  padding: 30px;
  background-color: #1e1e1e;
  color: #aaa;
  margin-top: 40px;
}

a {
  color: #61dafb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
    list-style-type: none;
    padding-left: 0;
}

ul li {
    background-color: #2a2a2a;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 5px;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

ul li:hover {
    transform: translateX(5px);
}

.experience-item {
    flex-direction: column;
    align-items: flex-start;
}

.experience-header {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.experience-details {
    flex-grow: 1;
}

.responsibilities-container {
    max-height: 70px; /* Высота для примерно двух пунктов */
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
    width: 100%;
    padding-left: 0; /* Убираем отступ */
}

.responsibilities-container.expanded {
    max-height: 500px; /* Достаточно большая высота для раскрытия */
}

.responsibilities-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.responsibilities-list li {
    background-color: transparent;
    padding: 2px 0;
    margin-bottom: 5px;
    display: list-item;
    color: #ccc;
}

.responsibilities-list li:hover {
    transform: none;
}

.toggle-responsibilities {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
    align-self: flex-end;
}

.toggle-responsibilities:hover {
    background-color: #0056b3;
}

.project-item {
    background-color: #2a2a2a;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 5px;
    transition: transform 0.3s;
    display: flex;
    align-items: flex-start; /* Выравнивание по верху */
    gap: 15px;
}

.project-item:hover {
    transform: translateX(5px);
}

.project-details p {
    margin: 5px 0 0 0;
    color: #ccc;
    line-height: 1.6;
}

.company-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 5px;
}

#skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  padding: 20px 0;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  background-color: #2a2a2a;
  border-radius: 10px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.skill-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.skill-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.skill-item img.dark-icon {
  filter: drop-shadow(0 0 2px white);
}

.skill-item span {
  margin-top: 10px;
  font-size: 14px;
  color: #e0e0e0;
}

/* Адаптивность */
@media (max-width: 992px) {
  .two-column-layout {
    flex-direction: column;
    gap: 0;
    align-items: stretch; /* Растягиваем элементы на всю ширину */
  }

  .left-column, .right-column {
    width: 100%;
    gap: 0;
    display: contents; /* Делаем дочерние секции прямыми потомками flex-контейнера */
  }

  .two-column-layout section {
    margin-bottom: 60px;
  }

  #about { order: 1; }
  #experience-section { order: 2; }
  #skills-section { order: 3; }
  #contacts { order: 4; }
}

@media (max-width: 768px) {
  header {
    padding: 40px 20px;
  }

  header nav {
    position: static;
    margin-top: 20px;
  }

  header nav a {
    display: block;
    margin: 10px 0;
  }

  section {
    padding: 20px;
  }
}
