/* GLOBAL */

html {
  min-width: 320px; /* reasonable smartphone baseline */
}

body {
  overflow-x: hidden;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Source Sans 3', sans-serif;
  background: black;
  color: white;
  overflow: auto; 
}

/* VIDEO FILTER + MASK */
#background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

.checker-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-conic-gradient(black 0% 25%, transparent 0% 50%);
  background-size: 2px 2px;
  pointer-events: none;
  z-index: 2;
}

/* Center text */
.overlay-text {
  position: relative; 
  width: 100%;
  padding: 20vh 15vw 10vh; /* отступ сверху и по бокам */
  box-sizing: border-box;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px); /* учитывать высоту хедера */
  overflow-wrap: break-word;
  z-index: 3;
}

.overlay-text h1 {
  font-family: 'Atkinson Hyperlegible Mono';
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 200;
  margin: 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
  line-height: 1.2;
}

/* BG VIDEO */
.video-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.video-container video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* HEADER */
.site-header {
  font-family: 'Space Mono', monospace;
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent;
  z-index: 10;
}

.site-header nav {
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

.site-header ul {
    display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
}

.site-header li {
  flex: 1 1 25%; /* 4 equal items */
  text-align: center;
}

.site-header a {
  font-family: 'Space Mono', monospace;
  text-decoration: none;
  color: white;
  font-size: clamp(1em, 3vw, 1.5rem);
  padding: 0.5rem 0.5rem;
  display: block;
  transition: opacity 0.2s;
}

.site-header a:hover {
  opacity: 0.6;
}


/* WORKS*/
.works-grid {
  column-count: 1;
  column-gap: 5rem;
  padding: 6rem 5vw 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .works-grid {
    column-count: 2;
  }
}

@media (min-width: 900px) {
  .works-grid {
    column-count: 3;
  }
}

.work-item {
  text-decoration: none;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: opacity 0.3s ease;
  break-inside: avoid;
  margin-bottom: 3rem;
}


.work-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.work-item h2 {
  font-family: 'Source Code Pro', monospace;
  font-size: 1rem;
  margin: 0;
  text-align: left;
}

/*WORK SINGLE */
.work-article {
  max-width: 800px;
  margin: 6rem auto 4rem;
  padding: 0 2rem;
  color: white;
}

.work-header {
  text-align: center;
  margin-bottom: 2rem;
}

.work-header h1 {
  font-size: 2rem;
  margin: 0;
}

.work-nav {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-button {
  font-family: 'Space Mono', monospace;
  color: white;
  text-decoration: none;
  border: 1px solid white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.work-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 8px;
}


/* Carousel */
.js-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 3rem 0;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  will-change: transform;
}

.carousel-item {
  flex: 0 0 100%;
  max-width: 100%;
}

.carousel-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}


.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 2rem;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s;
  border-radius: 4px;
}

.carousel-btn:hover {
  opacity: 0.6;
}

.carousel-btn.left {
  left: 10px;
}

.carousel-btn.right {
  right: 10px;
}

.carousel-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
  pointer-events: auto;
}

.dot {
  all: unset;
  width: 5px;
  height: 5px;
  display: block;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s ease;
}

.dot.active {
  background: white;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* ABOUT PAGE */
.about-page {
  padding: 6rem 2rem 4rem;
  max-width: 900px;
  margin: 0 auto;
  color: white;
}

.about-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.about-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.about-text h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
  margin-bottom: 1rem;
}


