:root {
	--ink: #151515;
	--muted: #6b6b6b;
	--line: #e6e6e6;
	--radius: 7px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
	font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
	color: var(--ink);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Looping video background (home page only) */
body.has-video {
	background: linear-gradient(180deg, #0f3d5a 0%, #1f6f8f 55%, #a9cfdd 100%);
}

.bg {
	position: fixed;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}

.bg video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.32));
}

@media (prefers-reduced-motion: reduce) {
	.bg video { display: none; }
}

.page {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Hero over the video */
.hero {
	color: #fff;
	padding: 28vh 0 9vh;
	text-shadow: 0 1px 18px rgba(0, 0, 0, 0.45);
}

.hero h1 {
	font-size: clamp(2.8rem, 8vw, 5rem);
	line-height: 1;
	letter-spacing: -0.03em;
	margin: 0 0 0.35em;
}

.hero p {
	font-size: 1.2rem;
	line-height: 1.5;
	max-width: 36em;
	margin: 0;
}

/* White sheet that holds the project grid */
.sheet {
	background: #fff;
	border-radius: 16px;
	padding: 36px 36px 40px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.sheet h2 {
	font-size: 0.85rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 28px;
}

.projects {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
	gap: 36px 48px;
}

.project {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.project:hover { text-decoration: none; }

.project img {
	flex: none;
	width: 168px;
	height: 112px;
	object-fit: cover;
	border-radius: var(--radius);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
	transition: transform 0.18s ease;
}

.project:hover img { transform: translateY(-2px) scale(1.02); }

.project p {
	margin: 0;
	font-size: 1.1rem;
	line-height: 1.45;
	color: var(--muted);
}

.project b { color: var(--ink); font-weight: 700; }
.project:hover b { text-decoration: underline; }

/* Footer */
footer {
	padding: 28px 4px 40px;
	font-size: 0.9rem;
	color: var(--muted);
}

body.has-video footer { color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }

footer ul {
	list-style: none;
	padding: 0;
	margin: 0 0 8px;
	font-weight: 600;
}

footer ul li { display: inline; margin-right: 18px; }

footer .credit { margin: 0; font-size: 0.8rem; opacity: 0.8; }
footer .credit a { text-decoration: underline; }

/* Blog pages (plain white) */
h1 { font-size: 2.4rem; letter-spacing: -0.02em; margin-top: 60px; }
p { line-height: 1.6; }
.meta { color: var(--muted); }
ul.posts { margin: 20px 0 40px; padding: 0; font-size: 1.15rem; }
ul.posts li { list-style: none; margin-bottom: 8px; }
ul.posts a { text-decoration: underline; }

@media (max-width: 640px) {
	.hero { padding: 20vh 0 7vh; }
	.sheet { padding: 24px 20px 28px; border-radius: 12px; }
	.projects { grid-template-columns: 1fr; gap: 28px; }
	.project img { width: 128px; height: 85px; }
	.project p { font-size: 1rem; }
}
