/* Общий фон: шторы + пол */
body.lynch-body {
  font-family: "Courier New", monospace;
  margin: 0;
  color: #f5e1e1;
  line-height: 1.6;
  background: repeating-linear-gradient(
    135deg,
    #111 0px,
    #111 20px,
    #000 20px,
    #000 40px
  );
  background-attachment: fixed;
}
/* ---- Глобальный фикс длинных слов ---- */
body, td, p, a, li, div {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}


/* Верхняя панель */
.top-bar {
  background: #000;
  color: #ff0000;
  font-size: 14px;
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.top-bar a {
  color: #ff0000;
  text-decoration: none;
  font-weight: bold;
}
.top-bar a:hover {
  text-shadow: 0 0 10px #ff0000;
}

/* Глитч-анимация */
.glitch {
  animation: glitch 2s infinite;
}
@keyframes glitch {
  0% { text-shadow: 2px 0 red; }
  20% { text-shadow: -2px 0 cyan; }
  40% { text-shadow: 2px 2px lime; }
  60% { text-shadow: -2px -2px magenta; }
  80% { text-shadow: 2px -2px yellow; }
  100% { text-shadow: none; }
}

/* Шапка */
.header.lynch-header {
  background: linear-gradient(180deg, #330000, #660000);
  padding: 40px 0;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.9);
}

.profile {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

/* Фото */
.avatar {
  width: 180px;
  height: 240px;
  object-fit: cover;
  border: 6px solid #ff0000;
  box-shadow: 0 0 25px rgba(255,0,0,0.8);
  transform: rotate(-2deg);
  transition: 0.3s;
}
.avatar:hover {
  transform: rotate(2deg) scale(1.1);
}

/* Инфо справа от фото */
.profile-info {
  flex: 1;
  background: rgba(0,0,0,0.7);
  padding: 20px;
  border: 2px solid #ff0000;
  box-shadow: 0 0 20px #ff0000;
}

.profile-info a {
  color: inherit;
  text-decoration: none;
}

.lynch-title {
  font-size: 2.2rem;
  color: #ff0000;
  text-shadow: 0 0 5px #ff0000, 0 0 20px #fff;
  margin: 0 0 20px 0;
  line-height: 1.2;
}

/* Меню */
.sub-menu.lynch-menu {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px auto;
}

.sub-menu a {
  background: black;
  color: #ff0000;
  border: 2px solid #ff0000;
  padding: 12px 24px;
  border-radius: 0;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 0 15px #ff0000;
}
.sub-menu a:hover {
  background: #ff0000;
  color: black;
}

/* Заголовки */
h2 {
  color: #ff0000;
  text-align: center;
  text-shadow: 0 0 15px #ff0000;
}

/* Таблица */
.resume-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: rgba(0,0,0,0.8);
  border: 2px solid #ff0000;
  box-shadow: 0 0 20px #ff0000;
  list-style-type: decimal;
}

.resume-table td {
  border: 1px solid #ff0000;
  padding: 14px 16px;
}

.resume-table tr:hover {
  background-color: rgba(255,0,0,0.3);
  color: #fff;
}

.resume-table a {
  color: inherit;
  text-decoration: none;
}

 li {
  margin-left: 30px;
}
/* Подвал */
.footer.lynch-footer {
  background: #000;
  padding: 20px 0;
  text-align: center;
  border-top: 2px solid #ff0000;
  box-shadow: 0 -5px 15px #ff0000;
}

.bottom-menu a {
  color: #ff0000;
  margin: 0 15px;
  text-decoration: none;
}
.bottom-menu a:hover {
  text-shadow: 0 0 10px #ff0000;
}

/* Кнопка */
#toTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: black;
  color: #ff0000;
  border: 2px solid #ff0000;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  display: none;
  box-shadow: 0 0 15px #ff0000;
}
#toTop.show { display: block; }
#toTop:hover {
  background: #ff0000;
  color: black;
}

/* ---------- Индивидуальный раздел ---------- */
.individual-block {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #ff0000;
  box-shadow: 0 0 25px #ff0000;
  padding: 30px;
  line-height: 1.7;
  text-align: justify;
}
.individual-block a{
  color: white;
  text-decoration: none;
}
.individual-block a:hover{
  color: #ff0000;
  text-shadow: 0 0 10px #ff0000;
  text-decoration: underline;;
}
.individual-block h3, 
.individual-block h4 {
  color: #ff0000;
   margin-top: 0;
  text-shadow: 0 0 10px #ff0000;
}

