#gallery {
    --gallery-page-size: 1%;
    --image-width: 65;
    --text-width: 35;
    
	display: flex !important;
	gap: 10vh;
}

#gallery > div {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: flex-start;

	position: relative;

	flex-shrink: 1;
	flex-grow: 1;

	width: 100%;
	height: auto;
}

#gallery > div > div {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: flex-start;

	flex-shrink: 0;
	flex-grow: 0;

	width: calc(var(--gallery-page-size) * var(--text-width));
	height: 100%;
	gap: 0.75vw;
}

#gallery > div > div.left {
	margin-right: auto;
	animation: slide-left-animation 1s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

#gallery > div > div.right {
	margin-left: auto;
	animation: slide-right-animation 1s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

#gallery > div > div > h1 {
	color: rgb(0, 0, 0);

	font-size: calc(min(7.2vw / var(--optimal-aspect-ratio), 7.2vh));
	font-weight: var(--font-weight-black);
	text-transform: uppercase;

	white-space: nowrap;
	letter-spacing: 0;
	line-height: 125%;

	z-index: 10;
}

#gallery > div > div > p {
	color: rgb(0, 0, 0);
	opacity: 0.5;

	font-size: calc(min(1.75vw / var(--optimal-aspect-ratio), 1.75vh));

	letter-spacing: min(calc(0.05vw / (4 / 3)), 0.05vh);
	line-height: 175%;
	user-select: text;

	z-index: 10;
}

#gallery > div > img {
	position: absolute;
	
	background: rgb(250, 250, 250);
    border-radius: var(--base-page-radius);

	width: calc(var(--gallery-page-size) * var(--image-width) - var(--page-content-padding));
	height: 100%;

	top: 0;

	flex-shrink: 1;
	flex-grow: 1;
}

#gallery > div > img.left {
	left: 0;
	animation: slide-left-animation 1s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

#gallery > div > img.right {
	right: 0;
	animation: slide-right-animation 1s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

@media (max-width: 100vh) {
	#gallery {
		gap: 5vh;
	}

	#gallery > div > img {
		display: none;
	}

	#gallery > div {
		width: 100%;
	}
	
	#gallery > div > div {
	    width: 100%;
	}

	#gallery > div > div > h1 {
		font-size: 5vh !important;
	}

	#gallery > div > div > p {
		font-size: 1.75vh !important;
	}
}