@import url(fontawesome-all.min.css);
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

/* -------------------------------------------------------------
   Tokens
------------------------------------------------------------- */
:root {
	--bg: #f5f2ea;
	--bg-alt: #eae5d8;
	--card: #ffffff;
	--ink: #181512;
	--ink-soft: #5b564d;
	--ink-faint: #8a8477;
	--line: rgba(24, 21, 18, 0.12);
	--accent: #c1440e;
	--accent-ink: #fff7ef;
	--accent-soft: rgba(193, 68, 14, 0.1);
	--focus: #1f6f5c;

	--font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--max: 1080px;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(24,21,18,.04), 0 8px 24px -12px rgba(24,21,18,.18);
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #121110;
		--bg-alt: #1a1815;
		--card: #1c1a17;
		--ink: #f3efe6;
		--ink-soft: #c3bdb0;
		--ink-faint: #8d8778;
		--line: rgba(243, 239, 230, 0.12);
		--accent: #ff8548;
		--accent-ink: #201200;
		--accent-soft: rgba(255, 133, 72, 0.14);
		--focus: #5fd6b6;
		color-scheme: dark;
	}
}

/* -------------------------------------------------------------
   Reset
------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
address { font-style: normal; }

body {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
	font-family: var(--font-sans);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { color: var(--ink-soft); }
p + p { margin-top: 1em; }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	font-family: var(--font-mono);
	font-size: .78rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--accent);
}
.eyebrow::before {
	content: "";
	width: 1.4em;
	height: 1px;
	background: var(--accent);
}

/* -------------------------------------------------------------
   Layout helpers
------------------------------------------------------------- */
.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 1.5rem;
}

.section {
	padding: 4.5rem 0;
}
.section--alt { background: var(--bg-alt); }
.section--tight { padding: 3rem 0; }

.section-head {
	max-width: 640px;
	margin-bottom: 2.5rem;
}
.section-head h2 { margin-top: .6rem; }
.section-head p { margin-top: .85rem; }

/* -------------------------------------------------------------
   Buttons / tags
------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	padding: .75em 1.4em;
	border-radius: 999px;
	font-weight: 600;
	font-size: .95rem;
	border: 1px solid var(--ink);
	transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
	background: var(--ink);
	color: var(--bg);
}
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost {
	background: transparent;
	color: var(--ink);
	border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); }
.btn[disabled], .btn.is-disabled {
	opacity: .5;
	pointer-events: none;
}
.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: .9rem;
	margin-top: 1.75rem;
}

.tag {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: .74rem;
	letter-spacing: .02em;
	padding: .3em .7em;
	border-radius: 6px;
	background: var(--accent-soft);
	color: var(--accent);
	border: 1px solid transparent;
}
.tag-row { display: flex; flex-wrap: wrap; gap: .45rem; }

.badge {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	font-family: var(--font-mono);
	font-size: .72rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: .3em .65em;
	border-radius: 999px;
	border: 1px solid var(--line);
	color: var(--ink-soft);
}
.badge::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: var(--ink-faint); }
.badge--public::before { background: #2c8f4b; }
.badge--private::before { background: var(--ink-faint); }
.badge--dev::before { background: var(--accent); }

/* -------------------------------------------------------------
   Header / nav
------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 4.25rem;
}
.logo {
	font-family: var(--font-mono);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: .01em;
}
.logo span { color: var(--accent); }

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.2rem;
	height: 2.2rem;
}
.nav-toggle span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--ink);
	transition: transform .2s ease, opacity .2s ease;
}

.nav-primary {
	display: flex;
	align-items: center;
	gap: 2.1rem;
}
.nav-links {
	display: flex;
	gap: 1.7rem;
	font-size: .93rem;
	font-weight: 500;
}
.nav-links a {
	position: relative;
	padding: .3em 0;
	color: var(--ink-soft);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -2px;
	height: 2px;
	background: var(--accent);
	border-radius: 2px;
}

@media (max-width: 760px) {
	.nav-toggle { display: flex; }
	.nav-primary {
		position: fixed;
		inset: 4.25rem 0 0 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--bg);
		border-top: 1px solid var(--line);
		padding: 1.5rem;
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity .18s ease, transform .18s ease, visibility .18s;
	}
	body.nav-open .nav-primary {
		opacity: 1;
		transform: translateY(0);
		visibility: visible;
	}
	.nav-links {
		flex-direction: column;
		gap: 0;
	}
	.nav-links a {
		padding: 1rem 0;
		border-bottom: 1px solid var(--line);
		font-size: 1.05rem;
	}
	.nav-cta { margin-top: 1.25rem; align-self: flex-start; }
	body.nav-open { overflow: hidden; }
}

/* -------------------------------------------------------------
   Hero
------------------------------------------------------------- */
.hero {
	padding: 5.5rem 0 4.5rem;
	position: relative;
	overflow: hidden;
}
.hero::before {
	content: "";
	position: absolute;
	top: -20%;
	right: -10%;
	width: 46rem;
	height: 46rem;
	background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
	pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; }
