@font-face {
	font-family: "Manrope";
	src: url("fonts/manrope-latin-wght.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

:root {
	--bg: #141414;
	--text: #e8e6e3;
	--accent: #ff7a1a;
	--panel: #1f1f1f;
	--border: #333333;
	--muted: #a0a0a0;
	--radius: 14px;
	--gutter: clamp(1rem, 4vw, 2rem);
	--font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color-scheme: dark;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.65;
	overflow-wrap: break-word;
}

h1,
h2,
h3 {
	line-height: 1.2;
	margin: 0;
}

p,
ul,
figure {
	margin: 0;
}

img,
svg {
	display: block;
	max-width: 100%;
}

.wrap {
	width: 100%;
	max-width: 1100px;
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Links: thin, offset underline at 45% opacity; solid on hover and focus. */
a {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	text-decoration-color: rgba(232, 230, 227, 0.45);
	text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}

a:hover,
a:focus-visible {
	text-decoration-color: currentColor;
}

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: 0.75rem;
	z-index: 10;
	padding: 0.6rem 1rem;
	background: var(--accent);
	color: var(--bg);
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none;
	transform: translateY(-200%);
}

.skip-link:focus-visible {
	transform: none;
	outline-color: var(--text);
}

main:focus {
	outline: none;
}

/* Hero */
.hero {
	padding-block: clamp(3.5rem, 12vw, 7.5rem) clamp(2.5rem, 7vw, 4.5rem);
}

.hero h1 {
	font-size: clamp(2.5rem, 9vw, 4.25rem);
	font-weight: 800;
	letter-spacing: -0.02em;
}

.roles {
	margin-top: 1rem;
	max-width: 46rem;
	color: var(--muted);
	font-size: clamp(1rem, 2.4vw, 1.2rem);
	font-weight: 500;
}

.lede {
	margin-top: 1.5rem;
	font-size: clamp(1.3rem, 3.6vw, 1.75rem);
	font-weight: 700;
}

.lede::before {
	content: "";
	display: inline-block;
	width: 0.6em;
	height: 0.6em;
	margin-right: 0.55em;
	border-radius: 2px;
	background: var(--accent);
	vertical-align: 0.05em;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2.25rem;
	padding: 0;
	list-style: none;
}

.button {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0.55rem 1.25rem;
	border: 1px solid var(--muted);
	border-radius: 8px;
	font-weight: 700;
	text-decoration: none;
}

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

.button-primary {
	border-color: var(--accent);
	background: var(--accent);
	color: var(--bg);
}

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

.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
}

@media (max-width: 781px) {
	.hero-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Gears above the name on phones, like benweese.com */
	.hero-grid .bwg {
		order: -1;
	}
}

/* Sections */
main > section {
	padding-block: clamp(2rem, 6vw, 3.5rem);
}

h2 {
	margin-bottom: 1.5rem;
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 800;
}

h2::after {
	content: "";
	display: block;
	width: 2.5rem;
	height: 3px;
	margin-top: 0.6rem;
	border-radius: 2px;
	background: var(--accent);
}

/* Project cards */
.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	gap: 1.25rem;
	padding: 0;
	list-style: none;
}

.card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	height: 100%;
	padding: clamp(1.25rem, 3vw, 1.75rem);
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.card h3 {
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--accent);
}

.card > p {
	color: var(--text);
}

.tech {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0;
	list-style: none;
}

.tech li {
	padding: 0.1rem 0.6rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 600;
}

.badge {
	align-self: flex-start;
	text-decoration: none;
	border-radius: 4px;
}

.badge img {
	height: 20px;
	width: auto;
}

.links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin-top: auto;
	padding: 0;
	list-style: none;
	font-weight: 700;
}

/* Diagram */
.diagram {
	display: grid;
	gap: 1.25rem;
	max-width: 46rem;
	padding: clamp(1rem, 3vw, 1.75rem);
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.diagram svg {
	width: 100%;
	max-width: 30rem;
	height: auto;
	margin-inline: auto;
	font-family: var(--font);
}

.node rect {
	fill: var(--bg);
	stroke: var(--muted);
	stroke-width: 1.5;
}

.node text {
	fill: var(--text);
	font-size: 16px;
	font-weight: 700;
}

.node-accent rect {
	stroke: var(--accent);
	stroke-width: 2.5;
}

.node-site rect {
	stroke-dasharray: 5 4;
}

.edge path {
	fill: none;
	stroke: var(--accent);
	stroke-width: 2;
}

.arrowhead {
	fill: var(--accent);
}

.edge-label text {
	fill: var(--muted);
	font-size: 15px;
	font-weight: 600;
}

.diagram figcaption {
	color: var(--muted);
}

.diagram figcaption strong {
	color: var(--text);
}

/* Writing */
.writing {
	display: grid;
	gap: 1rem;
	max-width: 46rem;
	padding: 0;
	list-style: none;
}

.writing li {
	padding: 1.1rem 1.25rem;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.writing a {
	font-size: 1.1rem;
	font-weight: 700;
}

.writing p {
	margin-top: 0.25rem;
	color: var(--muted);
}

/* Footer */
.site-footer {
	margin-top: clamp(2rem, 6vw, 3.5rem);
	padding-block: 2rem 2.5rem;
	border-top: 1px solid var(--border);
	color: var(--muted);
}

.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.75rem 2rem;
}

.site-footer a {
	color: var(--text);
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	padding: 0;
	list-style: none;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}

	a,
	.button {
		transition:
			text-decoration-color 0.15s ease,
			background-color 0.15s ease,
			border-color 0.15s ease,
			color 0.15s ease;
	}

	.skip-link {
		transition: transform 0.15s ease;
	}
}

@media (forced-colors: active) {
	.button,
	.card,
	.writing li,
	.diagram {
		border: 1px solid CanvasText;
	}
}
