/* ===============================
   1. Базовые сбросы и фон сайта
   =============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #f4f0e8
    url("https://www.transparenttextures.com/patterns/paper-fibers.png");
  background-size: 300px 300px;
  background-blend-mode: multiply;
  color: #333;
}

body.show-content {
  opacity: 1;
  transform: translateY(0);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.2);
  z-index: 0;
}

/* ===============================
   2. Интро-анимация (canvas)
   =============================== */
#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 9999;
  transform: translateY(0%);
  transition: transform 1.5s ease-in-out;
}

#canvas::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
}

/* ===============================
   3. Левое меню
   =============================== */
header.left {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  background: #fdfcf7;
  border-right: 1px solid #666666;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  z-index: 10;
}

.logo img {
  width: 100px;
  height: auto;
}

.menu {
  margin-top: 100px;
}

.menu ul {
  list-style: none;
}

.menu li {
  margin: 20px 0;
}

.menu a {
  color: #080808;
  text-decoration: none;
  font-size: 23px;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: #000000;
}

/* ===============================
   4. Контент
   =============================== */
.content {
  margin-left: 250px;
}

section {
  min-height: 100vh;
  padding: 60px;
  box-sizing: border-box;
}

#intro {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 1.5s ease forwards;
}

.intro-text {
  text-align: center;
  font-family: "Belanosima", sans-serif;
  font-size: clamp(35px, 5vw, 70px);
  line-height: 1.3;
  font-weight: 600;
}

/* ===============================
   5. Сетка проектов
   =============================== */

#projects h2 {
  font-size: 2.5rem; /* размер заголовка */
  font-weight: 600;   /* при желании */
  font-family: "Belanosima", sans-serif; /* шрифт */
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-top: 40px;
}


.project-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background-image: url("giorgio-trovato-EzoWfKqTaxk-unsplash.jpg");
  background-size: 300% 200%;
  background-repeat: no-repeat;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-card .front,
.project-card .back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.4s ease;
}

.project-card .front {
  font-family: "Belanosima", sans-serif;
  font-size: 20px; /* вот здесь размер шрифта */
  z-index: 2;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.project-card:nth-child(1) {
  background-position: 0% 0%;
}
.project-card:nth-child(2) {
  background-position: 50% 0%;
}
.project-card:nth-child(3) {
  background-position: 100% 0%;
}
.project-card:nth-child(4) {
  background-position: 0% 100%;
}
.project-card:nth-child(5) {
  background-position: 50% 100%;
}
.project-card:nth-child(6) {
  background-position: 100% 100%;
}

.project-card .back {
  opacity: 0;
  z-index: 1;
  background: transparent;
}

.project-card iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.project-card:hover .front {
  opacity: 0;
}
.project-card:hover .back {
  opacity: 1;
  z-index: 3;
}

/* ===============================
   6. Анимации текста
   =============================== */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.letter {
  opacity: 0;
  display: inline-block;
  transform: translateY(20px);
  animation: letterFade 0.5s forwards;
}

@keyframes letterFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================
   7. Контакты
   =============================== */
#contacts {
  font-size: 26px;
  display: flex;
  flex-direction: column; /* ставим элементы вертикально */
  align-items: center; /* горизонтальное центрирование */
  justify-content: flex-start; /* вертикально сверху */
  width: 100%;
  text-align: center;
  padding: 40px 0;
}

.contacts-inline {
  font-size: 20px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  font-size: 1.05rem;
}

.contact-link {
  color: #000000;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.12s ease;
  font-weight: 500;
}

.contact-link:hover {
  color: #000;
  background: #c4c4c4;
  transform: translateY(-2px);
}

.sep {
  color: #666;
  user-select: none;
}

/* ===============================
   8. Газетный стиль
   =============================== */
.newspaper {
  padding: 60px;
  font-family: "Merriweather", Georgia, serif;
  color: #222;
  line-height: 1.7;
}

.newspaper-content {
  max-width: 1000px;
  margin: 0 auto;
}

.newspaper-headline {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.newspaper-meta {
  text-align: center;
  font-size: 0.9rem;
  font-style: italic;
  color: #555;
  margin-bottom: 40px;
}

.newspaper-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.column.narrow h3 {
  text-align: center;
}

.newspaper-columns p {
  margin-bottom: 20px;
  text-align: justify;
}

.first-letter {
  font-size: 3.5rem;
  font-weight: bold;
  float: left;
  line-height: 1;
  margin-right: 8px;
  color: #000;
}

.newspaper-quote {
  font-style: italic;
  padding: 15px 20px;
  border-left: 4px solid #333;
  background: rgba(0, 0, 0, 0.03);
  margin: 20px 0;
  font-size: 1.1rem;
}

/* ===============================
   9. Опыт и обязанности
   =============================== */
.experience-list,
.duties-list {
  padding-left: 18px;
  margin-top: 0;
}

.experience-list li,
.duties-list li {
  margin-bottom: 5px;
  font-size: 0.9em;
}

.experience-list span {
  color: #666;
  font-size: 0.8em;
}

/* ===============================
   10. Таймлайн
   =============================== */
.timeline {
  position: relative;
  padding-left: 30px;
  border-left: 2px solid #ccc;
  margin-top: 15px;
}

.timeline-item {
  position: relative;
  margin-bottom: 25px;
}

.timeline-date {
  font-weight: bold;
  color: #444;
  font-size: 0.9em;
  margin-bottom: 3px;
}

.timeline-item h4 {
  font-size: 1em;
  margin: 0 0 5px;
}

.timeline-item ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85em;
}

.timeline-item ul li {
  margin-bottom: 3px;
}

/* ===============================
   11. Адаптив
   =============================== */
@media (max-width: 1000px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .newspaper-columns {
    grid-template-columns: 1fr;
  }
  .newspaper-headline {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Вкладка обо мне */

.newspaper-columns {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr;
  gap: 20px;
}

#about {
  position: relative; /* чтобы позиционировать внутри секции */
}

.headline-row {
  display: flex;
  justify-content: space-between; /* заголовок влево, кнопка вправо */
  align-items: center;
}

.newspaper-headline {
  margin: 0;
}

.resume-inline {
  margin-left: auto; /* ← заставляет кнопку прижаться вправо */
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #000000, #444444);
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.resume-inline:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #222222, #666666);
}

.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 100;
}

.lang-btn {
  padding: 6px 12px;
  border: 1px solid #333;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  border-radius: 4px;
  transition: background 0.2s;
}

.lang-btn:hover {
  background: #f0f0f0;
}

.lang-btn.active {
  background: #333;
  color: #fff;
}

h2, p {
  user-select: text;  /* нельзя выделять текст */
  outline: none;      /* убирает контур при фокусе */
  caret-color: transparent; /* скрывает мигающий курсор */
}