/* ===== Fonts ===== */
@font-face {
	font-family: 'Cento';
	font-weight: 100;
	font-style: normal;
	font-display: swap;
	src: url('fonts/Cento-light.woff2') format('woff2');
}
@font-face {
	font-family: 'Cento';
	font-weight: 500;
	font-style: normal;
	font-display: swap;
	src: url('fonts/Cento-medium.woff2') format('woff2');
}
@font-face {
	font-family: 'Cento';
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	src: url('fonts/Cento-bold.woff2') format('woff2');
}
@font-face {
	font-family: 'Montserrat';
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	src: url('fonts/Montserrat-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Montserrat';
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	src: url('fonts/Montserrat-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Base ===== */
* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	background: #ffffff;
	overflow-x: clip;
}

body {
	margin: 0;
	width: 100%;
	color: #000000;
	font-family: 'Cento', sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4,
h5 {
	color: #000000;
	font-family: 'Cento', sans-serif;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.25;
}

p {
	margin: 0 auto 1.5em;
}

a {
	color: #0084ff;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

hr {
	border: none;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ===== Brand (site title) ===== */
.cento-brand {
	max-width: 1200px;
	margin: 0 auto;
	padding: 45px 40px 25px;
	text-align: center;
}

.cento-brand .logo a {
	text-decoration: none;
}

.cento-brand .site-title {
	color: #000000;
	font-family: 'Montserrat', sans-serif;
	font-size: 36px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* ===== Sticky nav bar ===== */
.cento-header {
	position: sticky;
	top: 0;
	z-index: 12;
	width: 100%;
	background: #ffffff;
	transition: box-shadow 200ms ease;
}

.cento-header.stuck {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.cento-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 12px 40px;
	text-align: center;
}

.nav {
	text-align: center;
}

.nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.desktop-nav li {
	display: inline-block;
	vertical-align: bottom;
}

.nav .wsite-menu-item {
	display: block;
	padding: 10px 20px;
	font-family: 'Cento', sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #666666;
	text-decoration: none;
}

.nav .wsite-menu-item:hover {
	color: #000000;
	text-decoration: none;
}

/* ===== Main ===== */
.main-wrap {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 40px 40px;
}

/* ===== Home grid ===== */
.home {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px;
}

.home > * {
	min-width: 0;
}

.hero {
	grid-column: 1 / -1;
}

.hero::after {
	content: '';
	display: block;
	clear: both;
}

.hero p:has(> img) {
	float: left;
	width: 25%;
	margin: 0 2em 1em 0;
}

.hero .hero-photo {
	display: block;
	width: 100%;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.hero p:has(.button) {
	float: left;
	clear: left;
	width: 25%;
	margin: 0 2em 1em 0;
	text-align: center;
}

.hero p:has(.button) .button {
	display: block;
}

.hero p {
	text-align: left;
	margin: 0 0 1.5em calc(25% + 2em);
}

.section-heading {
	grid-column: 1 / -1;
	text-align: center;
	margin: 30px 0 10px;
	padding-top: 1.25em;
	border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.section-heading h1,
.section-heading h2 {
	font-size: 34px;
	font-weight: 700;
	margin: 0 auto;
}

.section-heading h1 a,
.section-heading h2 a {
	color: #000000;
	text-decoration: none;
}

/* ===== Project cards (home) ===== */
.project-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: 200px;
	background: #f1f1f2;
}

.project-card p:has(> .card-video) {
	display: contents;
}

.project-card .card-video {
	grid-column: 1;
	grid-row: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	background: #000000;
	margin: 0;
}

.project-card h1,
.project-card h2 {
	grid-column: 1;
	grid-row: 1;
	align-self: center;
	justify-self: center;
	z-index: 1;
	margin: 0;
	padding: 0 1em;
	text-align: center;
}

.project-card h1 a,
.project-card h2 a,
.project-card .card-title {
	color: #ffffff;
	font-size: 1.6em;
	font-weight: 700;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
	text-decoration: none;
}

.project-card > p {
	margin: 1.25em 1.75em 1em;
	text-align: left;
}

.project-card > p:not(:has(.button)) {
	min-height: 6em;
}

.project-card > p > strong:first-child {
	display: block;
}

.project-card table {
	border-collapse: collapse;
	width: calc(100% - 3.5em);
	margin: 0 1.75em 1em;
}

.project-card table td {
	vertical-align: top;
	padding: 2px 0;
}

.project-card table td:first-child {
	width: 7em;
}

.project-card thead {
	display: none;
}

.project-card p:has(.button) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: auto;
	margin-bottom: 1.25em;
}

.project-card .button {
	flex: 1 1 0;
}

/* ===== Generic button ===== */
.button {
	display: inline-block;
	background: #000000;
	color: #ffffff !important;
	border: none;
	padding: 14px 28px;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.button:hover {
	background: rgba(0, 0, 0, 0.6);
	text-decoration: none;
}

.button.button-gray {
	background: #ababab;
}

.button.button-gray:hover {
	background: #8f8f8f;
}

.button-disabled {
	pointer-events: none;
	cursor: default;
}

/* ===== Skills ===== */
.skills {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1em;
	text-align: center;
}

.skills > h1,
.skills > h2 {
	grid-column: 1 / -1;
}

.skills > ul {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1em;
	list-style: none;
	margin: 0;
	padding: 0;
}

.skills > ul > li {
	list-style: none;
}

.skills > ul > li > p,
.skills > ul > li > strong {
	display: block;
	font-size: 1.05em;
	margin-bottom: 1em;
}

.skills > ul > li > ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.skills figure {
	margin: 0 0 1.25em;
}

.skills figure img {
	width: 50px;
	height: 50px;
	object-fit: contain;
}

.skills figcaption {
	font-size: 90%;
	color: #2a2a2a;
}

/* ===== Contact ===== */
.contact {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1em;
	text-align: center;
}

.contact > h1,
.contact > h2 {
	grid-column: 1 / -1;
}

.contact > ul {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1em;
	list-style: none;
	margin: 0;
	padding: 0;
}

.contact li {
	list-style: none;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.contact img {
	width: 50px;
	height: 50px;
	object-fit: contain;
	margin-bottom: 0.5em;
}

/* ===== Project detail page ===== */
.project-title {
	position: relative;
	margin: 0;
	padding: 55px 15px 0;
	text-align: center;
	font-family: 'Cento', sans-serif;
	font-size: 58px;
	font-weight: 500;
	line-height: 1.15;
}

.project-title::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: -50vw;
	right: -50vw;
	background: #f1f1f2;
	z-index: -1;
}

.project-header {
	display: grid;
	grid-template-columns: 44.78% 55.22%;
}

.project-body {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
	position: relative;
	padding: 50px 15px;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.project-header .panel {
	padding-top: 20px;
}

.project-header .panel::before,
.project-body .panel:nth-child(4n + 3)::before,
.project-body .panel:nth-child(4n + 4)::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: -50vw;
	right: -50vw;
	background: #f1f1f2;
	z-index: -1;
}

.panel h2 {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 0.75em;
}

.panel-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

.panel .panel-body p {
	margin: 0 0 1.25em;
}

.panel-body p > strong:first-child {
	display: block;
}

.panel-body p:has(.button) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.panel-body .button {
	flex: 1 1 0;
}

.panel table {
	border-collapse: collapse;
	margin: 0 0 1.25em;
	width: 100%;
}

.panel table td {
	vertical-align: top;
	padding: 2px 0;
}

.panel table td:first-child {
	width: 7em;
}

.panel thead {
	display: none;
}

.panel ul {
	padding-left: 1.5em;
	margin: 0 0 1.25em;
}

.panel img {
	max-width: 100%;
}

.panel iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
}

.panel video {
	display: block;
	max-width: 100%;
	height: auto;
}

.panel .project-video {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	background: #000000;
	margin: 0 0 1.25em;
}

.asset-only {
	display: none;
}

/* ===== Slideshow ===== */
.slideshow {
	position: relative;
}

.slideshow .slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.slideshow .slide.active {
	position: relative;
	opacity: 1;
}

.slideshow figure {
	position: relative;
	margin: 0;
	text-align: center;
}

.slideshow img {
	display: block;
	width: 100%;
}

.slideshow video {
	display: block;
	width: 100%;
}

.slideshow figcaption,
.slideshow .slide-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 0.6em 1em;
	background: rgba(0, 0, 0, 0.55);
	color: #ffffff;
	text-align: center;
	font-size: 90%;
}

.slideshow .slide-dots {
	margin-top: 1em;
	text-align: center;
}

.slideshow .slide-dots button {
	display: inline-block;
	width: 12px;
	height: 12px;
	padding: 0;
	margin: 0 4px;
	border: none;
	border-radius: 50%;
	background: #c8c8c8;
	cursor: pointer;
}

.slideshow .slide-dots button.active {
	background: #2a2a2a;
}

/* ===== Footer ===== */
.footer-wrap {
	width: 100%;
	font-size: 14px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-wrap .footer {
	max-width: 1200px;
	margin: 0 auto;
	padding: 30px 40px;
	text-align: center;
	color: #666666;
}

/* ===== Responsive ===== */
@media screen and (max-width: 1600px) {
	.main-wrap,
	.footer-wrap .footer {
		max-width: 1200px;
	}
}

@media screen and (max-width: 1024px) {
	.cento-brand {
		padding: 20px 60px 15px;
	}

	.cento-brand .logo {
		margin: 0;
		overflow: hidden;
	}

	.cento-brand .site-title {
		font-size: 1.1em;
		line-height: 1.4;
	}

	.cento-header-inner {
		padding: 8px 12px;
	}

	.nav .wsite-menu-item {
		padding: 8px 10px;
		font-size: 12px;
		letter-spacing: 0.03em;
	}

	.main-wrap {
		padding: 20px;
	}

	.panel {
		padding: 2em 1.25em;
	}
}

@media screen and (max-width: 767px) {
	.cento-brand {
		padding: 15px 20px 12px;
	}

	.cento-header-inner {
		padding: 6px 8px;
	}

	.main-wrap {
		padding: 15px;
	}

	.home {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.project-header,
	.project-body {
		grid-template-columns: minmax(0, 1fr);
	}

	.project-title {
		font-size: 38px;
		padding: 30px 20px 0;
	}

	.project-card,
	.skills,
	.contact {
		grid-column: 1 / -1;
	}

	.skills,
	.skills > ul,
	.contact,
	.contact > ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hero p,
	.hero p:has(> img),
	.hero p:has(.button) {
		float: none;
		clear: none;
		width: auto;
		margin: 0 0 1.5em;
	}

	.hero .hero-photo {
		width: 45%;
		max-width: 200px;
		margin: 0 auto;
	}

	.hero p:has(.button) {
		text-align: center;
	}

	.project-card {
		grid-template-rows: 170px;
	}
}
