/* Fonts: Nunito = name, headings and body; Caveat = handwritten asides;
   Architects Daughter = section titles. Swap any of them here and in
   index.html's Google Fonts <link>; nothing else references them. */

:root {
	--bg: #f6f9fd;
	--surface: #fff;
	--text: #18233a;          /* navy */
	--text-2: #4a5568;
	--text-3: #5f6a7b;
	--accent: #2b5fc4;
	--accent-strong: #1d469a;
	--line: #e2e9f3;
	--ink: #3e63ab;           /* pencil colour for the doodles */
	--tint: #e4edf9;          /* badges, screenshot stages */
	--chip-bg: #eaf1fc;
	--chip-text: #2b55a3;
	--live: #276b4c;          /* colour's one job on this page: "this is running" */
	--live-bg: #e3f3ea;
	--bar: #4a76c4;
	--bar-track: #e2e8f1;
	--scroll-thumb: #c5d2e4;
	--radius: 18px;
	--shadow: 0 1px 2px rgba(24, 35, 58, .05), 0 12px 32px rgba(36, 72, 140, .08);
	--header-h: 60px;
	--rail: 14rem;            /* left column: section names, timeline dates */

	--sp-1: .25rem;
	--sp-2: .5rem;
	--sp-3: .75rem;
	--sp-4: 1rem;
	--sp-5: 1.5rem;
	--sp-6: 2rem;
	--sp-7: 3rem;
	--sp-8: 4.5rem;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	accent-color: var(--accent);
	caret-color: var(--ink);
	scrollbar-color: var(--scroll-thumb) var(--bg);
	background: var(--bg);
	color: var(--text);
	font: 400 1rem/1.6 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }

::selection { background: #cddcf3; color: var(--text); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
	background: var(--scroll-thumb);
	border: 3px solid var(--bg);
	border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink); }

.wrap { width: min(1080px, 100% - 3rem); margin-inline: auto; }

[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

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

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

.skip-link {
	position: absolute;
	left: var(--sp-4);
	top: -100px;
	z-index: 100;
	padding: var(--sp-2) var(--sp-4);
	background: var(--surface);
	color: var(--accent);
	font-weight: 700;
	border-radius: 8px;
	box-shadow: var(--shadow);
}
.skip-link:focus { top: var(--sp-3); }

/* Feather-style icons: drawn as strokes, coloured by their container. */
.badge svg, .contact-row svg, .link svg, .view-all svg,
.email-pill svg, .footer-links svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.scribble {
	font-family: 'Caveat', 'Nunito', cursive;
	color: var(--ink);
	margin: 0;
}

/* ------------------------------------------------------------------ header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(246, 249, 253, .86);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(226, 233, 243, .7);
}

.header-inner {
	height: var(--header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-5);
}

.monogram {
	display: flex;
	align-items: center;
	min-height: 44px;
	font-weight: 800;
	font-size: 1.4rem;
	letter-spacing: .02em;
	text-decoration: none;
	flex: none;
}

.nav {
	display: flex;
	gap: var(--sp-6);
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 44px;
	font-size: .9375rem;
	color: var(--text-2);
	text-decoration: none;
	white-space: nowrap;
	transition: color .18s;
}
.nav a:hover { color: var(--text); }

.nav a[aria-current] { color: var(--accent); }
.nav a[aria-current]::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 8px;
	height: 2px;
	border-radius: 2px;
	background: var(--accent);
}

/* -------------------------------------------------------------------- hero */

.hero {
	background:
		radial-gradient(60% 80% at 85% 20%, rgba(255, 255, 255, .7), transparent 70%),
		linear-gradient(160deg, #eef4fc 0%, #e2ebf8 100%);
	padding: var(--sp-6) 0 var(--sp-7);
}

.hero-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: var(--sp-7);
	align-items: center;
}

.hi {
	font-size: 1.7rem;
	line-height: 1;
	margin-left: .2rem;
}

.name {
	font-size: clamp(2.2rem, 5.2vw, 3.4rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -.01em;
	/* Uppercase is presentation only: the source stays mixed case so screen
	   readers say the name instead of spelling "N-G". */
	text-transform: uppercase;
	margin: var(--sp-2) 0 var(--sp-3);
	position: relative;
	display: inline-block;
}

.name-mark {
	color: var(--ink);
	position: absolute;
	top: -.35em;
	right: -2.4rem;
}

.tagline {
	font-size: 1.35rem;
	font-weight: 800;
	margin: 0 0 var(--sp-4);
}

.affiliation {
	display: flex;
	align-items: center;
	gap: var(--sp-2);
	margin: calc(-1 * var(--sp-2)) 0 var(--sp-4);
	font-weight: 700;
	color: var(--text-2);
}
.affiliation img { width: 28px; height: 28px; flex: none; }

.bio {
	max-width: 52ch;
	color: var(--text-2);
	margin: 0 0 var(--sp-5);
}

.contact-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2) var(--sp-5);
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: .9375rem;
}

