:root {
	color-scheme: dark;
	--bg: #0f172a;
	--text: #e2e8f0;
	--muted: #94a3b8;
	--accent: #5eead4;
	--spot-x: 25%;
	--spot-y: 15%;
}
* {
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
	scroll-padding-top: 96px;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family:
		Inter,
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		Arial,
		sans-serif;
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
body:before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: -1;
	background: radial-gradient(600px at var(--spot-x) var(--spot-y), rgba(29, 78, 216, 0.14), transparent 80%);
}
::selection {
	background: #5eead4;
	color: #134e4a;
}
a {
	color: inherit;
	text-decoration: none;
}
a:hover {
	color: var(--accent);
}
a:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 5px;
}
.layout {
	max-width: 1280px;
	padding: 0 96px;
	margin: auto;
}
.intro {
	position: sticky;
	top: 0;
	height: 100svh;
	min-height: 620px;
	padding: 96px 0;
}
h1 {
	font-size: 48px;
	font-weight: 700;
	letter-spacing: -1.8px;
	line-height: 1;
	margin: 0 0 17px;
}
.position {
	font-size: 20px;
	font-weight: 500;
	color: var(--text);
	margin: 0;
	letter-spacing: -0.4px;
}
.intro-copy {
	max-width: 310px;
	margin: 16px 0 0;
	color: var(--muted);
	line-height: 1.55;
}
nav {
	gap: 17px;
	margin-top: 64px;
}
nav a {
	display: flex;
	align-items: center;
	text-transform: uppercase;
	letter-spacing: 1.4px;
	font-size: 12px;
	font-weight: 700;
	color: var(--muted);
	padding: 4px 0;
}
nav a span {
	height: 1px;
	background: #475569;
	width: 32px;
	margin-right: 16px;
	transition:
		width 0.2s,
		background 0.2s;
}
nav a:hover,
nav a[aria-current] {
	color: var(--text);
}
nav a:hover span,
nav a[aria-current] span {
	width: 64px;
	background: var(--text);
}
.intro-bottom {
	margin-top: auto;
	padding-top: 40px;
	color: var(--muted);
}
.contact-link {
	font-size: 15px;
	font-weight: 500;
}
.contact-link span {
	margin-left: 12px;
}
.intro-bottom p {
	margin: 10px 0 0;
	font-size: 13px;
}
main {
	padding: 96px 0;
	min-width: 0;
}
section {
	margin-bottom: 96px;
	scroll-margin-top: 0;
}
.section-label {
	display: none;
}
h2,
.qualification-title {
	font-size: 14px;
	letter-spacing: 1.3px;
	text-transform: uppercase;
	font-weight: 700;
	margin: 0 0 30px;
}
p {
	color: var(--muted);
	margin-top: 0;
}
.lead {
	font-size: 16px;
	line-height: 1.65;
	margin-bottom: 22px;
}
.about-note {
	margin-top: 24px;
}
.role {
	padding: 20px;
	margin: 0 -20px 12px;
	border: 1px solid transparent;
	border-radius: 5px;
	transition:
		background 0.2s,
		border-color 0.2s;
}
.role:hover,
.project:hover {
	background: rgba(148, 163, 184, 0.055);
	border-top-color: rgba(148, 163, 184, 0.12);
}
.date {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	line-height: 1.8;
	color: var(--muted);
	padding-top: 3px;
}
.role h3 {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	margin: 0 0 3px;
}
.role:hover h3 {
	color: var(--accent);
}
.job {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	color: #8494ad;
	margin: 0 0 16px;
}
.role-body > p:not(.job) {
	font-size: 14px;
	line-height: 1.65;
	margin-bottom: 12px;
}
summary {
	color: var(--accent);
	font-size: 12px;
	cursor: pointer;
	width: fit-content;
	padding: 6px 0;
}
details ul {
	font-size: 14px;
	color: var(--muted);
	padding-left: 18px;
}
details li {
	margin-bottom: 12px;
}
.projects {
	display: grid;
	gap: 16px;
}
.project {
	padding: 20px;
	margin: 0 -20px;
	display: grid;
	grid-template-columns: 115px 1fr;
	gap: 10px 18px;
	border: 1px solid transparent;
	border-radius: 5px;
	transition: background 0.2s;
}
.project-top {
	grid-column: 1/-1;
	display: flex;
	justify-content: space-between;
	font-size: 10px;
	letter-spacing: 1px;
	color: var(--muted);
}
.project-top span:last-child {
	display: none;
}
.metric {
	grid-column: 1;
	grid-row: 2 / span 3;
	font-size: 25px;
	line-height: 1.3;
	color: var(--text);
	margin: 4px 0;
	border: 1px solid #334155;
	background: #17233b;
	border-radius: 4px;
	align-self: start;
	padding: 16px 10px;
}
.metric span {
	display: block;
	font-size: 11px;
	color: var(--muted);
	margin-top: 8px;
}
.project h3 {
	grid-column: 2;
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
}
.project p:not(.metric) {
	grid-column: 2;
	font-size: 14px;
	line-height: 1.65;
	margin: 0;
}
.project a {
	grid-column: 2;
	color: var(--accent);
	font-size: 12px;
	width: fit-content;
}
.project a span {
	margin-left: 7px;
}
.compact h3,
.compact p:not(.metric),
.compact a {
	grid-column: 2;
}
.qualification-title {
	margin-top: 36px;
}
.qualifications {
	padding-left: 18px;
	color: var(--muted);
	font-size: 14px;
}
.qualifications li {
	margin-bottom: 8px;
}
#contact > p {
	font-size: 14px;
}
.email {
	display: inline-block;
	color: var(--text);
	font-size: 20px;
	margin: 4px 0 20px;
}
.email span {
	margin-left: 10px;
}
.separator {
	margin: 0 12px;
	color: #475569;
}
footer {
	font-size: 12px;
	color: var(--muted);
	line-height: 1.7;
}
footer a {
	color: var(--text);
}
.skip {
	position: fixed;
	top: -100px;
	left: 20px;
	padding: 12px 20px;
	background: var(--accent);
	color: var(--bg);
	z-index: 10;
}
.skip:focus {
	top: 16px;
}
@media (max-width: 1100px) {
	.layout {
		padding: 0 48px;
		gap: 40px;
	}
	h1 {
		font-size: 44px;
	}
	.project {
		grid-template-columns: 90px 1fr;
		gap: 14px;
	}
	.metric {
		font-size: 21px;
		padding: 12px 7px;
	}
}
@media (max-width: 991.98px) {
	html {
		scroll-padding-top: 32px;
	}
	.layout {
		display: block;
		padding: 0 48px;
	}
	.intro {
		position: relative;
		height: auto;
		min-height: 0;
		padding: 64px 0 0;
	}
	h1 {
		font-size: 48px;
	}
	.intro-copy {
		max-width: 360px;
	}
	nav {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 16px;
		margin-top: 32px;
	}
	nav a {
		font-size: 11px;
	}
	nav a span {
		display: none;
	}
	.intro-bottom {
		margin-top: 24px;
		padding: 0;
	}
	.intro-bottom p {
		display: none;
	}
	main {
		padding-top: 64px;
	}
	section {
		margin-bottom: 64px;
	}
	#about h2 {
		position: static;
		width: auto;
		height: auto;
		clip-path: none;
		overflow: visible;
	}
	.project {
		grid-template-columns: 125px 1fr;
	}
	.metric {
		font-size: 25px;
	}
}
@media (max-width: 480px) {
	.layout {
		padding: 0 24px;
	}
	.intro {
		padding-top: 48px;
	}
	h1 {
		font-size: 40px;
	}
	.position {
		font-size: 18px;
	}
	.intro-copy {
		font-size: 15px;
	}
	nav {
		gap: 10px 18px;
	}
	.role {
		margin: 0 -12px;
		padding: 18px 12px;
	}
	.date {
		margin-bottom: 10px;
	}
	.project {
		grid-template-columns: 86px 1fr;
		margin: 0 -12px;
		padding: 18px 12px;
		gap: 12px;
	}
	.metric {
		font-size: 21px;
	}
	.project-top {
		font-size: 9px;
	}
	.email {
		font-size: 19px;
	}
	footer {
		display: block;
	}
	footer > a {
		display: block;
		margin-top: 18px;
	}
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	* {
		transition: none !important;
	}
	body:before {
		display: none;
	}
}
@media print {
	:root {
		color-scheme: light;
		--bg: #fff;
		--text: #111;
		--muted: #333;
		--accent: #155e75;
	}
	.layout {
		display: block;
		padding: 0;
	}
	.intro {
		position: static;
		height: auto;
		min-height: 0;
		padding: 0;
	}
	nav,
	.intro-bottom,
	.skip,
	footer,
	body:before {
		display: none;
	}
	main {
		padding: 30px 0;
	}
	.role,
	.project {
		break-inside: avoid;
	}
	section {
		margin-bottom: 30px;
	}
}

