/* Plus Jakarta Sans (variable, Latin subset), self-hosted. SIL Open Font License. */
@font-face {
	font-family: 'Plus Jakarta Sans';
	src: url('fonts/plus-jakarta-sans-latin.woff2') format('woff2');
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
	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;
}

:root {
	--bg: #152029;
	--text: #f5f5f5;
	--body: #d3dce3;
	--muted: #a9b8c3;
	--green: #86bc25;
	--blue: #add8e6;
	--teal: #66cdaa;
	--orange: #ec5800;
	--orange-hover: #ff6d1a;

	--pad-x: clamp(20px, 8vw, 128px);
	--pad-y: clamp(40px, 9vh, 96px);
}

/* Reset */
*, *::before, *::after {box-sizing: border-box; margin: 0; padding: 0;}

/* Core */
html {color-scheme: dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg);}
body {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding:
		max(var(--pad-y), env(safe-area-inset-top))
		max(var(--pad-x), env(safe-area-inset-right))
		max(var(--pad-y), env(safe-area-inset-bottom))
		max(var(--pad-x), env(safe-area-inset-left));
	font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
	color: var(--text);
	background:
		radial-gradient(56rem 40rem at 90% -10%, rgb(102 205 170 / 0.13), transparent 60%),
		radial-gradient(48rem 36rem at -10% 110%, rgb(134 188 37 / 0.11), transparent 60%),
		var(--bg);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-tap-highlight-color: transparent;
}

/* Faint grid that fades out toward the edges */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
	background-size: 64px 64px;
	-webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 45%, #000 20%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 60% at 30% 45%, #000 20%, transparent 75%);
}

/* Left-aligned column; on very wide screens the 1440px frame is centred */
main {
	position: relative;
	width: 100%;
	max-width: 50rem;
	margin-inline-start: max(0px, (100vw - 1440px) / 2);
}

h1 {
	font-size: clamp(1.5rem, 7.8vw, 4.5rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.035em;
	text-wrap: balance;
}
h1::after {
	content: "";
	display: block;
	width: 64px;
	height: 4px;
	margin: clamp(22px, 4vh, 36px) 0 clamp(24px, 5vh, 44px);
	border-radius: 2px;
	background: linear-gradient(90deg, var(--green), var(--teal));
}

p {
	font-size: clamp(1.0625rem, 2.2vw, 1.5rem);
	line-height: 1.65;
	color: var(--body);
	margin-bottom: 1.1em;
	text-wrap: pretty;
}

.nima {color: var(--green);}
@supports (background-clip: text) or (-webkit-background-clip: text) {
	.nima {
		background: linear-gradient(95deg, var(--green) 10%, var(--teal) 90%);
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
	}
}
.ecm, .aim {font-weight: 600;}
.ecm {color: var(--blue);}
.aim {color: var(--teal);}

/* Expertise tags */
.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: clamp(4px, 1vh, 12px);
	list-style: none;
}
.tags li {
	padding: 0.4em 0.75em;
	border: 1px solid rgb(255 255 255 / 0.12);
	border-radius: 999px;
	background: rgb(255 255 255 / 0.03);
	color: var(--muted);
	font-size: 0.78125rem;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
}
/* Tablet and up: keep all tags on one line by scaling them to the column width.
   The row is roughly 51.6 x font-size + 36px wide, so this fits with a little slack. */
main {container-type: inline-size;}
@container (min-width: 620px) {
	.tags li {font-size: clamp(0.6875rem, (100cqi - 40px) / 52, 0.875rem);}
}

/* Call to action */
.connect {margin: clamp(32px, 6vh, 52px) 0 0;}
a.contact {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	min-height: 48px;
	padding: 0.85em 1.5em;
	border-radius: 999px;
	background: var(--orange);
	color: var(--bg);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 8px 24px -10px rgb(236 88 0 / 0.6);
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
	touch-action: manipulation;
}
a.contact:active {background: var(--orange-hover);}
a.contact:focus-visible {outline: 2px solid var(--orange-hover); outline-offset: 4px;}
a.contact .icon {width: 1.05em; height: 1.05em; flex: none;}
a.contact .arrow {width: 1.1em; height: 1.1em; flex: none; transition: transform 0.2s ease;}
@media (hover: hover) {
	a.contact:hover {
		background: var(--orange-hover);
		box-shadow: 0 12px 32px -10px rgb(236 88 0 / 0.75);
		transform: translateY(-1px);
	}
	a.contact:hover .arrow {transform: translateX(3px);}
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Short landscape screens (phones on their side) */
@media (orientation: landscape) and (max-height: 500px) {
	body {align-items: flex-start;}
	h1 {font-size: clamp(1.5rem, 5vw, 2.75rem);}
	h1::after {margin: 16px 0 20px;}
	p {font-size: 1.0625rem;}
	.connect {margin-top: 24px;}
}

/* Entrance */
@media (prefers-reduced-motion: no-preference) {
	main > * {animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;}
	main > :nth-child(2) {animation-delay: 0.08s;}
	main > :nth-child(3) {animation-delay: 0.16s;}
	main > :nth-child(4) {animation-delay: 0.22s;}
	main > :nth-child(5) {animation-delay: 0.28s;}
	@keyframes rise {
		from {opacity: 0; transform: translateY(12px);}
	}
}

@media print {
	body {background: #fff; color: #000; display: block; padding: 0;}
	body::before {display: none;}
	.nima {background: none; color: #000;}
	p, .tags li {color: #000;}
	a.contact {box-shadow: none;}
}
