/* Site header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav__name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-text);
}

.site-nav__name:hover {
  color: var(--color-text);
}

.site-nav__links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.site-nav__links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-nav__links a:hover {
  color: var(--color-text);
}

/* Site footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Site main */
.site-main {
  flex: 1;
}

/* Hero */
.hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-sm);
}

/* Featured galleries grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
}

.gallery-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.gallery-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.gallery-card__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 25%;
  background: var(--color-bg-muted);
}

.gallery-card__info {
  padding: var(--space-md);
}

.gallery-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.gallery-card__count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: var(--space-md) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

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

.breadcrumbs a:hover {
  color: var(--color-text);
}

.breadcrumbs__separator {
  margin: 0 var(--space-sm);
}

/* Gallery header */
.gallery-header {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}

.gallery-header__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

.gallery-header__description {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Justified image grid */
.justified-grid {
  line-height: 0;
  padding: 0 var(--space-md);
}

.justified-row {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.justified-row__item {
  flex: none;
  overflow: hidden;
  position: relative;
}

.justified-row__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.justified-row__item:hover img {
  opacity: 0.9;
}

/* Image page */
.image-view {
  padding-bottom: var(--space-xl);
}

.image-view__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 220px);
  height: calc(100dvh - 220px);
  min-height: 240px;
  overflow: hidden;
}

.image-view__frame {
  position: relative;
  display: flex;
  max-width: 100%;
  max-height: 100%;
}

.image-view__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  max-height: calc(100dvh - 220px);
  object-fit: contain;
}

.image-view__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: var(--space-lg) var(--space-md) var(--space-sm);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  color: #fff;
  font-size: var(--text-sm);
  font-family: var(--font-heading);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.image-view__frame:hover .image-view__caption {
  opacity: 1;
}

@media (hover: none) {
  .image-view__caption {
    opacity: 1;
  }
}

.image-view__arrow {
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  display: flex;
  align-items: center;
  font-size: 2.5rem;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s;
  user-select: none;
  z-index: 2;
}

.image-view__arrow:hover {
  opacity: 1;
}

.image-view__arrow--prev {
  left: 0;
  justify-content: flex-start;
  padding-left: var(--space-lg);
  background: linear-gradient(to right, rgba(0,0,0,0.25), transparent);
}

.image-view__arrow--next {
  right: 0;
  justify-content: flex-end;
  padding-right: var(--space-lg);
  background: linear-gradient(to left, rgba(0,0,0,0.25), transparent);
}

.image-view__info {
  display: flex;
  align-items: baseline;
  gap: var(--space-lg);
  max-width: var(--container-max);
  margin: var(--space-md) auto 0;
  padding: 0 var(--space-md);
}

.image-view__back {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.image-view__back:hover {
  color: var(--color-text);
}

.image-view__download {
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.image-view__download:hover {
  color: var(--color-text);
}

/* Folder cards (in gallery list) */
.folder-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: var(--color-text);
}

.folder-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.folder-card__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  background: var(--color-bg-muted);
}

.folder-card__info {
  padding: var(--space-md);
}

.folder-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.folder-card__count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Hero carousel */
.hero-carousel {
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
  height: 65vh;
  min-height: 320px;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
  box-sizing: border-box;
}

.hero-carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease-in-out;
}

.hero-carousel__slide {
  flex: 0 0 80vw;
  margin: 0 1vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-carousel__slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.hero-carousel__arrow {
  position: absolute;
  top: 0; bottom: 0;
  width: 20%;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2.5rem;
  line-height: 1;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
  user-select: none;
  z-index: 2;
}

.hero-carousel__arrow:hover {
  opacity: 1;
}

.hero-carousel__arrow--prev {
  left: 0;
  justify-content: flex-start;
  padding-left: var(--space-lg);
  background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
}

.hero-carousel__arrow--next {
  right: 0;
  justify-content: flex-end;
  padding-right: var(--space-lg);
  background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);
}

/* ── About Page ─────────────────────────────────────────────── */

/* --- Banner layout --- */
.about-page.about--banner .about-page__image {
  width: 100%;
  max-height: 50vh;
  overflow: hidden;
  background: transparent;
}

.about-page.about--banner .about-page__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-page.about--banner .about-page__content {
  max-width: 740px;
  margin: var(--space-xl) auto;
  padding: 0 var(--space-md);
}

/* --- Centered layout (default) --- */
.about-page.about--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl) var(--space-md);
}

.about-page.about--centered .about-page__image {
  max-width: 33vw;
  background: transparent;
  margin-bottom: var(--space-lg);
}

.about-page.about--centered .about-page__image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.about-page.about--centered .about-page__content {
  max-width: 680px;
  text-align: center;
}

/* --- Split layout --- */
.about-page.about--split {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xl);
}

.about-page.about--split .about-page__image {
  width: 25%;
  flex-shrink: 0;
  background: transparent;
}

.about-page.about--split .about-page__image img {
  width: 100%;
  height: auto;
  display: block;
}

.about-page.about--split .about-page__content {
  flex: 1;
  padding: var(--space-xl) var(--space-md) var(--space-xl) 0;
}

@media (max-width: 640px) {
  .about-page.about--split {
    flex-direction: column;
  }

  .about-page.about--split .about-page__image {
    width: 100%;
  }
}

/* --- Shared about-page content styles --- */
.about-page__name {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-size: 2rem;
}

.about-page.about--centered .about-page__name,
.about-page.about--split .about-page__name {
  margin-top: 0;
}

.about-page__bio {
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.about-page__bio h1,
.about-page__bio h2,
.about-page__bio h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.about-page__bio p {
  margin-bottom: var(--space-md);
}

.about-page__placeholder {
  color: var(--color-muted, #888);
  font-style: italic;
  margin-top: var(--space-md);
}

/* Notify-me form (app_home hero) */
.notify-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  max-width: 480px;
}

.notify-form input[type="email"] {
  flex: 1 1 200px;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 4px);
  font: inherit;
  background: var(--color-bg);
  color: var(--color-text);
}

.notify-form input[type="email"]:focus {
  outline: 2px solid var(--color-accent, #3366cc);
  outline-offset: 1px;
}

.notify-form__message {
  flex: 1 0 100%;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.notify-form__message.is-success { color: var(--color-success, #2e7d32); }
.notify-form__message.is-error   { color: var(--color-error, #c62828); }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