/* Bootstrap supplies the responsive grid, navigation, badges and utilities.
   These theme rules retain the approved portfolio typography and colours. */
:root,
[data-bs-theme="dark"] {
	--bs-body-bg: #0f172a;
	--bs-body-color: #94a3b8;
	--bs-body-font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	--bs-body-line-height: 1.65;
	--bs-heading-color: #e2e8f0;
	--bs-link-color: #e2e8f0;
	--bs-link-hover-color: #5eead4;
}
.nav {
	--bs-nav-link-color: #94a3b8;
	--bs-nav-link-hover-color: #e2e8f0;
}
.lead {
	font-weight: 400;
}
.badge {
	line-height: 1.65;
}
summary {
	display: list-item;
}
.role-body {
	min-width: 0;
}
@media (min-width: 992px) {
	.layout > .row {
		--bs-gutter-x: 56px;
	}
}
@media (max-width: 991.98px) {
	.layout > .row {
		--bs-gutter-x: 0;
	}
}
.nav .nav-link {
	display: flex;
	align-items: center;
	font-size: 12px;
	font-weight: 700;
	padding-top: 4px;
	padding-bottom: 4px;
	letter-spacing: 1.4px;
}
@media (max-width: 991.98px) {
	.nav .nav-link {
		font-size: 11px;
	}
}

