/*
 * Scoped presentation for the photo archive. It inherits typography and
 * colors from the active theme wherever possible.
 */
.eric-gallery,
.eric-gallery-photo {
	--eric-gallery-ink: var(--eric-ink, #292b2b);
	--eric-gallery-muted: var(--eric-muted, #666b68);
	--eric-gallery-line: var(--eric-line, #d8d8d1);
	--eric-gallery-paper: var(--eric-surface, #fbfaf7);
	--eric-gallery-accent: var(--eric-burgundy, #8f002d);
	color: var(--eric-gallery-ink);
}

.eric-gallery {
	margin: 0 auto;
	max-width: 1180px;
}

.eric-gallery__header {
	position: relative;
	margin: 0 0 clamp(1.25rem, 3vw, 2.35rem);
	padding: 0 0 1rem;
	border-bottom: 1px solid var(--eric-gallery-line);
}

.eric-gallery__eyebrow,
.eric-gallery__sequence,
.eric-slideshow__counter,
.eric-slideshow__position {
	margin: 0;
	color: var(--eric-gallery-muted);
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .095em;
	line-height: 1.45;
	text-transform: uppercase;
}

.eric-gallery__title {
	max-width: 18ch;
	margin: .3rem 0 .45rem;
	color: inherit;
	font-family: inherit;
	font-size: clamp(1.65rem, 4vw, 2.6rem);
	font-weight: 700;
	letter-spacing: -.035em;
	line-height: 1.08;
}

.eric-gallery__count {
	margin: 0;
	color: var(--eric-gallery-muted);
	font-size: .88rem;
}

.eric-gallery__slideshow-link {
	position: absolute;
	right: 0;
	bottom: 1rem;
	padding: .55rem .8rem;
	border: 1px solid var(--eric-gallery-line);
	font-size: .86rem;
	font-weight: 700;
	text-decoration: none;
}

.eric-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.7rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.eric-gallery__item {
	min-width: 0;
}

.eric-gallery__card {
	height: 100%;
	background: var(--eric-gallery-paper);
	border: 1px solid var(--eric-gallery-line);
}

.eric-gallery__image-link {
	display: block;
	overflow: hidden;
	background: color-mix(in srgb, var(--eric-gallery-line) 45%, transparent);
}

.eric-gallery__image {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .35s ease;
}

.eric-gallery__image-link:hover .eric-gallery__image,
.eric-gallery__image-link:focus-visible .eric-gallery__image {
	transform: scale(1.025);
}

.eric-gallery__card-copy {
	padding: .95rem 1rem 1.1rem;
}

.eric-gallery__sequence {
	margin-bottom: .45rem;
	font-variant-numeric: tabular-nums;
}

.eric-gallery__card-title {
	margin: 0;
	font-family: inherit;
	font-size: clamp(1rem, 1.4vw, 1.22rem);
	font-weight: 700;
	letter-spacing: -.015em;
	line-height: 1.35;
}

.eric-gallery__card-title a {
	color: inherit;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
	transition: color .2s ease, text-decoration-color .2s ease;
}

.eric-gallery__card-title a:hover,
.eric-gallery__card-title a:focus-visible {
	color: var(--eric-gallery-accent);
	text-decoration-color: currentColor;
}

.eric-gallery__caption {
	margin: .55rem 0 0;
	color: var(--eric-gallery-muted);
	font-size: .9rem;
	line-height: 1.55;
}

.eric-gallery__missing {
	display: grid;
	min-height: 10rem;
	place-items: center;
	padding: 1.25rem;
	color: var(--eric-gallery-muted);
	background: color-mix(in srgb, var(--eric-gallery-line) 24%, var(--eric-gallery-paper));
	border-bottom: 1px solid var(--eric-gallery-line);
	font-size: .92rem;
	text-align: center;
}

.eric-gallery__protected {
	display: grid;
	min-height: 10rem;
	place-items: center;
	margin: 0;
	padding: 1.25rem;
	color: var(--eric-gallery-muted);
	background: color-mix(in srgb, var(--eric-gallery-line) 24%, var(--eric-gallery-paper));
	font-size: .9rem;
	text-align: center;
}

.eric-gallery__protected--large {
	min-height: 50vh;
}

.eric-gallery__pagination {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 1rem;
	margin-top: clamp(1.6rem, 4vw, 3rem);
	padding-top: 1rem;
	border-top: 1px solid var(--eric-gallery-line);
}

.eric-gallery__pagination p {
	margin: 0;
	color: var(--eric-gallery-muted);
	font-size: .85rem;
	font-variant-numeric: tabular-nums;
}

.eric-gallery__page-link {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-weight: 700;
	text-decoration: none;
}

.eric-gallery__page-link--next {
	justify-self: end;
}

.eric-gallery__empty {
	padding: clamp(1.5rem, 4vw, 3rem);
	background: var(--eric-gallery-paper);
	border: 1px solid var(--eric-gallery-line);
}

.eric-gallery__empty h3 {
	margin: 0 0 .4rem;
	font-size: 1.35rem;
}

.eric-gallery__empty p {
	margin: 0;
	color: var(--eric-gallery-muted);
}

.eric-gallery-link {
	font-weight: 700;
}

.eric-gallery-single-layout {
	width: min(var(--eric-width, 1110px), calc(100% - 36px));
	margin: 0 auto;
}

.eric-gallery-photo {
	padding: clamp(1rem, 3vw, 1.65rem);
	background: var(--eric-gallery-paper);
	border: 1px solid var(--eric-gallery-line);
}

.eric-gallery-photo__back {
	margin: 0 0 1rem;
	font-size: .88rem;
	font-weight: 700;
}

.eric-gallery-photo__title {
	margin-bottom: 1.25rem;
}

.eric-gallery-photo__figure {
	margin: 0;
}

.eric-gallery-photo__image {
	display: block;
	width: 100%;
	max-height: min(78vh, 940px);
	object-fit: contain;
	background: color-mix(in srgb, var(--eric-gallery-line) 20%, var(--eric-gallery-paper));
}

.eric-gallery-photo__caption {
	margin-top: .8rem;
	color: var(--eric-gallery-muted);
	font-size: .93rem;
}

.eric-gallery-photo__content {
	margin-top: 1.2rem;
}

.eric-gallery-photo__missing {
	border: 1px solid var(--eric-gallery-line);
}

.eric-gallery-photo__navigation {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1rem;
	margin-top: 1.8rem;
	padding-top: 1rem;
	border-top: 1px solid var(--eric-gallery-line);
}

.eric-gallery-photo__nav-link {
	display: grid;
	gap: .25rem;
	min-width: 0;
	font-weight: 700;
	text-decoration: none;
}

.eric-gallery-photo__nav-link--next {
	text-align: right;
}

.eric-gallery-photo__nav-label {
	color: var(--eric-gallery-muted);
	font-size: .76rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.eric-gallery-photo__comments {
	margin-top: 1.5rem;
}

.eric-gallery--slideshow {
	width: min(1180px, calc(100% - 32px));
}

.eric-slideshow__topline,
.eric-slideshow__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.eric-slideshow__topline {
	margin-bottom: 1rem;
}

.eric-slideshow__back {
	font-weight: 700;
}

.eric-slideshow__figure {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(220px, .65fr);
	align-items: center;
	gap: clamp(1.25rem, 4vw, 3.5rem);
	margin: 0;
	padding: clamp(.75rem, 2vw, 1.5rem);
	background: var(--eric-gallery-paper);
	border: 1px solid var(--eric-gallery-line);
}

.eric-slideshow__image {
	display: block;
	width: 100%;
	max-height: min(72vh, 860px);
	object-fit: contain;
}

.eric-slideshow__caption h1 {
	margin: .5rem 0 .8rem;
	font-family: inherit;
	font-size: clamp(1.4rem, 3vw, 2.25rem);
	letter-spacing: -.03em;
	line-height: 1.16;
}

.eric-slideshow__caption h1 a {
	color: inherit;
	text-decoration: none;
}

.eric-slideshow__description {
	color: var(--eric-gallery-muted);
	font-size: .96rem;
	line-height: 1.65;
}

.eric-slideshow__controls {
	margin-top: 1rem;
}

.eric-slideshow__control {
	display: inline-flex;
	align-items: center;
	gap: .65rem;
	min-height: 44px;
	padding: .55rem .8rem;
	border: 1px solid var(--eric-gallery-line);
	font-weight: 700;
	text-decoration: none;
}

.eric-slideshow__control--next {
	margin-left: auto;
}

.eric-slideshow__control--disabled {
	color: var(--eric-gallery-muted);
}

.eric-slideshow__arrow {
	font-size: 1.2rem;
	line-height: 1;
}

@media (max-width: 900px) {
	.eric-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.eric-gallery__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.eric-gallery__image {
		aspect-ratio: 16 / 10;
	}

	.eric-slideshow__figure {
		grid-template-columns: minmax(0, 1fr);
	}

	.eric-slideshow__image {
		max-height: 62vh;
	}

	.eric-slideshow__caption {
		padding: 0 .25rem .5rem;
	}

	.eric-gallery-single-layout {
		width: min(100% - 24px, 680px);
	}
}

@media (max-width: 480px) {
	.eric-gallery__slideshow-link {
		position: static;
		display: inline-flex;
		margin-top: .75rem;
	}

	.eric-gallery__pagination {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.eric-gallery__pagination p {
		grid-column: 1 / -1;
		grid-row: 1;
		text-align: center;
	}

	.eric-gallery-photo__navigation {
		gap: .65rem;
	}

	.eric-gallery-photo__nav-link {
		font-size: .88rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eric-gallery__image,
	.eric-gallery__card-title a {
		transition: none;
	}
}
