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

:root {
	--bg: #f7f8f9;
	--card: #fff;
	--card-tint: #f7faf8;
	--text: #1f2937;
	--text-2: #4b5563;
	--text-3: #7b8492;
	--accent: #2563eb;
	--line: #ebedf0;
	--pastel-blue: #dbeafe;
	--pastel-amber: #fef3c7;
	--pastel-purple: #ede9fe;
	--pastel-pink: #fee2e2;
	--pastel-green: #d3efe0;
	--chip-bg: #eff5ff;
	--chip-text: #2c4f92;
	--bar: #7cb083;
	--bar-track: #e4e7ea;
	--ink: #5b7295;          /* pencil colour for the doodles */
	--radius: 18px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px rgba(16, 24, 40, .05);
	--header-h: 60px;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	/* Full-bleed so the glow has no edge to be cut off against. It used to sit
	   on <main>, which is width-constrained, so it stopped dead at the content
	   box and showed a hard vertical seam bottom-right. */
	background-color: var(--bg);
	background-image: radial-gradient(72% 42% at 84% 76%, rgba(150, 199, 170, .13), transparent 72%);
	background-repeat: no-repeat;
	color: var(--text);
	font: 400 15px/1.65 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.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;
}

/* Feather-style icons: drawn as strokes, coloured by their container.
   .project-art keeps its own inline fills and is deliberately excluded. */
.badge svg, .contact-row svg, .link 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(247, 248, 249, .82);
	backdrop-filter: blur(10px);
}

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

.monogram {
	font-family: 'Architects Daughter', cursive;
	font-size: 1.6rem;
	letter-spacing: .02em;
	text-decoration: none;
	flex: none;
}

.nav {
	display: flex;
	gap: 1.6rem;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
	position: relative;
	padding: .35rem 0;
	font-size: .9rem;
	color: var(--text-2);
	text-decoration: none;
	white-space: nowrap;
	transition: color .18s;
}
.nav a:hover { color: var(--text); }

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

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

