/* ============================================================
   TOKENS
   ============================================================ */
:root {
	--bg:            #F7F5F0;
	--bg-subtle:     #EEEBE4;  /* slightly more distinct from bg for section breaks */
	--ink:           #191917;
	--ink-muted:     #56534E;  /* darkened for contrast: ~7.2:1 on bg */
	--ink-faint:     #9B9890;  /* decorative use only — separators, em dashes */
	--accent:        #1D5E5B;  /* deeper, more confident teal */
	--border:        #E4E0D9;
	--border-strong: #C4C0B8;

	--font-display: 'DM Serif Display', Georgia, serif;
	--font-ui:      'Inter', system-ui, -apple-system, sans-serif;

	--container-width: 1280px;
	--pad-x:           40px;
}

/* ============================================================
   DARK MODE TOKENS
   ============================================================ */
[data-theme="dark"] {
	--bg:            #141412;
	--bg-subtle:     #1C1A17;
	--ink:           #F0EDE7;
	--ink-muted:     #A09C95;
	--ink-faint:     #615E58;
	--accent:        #4DB8B3;
	--border:        #2A2826;
	--border-strong: #3D3A34;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-ui);
	font-size: 16px;
	line-height: 1.65;
	color: var(--ink);
	background-color: var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transition: background-color 0.2s ease, color 0.2s ease;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	list-style: none;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding-left: var(--pad-x);
	padding-right: var(--pad-x);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--bg);
	border-bottom: 1px solid var(--border);
}

.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
}

.monogram {
	font-family: var(--font-display);
	font-size: 17px;
	color: var(--ink);
	letter-spacing: 0.01em;
}

.nav-links {
	display: flex;
	gap: 32px;
}

.nav-links a {
	font-size: 14px;
	color: var(--ink-muted);
	transition: color 0.15s ease;
}

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

.btn-contact {
	display: inline-block;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: #fff;
	background-color: var(--accent);
	padding: 7px 16px;
	border-radius: 4px;
	transition: opacity 0.15s ease;
}

.btn-contact:hover {
	opacity: 0.86;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
	padding: 80px 0 72px;
}

.hero-grid {
	display: grid;
	grid-template-columns: 56fr 44fr;
	gap: 64px;
	align-items: start;
}

/* Left column */
.hero-name {
	font-family: var(--font-display);
	font-size: 80px;
	font-weight: 400;
	line-height: 1.0;
	letter-spacing: -0.02em;
	color: var(--ink);
	margin-bottom: 18px;
}

.hero-role {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 20px;
}

/* Narrow neutral rule — separates role from bio without teal overuse */
.hero-location {
	font-size: 12px;
	color: var(--ink-faint);
	letter-spacing: 0.02em;
	margin-bottom: 4px;
}

.hero-education {
	font-size: 12px;
	color: var(--ink-faint);
	letter-spacing: 0.02em;
	margin-bottom: 20px;
}

.hero-rule {
	width: 40px;
	height: 1px;
	background-color: var(--border-strong);
	margin-bottom: 24px;
}

.hero-bio {
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink);
	max-width: 480px;
	margin-bottom: 12px;
}

.hero-sub {
	font-size: 15px;
	line-height: 1.65;
	color: var(--ink-muted);
	max-width: 460px;
	margin-bottom: 40px;
}

.hero-ctas {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--ink);
	border: 1px solid var(--ink);
	background: transparent;
	padding: 10px 20px;
	border-radius: 4px;
	transition: background 0.15s ease, color 0.15s ease;
}

.btn-primary:hover {
	background: var(--ink);
	color: #fff;
}

.btn-email {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 46px;
	padding: 0 22px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--ink-muted);
	border: 1px solid var(--border-strong);
	border-radius: 4px;
	background: transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-email:hover {
	color: var(--ink);
	border-color: var(--ink-muted);
}

.btn-email svg {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
}

/* Nav right cluster */
.nav-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.theme-toggle {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--ink-muted);
	display: flex;
	align-items: center;
	padding: 4px;
	border-radius: 3px;
	transition: color 0.15s ease;
}

.theme-toggle:hover {
	color: var(--ink);
}

.theme-toggle svg {
	width: 16px;
	height: 16px;
}

/* Show moon in light mode, sun in dark mode */
.icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: block; }

/* Contact button inverts in dark mode — teal has low contrast with white on dark bg */
[data-theme="dark"] .btn-contact {
	background-color: var(--ink);
	color: var(--bg);
}

[data-theme="dark"] .btn-contact:hover {
	opacity: 0.88;
}

/* Right column — principles panel */
.hero-right {
	padding-top: 6px;
}

.principles-label {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 10px;
}

/* Short teal underline anchors the label */
.principles-rule {
	width: 32px;
	height: 2px;
	background-color: var(--accent);
	margin-bottom: 32px;
}

