/* Additions on top of the HTML5 UP "Dimension" template */

/* Project header: year, role and stack */
.project-meta {
	margin: -1rem 0 1rem 0;
	font-size: 0.8rem;
	letter-spacing: 0.1rem;
	text-transform: uppercase;
	opacity: 0.75;
}

ul.tags {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

	ul.tags li {
		padding: 0.1rem 0.7rem;
		border: solid 1px rgba(255, 255, 255, 0.35);
		border-radius: 1rem;
		font-size: 0.75rem;
		line-height: 1.6;
	}

#main video {
	display: block;
	width: 100%;
	max-height: 70vh;
	background: #000;
	margin: 0 0 1.5rem 0;
	border-radius: 4px;
}

/* YouTube videos: a thumbnail with a play button, replaced by the player on click */
.yt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
	margin: 0 0 1.5rem 0;
}

.yt {
	margin: 0;
}

	.yt button,
	.yt iframe {
		display: block;
		position: relative;
		width: 100%;
		aspect-ratio: 16 / 9;
		padding: 0;
		border: 0;
		border-radius: 4px;
		background: #000;
		overflow: hidden;
		cursor: pointer;
		box-shadow: none;
		height: auto;
		line-height: normal;
	}

	.yt.short {
		max-width: 300px;
	}

		.yt.short button,
		.yt.short iframe {
			aspect-ratio: 9 / 16;
		}

	.yt img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		opacity: 0.85;
		transition: opacity 0.2s ease;
	}

	.yt button:hover img,
	.yt button:focus-visible img {
		opacity: 1;
	}

	.yt button::after {
		content: "";
		position: absolute;
		top: 50%;
		left: 50%;
		width: 64px;
		height: 44px;
		margin: -22px 0 0 -32px;
		border-radius: 10px;
		background: rgba(0, 0, 0, 0.75) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23ffffff'/%3E%3C/svg%3E") center / 28px no-repeat;
	}

	.yt button:hover::after {
		background-color: #ff0000;
	}

	.yt figcaption {
		margin-top: 0.4rem;
		font-size: 0.8rem;
		line-height: 1.4;
		opacity: 0.75;
	}

/* The template sizes headings to their text (max-content), so long titles never wrap on phones */
h1.major, h2.major, h3.major, h4.major, h5.major, h6.major {
	max-width: 100%;
	overflow-wrap: break-word;
}

#main article h3.major {
	margin-top: 3rem;
}

	#main article h2.major + h3.major {
		margin-top: 0;
	}

/* Template credit required by its licence, kept small and discreet */
#footer .copyright.credit {
	font-size: 0.55rem;
	opacity: 0.5;
}

#header .content .tagline {
	font-size: 0.9rem;
	letter-spacing: 0.15rem;
}
