/* Clean project detail styles */
.project-page {
  padding: 120px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-page-wide {
  max-width: none;
  margin: 0;
  padding-left: 40px;
  padding-right: 40px;
}

.project-title {
  font-family: 'Helvetica', sans-serif;
  font-size: 80px;
  text-transform: none;
  letter-spacing: 1px;
  margin: 0;
  font-weight: 400;
  color: #fff;
  text-align: left;
}

.project-page-wide .project-title {
  font-size: 180px;
}

.project-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: last baseline;
  margin-bottom: 10px;
  width: 100%;
}

.project-header .project-description {
  text-align: left;
  max-width: 900px;
  margin: 0;
  margin-right: 10%;
}

.project-header .project-description p {
  margin: 0;
}

.project-header .project-title {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
}

.project-header .project-description {
  margin-bottom: 0 !important;
}

.project-video {
  width: 100%;
  margin-top: 120px;
  margin-bottom: 60px;
}

.project-video video {
  width: 100%;
  height: auto;
  display: block;
  filter: none;
  box-shadow: none;
  border: none;
  background: none;
}

.project-video-autoplay {
  width: 100%;
  margin-top: 120px;
  margin-bottom: 60px;
}

.project-video-autoplay + .project-video-row,
.project-video-autoplay + .project-video-autoplay {
  margin-top: 0;
}

.project-video-autoplay video {
  width: 100%;
  height: auto;
  display: block;
  filter: none;
  box-shadow: none;
  border: none;
  background: none;
}

.project-video-row {
  display: flex;
  gap: 20px;
  margin-bottom: 60px;
  width: 100%;
}

.project-video-small {
  flex: 1;
  width: 100%;
}

.project-video-row:has(.project-video-small:only-child) .project-video-small {
  max-width: 33.33%;
}

.project-video-small video {
  width: 100%;
  height: auto;
  display: block;
  filter: none;
  box-shadow: none;
  border: none;
  background: none;
}

.project-video-row-portrait .project-video-small {
  aspect-ratio: 1136 / 1624;
}

.project-video-row-portrait .project-video-small video {
  height: 100%;
  object-fit: cover;
}

.project-video-offset-left {
  width: 33.33%;
  margin-left: 0;
  margin-right: auto;
}


/* Custom Video Player Styles */
.custom-video-player {
  position: relative;
  width: 100%;
  height: auto;
  background: #000;
}

.custom-video-player video {
  width: 100%;
  height: auto;
  display: block;
}

.custom-video-player video::-webkit-media-controls {
  display: none !important;
}

.custom-video-player video::-moz-media-controls {
  display: none !important;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.video-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.play-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.play-button::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 20px solid #000;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 4px;
}

/* Video Controls Bar */
.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 20px 15px 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 15px;
  pointer-events: none;
}

.custom-video-player:hover .video-controls {
  opacity: 1;
  pointer-events: auto;
}

.custom-video-player.playing .video-controls {
  opacity: 0;
  pointer-events: none;
}

.custom-video-player.playing:hover .video-controls {
  opacity: 1;
  pointer-events: auto;
}

/* Progress Bar */
.progress-container {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0;
  cursor: pointer;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: #fff;
  border-radius: 0;
  width: 0%;
  transition: width 0.1s ease;
}

.progress-container:hover {
  height: 8px;
  margin: -1px 0;
}

.progress-container:hover .progress-bar {
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Control Buttons */
.control-btn {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

/* Fullscreen Icon - Expand squares */
.fullscreen-btn {
  position: relative;
}

.fullscreen-btn::before,
.fullscreen-btn::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border: 1.5px solid #000;
}

.fullscreen-btn::before {
  top: 4px;
  left: 4px;
  border-bottom: none;
  border-right: none;
}

.fullscreen-btn::after {
  bottom: 4px;
  right: 4px;
  border-top: none;
  border-left: none;
}

/* Play/Pause Button in Controls */
.play-pause-btn::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 6px solid #000;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: 1px;
  transition: all 0.3s ease;
}

.play-pause-btn.paused::before {
  border-left: 6px solid #000;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: 1px;
}

.play-pause-btn.playing::before {
  border-left: none;
  border-top: none;
  border-bottom: none;
  width: 6px;
  height: 8px;
  background: linear-gradient(to right, #000 0%, #000 30%, transparent 30%, transparent 70%, #000 70%, #000 100%);
  margin-left: 0;
}

/* Fullscreen state styles */
.custom-video-player:fullscreen {
  width: 100vw;
  height: 100vh;
  background: #000;
}

.custom-video-player:fullscreen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Time Display */
.time-display {
  color: #fff;
  font-size: 12px;
  font-family: monospace;
  white-space: nowrap;
  min-width: 80px;
  text-align: center;
}


.project-video video::-webkit-media-controls {
  filter: none;
  background: transparent;
}

.project-video video::-webkit-media-controls-panel {
  background: transparent;
  background-image: none;
}

.project-video video::-webkit-media-controls-enclosure {
  background: transparent;
  background-image: none;
}

.project-description {
  font-size: 18px;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 40px;
  text-align: center;
  max-width: 70%;
  margin-left: auto;
  margin-right: auto;
}

.project-page-wide .project-description {
  font-size: 22px;
}

.project-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.detail-section h3 {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
  font-weight: 400;
  color: #fff;
}

.detail-section p {
  font-size: 14px;
  line-height: 1.6;
  color: #aaa;
}

.project-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 40px;
}

.nav-link {
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0.5px;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  opacity: 0.7;
}

.process-title {
  font-size: 19.2px;
  text-transform: none;
  letter-spacing: 1px;
  margin-bottom: 30px;
  margin-top: 100px;
  font-weight: 400;
  color: #fff;
  text-align: left;
}

.project-page-wide .process-title {
  font-size: 25.6px;
}

.project-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  margin-bottom: 60px;
  width: 100%;
}

/* Two column layout when there are only 2 items */
.project-thumbnails:has(.thumbnail-item:nth-child(2):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

.thumbnail-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #000;
  border: none;
  outline: none;
  position: relative;
}

.thumbnail-item img,
.thumbnail-item video {
  width: 101%;
  height: 101%;
  object-fit: cover;
  display: block;
  border: none;
  outline: none;
  box-shadow: none;
  background: #000;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.02);
}

/* Responsive */
@media (max-width: 768px) {
  .project-page {
    padding: 80px 20px 40px;
  }

  .project-title,
  .project-page-wide .project-title {
    font-size: 10vw;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 20px;
  }

  .project-header .project-description {
    text-align: left !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .project-video,
  .project-video-autoplay {
    margin-top: 40px;
  }

  .project-thumbnails {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .project-navigation {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

/* Hide controls for autoplay videos */
video[autoplay]::-webkit-media-controls {
  display: none !important;
}
video[autoplay]::-moz-media-controls {
  display: none !important;
}
video[autoplay]::-webkit-media-controls-panel {
  display: none !important;
}
video[autoplay] {
  pointer-events: none;
}