.contact-row li {
	display: flex;
	align-items: center;
	gap: var(--sp-2);
	color: var(--text-2);
}

.contact-row svg { width: 17px; height: 17px; flex: none; color: var(--text); }

.contact-row a { text-decoration: none; padding-block: var(--sp-1); }
.contact-row a:hover {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* polaroid */

.hero-photo {
	position: relative;
	display: grid;
	grid-template-columns: auto auto auto;
	align-items: center;
	justify-content: center;
	gap: var(--sp-3);
}

.photo-ticks { color: var(--ink); align-self: start; margin-top: 2.5rem; }

.polaroid {
	width: 236px;
	margin: 0;
	padding: 12px 12px 36px;
	background: #fff;
	border-radius: 3px;
	box-shadow: 0 2px 6px rgba(24, 35, 58, .1), 0 18px 38px rgba(36, 72, 140, .16);
	transform: rotate(3deg);
	position: relative;
}

.polaroid::before {              /* washi tape */
	content: '';
	position: absolute;
	top: -12px;
	left: 50%;
	width: 62px;
	height: 22px;
	background: rgba(132, 168, 226, .6);
	transform: translateX(-50%) rotate(-2deg);
}

.polaroid img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 4.6;
	object-fit: cover;
}

.aside {
	font-size: 1.6rem;
	line-height: 1.15;
	transform: rotate(-6deg);
	white-space: nowrap;
	align-self: start;
	margin-top: 3.5rem;
}

.smiley { font-size: 1.3rem; }

.aside-underline {
	display: block;
	width: 110px;
	margin-top: .15rem;
}

/* ---------------------------------------------------------------- sections */

.sections { padding: var(--sp-6) 0 var(--sp-7); }

.section {
	padding-block: var(--sp-7);
	border-top: 1px solid var(--line);
}
.section:first-child { border-top: 0; padding-top: var(--sp-4); }

.section-head {
	display: flex;
	align-items: center;
	gap: var(--sp-3);
	margin-bottom: var(--sp-5);
}

.section-head h2 {
	font-family: 'Architects Daughter', cursive;
	font-size: 1.65rem;
	font-weight: 400;
	line-height: 1.2;
	margin: 0;
}

.badge {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	flex: none;
	background: var(--tint);
	color: var(--ink);
}
.badge svg { width: 20px; height: 20px; }

/* Education and Skills: the section name sits in the left rail beside its
   record, the same rail the experience dates use, so all content lines up. */
.section-rail {
	display: grid;
	grid-template-columns: var(--rail) minmax(0, 1fr);
	align-items: start;
}
.section-rail .section-head { margin-bottom: 0; }

.view-all {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	min-height: 44px;
	font-size: .9375rem;
	font-weight: 600;
	color: var(--accent);
	text-decoration: none;
}
.view-all svg { width: 18px; height: 18px; transition: transform .2s; }
.view-all:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.view-all:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------- projects */

.card {
	background: var(--surface);
	border: 1px solid #e9eff7;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.project-featured {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: var(--sp-6);
	align-items: center;
	padding: var(--sp-4);
	padding-right: var(--sp-6);
}

