/* ===========================================================
   Elias Lindblad — Career Page
   Palette, type, layout. Edit --accent to recolor everything.
   =========================================================== */

/* ---------- Self-hosted fonts (latin subset) ---------- */
@font-face {
	font-family: "Space Grotesk";
	font-style: normal;
	font-weight: 400 700; /* variable font: one file covers 400–700 */
	font-display: swap;
	src: url("./fonts/space-grotesk-latin.woff2") format("woff2");
}
@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("./fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
	--bg: oklch(0.17 0.006 250); /* near-black page background */
	--panel: oklch(0.21 0.008 250); /* card / panel surfaces */
	--ink: oklch(0.97 0.005 250); /* primary text */
	--muted: oklch(0.65 0.01 250); /* secondary text */
	--line: oklch(0.3 0.01 250); /* hairlines / borders */
	--accent: oklch(0.82 0.07 20); /* Dusty rose accent */
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
}

/* Visually hidden, but available to screen readers and search engines. */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

body {
	background: var(--bg);
	color: var(--ink);
	font-family: "Space Grotesk", sans-serif;
	-webkit-font-smoothing: antialiased;
	line-height: 1.5;
}

.wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 48px;
}
.mono {
	font-family: "JetBrains Mono", monospace;
}

/* ---------- Nav ---------- */
nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 28px 48px;
	max-width: 1280px;
	margin: 0 auto;
	font-family: "JetBrains Mono", monospace;
	font-size: 13px;
	position: sticky;
	top: 0;
	background: color-mix(in oklab, var(--bg) 88%, transparent);
	backdrop-filter: blur(10px);
	z-index: 10;
	border-bottom: 1px solid var(--line);
}
nav .dot {
	color: var(--accent);
}
nav .links {
	display: flex;
	gap: 28px;
}
nav a {
	color: var(--muted);
	text-decoration: none;
	transition: color 0.2s;
}
nav a:hover {
	color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
	padding: 90px 0 70px;
}
.hero .tagline {
	font-family: "JetBrains Mono", monospace;
	font-size: 14px;
	color: var(--accent);
	margin-bottom: 40px;
	letter-spacing: 0.02em;
}
.hero h1 {
	font-weight: 700;
	font-size: clamp(64px, 15vw, 240px);
	line-height: 0.84;
	letter-spacing: -0.04em;
	text-transform: uppercase;
}
.hero h1 .out {
	color: transparent;
	-webkit-text-stroke: 2px var(--ink);
}
.hero .role-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 40px;
	margin-top: 56px;
	padding-top: 32px;
	border-top: 1px solid var(--line);
	font-family: "JetBrains Mono", monospace;
	font-size: 14px;
	color: var(--muted);
}
.hero .role-bar b {
	color: var(--ink);
	font-weight: 500;
}

/* ---------- Generic section ---------- */
section {
	padding: 80px 0;
}
.lead {
	font-size: clamp(28px, 4.5vw, 56px);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.02em;
	max-width: 18ch;
}
.lead .hl {
	color: var(--accent);
}

/* ---------- Stats ---------- */
.stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-top: 72px;
}
.stats .stat {
	border-top: 2px solid var(--accent);
	padding-top: 20px;
}
.stats .stat .num {
	font-size: clamp(40px, 6vw, 76px);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
}
.stats .stat .lab {
	font-family: "JetBrains Mono", monospace;
	font-size: 13px;
	color: var(--muted);
	margin-top: 12px;
}

/* ---------- Photo placeholder ---------- */
.photo {
	aspect-ratio: 16 / 7;
	margin-top: 48px;
	border: 1px solid var(--line);
	background-image: repeating-linear-gradient(
		45deg,
		oklch(0.22 0.008 250) 0 12px,
		oklch(0.2 0.008 250) 12px 24px
	);
	display: flex;
	align-items: center;
	justify-content: center;
}
.photo span {
	font-family: "JetBrains Mono", monospace;
	font-size: 13px;
	color: var(--muted);
}
.photo span:has(img) {
	width: 100%;
	height: 100%;
}
.photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---------- Experience ---------- */
.exp {
	border-top: 1px solid var(--line);
}
.exp .item {
	display: grid;
	grid-template-columns: 160px 1fr auto;
	gap: 32px;
	padding: 34px 0;
	border-bottom: 1px solid var(--line);
	align-items: center;
	transition:
		padding-left 0.25s,
		background 0.25s;
}
.exp .item:hover {
	padding-left: 16px;
	background: var(--panel);
}
.exp .item .yr {
	font-family: "JetBrains Mono", monospace;
	font-size: 13px;
	color: var(--muted);
}
.exp .item .role {
	font-size: clamp(22px, 3vw, 34px);
	font-weight: 500;
	letter-spacing: -0.01em;
}
.exp .item .role span {
	display: block;
	font-size: 15px;
	color: var(--muted);
	font-weight: 400;
	margin-top: 4px;
}
.exp .item .now {
	font-family: "JetBrains Mono", monospace;
	font-size: 12px;
	color: var(--bg);
	background: var(--accent);
	padding: 5px 10px;
	border-radius: 100px;
	white-space: nowrap;
}

/* ---------- Focus cards ---------- */
.focus {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}
.focus .card {
	background: var(--panel);
	border: 1px solid var(--line);
	padding: 40px;
	transition:
		border-color 0.25s,
		transform 0.25s;
}
.focus .card:hover {
	border-color: var(--accent);
	transform: translateY(-4px);
}
.focus .card .n {
	font-family: "JetBrains Mono", monospace;
	font-size: 13px;
	color: var(--accent);
}
.focus .card h3 {
	font-size: 26px;
	font-weight: 500;
	margin: 16px 0 10px;
	letter-spacing: -0.01em;
}
.focus .card p {
	color: var(--muted);
	font-size: 16px;
}

/* ---------- CTA ---------- */
.cta {
	padding: 110px 0;
	text-align: center;
}
.cta h2 {
	font-size: clamp(48px, 11vw, 160px);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: -0.04em;
	line-height: 0.9;
}
.cta a.mail {
	color: var(--accent);
	text-decoration: none;
}
.cta .links {
	display: flex;
	gap: 24px;
	justify-content: center;
	margin-top: 44px;
	font-family: "JetBrains Mono", monospace;
	font-size: 14px;
	flex-wrap: wrap;
}
.cta .links a {
	color: var(--ink);
	text-decoration: none;
	border: 1px solid var(--line);
	padding: 12px 22px;
	border-radius: 100px;
	transition:
		border-color 0.2s,
		color 0.2s;
}
.cta .links a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

/* ---------- Footer ---------- */
footer {
	padding: 28px 48px;
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	font-family: "JetBrains Mono", monospace;
	font-size: 12px;
	color: var(--muted);
	border-top: 1px solid var(--line);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
	.wrap {
		padding: 0 24px;
	}
	nav {
		padding: 20px 24px;
	}
	nav .links {
		display: none;
	}
	.stats {
		grid-template-columns: 1fr;
	}
	.exp .item {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	.exp .item .now {
		justify-self: start;
	}
	.focus {
		grid-template-columns: 1fr;
	}
	footer {
		padding: 24px;
		flex-direction: column;
		gap: 6px;
	}
}