.book-item p {
  color: #f5e1e1;
  line-height: 1.6;
  margin-bottom: 12px;
  text-align: justify;
}
.book-item, .movie-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin: 30px 0;
}

.book-item img, 
.movie-item img {
  width: 180px;
  height: auto;
  object-fit: cover;
  border: 2px solid #ff0000;
  box-shadow: 0 0 15px #ff0000;
}

.sources ul {
  list-style-type: none;
  padding-left: 0;
}

.sources a {
  color: #ff0000;
  text-decoration: none;
}

.sources a:hover {
  text-shadow: 0 0 10px #ff0000;
}

/* Дополнительные стили для страницы научных трудов */
.publication-item {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #ff0000;
}

.publication-item:last-child {
  border-bottom: none;
}

.publication-item h4 {
  color: #ff0000;
  text-shadow: 0 0 8px #ff0000;
  margin-bottom: 10px;
}

.publication-item p {
  margin-bottom: 8px;
  color: #f5e1e1;
}

/* Стили для страницы статьи */
.back-link:hover {
  background: #ff0000 !important;
  color: black !important;
  transform: translateX(-5px);
}

.article-content h2 {
  color: #ff0000;
  text-shadow: 0 0 10px #ff0000;
  border-bottom: 1px solid #ff0000;
  padding-bottom: 8px;
  margin-top: 30px;
}

.article-content h3 {
  color: #ff0000;
  text-shadow: 0 0 8px #ff0000;
  margin-top: 25px;
}

.article-content p {
  text-align: justify;
  margin-bottom: 16px;
  line-height: 1.7;
}

.article-content ul {
  margin: 15px 0;
  padding-left: 30px;
}

.article-content li {
  margin-bottom: 8px;
  color: #f5e1e1;
}
.article-content table {
width: 100%; 
border-collapse: collapse; 
margin: 20px 0;
}
.article-content th {
padding: 10px;
background: rgba(255,0,0,0.1);
}
.article-content td {
padding: 10px;
}

.article-meta p {
  margin-bottom: 8px;
  color: #f5e1e1;
}

.abstract p {
  font-style: italic;
  margin-bottom: 0;
}

.keywords p {
  font-style: italic;
  color: #f5e1e1;
}

.citation p {
  font-size: 0.9em;
  color: #f5e1e1;
  margin-bottom: 0;
}

/* Статьи */
.article-content h2,
.article-content h3 {
  transition: all 0.3s ease;
}

.article-content h2:hover,
.article-content h3:hover {
  text-shadow: 0 0 15px #ff0000, 0 0 25px #ff0000;
}

.article-button{
  margin-bottom: 30px;
}
.article-button a {
  display: inline-block;
      background: black;
      color: #ff0000;
      border: 2px solid #ff0000;
      padding: 10px 20px;
      text-decoration: none;
      font-weight: bold;
      box-shadow: 0 0 10px #ff0000;
      transition: all 0.3s;
}
.article-title {
  text-align: center; 
  margin-bottom: 30px;
}
.article-title h1 {
color: #ff0000; 
text-shadow: 0 0 15px #ff0000; 
margin-bottom: 10px;
}
.article-title p {
color: #f5e1e1; 
font-size: 1.1em;
}
.article-author {
  margin-bottom: 25px; 
  line-height: 1.6; 
  text-align: center;
}
.article-author p{
  margin-bottom: 5px;
}
.article-annotation {
  background: rgba(255, 0, 0, 0.1);
      border-left: 3px solid #ff0000;
      padding: 15px 20px;
      margin-bottom: 30px;
}
.article-annotation h3 {
color: #ff0000; 
margin-top: 0;
}
.article-annotation p {
text-align: justify; 
margin-bottom: 10px;
}
.article-picture{
  text-align: center; 
  margin: 20px 0;
}
.article-picture p{
color: #ff0000; 
margin: 10px 0 0 0; 
text-align: center;
}
/* ---------- Стили для математических формул ---------- */
.math-formula {
    text-align: center;
    font-size: 18px;
    margin: 20px 0;
    font-family: 'Times New Roman', Times, serif;
}

