@font-face {
  font-family: 'Booklet';
  src: url('https://raw.githubusercontent.com/geosapozhkov/georgii/main/BookletSans-regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

body {
  background: #FAFAFA;
  font-family: 'Booklet', sans-serif;
  color: #ACACAC;
  min-height: 100vh;
  cursor: none !important; /* Скрываем стандартный курсор */
}

/* Убираем все стандартные курсоры - везде только точка */
*,
*::before,
*::after {
  cursor: none !important;
}

/* Особенно важно для iframe Vimeo */
iframe,
iframe *,
[data-vimeo-id],
[data-vimeo-id] * {
  cursor: none !important;
}

/* Дополнительные правила для macOS */
html,
body,
a,
button,
input,
select,
textarea,
div,
span,
p,
h1, h2, h3, h4, h5, h6,
img,
video {
  cursor: none !important;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Кастомный курсор - точка */
#custom-cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: #ACACAC;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
  display: none; /* Скрыт по умолчанию, показывается через JS */
}

/* Показываем курсор только на десктопе */
@media (min-width: 640px) {
  #custom-cursor {
    display: block;
  }
}

/* Override Tailwind text color classes to use #ACACAC */
.text-gray-600,
.text-gray-500,
.text-gray-400,
.text-gray-300,
.text-gray-200,
.text-gray-100 {
  color: #ACACAC !important;
}

/* Ensure all text elements use the specified color */
h1, h2, h3, h4, h5, h6,
p, span, div, a, button,
nav, footer, header {
  color: #ACACAC;
}

/* Allow images and videos to keep their natural appearance */
img, video {
  color: inherit;
}

/* Стили для fullwidth элементов - занимают всю ширину сетки */
.col-span-12 {
  grid-column: span 12 / span 12 !important;
  width: 100% !important;
}

@media (min-width: 640px) {
  .sm\:col-span-6 {
    grid-column: span 6 / span 6 !important;
  }
}

@media (min-width: 768px) {
  .md\:col-span-12 {
    grid-column: span 12 / span 12 !important;
    width: 100% !important;
  }
  
  /* Позиционирование элементов по data-атрибуту на десктопе */
  [data-grid-start="1"] { grid-column-start: 1 !important; }
  [data-grid-start="2"] { grid-column-start: 2 !important; }
  [data-grid-start="3"] { grid-column-start: 3 !important; }
  [data-grid-start="4"] { grid-column-start: 4 !important; }
  [data-grid-start="5"] { grid-column-start: 5 !important; }
  [data-grid-start="6"] { grid-column-start: 6 !important; }
  [data-grid-start="7"] { grid-column-start: 7 !important; }
  [data-grid-start="8"] { grid-column-start: 8 !important; }
  [data-grid-start="9"] { grid-column-start: 9 !important; }
  [data-grid-start="10"] { grid-column-start: 10 !important; }
  [data-grid-start="11"] { grid-column-start: 11 !important; }
  [data-grid-start="12"] { grid-column-start: 12 !important; }
}

/* =============== СТИЛИ ДЛЯ ОБЛОЖЕК ПРОЕКТОВ =============== */

/* Контейнер карточки проекта */
.project-card {
  border: 1px solid #E5E5E5;
  overflow: hidden;
  background: white;
  position: relative;
}

/* Контейнер изображения обложки */
.project-cover-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: transparent;
}

.project-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Оверлей для текста (настраиваемый) */
.project-cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

/* Вариант 1: Минималистичный - без оверлея, текст снизу */
.project-cover-style-minimal .project-cover-overlay {
  background: transparent;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 16px;
}

.project-cover-style-minimal .project-cover-title {
  color: #ACACAC;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  font-size: 1.25rem;
  font-weight: normal;
  text-align: left;
}

/* Вариант 2: Классический - полупрозрачный оверлей, текст по центру */
.project-cover-style-classic .project-cover-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.project-cover-style-classic .project-cover-title {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  padding: 0 16px;
}

/* Вариант 3: Тонкий оверлей - легкий градиент снизу */
.project-cover-style-gradient .project-cover-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
}

.project-cover-style-gradient .project-cover-title {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: left;
  padding: 0;
}

/* Вариант 4: Без текста на обложке - только изображение */
.project-cover-style-image-only .project-cover-overlay {
  display: none;
}

/* Заголовок проекта */
.project-cover-title {
  margin: 0;
  line-height: 1.2;
  word-wrap: break-word;
}

/* Плейсхолдер для отсутствующей обложки */
.project-cover-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #ACACAC;
}

/* =============== СТИЛИ ДЛЯ ОПИСАНИЙ =============== */
.description-text {
  line-height: 1.1;
  color: #ACACAC;
}

/* Стили для описания на странице About me - десктоп */
#bio {
  position: absolute;
  left: calc(40% + 200px);
  width: calc(60% - 200px - 220px);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 0.3rem;
  box-sizing: border-box;
}

/* Скрыть мобильную версию на десктопе и планшете */
#bio-mobile {
  display: none;
}

/* Убедиться, что на планшетах мобильная версия скрыта */
@media (min-width: 640px) {
  #bio-mobile {
    display: none !important;
  }
  
  #bio-container {
    display: none !important;
  }
}

/* Стили для навигации на главной странице */
#top-nav {
  margin-top: 0 !important;
  padding-top: 0;
}

