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

/* Visual system */
:root {
	--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	--font-display:
		'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
	--ink: #101c2c;
	--ink-soft: #3f4853;
	--muted: #76766f;
	--paper: #f4efe6;
	--paper-deep: #e9e1d4;
	--line: #d8cebd;
	--bronze: #8a6842;
	--bronze-dark: #664a2d;
	--max-width: 820px;
	--transition: 180ms ease;
}

html {
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-behavior: smooth;
	scroll-padding-top: 96px;
}

body {
	min-height: 100dvh;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-sans);
	line-height: 1.65;
}

a,
button {
	-webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--bronze);
	outline-offset: 4px;
}

.skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 20;
	padding: 10px 14px;
	transform: translateY(-150%);
	background: var(--ink);
	color: var(--paper);
	font-size: 13px;
	text-decoration: none;
	transition: transform var(--transition);
}

.skip-link:focus {
	transform: translateY(0);
}

.container {
	width: min(calc(100% - 64px), var(--max-width));
	margin: 0 auto;
}

/* Masthead */
.masthead {
	padding-top: 32px;
}

.hero-grid {
	padding: 32px 0 40px;
}

.hero-copy {
	margin-top: 22px;
}

.eyebrow,
.section-kicker {
	color: var(--bronze-dark);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.eyebrow {
	margin-bottom: 16px;
}

.name-lockup {
	display: flex;
	align-items: center;
	gap: 16px;
}

.brand-logo {
	display: block;
	width: 72px;
	height: auto;
	flex: 0 0 auto;
}

.header-name {
	max-width: 610px;
}

.portrait-frame {
	width: 120px;
	aspect-ratio: 1;
	margin: 0;
}

.header-avatar {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 12px;
	object-fit: cover;
	object-position: center;
	filter: saturate(0.72) contrast(1.03);
}

/* Contact details */
.contact-section {
	padding: 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.contact-links {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr 1fr;
}

.contact-row {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding: 20px 22px;
	border-right: 1px solid var(--line);
}

.contact-row:last-child {
	border-right: 0;
}

.contact-row svg {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	color: var(--bronze);
	stroke-width: 1.5;
}

.contact-row a,
.contact-row span {
	overflow: hidden;
	color: var(--ink-soft);
	font-size: 15px;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color var(--transition);
}

.contact-row a:hover {
	color: var(--bronze-dark);
}

/* Navigation */
nav {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	gap: 38px;
	padding: 28px 0;
	background: rgba(244, 239, 230, 0.96);
}

nav a {
	position: relative;
	color: var(--muted);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-decoration: none;
	transition: color var(--transition);
}

nav a span {
	margin-right: 6px;
	color: var(--bronze);
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 400;
}

nav a:hover,
nav a.active {
	color: var(--ink);
}

/* Shared sections */
main section {
	padding: 64px 0 0;
}

.section-heading {
	margin-bottom: 32px;
}

.section-kicker {
	margin-bottom: 12px;
}

.header-name,
.section-title,
.intro-heading {
	font-family: var(--font-display);
	font-size: clamp(2rem, 3.2vw, 3rem);
	font-weight: 400;
	letter-spacing: -0.045em;
	line-height: 1.05;
}

.section-summary {
	max-width: 550px;
	margin-top: 16px;
	color: var(--muted);
	font-size: 14px;
}

/* Introduction */
.intro {
	display: block;
	padding: 40px 0 64px;
}

.intro-heading {
	max-width: 750px;
}

.intro .dropcap {
	max-width: 730px;
	margin-top: 0;
	color: var(--ink-soft);
	font-family: var(--font-display);
	font-size: clamp(1rem, 1.4vw, 1.125rem);
	line-height: 1.75;
}

.intro-heading + .dropcap {
	margin-top: 32px;
}

.dropcap-mark {
	position: relative;
	isolation: isolate;
	float: left;
	display: grid;
	width: 92px;
	height: 92px;
	margin: 3px 18px 2px 0;
	place-items: center;
}

.dropcap-backdrop {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: url('media/dropcap-ornament.svg') center / contain no-repeat;
	filter: sepia(0.45);
	opacity: 0.48;
}

.dropcap-letter {
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 3.8rem;
	line-height: 1;
}

/* Services */
.services-list {
	list-style: none;
	counter-reset: services;
}

.service-item {
	border-top: 1px solid var(--line);
	counter-increment: services;
}

.service-item:last-child {
	border-bottom: 1px solid var(--line);
}

.service-header {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) 34px;
	gap: 16px;
	align-items: center;
	width: 100%;
	padding: 25px 4px;
	border: 0;
	background: transparent;
	color: var(--ink);
	font-family: inherit;
	text-align: left;
	cursor: pointer;
	transition:
		padding var(--transition),
		background var(--transition);
}

.service-header::before {
	color: var(--bronze);
	content: counter(services, decimal-leading-zero);
	font-family: var(--font-display);
	font-size: 13px;
}

.service-name {
	font-family: var(--font-display);
	font-size: clamp(1.18rem, 2.2vw, 1.5rem);
	line-height: 1.35;
	transition: color var(--transition);
}

.service-chevron {
	width: 29px;
	height: 29px;
	padding: 8px;
	border: 1px solid var(--line);
	border-radius: 50%;
	color: var(--bronze-dark);
	stroke-width: 1.5;
	transition:
		transform 300ms ease,
		background var(--transition);
}

.service-header:hover {
	padding-right: 12px;
	padding-left: 12px;
	background: rgba(233, 225, 212, 0.42);
}

.service-header:hover .service-name,
.service-item.open .service-name {
	color: var(--bronze-dark);
}

.service-item.open .service-chevron {
	transform: rotate(180deg);
	background: var(--paper-deep);
}

.service-body {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition:
		max-height 400ms ease,
		opacity 250ms ease;
}

.service-item.open .service-body {
	opacity: 1;
}

.service-body-inner {
	max-width: 760px;
	padding: 0 50px 30px 68px;
}

.service-body-inner p {
	color: var(--ink-soft);
	font-size: 14px;
	line-height: 1.8;
}

.service-body-inner p + p {
	margin-top: 12px;
}

/* Education */
.education-list {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	column-gap: 40px;
	list-style: none;
}

.education-item {
	min-height: 205px;
	padding: 28px 0px;
	background: var(--paper);
}

.education-item + .education-item {
	position: relative;
}

.education-item + .education-item::before {
	position: absolute;
	top: 28px;
	bottom: 28px;
	left: -20px;
	border-left: 1px solid var(--line);
	content: '';
}

.edu-year {
	display: inline-block;
	margin-bottom: 52px;
	color: var(--bronze-dark);
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: 0.12em;
}

.edu-degree {
	max-width: 360px;
	font-family: var(--font-display);
	font-size: clamp(1.2rem, 2vw, 1.45rem);
	line-height: 1.35;
}

.edu-school {
	margin-top: 8px;
	color: var(--muted);
	font-size: 12px;
	line-height: 1.5;
}

/* Footer */
footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	margin-top: 72px;
	padding: 28px 0 36px;
}