.hero h1 { margin-top: 1rem; }
.hero .lead { margin-top: 1.4rem; font-size: 1.15rem; max-width: 46ch; }
.hero-meta {
	margin-top: 2rem;
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	font-family: var(--font-mono);
	font-size: .82rem;
	color: var(--ink-faint);
}
.hero-meta span:not(:last-child)::after { content: "/"; margin-left: .6rem; color: var(--line); }

/* -------------------------------------------------------------
   Tiles (home quick-nav)
------------------------------------------------------------- */
.tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: var(--line);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.tile {
	background: var(--card);
	padding: 1.9rem 1.5rem;
	transition: background .15s ease;
}
.tile:hover { background: var(--bg-alt); }
.tile .tile-index { font-family: var(--font-mono); font-size: .78rem; color: var(--accent); }
.tile h3 { margin-top: .9rem; font-size: 1.05rem; }
.tile p { margin-top: .35rem; font-size: .9rem; }

@media (max-width: 760px) {
	.tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
	.tiles { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------
   Role strip
------------------------------------------------------------- */
.roles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1.75rem;
}
.role-card {
	border-left: 2px solid var(--accent);
	padding-left: 1.1rem;
}
.role-card .role-org { font-weight: 600; }
.role-card .role-title { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-faint); margin-top: .25rem; }
@media (max-width: 700px) {
	.roles { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* -------------------------------------------------------------
   Timeline (About)
------------------------------------------------------------- */
.timeline {
	border-left: 1px solid var(--line);
	padding-left: 1.75rem;
	display: flex;
	flex-direction: column;
	gap: 1.9rem;
}
.timeline-item { position: relative; }
.timeline-item::before {
	content: "";
	position: absolute;
	left: -2.28rem;
	top: .35rem;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--accent);
}
.timeline-item .when { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); }
.timeline-item h3 { margin-top: .3rem; }
.timeline-item .org { color: var(--ink-soft); font-size: .95rem; margin-top: .15rem; }
.timeline-item p { margin-top: .5rem; }

.about-columns {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 3.5rem;
}
@media (max-width: 820px) {
	.about-columns { grid-template-columns: 1fr; }
}

.pull-photo {
	width: 100%;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

/* -------------------------------------------------------------
   Projects
------------------------------------------------------------- */
.project-grid {
	display: grid;
	gap: 1.4rem;
}
.project-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.9rem;
	box-shadow: var(--shadow);
}
.project-card__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}
.project-card h3 { font-size: 1.3rem; }
.project-card .dek { margin-top: .5rem; color: var(--ink-soft); }
.project-card .tag-row { margin-top: 1.1rem; }

.project-card details {
	margin-top: 1.3rem;
	border-top: 1px solid var(--line);
	padding-top: 1.1rem;
}
.project-card summary {
	cursor: pointer;
	font-family: var(--font-mono);
	font-size: .85rem;
	color: var(--accent);
	list-style: none;
	display: flex;
	align-items: center;
	gap: .5em;
}
.project-card summary::-webkit-details-marker { display: none; }
.project-card summary::before {
	content: "+";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.3em;
	height: 1.3em;
	border: 1px solid var(--accent);
	border-radius: 50%;
	font-size: .9em;
	transition: transform .15s ease;
}
.project-card details[open] summary::before { content: "\2212"; }

