@charset "utf-8";

/* ==========================================================================
   sigv.me — layered on top of modern-normalize
   Light/dark via prefers-color-scheme. No transitions or animations anywhere.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   --accent cannot be a single value: for 4.5:1 text on #fcfcfb a colour needs
   luminance <= 0.1767, on #1a1c1b it needs >= 0.2258. The ranges do not
   overlap, so each scheme gets its own. #3b6f2e is hue 108.0deg against
   #6fae5f's 107.8deg — the same green, darkened.
   -------------------------------------------------------------------------- */

:root {
	color-scheme: light dark;

	--bg: #fcfcfb;
	--ink: #2b2f2d;    /* 13.2:1 */
	--muted: #5c625e;  /*  6.1:1 */
	--accent: #3b6f2e; /*  5.9:1 */
	--rule: #e6e7e3;

	--card-w: 20rem;      /* 320px — matches the portrait srcset */
	--measure: 40.625rem; /* 650px ~ 68ch */

	--font-serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
	--font-sans: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #1a1c1b;
		--ink: #d2d6d3;    /* 11.7:1 */
		--muted: #9aa19c;  /*  6.5:1 */
		--accent: #6fae5f; /*  6.4:1 */
		--rule: #2e322f;
	}
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

body {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.1875rem);
	line-height: 1.65;
}

p {
	margin: 0 0 1.15em;
}

p:last-child {
	margin-bottom: 0;
}

code {
	background: var(--rule);
	padding: 0.1em 0.35em;
	border-radius: 4px;
	font-size: 0.9em;
}

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

/* Visually hidden, still announced. Pairs with the aria-hidden separators
   in .location and .job-role — must never become display: none. */
.aria-readable {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   Skip link — the only in-page fragment link on the page
   -------------------------------------------------------------------------- */

#skip-to-content {
	position: fixed;
	z-index: 10;
	top: 1rem;
	left: -100vw;
	padding: 0.6rem 1rem;
	background: var(--accent);
	color: var(--bg);
	border-radius: 6px;
	font-family: var(--font-sans);
	font-size: 0.9rem;
	text-decoration: none;
}

#skip-to-content:focus {
	left: 1rem;
}

/* --------------------------------------------------------------------------
   Layout — single column, two-column grid added at 1000px
   -------------------------------------------------------------------------- */

#layout {
	display: grid;
	gap: 2.5rem;
	max-width: calc(var(--measure) + 2.5rem);
	margin-inline: auto;
	padding: 2rem 1.25rem 4rem;
}

/* 1100px, not 1000px: below this the prose column is squeezed under 60ch
   (at 1024px it measures 545px / ~54ch once the scrollbar and padding are
   counted), and a single 650px column reads better than a cramped sidebar. */
@media (min-width: 68.75rem) {
	#layout {
		grid-template-columns: var(--card-w) minmax(0, var(--measure));
		gap: 0 4rem;
		justify-content: center;
		max-width: none;
		padding: 3rem 2.5rem 6rem;
	}

	/* Required: a grid item stretches by default, which makes sticky a no-op. */
	#card {
		align-self: start;
	}
}

/* Card is ~480px; + 3rem top offset + breathing = ~552px. Below that it must
   scroll normally or its lower half becomes unreachable. */
@media (min-width: 68.75rem) and (min-height: 35rem) {
	#card {
		position: sticky;
		top: 3rem;
	}
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

#portrait {
	display: block;
	width: var(--card-w);
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	border: 1px solid var(--rule);
}

#card-block {
	font-family: var(--font-sans);
	margin-top: 1.25rem;
}

#card-block h1 {
	margin: 0;
	font-size: 2rem;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

#card-block .handle {
	margin: 0.35rem 0 0;
	font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.9rem;
	color: var(--muted);
}

#card-block .role {
	margin: 0.9rem 0 0;
	font-size: 0.95rem;
	font-weight: 600;
}

#card-block .location {
	margin: 0.15rem 0 0;
	font-size: 0.9rem;
	color: var(--muted);
}

/* --------------------------------------------------------------------------
   Content
   -------------------------------------------------------------------------- */

#content {
	scroll-margin-top: 2rem;
}

#content > section + section {
	margin-top: 3.25rem;
}

#content h2 {
	margin: 0 0 1.25rem;
	font-family: var(--font-sans);
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.01em;
}

#content h2::before {
	content: "";
	display: block;
	width: 2.5rem;
	height: 2px;
	margin-bottom: 0.9rem;
	background: var(--accent);
}

#intro {
	font-size: 1.05em;
}

#content a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

#content a:hover {
	text-decoration-thickness: 2px;
}

/* --------------------------------------------------------------------------
   Viewpoints — h3 is a full-sentence claim, so it stays in the serif
   -------------------------------------------------------------------------- */

.viewpoints {
	display: grid;
	gap: 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.viewpoints > li {
	border-left: 2px solid var(--accent);
	padding-left: 1.25rem;
}

.viewpoints h3 {
	margin: 0 0 0.6rem;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Timeline — org names are labels, so they take the sans
   -------------------------------------------------------------------------- */

.timeline {
	position: relative;
	display: grid;
	gap: 2.25rem;
	margin: 0;
	padding: 0 0 0 1.75rem;
	list-style: none;
}

.timeline::before {
	content: "";
	position: absolute;
	left: 0.3125rem;
	top: 0.6rem;
	bottom: 0.6rem;
	width: 1px;
	background: var(--rule);
}

.timeline > li {
	position: relative;
}

.timeline > li::before {
	content: "";
	position: absolute;
	left: -1.75rem;
	top: 0.35rem;
	width: 0.6875rem;
	height: 0.6875rem;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 3px var(--bg);
}

/* Concurrent with the role above it — hollow marker. The overlap is already
   stated in .period, so this is reinforcement only, no generated text. */
.timeline > li.concurrent::before {
	background: var(--bg);
	border: 2px solid var(--accent);
}

.period {
	margin: 0 0 0.4rem;
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.timeline h3 {
	margin: 0 0 0.15rem;
	font-family: var(--font-sans);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
}

.job-role {
	margin: 0 0 0.85rem;
	font-family: var(--font-sans);
	font-size: 0.9rem;
	color: var(--muted);
}

/* --------------------------------------------------------------------------
   Elsewhere
   -------------------------------------------------------------------------- */

.elsewhere {
	display: grid;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.elsewhere > li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.15rem 0.75rem;
}

.elsewhere .note {
	font-family: var(--font-sans);
	font-size: 0.85rem;
	color: var(--muted);
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
	#skip-to-content {
		display: none;
	}

	body {
		background: #fff;
		color: #000;
		font-size: 11pt;
	}

	#layout {
		display: block;
		max-width: none;
		padding: 0;
	}

	#card {
		position: static;
		margin-bottom: 2rem;
	}

	#portrait {
		width: 9rem;
	}

	#content > section + section {
		margin-top: 2rem;
	}

	#content a {
		color: #000;
	}
}