.math-fraction {
    display: inline-block;
    vertical-align: middle;
    text-align: center;
}

.math-numerator {
    display: block;
    padding: 0 8px;
    border-bottom: 1px solid #ff0000;
}

.math-denominator {
    display: block;
    padding: 2px 8px 0;
    color: #f5e1e1;
}

.math-absolute {
    display: inline-flex;
    align-items: center;
}

.math-abs-bar {
    width: 2px;
    height: 20px;
    background-color:white;
    margin: 0 2px;
}

.math-equation-number {
    margin-left: 15px;
    color:white;
}

.math-variable {
    color: white;
}

.math-content {
    color: #f5e1e1;
}

/* Стили для формул внутри статей */
.article-content .math-formula {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
}

.article-content .math-numerator {
    border-bottom: 1px solid white;
}

/* ============================
      АДАПТИВНОСТЬ САЙТА
   ============================ */

/* Глобальный контейнер */
.container {
  max-width: 1100px;
  padding: 0 20px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Фон — всегда cover */
body.lynch-body {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Изображения — не ломают вёрстку */
img {
  max-width: 100%;
  height: auto;
}


/* ========== Адаптивность 900px ↓ ========== */
@media (max-width: 900px) {

  /* Шапка уходит в колонку */
  .profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .profile-info {
    width: 100%;
  }

  .avatar {
    width: 150px;
    height: 200px;
  }

  /* МЕНЮ — просто в колонку */
  .sub-menu.lynch-menu {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
    text-align: center;
  }

  .sub-menu a {
    width: 80%;
    margin: 0 auto;
    padding: 12px 0;
  }

  /* Контент */
  .lynch-main {
    padding: 0 10px;
  }

  /* Таблица становится скроллимой */
  .resume-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .resume-table td {
    white-space: normal;
    padding: 12px;
  }

  /* Книги / фильмы — в колонку */
  .book-item,
  .movie-item {
    flex-direction: column;
    text-align: center;
  }

  .book-item img,
  .movie-item img {
    width: 70%;
  }

  /* Статьи */
  .article-content {
    padding: 0 10px;
  }
}


/* ========== Адаптивность 600px ↓ ========== */
@media (max-width: 600px) {

  .lynch-title {
    font-size: 1.6rem;
  }

  .avatar {
    width: 120px;
    height: 160px;
  }

  .sub-menu a {
    padding: 10px;
    font-size: 14px;
  }

  .book-item img,
  .movie-item img {
    width: 85%;
  }

  .resume-table {
    font-size: 14px;
  }
}


/* ========== Адаптивность 420px ↓ ========== */
@media (max-width: 420px) {

  .lynch-title {
    font-size: 1.4rem;
  }

  .avatar {
    width: 100px;
    height: 140px;
  }

  .sub-menu a {
    width: 90%;
  }

  .resume-table {
    font-size: 13px;
  }
}
/* ---- Полный адаптив таблиц без скролла ---- */
.resume-table,
.article-content table {
  display: table;     /* вернуть нормальный режим */
  width: 100%;  
  table-layout: fixed;  /* ячейки сами подстраиваются */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.resume-table td,
.article-content td,
.article-content th {
  white-space: normal;   /* строки переносятся */
  word-break: break-word; /* длинные слова тоже переносятся */
}

/* --------------------------
   Адаптивный блок для видео
   -------------------------- */

.video-block {
  margin: 40px 0;
  display: flex;
  justify-content: center;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;      /* максимальная ширина видео */
  padding-bottom: 35%; /* 16:9 — адаптивная высота */
  height: 0;
  overflow: hidden;
  border: 2px solid #ff0000;
  box-shadow: 0 0 20px #ff0000;
  background: rgba(0, 0, 0, 0.6);
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
/* ---- Видео на телефонах — фиксированный компактный размер ---- */
@media (max-width: 600px) {
  .video-wrapper {
    max-width: 350px !important;   /* тот самый размер, что ты хочешь */
    padding-bottom: 45% !important; /* высота */
    margin: 0 auto;                 /* центрируем */
  }
}