/* A tablet on a pale stage, holding the real game mid-round. */
.shot-tablet {
	position: relative;
	background: var(--tint);
	border-radius: 14px;
	padding: var(--sp-6) var(--sp-6) 0;
	overflow: hidden;
	min-height: 15rem;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.shot-ticks { position: absolute; top: var(--sp-4); left: var(--sp-4); color: var(--ink); }

.tablet {
	width: 90%;
	padding: 10px 10px 0;
	background: #1b2333;
	border-radius: 18px 18px 0 0;
	box-shadow: 0 -2px 0 #2b3446 inset, 0 18px 36px rgba(24, 35, 58, .25);
	transform: rotate(-3deg) translateY(10px);
}
.tablet img {
	width: 100%;
	height: auto;
	border-radius: 9px 9px 0 0;
}

.project-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--sp-5);
	margin-top: var(--sp-5);
}

.project-pair .project {
	display: grid;
	grid-template-columns: 9.5rem minmax(0, 1fr);
	gap: var(--sp-5);
	padding: var(--sp-4);
	align-items: start;
}

.thumb {
	border-radius: 12px;
	overflow: hidden;
	background: var(--tint);
	box-shadow: 0 1px 2px rgba(24, 35, 58, .08), 0 8px 18px rgba(36, 72, 140, .1);
	aspect-ratio: 4 / 5;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
/* An app icon is shown whole on white, never cropped like a screenshot. */
.thumb-icon { background: #fff; padding: var(--sp-4); }
.thumb-icon img { object-fit: contain; }

/* The plugin's actual repair, from its README: there is no public screen to
   capture, and a mocked-up admin panel would invent numbers. */
.thumb-code {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--sp-1);
	padding: var(--sp-3);
	background: #fbfcfe;
	font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
	font-size: .6875rem;
	line-height: 1.45;
}
.code-label {
	font-family: 'Nunito', system-ui, sans-serif;
	font-size: .75rem;
	font-weight: 700;
	color: var(--text-3);
}
.code-label + code { margin-bottom: var(--sp-2); }
.thumb-code code {
	display: block;
	padding: var(--sp-2);
	border-radius: 6px;
	overflow-wrap: anywhere;
}
.code-bad { background: #fff5f5; color: #b4232a; text-decoration: line-through; text-decoration-color: rgba(180, 35, 42, .5); }
.code-good { background: #effaf3; color: #1f6b45; }

.project-head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--sp-2) var(--sp-3);
}

.project h3 {
	font-size: 1.2rem;
	font-weight: 800;
	line-height: 1.25;
	margin: 0;
}
.project-featured h3 { font-size: 1.55rem; }

.status {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .3rem .7rem;      /* same text inset as the chips */
	border-radius: 999px;
	font-size: .8125rem;
	font-weight: 700;
	line-height: 1.6;
}
.status-live { color: var(--live); background: var(--live-bg); }
.status-live::before {
	content: '';
	width: .45rem;
	height: .45rem;
	border-radius: 50%;
	background: currentColor;
}
.status-source { color: var(--text-2); background: #eef1f6; }

.meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--sp-3);
	margin: var(--sp-1) 0 0;
	font-size: .875rem;
	color: var(--text-3);
}
.when { font-variant-numeric: tabular-nums; white-space: nowrap; }

.desc { color: var(--text-2); margin: var(--sp-3) 0 0; max-width: 60ch; }
.project-pair .desc { font-size: .9375rem; margin-top: var(--sp-2); }

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2);
	list-style: none;
	margin: var(--sp-4) 0 0;
	padding: 0;
}
.tags li {
	background: var(--chip-bg);
	color: var(--chip-text);
	border-radius: 999px;
	padding: .3rem .75rem;
	font-size: .8125rem;
	font-weight: 600;
}
.project-pair .tags { margin-top: var(--sp-3); }

.link {
	/* Inline, not inline-flex: when a long URL wraps, the arrow stays glued
	   to its last word instead of being pushed to the far edge. */
	display: inline-block;
	margin-top: var(--sp-3);
	padding-block: var(--sp-1);
	font-size: .9375rem;
	font-weight: 600;
	color: var(--accent);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	overflow-wrap: anywhere;
	transition: color .18s;
}
.link svg { width: 16px; height: 16px; margin-left: .2rem; vertical-align: -2px; transition: transform .2s; }
.link:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
.link:hover svg { transform: translate(2px, -2px); }
.project-pair .link { font-size: .875rem; }
/* Long repo URLs break after the slash, never between the name and its arrow. */
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------- experience */

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