/* Reserve enough room for a full date range; location always starts below it. */
.role-location {
	margin-top: 3px;
}
@media (min-width: 576px) {
	.role > .date {
		flex: 0 0 170px;
		width: 170px;
	}
	.role > .role-body {
		flex: 1 1 0;
		width: auto;
	}
}

/* Keep the original title size, with the specialism on its own line. */
.intro > div:first-child {
	width: 100%;
}
.intro .position {
	white-space: normal;
}

/* Contact stays with the desktop introduction and flows naturally on mobile. */
.intro {
	overflow-y: auto;
}
#contact {
	margin-bottom: 0;
	flex-shrink: 0;
	width: 100%;
	padding-top: 28px;
}
#contact .contact-heading {
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	margin: 0 0 8px;
}
#contact .email {
	display: block;
	font-size: 16px;
	margin: 0 0 12px;
	width: fit-content;
}
#contact p {
	display: block;
	font-size: 13px;
	margin: 0 0 10px;
	max-width: 310px;
}
#contact .contact-meta {
	margin-bottom: 0;
	line-height: 1.8;
}
@media (min-width: 992px) and (max-height: 850px) {
	.intro {
		padding-top: 40px;
		padding-bottom: 32px;
	}
	.intro nav {
		margin-top: 32px;
		gap: 12px;
	}
}
@media (max-width: 991.98px) {
	.intro {
		overflow: visible;
	}
	#contact {
		padding-top: 0;
		margin-top: 30px;
	}
}

#contact {
	container-type: inline-size;
}
#contact .contact-line {
	max-width: none;
	white-space: normal;
	font-size: 14px;
	line-height: 1.8;
	margin: 12px 0 0;
}
#contact .contact-line a {
	color: var(--muted);
}
#contact .contact-line a:hover {
	color: var(--accent);
}

#contact .contact-line {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 9px;
}
.contact-line > a,
.contact-line > span {
	white-space: nowrap;
}
#contact .contact-email {
	font-size: 16px;
}
.contact-divider {
	color: #64748b;
}

#contact .contact-location {
	font-size: 14px;
	margin: 8px 0 0;
	max-width: none;
}
.contact-location a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.contact-location svg {
	flex-shrink: 0;
}

.contact-email .email-arrow {
	display: inline-block;
	margin-left: 10px;
}
.contact-tip {
	position: relative;
}
.contact-tooltip {
	position: absolute;
	bottom: 100%;
	left: 0;
	z-index: 20;
	display: block;
	padding: 6px 10px;
	background: #e2e8f0;
	color: #0f172a;
	border-radius: 4px;
	box-shadow: 0 4px 14px #0004;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	white-space: nowrap;
	visibility: hidden;
	opacity: 0;
}
.contact-tip:hover .contact-tooltip,
.contact-tip:focus-visible .contact-tooltip {
	visibility: visible;
	opacity: 1;
}
.contact-tip.tip-dismissed .contact-tooltip {
	visibility: hidden;
	opacity: 0;
}

