.gallery > a:first-child .gallery__text {
  margin-top: 10vw;
}
body {
	--color-text: #444444 !important;
	--color-bg: #e2d9c7;
	--color-link: #d2b48c;
	--color-link-hover: #fff;
	--color-gallery-title: #4a525e;
	--color-gallery-number: #f8ffff;
	--color-gallery-link: #fff;
	--color-gallery-link-bg: #d2b48c;
	--color-gallery-link-hover: #d2b48c;
	--color-gallery-link-bg-hover: #fff;
	color: var(--color-text);
	background-color: var(--color-bg);
	--cursor-stroke: none;
	--cursor-fill: #ffffff;
	--cursor-stroke-width: 1px;
}

.gallery {
	display: flex;
	margin-left: 12vw;
	padding-right: 12vw;
}


.content {
	margin-top: 13vw;
}



.gallery__item {
	margin: 0 3vw;
	display: grid;
	grid-template-areas: '... ...'
		'... gallery-image'
		'... ...';
	grid-template-columns: 8rem 21vmax;
	grid-template-rows: 8rem 28vmax 3rem;
	will-change: transform;
}

.gallery__item:nth-child(even) {
	padding-top: 10vh;
}

.gallery__item-img {
	grid-area: gallery-image;
	width: 100%;
	height: 90%;
	overflow: hidden;
	position: relative;
	will-change: transform;
}

.gallery__item-imginner {
	background-size: cover;
	background-position: 50% 0;
	width: 100%;
	height: calc(100% + 14vh);
	margin-top: -7vh;
	will-change: transform;
}

.gallery__item-caption {
	grid-area: 1 / 1 / 4 / 3;
	display: grid;
	grid-template-areas: 'gallery-number gallery-title'
		'gallery-link ...'
		'gallery-link gallery-tags';
	grid-template-columns: 8rem auto;
	grid-template-rows: 8rem auto 3rem;

}

.gallery__item-number {
	grid-area: gallery-number;
	font-size: 6rem;
	font-size: clamp(2.5rem, 9vw, 6.5rem);
	justify-self: end;
	padding-right: 2rem;
	text-shadow: 0 0 10px rgba(0, 0, 0, 0.75);
	color: var(--color-gallery-number);
}

.gallery__item-title {
	grid-area: gallery-title;
	margin: 0;
	font-size: 4rem;
	font-size: clamp(2rem, 5vw, 4rem);
	color: var(--color-gallery-title);
}

.gallery__item-number,
.gallery__item-title,
.gallery__text {
	font-family: moret, serif;
	font-weight: 800;
	font-style: italic;
	align-self: center;
}

.gallery__item-link {
	grid-area: gallery-link;
	font-family: 'Times New Roman', Times, serif;
	align-self: end;
	font-size: 1.5rem;
	background: var(--color-gallery-link-bg);
	color: var(--color-gallery-link);
	text-decoration: none;
	width: 120px;
	height: 120px;
	border-radius: 50%;
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	text-transform: capitalize;
}

.gallery__item-link:focus,
.gallery__item-link:hover {
	background: var(--color-gallery-link-bg-hover);
	color: var(--color-gallery-link-hover);
	text-decoration: none;
	box-shadow: #444444 0 0 10px;
	
	font-size: 1.5rem;
}

.gallery__item-tags {
	grid-area: gallery-tags;
	justify-self: end;
	font-size: 1.5rem;
	display: grid;
	grid-auto-flow: column;
	grid-gap: 1rem;
	cursor: pointer;
}

.gallery__text {
  font-size: 20vw;
  line-height: 0.9;
  margin: 0 10vw 0 14vw;
  text-transform: lowercase;
  color: #d2b48c;
  -webkit-text-stroke: 1px #463832;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* animation and scroll attributes remain unaffected */
}

/* Fix overlap: reduce font-size and adjust layout for last .gallery__text */
.gallery > a:last-child .gallery__text {
  font-size: 20vw;
  line-height: 0.9;
  margin-bottom: 18vw;
  min-height: 42vw;
  display: block;
  position: relative;
  padding-bottom: 6vw;
}
.gallery > a:last-child .gallery__text-outer {
  width: 100%;
  display: block;
  position: relative;
}
.gallery > a:last-child .gallery__text-outer:last-child {
  margin-top: 0.2em;
}


.gallery__text-inner {
	display: block;
}
.gallery__text-outer {
	display: block;
	color: #d2b48c;
}

.gallery__item-tags span {
	font-weight: 900;
}