.case-study {
	margin-top: 1.2rem;
	display: grid;
	gap: 1rem;
}
.case-study dt {
	font-family: var(--font-mono);
	font-size: .74rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ink-faint);
}
.case-study dd { margin-top: .3rem; color: var(--ink-soft); }

.placeholder {
	color: var(--accent);
	background: var(--accent-soft);
	padding: .05em .4em;
	border-radius: 4px;
	font-family: var(--font-mono);
	font-size: .92em;
}

.project-links {
	margin-top: 1.3rem;
	display: flex;
	gap: .8rem;
	flex-wrap: wrap;
}

.selected-work {
	margin-top: 1rem;
	display: grid;
	gap: .1rem;
}
.selected-work li {
	padding: 1rem 0;
	border-top: 1px solid var(--line);
	display: flex;
	gap: 1rem;
	align-items: baseline;
	color: var(--ink-soft);
}
.selected-work li:last-child { border-bottom: 1px solid var(--line); }
.selected-work li::before {
	content: "\2192";
	color: var(--accent);
	flex: none;
}

/* -------------------------------------------------------------
   Testimonial
------------------------------------------------------------- */
.testimonial-feature {
	max-width: 760px;
	margin: 0 auto;
	text-align: center;
}
.testimonial-feature blockquote {
	font-family: var(--font-sans);
	font-size: clamp(1.35rem, 3vw, 1.8rem);
	font-weight: 500;
	line-height: 1.45;
	color: var(--ink);
}
.testimonial-feature blockquote::before { content: "\201C"; color: var(--accent); }
.testimonial-feature blockquote::after { content: "\201D"; color: var(--accent); }
.testimonial-feature figcaption {
	margin-top: 1.75rem;
	font-family: var(--font-mono);
	font-size: .88rem;
	color: var(--ink-faint);
}
.testimonial-feature figcaption strong { color: var(--ink-soft); }

/* -------------------------------------------------------------
   Blog
------------------------------------------------------------- */
.blog-credits {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
	margin-top: 1.2rem;
}

.blog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.4rem;
}
@media (max-width: 860px) {
	.blog-grid { grid-template-columns: 1fr; }
}
.blog-card {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
}
.blog-card img { aspect-ratio: 16/10; object-fit: cover; }
.blog-card .inner { padding: 1.4rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.blog-card h3 { font-size: 1.05rem; }
.blog-card p { font-size: .92rem; flex: 1; }
.blog-card .btn { align-self: flex-start; }

/* -------------------------------------------------------------
   CTA band
------------------------------------------------------------- */
.cta-band {
	text-align: center;
}
.cta-band .wrap { max-width: 640px; }
.cta-band .btn-row { justify-content: center; }

/* -------------------------------------------------------------
   Footer
------------------------------------------------------------- */
.site-footer {
	border-top: 1px solid var(--line);
	background: var(--bg-alt);
	padding: 3.5rem 0 2.5rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr;
	gap: 2.5rem;
}
@media (max-width: 700px) {
	.footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}
.footer-grid h4 {
	font-family: var(--font-mono);
	font-size: .76rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--ink-faint);
	margin-bottom: .9rem;
}
.footer-contact address { display: flex; flex-direction: column; gap: .5rem; color: var(--ink-soft); font-size: .95rem; }
.footer-contact a:hover { color: var(--accent); }

.footer-social { display: flex; flex-wrap: wrap; gap: .6rem; }
.footer-social a {
	width: 2.4rem;
	height: 2.4rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--line);
	border-radius: 50%;
	transition: border-color .15s ease, color .15s ease;
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }

.footer-links { display: flex; flex-direction: column; gap: .55rem; font-size: .95rem; color: var(--ink-soft); }
.footer-links a:hover { color: var(--accent); }

.footer-base {
	margin-top: 3rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--line);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .5rem;
	font-size: .82rem;
	color: var(--ink-faint);
}

/* -------------------------------------------------------------
   Misc
------------------------------------------------------------- */
.skip-link {
	position: absolute;
	left: -999px;
	top: auto;
	background: var(--ink);
	color: var(--bg);
	padding: .8em 1.2em;
	border-radius: 8px;
	z-index: 100;
}
.skip-link:focus {
	left: 1rem;
	top: 1rem;
}

::selection { background: var(--accent); color: var(--accent-ink); }
