/* ==========================================================================
   Jon Stauffer: Personal Site
   Warm, editorial light theme: sage + evergreen on off-white, Fraunces + Inter.
   ========================================================================== */

/* Theme tokens ------------------------------------------------------------- */

:root {
	--canvas: #f5f4ee;
	--surface: #ffffff;
	--ink: #23271f;
	--ink-soft: #5b6157;
	--sage: #6b8168;
	--sage-dark: #546a52;
	--sage-tint: #e7ede4;
	--evergreen: #37483a;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--radius: 16px;
	--container: 1152px;
	--serif: 'Fraunces', Georgia, serif;
	--sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Reset & base ------------------------------------------------------------- */

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

body {
	margin: 0;
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--canvas);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

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

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

h1,
h2,
h3 {
	font-family: var(--serif);
	font-weight: 600;
	margin: 0;
}

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

/* Buttons ------------------------------------------------------------------ */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.btn svg {
	width: 16px;
	height: 16px;
	transition: transform 0.2s ease;
}

.btn-primary {
	background: var(--evergreen);
	color: var(--canvas);
	padding: 12px 24px;
}

.btn-primary:hover {
	background: var(--sage);
}

.btn-primary:hover svg {
	transform: translateX(2px);
}

.btn-outline {
	background: var(--surface);
	border: 1px solid rgba(35, 39, 31, 0.15);
	color: var(--ink);
}

.btn-outline:hover {
	border-color: var(--sage);
	color: var(--evergreen);
}

.btn-ghost {
	color: var(--ink-soft);
}

.btn-ghost:hover {
	color: var(--evergreen);
}

/* Navigation --------------------------------------------------------------- */

.nav {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid transparent;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav.is-scrolled {
	background: rgba(245, 244, 238, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom-color: var(--sage-tint);
}

.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 16px;
	padding-bottom: 16px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--serif);
	font-size: 18px;
	font-weight: 600;
}

.brand-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--sage);
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-links a {
	display: block;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	color: var(--ink-soft);
}

.nav-links a:hover,
.nav-links a.is-active {
	background: var(--sage-tint);
	color: var(--evergreen);
}

.nav-cta {
	padding: 8px 16px;
}

.nav-toggle {
	display: none;
	padding: 8px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--ink);
	cursor: pointer;
}

.nav-toggle svg {
	width: 22px;
	height: 22px;
	display: block;
}

@media (max-width: 860px) {
	.nav-cta {
		display: none;
	}

	.nav-toggle {
		display: block;
	}

	.nav-links {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px 24px 16px;
		background: var(--canvas);
		border-top: 1px solid var(--sage-tint);
		border-bottom: 1px solid var(--sage-tint);
	}

	.nav-links.is-open {
		display: flex;
	}

	.nav-links a {
		padding: 12px 8px;
		font-size: 16px;
		border-radius: 8px;
	}

	.nav-links a:hover,
	.nav-links a.is-active {
		background: none;
	}
}

/* Hero --------------------------------------------------------------------- */

.hero {
	padding: 96px 0 64px;
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 64px;
	align-items: center;
}

.hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border: 1px solid var(--sage-tint);
	border-radius: 999px;
	background: var(--surface);
	font-size: 14px;
	font-weight: 500;
	color: var(--ink-soft);
}

.pulse {
	position: relative;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--sage);
}

.pulse::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--sage);
	opacity: 0.6;
	animation: ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
	75%,
	100% {
		transform: scale(2.4);
		opacity: 0;
	}
}

.hero-title {
	margin-top: 24px;
	font-family: var(--sans);
	font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.5rem);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.025em;
}

.hero-tagline {
	max-width: 36rem;
	margin: 24px 0 0;
	font-size: 18px;
	line-height: 1.65;
	color: var(--ink-soft);
}

.hero-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

.hero-meta li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: var(--ink-soft);
}

.hero-meta i {
	color: var(--sage);
	width: 16px;
	text-align: center;
}

.hero-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 36px;
}

.hero-portrait {
	position: relative;
	width: 100%;
	max-width: 384px;
	margin: 0 auto;
}

.hero-portrait::before {
	content: '';
	position: absolute;
	inset: -12px;
	z-index: -1;
	border-radius: 2rem;
	background: var(--sage-tint);
}

.hero-portrait img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center 30%;
	border-radius: 1.75rem;
	box-shadow: 0 20px 25px -5px rgba(55, 72, 58, 0.1), 0 8px 10px -6px rgba(55, 72, 58, 0.1);
}

/* Stats */

.stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	margin: 64px 0 0;
	border: 1px solid var(--sage-tint);
	border-radius: var(--radius);
	background: var(--sage-tint);
	overflow: hidden;
}

.stats > div {
	padding: 28px 24px;
	background: var(--surface);
}