.hero {
	background: linear-gradient(168deg, #f3f5f7 0%, #e9edf1 100%);
	padding-bottom: 2.2rem;
}

.hero-inner {
	display: grid;
	grid-template-columns: 1fr 350px;
	gap: 2.5rem;
	align-items: center;
	padding: 1.9rem 0 .5rem;
}

.hi {
	font-size: 1.5rem;
	margin-left: .3rem;
}

.name {
	font-family: 'Architects Daughter', cursive;
	font-size: clamp(2rem, 5vw, 3.1rem);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: .01em;
	margin: .05rem 0 .6rem;
	position: relative;
	display: inline-block;
}

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

.tagline {
	font-size: 1.28rem;
	font-weight: 600;
	color: var(--text);
	margin: 0 0 .85rem;
}

.bio {
	max-width: 42ch;
	line-height: 1.55;
	color: var(--text-2);
	margin: 0 0 1.25rem;
}

.contact-row {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: .74rem;
}

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

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

.contact-row a { text-decoration: none; }
.contact-row a:hover { color: var(--accent); text-decoration: underline; }

/* polaroid */

.hero-photo { position: relative; justify-self: center; }

.polaroid {
	width: 218px;
	margin: 0;
	padding: 12px 12px 34px;
	background: #fff;
	border-radius: 3px;
	box-shadow: 0 2px 6px rgba(16, 24, 40, .1), 0 16px 34px rgba(16, 24, 40, .13);
	transform: rotate(2deg);
	position: relative;
}

.polaroid::before {              /* washi tape */
	content: '';
	position: absolute;
	top: -11px;
	left: 50%;
	width: 58px;
	height: 21px;
	background: rgba(146, 178, 224, .55);
	transform: translateX(-50%) rotate(-3deg);
}

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

.aside {
	position: absolute;
	top: 22%;
	left: calc(100% + 1.4rem);
	font-size: 1.6rem;
	line-height: 1.15;
	transform: rotate(-5deg);
	white-space: nowrap;
}

.smiley { font-size: 1.3rem; }

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

/* ------------------------------------------------------------------- cards */

main {
	padding: 2.6rem 0 1rem;
}

.bento-top {
	display: grid;
	grid-template-columns: 4fr 3fr 5fr;
	gap: 20px;
	align-items: start;
	margin-bottom: 20px;
}

.columns {
	display: grid;
	grid-template-columns: 11fr 13fr;
	gap: 20px;
	align-items: start;
}

.col { display: grid; gap: 20px; align-content: start; }

.card {
	background: var(--card);
	border: 1px solid #eff1f3;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.5rem 1.45rem;
}

.card-tint { background: var(--card-tint); }

.card h2 {
	display: flex;
	align-items: center;
	gap: .7rem;
	font-family: 'Architects Daughter', cursive;
	font-size: 1.32rem;
	font-weight: 400;
	margin: 0 0 1.15rem;
}

.badge {
	width: 42px;
	height: 42px;
	border-radius: 13px;
	display: grid;
	place-items: center;
	flex: none;
}
.badge svg { width: 21px; height: 21px; }

.badge-blue   { background: var(--pastel-blue);   color: #2f5ea8; }
.badge-green  { background: var(--pastel-green);  color: #2f7a58; }
.badge-amber  { background: var(--pastel-amber);  color: #8a6218; }
.badge-purple { background: var(--pastel-purple); color: #5b45a8; }
.badge-pink   { background: var(--pastel-pink);   color: #a4494b; }

/* chips */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.chips li {
	background: var(--chip-bg);
	color: var(--chip-text);
	border-radius: 999px;
	padding: .34rem .78rem;
	font-size: .8rem;
}

.chip-year {
	display: inline-block;
	background: #eef0f2;
	color: var(--text-3);
	border-radius: 6px;
	padding: .12rem .5rem;
	font-size: .72rem;
}

/* languages */

.langs { margin: 0; }

.lang {
	display: grid;
	grid-template-columns: 88px 1fr;
	gap: .9rem;
	align-items: center;
	margin-bottom: 1rem;
}
.lang:last-child { margin-bottom: 0; }

.lang dt { font-size: .88rem; font-weight: 600; }
.lang dd { margin: 0; display: grid; gap: .32rem; }

.lang-level { font-size: .72rem; color: var(--text-3); }

.bar {
	display: block;
	height: 8px;
	border-radius: 999px;
	background: var(--bar-track);
	overflow: hidden;
}
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--bar); }

/* entries */

.entry {
	padding-bottom: .95rem;
	margin-bottom: .95rem;
	border-bottom: 1px solid var(--line);
}
.entry-last, .entry:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }

.entry-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
}

.entry h3 {
	font-size: .95rem;
	font-weight: 700;
	margin: 0;
}

.when { font-size: .78rem; color: var(--text-3); white-space: nowrap; flex: none; }

.entry-org {
	font-size: .82rem;
	font-weight: 600;
	color: var(--text-3);
	margin: .2rem 0 0;
}

.entry-sub, .plain {
	font-size: .85rem;
	color: var(--text-2);
	margin: .25rem 0 0;
}
.plain { margin: 0; }

.bullets {
	margin: .4rem 0 0;
	padding-left: 1.15rem;
	font-size: .85rem;
	color: var(--text-2);
}
.bullets li { margin-bottom: .2rem; }
.bullets ::marker, .bullets li::marker { color: var(--text-3); }

/* projects */

.project { display: grid; grid-template-columns: 1fr 130px; gap: 1rem; }
.project-body > p { margin: .35rem 0 0; }
.project-art { align-self: start; background: var(--pastel-blue); border-radius: 12px; padding: .4rem; }

.link {
	display: flex;
	align-items: center;
	gap: .45rem;
	font-size: .84rem;
	overflow-wrap: anywhere;
}
.link svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.link a { color: var(--accent); }

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

.site-footer { padding: 2.5rem 0 3rem; }

.footer-inner {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1.1rem;
}

.connect {
	font-size: 1.45rem;
	display: flex;
	align-items: center;
	gap: .5rem;
}
.connect-arrow { flex: none; }

.footer-divider { width: 1px; height: 26px; background: #d8dce0; }

.footer-links {
	display: flex;
	gap: .35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-links a {
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	color: var(--text-2);
	transition: color .18s, background .18s;
}
.footer-links a:hover { color: var(--accent); background: #edf1f6; }
.footer-links svg { width: 20px; height: 20px; }

.footer-hills { color: var(--ink); flex: none; margin-left: .6rem; }

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

@media (max-width: 900px) {
	.hero-inner { grid-template-columns: 1fr; gap: 2.2rem; padding-bottom: 0; }
	.hero-photo { justify-self: start; display: flex; align-items: center; gap: 2.5rem; }
	.aside { position: static; transform: rotate(-3deg); }
}

@media (max-width: 860px) {
	.bento-top, .columns { grid-template-columns: 1fr; }
	/* Collapsed to one column the two stacks would interleave as
	   Experience, DSE, Projects, Certifications. Flatten them and restate the
	   reading order so Projects follows Experience. */
	.col { display: contents; }
	#experience { order: 1; }
	#projects   { order: 2; }
	.card-blog  { order: 3; }
	.card-dse   { order: 4; }
	.card-certs { order: 5; }
}

@media (max-width: 620px) {
	.wrap { width: min(1080px, 100% - 2rem); }
	.nav { gap: 1.05rem; }
	.nav a { font-size: .8rem; }
	/* Keep the scribble beside the photo rather than under it; the polaroid
	   gives up width so both still fit a narrow phone. */
	.hero-photo { gap: 1.1rem; }
	.polaroid { width: min(52vw, 200px); }
	.aside { font-size: 1.35rem; }
	.aside-underline { width: 92px; }
	.contact-row { gap: .5rem 1.2rem; }
	.project { grid-template-columns: 1fr; }
	.project-art { justify-self: start; width: 130px; }
	.entry-head { flex-direction: column; gap: .1rem; }
	.footer-inner { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 430px) {
	/* Seven links on a 375px phone: tighten spacing rather than shrink the
	   text further, so the tap targets stay usable. Narrower than that the
	   nav scrolls sideways instead of dropping a link. */
	.nav { gap: .5rem; }
	.nav a { font-size: .72rem; }
	.monogram { font-size: 1.35rem; }
	.header-inner { gap: .55rem; }
}

@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, .scribble, .name-mark, .connect-arrow, .footer-hills,
	.project-art, .polaroid::before { display: none; }
	body, .hero, main, .card { background: #fff; }
	.project { grid-template-columns: 1fr; }
	.hero { padding-bottom: 1rem; }
	.hero-inner { padding-top: 0; }
	.polaroid { transform: none; box-shadow: none; padding: 0; }
	.card { box-shadow: none; border: 1px solid #dcdfe3; break-inside: avoid; }
	.wrap { width: 100%; }
	a { text-decoration: none; }
}
