/* Portfolio Template Styles */
/* Matches Clare's Art Portfolio original design */

:root {
  --primary-color: #7c3aed;
  --secondary-color: #6366f1;
  --font-family: 'Cormorant Garamond', serif;

  --bg-color: #3a3a3a;
  --text-color: #c1e7f4;
  --text-muted: #8ab4c4;

  --link-color: #c1e7f4;
  --link-hover: #bd775d;
  --nav-color: #bd775d;
  --nav-hover: #dbb4a5;
  --nav-active: #c1e7f4;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

/* Layout */
.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 3rem;
  gap: 2rem;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 350px;
}

.site-title {
  font-family: var(--font-family);
  font-size: 2.5rem;
  font-weight: normal;
  color: var(--nav-color);
  line-height: 1.2;
  text-transform: uppercase;
}

.site-title:hover {
  color: var(--nav-hover);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--link-color);
  font-size: 1rem;
}

.contact-link:hover {
  color: var(--link-hover);
}

.contact-link svg {
  opacity: 0.8;
}

/* Author Photo - full ellipse/oval like original */
.author-photo {
  margin-top: 1rem;
  max-width: 280px;
}

.author-photo img {
  border: 3px solid #aaa;
  border-radius: 50%;
}

/* Navigation - Horizontal album thumbnails */
.header-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-album {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.nav-album:hover {
  transform: translateY(-2px);
}

.nav-album-name {
  font-family: var(--font-family);
  font-size: 0.95rem;
  color: var(--nav-color);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  text-align: center;
  transition: color 0.2s ease;
}

.nav-album:hover .nav-album-name {
  color: var(--nav-hover);
}

.nav-album.active .nav-album-name {
  color: var(--nav-active);
}

.nav-album-thumb {
  width: 110px;
  height: 130px;
  object-fit: contain;
  border-radius: 12px;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
}

/* Center welcome message on homepage */
.main-content:has(.welcome-message) {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Gallery pages need full width */
.main-content:has(.gallery-section) {
  padding: 0;
}

/* Welcome Message */
.welcome-message {
  text-align: center;
  max-width: 800px;
}

.tagline {
  font-family: var(--font-family);
  font-size: 1.75rem;
  font-style: italic;
  color: var(--nav-color);
  line-height: 1.4;
}

/* Album Page */
.album-header {
  padding: 1rem 3rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb-sep {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-color);
}

.page-title {
  font-family: var(--font-family);
  font-size: 2rem;
  font-weight: normal;
  color: var(--nav-color);
  text-transform: uppercase;
}

.album-description {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Gallery Section */
.gallery-section {
  padding: 1rem 3rem 3rem;
}

/* Justified Gallery (Collage Plus style) */
.collage {
  padding: 1px;
}

.image-wrapper {
  display: inline-block;
  margin: 2px;
  opacity: 0;
  transition: opacity 0.4s ease;
  cursor: pointer;
  vertical-align: bottom;
}

.image-wrapper.loaded {
  opacity: 1;
}

.collage-image {
  display: block;
  vertical-align: bottom;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  border: 2px solid #555;
  transition: border-color 0.2s ease, transform 0.2s ease;
  object-fit: contain;
}

.image-wrapper:hover .collage-image {
  border-color: var(--nav-hover);
  transform: scale(1.01);
}

/* About Page */
.about-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.about-content {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.about-image {
  width: 200px;
  min-width: 200px;
}

.about-image img {
  border-radius: 8px;
}

.about-text {
  flex: 1;
  line-height: 1.8;
}

.about-text p {
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-family);
  font-size: 1.5rem;
  color: var(--nav-color);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.contact-info a {
  display: block;
  margin-bottom: 0.5rem;
}

/* Empty State */
.empty-section {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

/* Album Slot Styles */
.album-slot {
  width: 100%;
}

/* Single/Hero Layout */
.album-slot--single {
  margin-bottom: 2rem;
}

.album-feature {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.album-feature__image-wrapper {
  position: absolute;
  inset: 0;
}

.album-feature__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.album-feature:hover .album-feature__image {
  transform: scale(1.03);
}

/* Placeholder styles for missing cover images */
.album-card__placeholder,
.album-feature__placeholder,
.carousel__placeholder,
.album-list-item__placeholder,
.nav-album__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #333;
  color: #666;
  font-size: 3rem;
}

.album-list-item__placeholder {
  width: 80px;
  height: 60px;
  font-size: 1.5rem;
  border-radius: 6px;
}

.album-feature__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: white;
}

.album-feature__title {
  font-family: var(--font-family);
  font-size: 2rem;
  font-weight: normal;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  color: var(--nav-color);
  text-transform: uppercase;
}

.album-feature__description {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 500px;
  margin-bottom: 0.75rem;
}

.album-feature__cta {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.album-feature:hover .album-feature__cta {
  opacity: 1;
}

/* Grid Layout */
.album-slot--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* List Layout */
.album-slot--list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.album-list-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid #555;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.album-list-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--nav-hover);
}

.album-list-item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.album-list-item__thumb {
  width: 80px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #666;
}

.album-list-item__name {
  font-weight: 500;
  color: var(--nav-color);
  flex: 1;
}

.album-list-item__count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .album-feature {
    aspect-ratio: 16 / 9;
  }

  .album-feature__title {
    font-size: 1.5rem;
  }

  .album-feature__overlay {
    padding: 1.5rem;
  }
}

/* Footer */
.site-footer {
  padding: 1rem 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 2.5rem;
  padding: 1rem;
  transition: opacity 0.2s ease;
  z-index: 10;
  opacity: 0.7;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: 0.5rem;
  right: 0.5rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

.lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-caption {
  color: white;
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-left {
    align-items: center;
    max-width: 100%;
  }

  .header-nav {
    justify-content: center;
  }

  .nav-album-thumb {
    width: 90px;
    height: 90px;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 1.5rem;
  }

  .site-title {
    font-size: 1.75rem;
  }

  .author-photo {
    max-width: 200px;
  }

  .header-nav {
    gap: 0.75rem;
  }

  .nav-album-name {
    font-size: 0.8rem;
  }

  .nav-album-thumb {
    width: 70px;
    height: 70px;
  }

  .tagline {
    font-size: 1.25rem;
  }

  .gallery-section,
  .album-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .about-content {
    flex-direction: column;
    align-items: center;
  }

  .about-image {
    width: 150px;
    min-width: 150px;
  }
}