.stat-num {
	font-family: var(--serif);
	font-size: 30px;
	font-weight: 600;
	color: var(--evergreen);
	line-height: 1.2;
}

.stat-label {
	margin: 4px 0 0;
	font-size: 14px;
	color: var(--ink-soft);
}

@media (max-width: 1024px) {
	.hero {
		padding-top: 64px;
	}

	.hero-grid {
		grid-template-columns: 1fr;
		gap: 48px;
	}
}

@media (max-width: 768px) {
	.stats {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Sections ----------------------------------------------------------------- */

.section {
	padding: 80px 0;
	scroll-margin-top: 72px;
}

.section-head {
	margin-bottom: 40px;
}

.section-eyebrow {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--sage);
}

.section-title {
	margin-top: 8px;
	font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3rem);
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.card {
	border: 1px solid var(--sage-tint);
	border-radius: var(--radius);
	background: var(--surface);
	padding: 28px;
}

@media (max-width: 768px) {
	.section {
		padding: 64px 0;
	}
}

/* About */

.about-card {
	padding: 36px;
}

.about-card p {
	margin: 0;
	max-width: 46rem;
	font-size: 17px;
	line-height: 1.75;
	color: var(--ink-soft);
}

.about-card p + p {
	margin-top: 16px;
}

.about-card strong {
	color: var(--ink);
	font-weight: 600;
}

/* Experience */

.timeline {
	display: grid;
	gap: 24px;
}

.role {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 24px;
	padding: 36px;
}

.role-meta {
	padding-right: 24px;
	border-right: 1px solid var(--sage-tint);
}

.role-date {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--evergreen);
}

.role-place {
	margin: 4px 0 0;
	font-size: 14px;
	color: var(--ink-soft);
}

.role-title {
	font-size: 24px;
	line-height: 1.3;
}

.role-org {
	margin-left: 4px;
	font-family: var(--sans);
	font-size: 16px;
	font-weight: 500;
	color: var(--ink-soft);
	vertical-align: middle;
}

.role-summary {
	margin: 8px 0 0;
	font-size: 14px;
	font-style: italic;
	color: var(--ink-soft);
}

.role-bullets {
	display: grid;
	gap: 16px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.role-bullets li {
	position: relative;
	padding-left: 18px;
	line-height: 1.65;
	color: var(--ink-soft);
}

.role-bullets li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.65em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--sage);
}

.role-bullets b {
	font-weight: 600;
	color: var(--ink);
}

@media (max-width: 768px) {
	.role {
		grid-template-columns: 1fr;
		padding: 28px;
	}

	.role-meta {
		padding-right: 0;
		border-right: 0;
	}
}

/* Skills */

.skill-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.skill-group {
	padding: 24px;
}

.skill-group h3 {
	font-family: var(--sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--evergreen);
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.tags li {
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--sage-tint);
	font-size: 14px;
	font-weight: 500;
	color: var(--evergreen);
}

@media (max-width: 768px) {
	.skill-grid {
		grid-template-columns: 1fr;
	}
}

/* Education & certifications */

.list-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.cred-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.cred-head h3 {
	font-size: 20px;
	line-height: 1.35;
}

.cred-date {
	white-space: nowrap;
	font-size: 14px;
	font-weight: 500;
	color: var(--sage);
}

.cred-sub {
	margin: 12px 0 0;
	font-weight: 500;
}

.cred-extra {
	margin: 12px 0 0;
	line-height: 1.65;
	color: var(--ink-soft);
}

@media (max-width: 768px) {
	.list-grid {
		grid-template-columns: 1fr;
	}
}

/* Contact */

.contact-card {
	margin-top: 32px;
	padding: 48px;
	border-radius: var(--radius);
	background: var(--evergreen);
}

.contact-card p {
	max-width: 42rem;
	margin: 0;
	font-size: 18px;
	line-height: 1.65;
	color: var(--sage-tint);
}

.contact-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

.btn-light {
	background: var(--canvas);
	color: var(--evergreen);
}

.btn-light:hover {
	background: var(--sage-tint);
}

.btn-on-dark {
	border: 1px solid rgba(231, 237, 228, 0.3);
	color: var(--sage-tint);
}

.btn-on-dark:hover {
	background: rgba(255, 255, 255, 0.05);
	color: var(--sage-tint);
}

@media (max-width: 768px) {
	.contact-card {
		padding: 32px;
	}
}

/* Footer ------------------------------------------------------------------- */

.footer {
	border-top: 1px solid var(--sage-tint);
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 32px;
	padding-bottom: 32px;
	font-size: 14px;
	color: var(--ink-soft);
}

.footer-inner p {
	margin: 0;
}

.footer-links {
	display: flex;
	gap: 20px;
}

.footer-links a:hover {
	color: var(--evergreen);
}

/* Reveal on scroll --------------------------------------------------------- */

.reveal {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.is-visible {
	opacity: 1;
	transform: none;
}