/* Items are separated by spacing alone — no borders, no fills, no dividers */
.principles-list {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

/* Icon + text layout for each principle */
.principle {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.principle-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: var(--ink-muted);
	margin-top: 1px;
}

.principle-title {
	font-family: var(--font-ui);
	font-size: 14px;
	font-weight: 500;
	color: var(--ink);
	margin-bottom: 5px;
}

.principle-body {
	font-size: 13px;
	line-height: 1.65;
	color: var(--ink-muted);
}

/* ============================================================
   PROOF STRIP
   ============================================================ */
#proof {
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	background-color: var(--bg-subtle);
}

.proof-inner {
	display: flex;
	align-items: center;
	min-height: 56px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.proof-tech {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	flex: 1;
}

/* Each icon+label pair in the proof strip */
.proof-group {
	display: flex;
	align-items: center;
	gap: 7px;
}

.proof-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--ink-muted);
}

.proof-item {
	font-size: 13px;
	color: var(--ink-muted);
	letter-spacing: 0.01em;
}

/* { } API Design curly brace label */
.proof-braces {
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
	font-size: 12px;
	color: var(--ink-muted);
	letter-spacing: -0.03em;
}

.proof-sep {
	font-size: 13px;
	color: var(--border-strong);
}

.proof-status {
	flex-shrink: 0;
	margin-left: 40px;
	font-size: 12px;
	font-style: italic;
	color: var(--ink-muted);
	white-space: nowrap;
}

/* ============================================================
   SELECTED WORK
   ============================================================ */
#work {
	padding: 80px 0;
}

.section-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 16px;
}

.section-label {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	color: var(--ink);
}

.section-more {
	font-size: 13px;
	color: var(--ink-muted);
	transition: color 0.15s ease;
}

.section-more:hover {
	color: var(--ink);
}

.section-rule {
	border: none;
	border-top: 1px solid var(--border);
}

/* Each project row — three editorial columns matching reference layout */
.work-row {
	display: grid;
	grid-template-columns: 36fr 27fr 37fr;
	gap: 36px;
	padding: 56px 0;
}

/* Two-column variant for repos without curated key decisions */
.work-row--simple {
	grid-template-columns: 54fr 46fr;
}

/* Project title links (when driven from GitHub) */
.work-title a {
	color: inherit;
	text-decoration: none;
}

.work-title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--border-strong);
	text-underline-offset: 3px;
}

/* Single thin line between projects — whitespace does the separating */
.work-rule {
	border: none;
	border-top: 1px solid var(--border);
}

/* Project title row — icon + name in flex */
.work-title-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.work-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: var(--ink-faint);
}

.work-title {
	font-family: var(--font-ui);
	font-size: 17px;
	font-weight: 500;
	letter-spacing: -0.01em;
	color: var(--ink);
}

.work-summary {
	font-size: 14px;
	line-height: 1.65;
	color: var(--ink-muted);
}

/* Stack as compact comma-joined text block */
.stack-text {
	font-size: 13px;
	line-height: 1.7;
	color: var(--ink-muted);
}

.col-label {
	display: block;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	color: var(--ink-muted);
	margin-bottom: 14px;
}

/* Em dash prefix instead of bullet points */
.decision-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.decision-list li {
	font-size: 14px;
	line-height: 1.6;
	color: var(--ink-muted);
}

.work-more-link {
	display: inline-block;
	margin-top: 40px;
	font-size: 14px;
	color: var(--ink-muted);
	transition: color 0.15s ease;
}

.work-more-link:hover {
	color: var(--ink);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
	border-top: 1px solid var(--border);
	padding: 40px 0;
}

.footer-inner {
	display: flex;
	align-items: center;
	justify-content: center;
}

.footer-inner span {
	font-size: 13px;
	color: var(--ink-muted);
}

.footer-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid var(--border-strong);
	border-radius: 4px;
	color: var(--ink-muted);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-icon-btn:hover {
	color: var(--ink);
	border-color: var(--ink-muted);
}

.footer-icon-btn svg {
	width: 18px;
	height: 18px;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
	:root {
		--pad-x: 20px;
	}

	/* Nav: keep MG + Contact, hide text links */
	.nav-links {
		display: none;
	}

	/* Hero stacks vertically, name scales down */
	#hero {
		padding: 48px 0 56px;
	}

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

	.hero-name {
		font-size: 52px;
	}

	.hero-bio,
	.hero-sub {
		max-width: 100%;
	}

	/* Proof strip: hide status on mobile, let tech items wrap */
	.proof-inner {
		flex-wrap: wrap;
		gap: 12px;
		padding-top: 16px;
		padding-bottom: 16px;
		min-height: auto;
	}

	.proof-tech {
		flex: none;
		width: 100%;
	}

	.proof-status {
		display: none;
	}

	/* Work rows: collapse all columns */
	#work {
		padding: 56px 0;
	}

	.work-row,
	.work-row--simple {
		grid-template-columns: 1fr;
		gap: 28px;
		padding: 40px 0;
	}

	/* Footer: stays centered on mobile, nothing to stack */
}
