
:root {
	--yellow: #e3cd0c;
	--charcoal: #202020;
	--page: #e9e7e2;
	--surface: #ffffff;
	--border: #c4c0b6;
	--border-hover: #6b685f;
	--text: #1d1d1b;
	--muted: #55554f;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--page);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
}

.container {
	width: 100%;
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 1.25rem;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

a {
	color: var(--text);
}

a:focus-visible {
	outline: 3px solid var(--text);
	outline-offset: 2px;
}

/*****************
    - Header -
*****************/
.site-header {
	background: var(--charcoal);
	color: #ffffff;
}

.header-inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	flex-wrap: wrap;
	padding-top: 1.75rem;
	padding-bottom: 1.6rem;
}

.site-title {
	margin: 0 0 0.45rem;
	color: #ffffff;
	font-size: clamp(2rem, 1.5rem + 2vw, 2.6rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.site-title-mark {
	display: inline-block;
	padding: 0 0.4rem;
	background: var(--yellow);
	color: var(--text);
	border-radius: 4px;
}

.site-subtitle {
	margin: 0;
	color: #d0cec8;
}

.profile-link {
	color: #ffffff;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--yellow);
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
}

.profile-link:hover {
	color: var(--yellow);
}

/* focus ring that shows on the dark header */
.site-header a:focus-visible {
	outline-color: var(--yellow);
}

/*****************
   - Projects -
*****************/
.project-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 2rem 0 3rem;
}

.project-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow: hidden;
}

.project-card:hover {
	border-color: var(--border-hover);
}

/* same 16:10 frame for every screenshot */
.project-image {
	aspect-ratio: 16 / 10;
	background: #ecebe6;
	border-bottom: 1px solid var(--border);
}

.project-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.project-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1rem 1.1rem 1.1rem;
}

.project-name {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.3;
}

.project-description {
	margin: 0 0 1rem;
	color: var(--muted);
	font-size: 0.95rem;
}

/* links stay at the bottom of the card */
.project-links {
	display: flex;
	gap: 0.6rem;
	margin-top: auto;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0 1.1rem;
	border: 1px solid transparent;
	border-radius: 4px;
	font-size: 0.95rem;
	font-weight: 700;
	text-decoration: none;
}

.button-demo {
	background: var(--yellow);
	border-color: var(--yellow);
	color: var(--text);
}

.button-demo:hover {
	border-color: var(--text);
}

.button-code {
	background: transparent;
	border-color: var(--border);
	color: var(--text);
	font-weight: 600;
}

.button-code:hover {
	border-color: var(--text);
}

.no-script {
	padding: 2rem 0;
}

/*****************
    - Footer -
*****************/
.site-footer {
	border-top: 1px solid var(--border);
	padding: 1.5rem 0 2rem;
	color: var(--muted);
	font-size: 0.9rem;
}

.footer-title {
	margin: 0 0 0.35rem;
	color: var(--text);
	font-size: 0.9rem;
	font-weight: 700;
}

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

/* tablet: two columns */
@media (max-width: 991px) {
	.project-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* mobile: one column */
@media (max-width: 599px) {
	.header-inner {
		padding-top: 1.25rem;
		padding-bottom: 1.1rem;
	}

	.project-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
		padding-top: 1.25rem;
	}
}