.footer-name {
	font-family: var(--font-display);
	font-size: 18px;
}

.footer-name span {
	color: var(--bronze-dark);
	font-size: 13px;
}

.footer-legal {
	max-width: 400px;
	color: var(--muted);
	font-size: 10px;
	line-height: 1.5;
	text-align: right;
}

@media (max-width: 760px) {
	.container {
		width: min(calc(100% - 40px), var(--max-width));
	}

	.masthead {
		padding-top: 22px;
	}

	.hero-grid {
		padding: 28px 0 36px;
	}

	.contact-links {
		grid-template-columns: 1fr 1fr;
	}

	.contact-row {
		padding: 18px 14px;
	}

	.contact-row:nth-child(2) {
		border-right: 0;
	}

	.contact-row:last-child {
		grid-column: 1 / -1;
		border-top: 1px solid var(--line);
	}
}

@media (max-width: 540px) {
	html {
		scroll-padding-top: 78px;
	}

	.hero-grid {
		padding: 28px 0 36px;
	}

	.hero-copy {
		margin-top: 20px;
	}

	.intro {
		padding: 36px 0 56px;
	}

	.name-lockup {
		gap: 10px;
	}

	.brand-logo {
		width: 52px;
	}

	.contact-links {
		display: block;
	}

	.contact-row {
		padding: 18px 0;
		border-right: 0;
		border-bottom: 1px solid var(--line);
	}

	.contact-row:last-child {
		border-top: 0;
		border-bottom: 0;
	}

	nav {
		gap: 23px;
		padding: 24px 0;
		overflow-x: auto;
	}

	nav a {
		flex: 0 0 auto;
	}

	main section {
		padding-top: 56px;
	}

	.section-kicker {
		margin-bottom: 12px;
	}

	.section-title,
	.intro-heading {
		font-size: clamp(1.9rem, 8.5vw, 2.6rem);
	}

	.header-name {
		font-size: clamp(1.75rem, 8vw, 2rem);
		white-space: nowrap;
	}

	.section-summary {
		margin-top: 18px;
	}

	.dropcap-mark {
		width: 78px;
		height: 78px;
		margin-right: 14px;
	}

	.dropcap-letter {
		font-size: 3.2rem;
	}

	.section-heading {
		margin-bottom: 28px;
	}

	.service-header {
		grid-template-columns: 28px minmax(0, 1fr) 30px;
		gap: 10px;
		padding: 22px 2px;
	}

	.service-header:hover {
		padding-right: 2px;
		padding-left: 2px;
	}

	.service-name {
		font-size: 1.15rem;
	}

	.service-chevron {
		width: 28px;
		height: 28px;
	}

	.service-body-inner {
		padding: 0 4px 26px 38px;
	}

	.education-list {
		grid-template-columns: 1fr;
		row-gap: 40px;
	}

	.education-item {
		min-height: 180px;
	}

	.education-item + .education-item::before {
		top: -20px;
		right: 0;
		bottom: auto;
		left: 0;
		border-top: 1px solid var(--line);
		border-left: 0;
	}

	.edu-year {
		margin-bottom: 38px;
	}

	footer {
		display: block;
	}

	.footer-legal {
		margin-top: 16px;
		text-align: left;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