.tl-item {
	position: relative;
	display: grid;
	grid-template-columns: var(--rail) minmax(0, 1fr);
	padding-bottom: var(--sp-6);
}
.tl-item:last-child { padding-bottom: 0; }

/* The rail: one line from first dot to last, a dot per role. */
.tl-item::before {
	content: '';
	position: absolute;
	left: 19px;
	top: .55rem;
	bottom: -.55rem;
	width: 2px;
	background: #d6e2f3;
}
.tl-item:last-child::before { bottom: auto; height: 0; }
.tl-item::after {
	content: '';
	position: absolute;
	left: 15px;
	top: .4rem;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #5b84cf;
	outline: 4px solid var(--bg);   /* knocks the rail out around the dot */
}

.tl-when {
	margin: 0;
	padding-left: 3.25rem;
	font-size: .9375rem;
	color: var(--text-3);
	font-variant-numeric: tabular-nums;
}

.tl-body h3, .entry h3 {
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.3;
	margin: 0;
}

.org { margin: var(--sp-1) 0 0; color: var(--text-3); }

/* Employer logo beside the role: as tall as the title and company lines it
   sits next to, top-aligned so it lines up with the date and the rail dot. */
.tl-head { display: flex; align-items: flex-start; gap: var(--sp-3); }
.org-logo {
	width: 48px;
	height: 48px;
	flex: none;
	padding: 3px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--line);
}
.tl-head + .bullets, .tl-head + .indent { margin-left: calc(48px + var(--sp-3)); }

.sub { margin: var(--sp-2) 0 0; font-weight: 700; }
.strong { margin: var(--sp-3) 0 0; font-weight: 800; font-size: 1.05rem; }

.bullets {
	margin: var(--sp-2) 0 0;
	padding-left: 1.15rem;
	color: var(--text-2);
}
.bullets li + li { margin-top: var(--sp-1); }
.bullets li::marker { color: var(--ink); }

/* ----------------------------------------------------- education / skills */

.split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	/* The divider is drawn on the grid itself, centred between the two equal
	   columns, rather than as a border on the column that holds the text. */
	background: linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat;
}
.split > * { padding-right: var(--sp-6); }
.split > * + * { padding-left: var(--sp-6); padding-right: 0; }

.group + .group { margin-top: var(--sp-5); }

.group-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 var(--sp-3);
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2);
	list-style: none;
	margin: 0;
	padding: 0;
}
.chips li {
	background: var(--chip-bg);
	color: var(--chip-text);
	border-radius: 999px;
	padding: .3rem .8rem;
	font-size: .9375rem;
}

.langs { margin: 0; display: grid; gap: var(--sp-3); }
.lang {
	display: grid;
	grid-template-columns: 5.5rem minmax(0, 1fr);
	align-items: center;
	gap: var(--sp-4);
}
.lang dt { font-weight: 600; }
.lang dd {
	margin: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 3.5rem;
	align-items: center;
	gap: var(--sp-4);
}
.bar {
	display: block;
	height: 8px;
	border-radius: 999px;
	background: var(--bar-track);
	overflow: hidden;
}
.bar i { display: block; width: var(--w); height: 100%; border-radius: 999px; background: var(--bar); }
.lang-level { font-size: .875rem; color: var(--text-3); text-align: right; }

.cert h4 { font-size: 1rem; font-weight: 700; margin: 0; }
.cert + .cert { margin-top: var(--sp-4); }
.cert-note { margin: var(--sp-1) 0 0; font-size: .9375rem; color: var(--text-2); }

/* ------------------------------------------------------------------ footer */

.site-footer {
	position: relative;
	background: #e6eefa;
	padding: var(--sp-5) 0 var(--sp-7);
	margin-top: 56px;
}
.footer-wave {
	position: absolute;
	left: 0;
	bottom: 100%;
	width: 100%;
	height: 56px;
	fill: #e6eefa;
}

.footer-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: var(--sp-4) var(--sp-6);
}

