* {
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: auto;
  padding: 2em 2em 2em calc(14em + 3em);
  font-size: 16px;
  line-height: 1.6;
  font-family: 'Roboto', sans-serif;
  position: relative;
}

.sidebar-bg {
  position: fixed;
  top: 19em;
  left: 0;
  width: 25em;
  height: 100%;
  background: url('photo_ivanisenko.png') no-repeat center center/cover;
  opacity: 0.5;
  z-index: -1;
}

.header {
  text-align: center;
  margin-bottom: 2em;
  position: relative;
}

.header-content {
  color: #111;
}

.header h1 {
  font-size: 2.5em;
  margin: 0;
}

.header h2 {
  font-size: 1.5em;
  margin: 0;
}

.toc {
  position: fixed;
  left: 3em;
  top: 5em;
  padding: 1em;
  width: 14em;
  line-height: 2;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc ul ul {
  padding-left: 2em;
}

.toc li a {
  display: inline-block;
  color: #aaa;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.230, 1.000, 0.320, 1.000);
}

.toc li.visible>a {
  color: #111;
  transform: translate(5px);
}

.toc-marker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.toc-marker path {
  transition: all 0.3s ease;
}

.contents {
  padding: 1em;
  max-width: 800px;
  font-size: 1.2em;
  font-family: 'Frank Ruhl Libre', sans-serif;
  margin-left: 17em; /* Отступ для sidebar */
}

.contents img {
  max-width: 100%;
}

.contents .code-block {
  white-space: pre;
  overflow: auto;
  max-width: 100%;
}

.contents .code-block code {
  display: block;
  background-color: #f9f9f9;
  padding: 10px;
}

.contents .code-inline {
  background-color: #f9f9f9;
  padding: 4px;
}

.contents h2,
.contents h3 {
  padding-top: 1em;
}

@media screen and (max-width: 1200px) {
  body {
    font-size: 14px;
  }

  .contents {
    margin-left: 0; /* Убрать отступ для маленьких экранов */
  }

  .sidebar-bg {
    display: none; /* Скрыть фон на маленьких экранах */
  }
}