/* Accent only on hover; the active section keeps its original colour. */
@media (hover: hover) {
	.nav .nav-link:hover {
		color: var(--accent);
	}
	.nav .nav-link:hover span {
		background: var(--accent);
	}
}

/* Compact mobile navigation; the desktop section links keep their layout. */
.nav-shell {
	width: 100%;
}
.mobile-menu-bar {
	display: none;
}
.menu-toggle {
	color: var(--text);
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 12px;
	border: 0;
	border-radius: 6px;
	font-size: 13px;
	box-shadow: none;
}
.menu-toggle:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}
.close-lines {
	display: none;
}
.menu-open .close-lines {
	display: block;
}
.menu-open .hamburger-lines {
	display: none;
}
@media (max-width: 991.98px) {
	.intro {
		padding-top: 104px;
	}
	.nav-shell {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 100;
		background: rgba(15, 23, 42, 0.98);
		border-bottom: 1px solid #334155;
		padding: 10px 24px;
	}
	.mobile-menu-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
	}
	.mobile-brand {
		font-size: 16px;
		font-weight: 600;
		color: var(--text);
	}
	.nav-shell nav.nav {
		flex-direction: column !important;
		align-items: stretch;
		gap: 0;
		margin: 12px 0 0;
		padding: 8px 0;
		max-height: calc(100svh - 76px);
		overflow-y: auto;
	}
	.nav-shell nav .nav-link {
		padding: 12px 4px !important;
		min-height: 44px;
		font-size: 12px;
	}
	.menu-ready .nav-shell:not(.menu-open) nav {
		display: none;
	}
	html {
		scroll-padding-top: 92px;
	}
}
@media print {
	.nav-shell {
		display: none;
	}
}

@media (max-width: 991.98px) {
	main #contact {
		margin: 0 0 64px;
		padding-top: 0;
	}
	main #contact p {
		display: block;
	}
}

/* A single transparent introduction header on one-column screens. */
@media (max-width: 991.98px) {
	.intro {
		padding-top: 48px;
	}
	.intro h1 {
		padding-right: 64px;
	}
	.nav-shell {
		position: static;
		background: transparent;
		border: 0;
		padding: 0;
	}
	.mobile-menu-bar {
		position: absolute;
		top: 48px;
		right: 0;
		justify-content: flex-end;
	}
	.nav-shell nav.nav {
		margin-top: 24px;
		max-height: none;
		overflow: visible;
	}
	html {
		scroll-padding-top: 32px;
	}
}

@media (max-width: 991.98px) {
	.mobile-menu-bar {
		position: fixed;
		top: 16px;
		right: 24px;
		z-index: 102;
	}
	.menu-toggle {
		background: transparent;
	}
	.nav-shell nav.nav {
		position: fixed;
		top: 72px;
		right: 24px;
		z-index: 101;
		width: min(280px, calc(100vw - 48px));
		margin: 0;
		padding: 16px 20px;
		background: var(--bg);
		border-radius: 8px;
		box-shadow: 0 12px 30px #0005;
		max-height: calc(100svh - 96px);
		overflow-y: auto;
	}
}

.menu-toggle:hover {
	color: var(--accent);
}

.header-contact {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 9px;
	font-size: 14px;
	line-height: 1.8;
	color: var(--muted);
	margin: 20px 0 0;
}
.header-contact .contact-email {
	font-size: 16px;
}
.header-contact a:hover {
	color: var(--accent);
}

.name-with-portrait {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}
.portrait {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 50%;
	flex-shrink: 0;
}
.name-with-portrait h1 {
	margin: 0;
	padding-right: 0;
}
@media (max-width: 480px) {
	.portrait {
		width: 52px;
		height: 52px;
	}
	.name-with-portrait {
		gap: 12px;
	}
	.name-with-portrait h1 {
		font-size: 36px;
	}
}

.name-with-portrait {
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}
.name-with-portrait h1 {
	font-size: 48px;
}
@media (max-width: 480px) {
	.name-with-portrait h1 {
		font-size: 40px;
	}
}

.portrait {
	width: 88px;
	height: 88px;
}
@media (max-width: 480px) {
	.portrait {
		width: 64px;
		height: 64px;
	}
}

/* Let the page handle scrolling when the introduction cannot fit. */
@media (min-width: 992px) {
	.intro {
		height: auto;
		min-height: 100svh;
		align-self: flex-start;
		overflow: visible;
	}
	.intro.intro-too-tall {
		position: relative;
		top: auto;
	}
}
