/* Portfolio page specific styles */
.portfolio-page {
  background: var(--bg);
  padding: 0;
}

/* Instagram-style grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 0;
  margin: 0;
}

.portfolio-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--card);
  width: 100%;
  height: auto;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity 0.2s ease;
}

.portfolio-item:active {
  opacity: 0.8;
}

/* Full-screen viewer */
.fullscreen-viewer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fullscreen-viewer.active {
  display: block;
  opacity: 1;
}

.viewer-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(11,11,11,0.9), transparent);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  z-index: 1001;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.close-btn:active {
  opacity: 0.7;
  transform: scale(.9);
}

.photo-scroll-container {
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding-top: 0;
  margin-top: 60px;
  scroll-behavior: smooth;
}

.photo-item {
  width: 100%;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.photo-item img {
  max-width: 100%;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  border-radius: 8px;
}

/* Mobile optimizations */
@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
  }
  
  .viewer-header {
    height: 50px;
    padding: 0 16px;
  }
  
  .close-btn {
    font-size: 28px;
  }
  
  .photo-scroll-container {
    height: calc(100vh - 50px);
    margin-top: 50px;
  }
  
  .photo-item {
    min-height: auto;
    padding: 10px;
  }
  
  .photo-item img {
    max-height: 80vh;
    width: auto;
  }
}
/* Loading indicator */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--ring-weak);
  border-top: 3px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}