.connect {
	font-size: 1.6rem;
	display: flex;
	align-items: center;
	gap: var(--sp-2);
	transform: rotate(-3deg);
}
.connect-arrow { flex: none; }

.email-pill {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	min-height: 44px;
	padding: var(--sp-2) var(--sp-5);
	border-radius: 999px;
	background: var(--surface);
	box-shadow: var(--shadow);
	color: var(--accent);
	font-weight: 600;
	text-decoration: none;
	transition: box-shadow .2s, transform .2s;
}
.email-pill svg { width: 18px; height: 18px; }
.email-pill:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(24, 35, 58, .06), 0 16px 34px rgba(36, 72, 140, .14); }

.footer-links {
	display: flex;
	gap: var(--sp-1);
	list-style: none;
	margin: 0;
	padding: 0;
}
.footer-links a {
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	color: var(--text);
	transition: color .18s, background .18s;
}
.footer-links a:hover { color: var(--accent); background: rgba(255, 255, 255, .7); }
.footer-links svg { width: 22px; height: 22px; }

.footer-hills { color: var(--ink); flex: none; }

/* --------------------------------------------------------------- responsive */

@media (max-width: 960px) {
	.hero-inner { grid-template-columns: 1fr; gap: var(--sp-6); }
	.hero-photo { justify-content: start; }
	.project-featured { grid-template-columns: 1fr; padding-right: var(--sp-4); }
	.project-featured .project-text { padding: 0 var(--sp-3) var(--sp-3); }
	.project-pair { grid-template-columns: 1fr; }
}

/* The rail folds away: section names move above their record, dates move
   above their role. */
@media (max-width: 760px) {
	:root { --rail: 0; }
	.section-rail { grid-template-columns: 1fr; }
	.section-rail .section-head { margin-bottom: var(--sp-5); }
	.split { grid-template-columns: 1fr; gap: var(--sp-6); background: none; }
	.split > *, .split > * + * { padding: 0; }
	.tl-item { grid-template-columns: 1fr; padding-left: 3rem; }
	.tl-when { padding-left: 0; margin-bottom: var(--sp-1); }
}

@media (max-width: 620px) {
	.wrap { width: min(1080px, 100% - 2rem); }
	.nav { gap: var(--sp-5); }
	.photo-ticks { display: none; }
	.hero-photo { grid-template-columns: auto auto; gap: var(--sp-4); }
	.polaroid { width: min(52vw, 210px); }
	.aside { font-size: 1.35rem; margin-top: 2rem; }
	.aside-underline { width: 88px; }
	.contact-row { flex-direction: column; }
	.tl-head + .bullets, .tl-head + .indent { margin-left: 0; }
	.project-pair .project { grid-template-columns: 1fr; }
	.thumb { aspect-ratio: 16 / 9; }
	.thumb-code { font-size: .75rem; }
	.shot-tablet { min-height: 0; padding: var(--sp-5) var(--sp-5) 0; }
	.footer-hills { display: none; }
}

/* Five links at a readable 14px on a 375px phone: give up spacing, not size.
   Narrower than that, the nav scrolls sideways rather than drop a link. */
@media (max-width: 430px) {
	.header-inner { width: min(1080px, 100% - 1.5rem); gap: var(--sp-2); }
	.nav { gap: var(--sp-3); }
	.nav a { font-size: .875rem; }
	.monogram { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition-duration: .01ms !important; }
}

/* This page is a résumé, so it will get printed and saved as PDF. */
@media print {
	.site-header, .skip-link, .scribble, .name-mark, .photo-ticks, .shot-ticks,
	.footer-wave, .footer-hills, .polaroid::before, .view-all { display: none; }
	body, .hero, .site-footer { background: #fff; }
	.hero { padding: 0 0 1rem; }
	.polaroid { transform: none; box-shadow: none; padding: 0; }
	.card { box-shadow: none; border: 1px solid #dcdfe3; }
	.tablet { transform: none; box-shadow: none; }
	.section, .card { break-inside: avoid; }
	.section { padding-block: 1.25rem; }
	.wrap { width: 100%; }
	a { text-decoration: none; }
}
