/* Shared styles for design-portfolio and documentation-portfolio pages */

.portfolio-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portfolio-header {
  padding: 2rem 3rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-link {
  font-family: 'Degular', 'Ramabhadra', sans-serif;
  font-size: 1rem;
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.back-link:hover {
  border-bottom-color: currentColor;
}

.portfolio-title {
  font-family: 'EB Garamond', serif;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: italic;
  color: #1a1a1a;
}

.portfolio-main {
  flex: 1;
  padding: 2rem;
  width: 100%;
  max-width: 100%;
}

/* Sequential folio pages: full width, A3 landscape, small border offset via padding above */
.folio-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

/* A3 landscape = 420 × 297 mm → aspect ratio 420/297; never taller than viewport */
.folio-sheet {
  width: min(100%, calc(100vh * 420 / 297));
  max-width: 100%;
  aspect-ratio: 420 / 297;
  overflow: hidden;
  background: #e8e4df;
}

.folio-sheet img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 768px) {
  .portfolio-header,
  .portfolio-main {
    padding: 1.5rem;
  }
  .folio-stack {
    gap: 1rem;
  }
}