/* Стили для описания на странице проекта */
#project-description {
  width: 60%;
  padding-left: 1.5rem;
  padding-right: 0;
  box-sizing: border-box;
}

/* Стили для breadcrumb на странице проекта - скрыт на десктопе и планшете */
#breadcrumb {
  align-items: baseline;
  display: none !important;
}

/* Показать breadcrumb только на мобильной версии */
@media (max-width: 639px) {
  #breadcrumb {
    display: flex !important;
  }
}

/* Стили для HomeContent */
#home-content-container {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 155px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Центрирование HomeContent для экранов 16:10 и других широких экранов */
@media (min-width: 640px) and (min-aspect-ratio: 16/10) {
  #home-content-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    z-index: 1;
  }
}

#home-content-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80vw;
  max-width: 1200px;
  height: 70vh;
  position: relative;
  overflow: hidden;
}

#home-content-item img,
#home-content-item video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Скрываем нативные элементы управления видео */
#home-content-item video::-webkit-media-controls {
  display: none !important;
}

#home-content-item video::-webkit-media-controls-enclosure {
  display: none !important;
}

#home-content-item video::-webkit-media-controls-panel {
  display: none !important;
}

#home-content-item video::-webkit-media-controls-play-button {
  display: none !important;
}

#home-content-item video::-webkit-media-controls-start-playback-button {
  display: none !important;
}

#home-content-item video::-webkit-media-controls-fullscreen-button {
  display: none !important;
}

/* Для Firefox */
#home-content-item video::-moz-media-controls {
  display: none !important;
}

/* Предотвращаем полноэкранный режим через CSS */
#home-content-item video {
  -webkit-touch-callout: none; /* Отключаем контекстное меню на iOS */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  touch-action: none; /* Отключаем жесты на мобильных */
}

/* =============== МОБИЛЬНАЯ ВЕРСИЯ (до 640px) =============== */
@media (max-width: 639px) {
  /* Блокировка скролла только на мобильных устройствах для главной страницы */
  body.home-page {
    height: 100%;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  html.home-page {
    height: 100%;
    overflow: hidden;
  }
  /* Главная страница - адаптация header */
  body > header {
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
  }
  
  /* Логотип на мобильных */
  #logo {
    margin-bottom: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Описание About me на мобильных - скрыть десктопную версию */
  #bio {
    display: none !important;
  }
  
  /* Показать мобильную версию */
  #bio-mobile {
    display: block !important;
  }
  
  /* Описание About me на мобильных */
  #bio-container {
    flex-direction: column !important;
  }
  
  #bio-container > div:first-child {
    width: 0 !important;
    display: none !important;
  }
  
  #bio-container > div:last-child {
    width: 100% !important;
  }
  
  #bio-mobile {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 1rem;
  }
  
  /* Навигация на мобильных - вертикально в правом верхнем углу */
  #top-nav {
    margin-left: 0 !important;
    margin-top: 0 !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 0 !important;
  }
  
  #top-nav button,
  #top-nav a {
    display: block;
    line-height: 1.2;
    white-space: nowrap;
  }
  
  /* Страница проекта - скрыть breadcrumb навигацию на мобильных */
  body > header #breadcrumb {
    display: none !important;
  }
  
  /* Заголовок проекта на мобильных */
  #project-title {
    margin-bottom: 0.5rem;
    margin-right: 0 !important;
  }
  
  /* Навигация Back to Home на мобильных */
  body > header #top-nav {
    position: static !important;
    left: auto !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    margin-top: 0.5rem;
    white-space: nowrap !important;
  }
  
  body > header #top-nav a {
    white-space: nowrap !important;
  }
  
  /* Контейнер описания проекта на мобильных */
  main > div.flex.items-baseline {
    flex-direction: column !important;
  }
  
  main > div.flex.items-baseline > div:first-child {
    width: 0 !important;
    display: none !important;
  }
  
  main > div.flex.items-baseline > div:last-child {
    width: 100% !important;
  }
  
  /* Описание проекта на мобильных */
  #project-description {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 1rem;
  }
  
  /* HomeContent на мобильных - центрирование по вертикали */
  #home-content-container {
    margin-top: 0 !important;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    margin-left: 0;
    margin-right: 0;
    z-index: 1;
  }
  
  #home-content-item {
    width: 90vw;
    height: 60vh;
  }
  
  /* Все картинки и видео на мобильных занимают все 4 колонки */
  #file-grid > div,
  #projects-list > div {
    grid-column: span 4 / span 4 !important;
    width: 100% !important;
  }
}

/* =============== VIMEO VIDEO INDICATOR =============== */
.vimeo-video-container {
  position: relative;
}

.vimeo-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(26, 183, 234, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  z-index: 10;
  pointer-events: none;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Чтобы скрыть индикатор, раскомментируйте следующую строку: */
/* .vimeo-indicator { display: none !important; } */

/* Скрываем стандартный UI Vimeo внутри iframe */
.vimeo-video-container iframe {
  pointer-events: auto;
}

/* Скрываем нативные элементы управления Vimeo через CSS (если они все еще видны) */
.vimeo-video-container iframe[src*="vimeo.com"] {
  /* Vimeo использует iframe, поэтому мы не можем напрямую скрыть их UI через CSS */
  /* Но параметры в URL должны скрыть все элементы управления */
}

