/* davit-resume.com: a terminal-inspired portfolio. Tokens, base, layout, sections, terminal, print. */

@font-face {
	font-family: "Inter";
	src: url("/fonts/inter-v1.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "JetBrains Mono";
	src: url("/fonts/jetbrains-mono-v1.woff2") format("woff2");
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}

/* Tokens --------------------------------------------------------------------------- */

:root {
	--bg: #0a0c0b;
	--panel: #0f1211;
	--panel-raised: #141816;
	--border: #1e2421;
	--border-strong: #2b3330;
	--text: #e7ece9;
	--text-body: #cdd5d0;
	--muted: #8b958f;
	--green: #3ddc84;
	--green-strong: #62f0a0;
	--green-soft: rgb(61 220 132 / 0.12);
	--green-line: rgb(61 220 132 / 0.38);
	--red: #ff6b6b;
	--on-green: #04120a;

	--mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--size: 1rem;
	--size-sm: 0.875rem;
	--size-xs: 0.8125rem;
	--leading: 1.65;
	--measure: 74rem;
	--prose: 72ch;
	--gutter: 1.25rem;
	--radius: 10px;
	--radius-sm: 6px;
	--tap: 2.75rem;
	--bar: 3.5rem;
	--pad: clamp(1rem, 3vw, 1.75rem);

	color-scheme: dark;
}

@media (min-width: 48rem) {
	:root {
		--gutter: 2rem;
	}
}

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

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	background: var(--bg);
	scroll-padding-top: calc(var(--bar) + 1.25rem);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	min-height: 100vh;
	color: var(--text-body);
	background:
		radial-gradient(70rem 36rem at 85% -12rem, rgb(61 220 132 / 0.07), transparent 65%),
		radial-gradient(50rem 30rem at -10% 20rem, rgb(61 220 132 / 0.03), transparent 70%),
		var(--bg);
	font-family: var(--sans);
	font-size: var(--size);
	line-height: var(--leading);
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd {
	margin: 0;
}

ul,
ol {
	padding: 0;
}

h1,
h2,
h3,
h4 {
	color: var(--text);
	line-height: 1.25;
}

strong,
b {
	color: var(--text);
	font-weight: 600;
}

code,
kbd {
	font-family: var(--mono);
	font-size: 0.875em;
}

code {
	padding: 0.1em 0.4em;
	color: var(--text);
	background: var(--panel-raised);
	border: 1px solid var(--border);
	border-radius: 4px;
}

kbd {
	padding: 0 0.4em;
	color: var(--text);
	border: 1px solid var(--border-strong);
	border-bottom-width: 2px;
	border-radius: 4px;
}

::selection {
	color: var(--text);
	background: rgb(61 220 132 / 0.3);
}

[hidden] {
	display: none !important;
}

a {
	color: var(--green);
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	text-decoration-color: rgb(61 220 132 / 0.4);
}

a:hover {
	color: var(--green-strong);
	text-decoration-color: currentColor;
}

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

[tabindex="-1"]:focus {
	outline: none;
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: 0.5rem;
	left: var(--gutter);
	z-index: 100;
	padding: 0.5rem 0.875rem;
	color: var(--on-green);
	background: var(--green);
	font-family: var(--mono);
	font-weight: 700;
	text-decoration: none;
	border-radius: var(--radius-sm);
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

.wrap {
	width: min(100% - 2 * var(--gutter), var(--measure));
	margin-inline: auto;
}

.muted {
	color: var(--muted);
}

/* Shell vocabulary --------------------------------------------------------------------- */

.cmdline,
.shell-line {
	overflow: hidden;
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-sm);
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ps1 {
	color: var(--green);
}

.ps-sep {
	color: var(--muted);
}

.ps-cwd,
.ps-cmd {
	color: var(--text);
}

.panel-path,
.file-name {
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-xs);
	letter-spacing: 0.01em;
}

.panel-path b {
	color: var(--green);
	font-weight: 500;
}

.file-name {
	display: block;
	margin-bottom: 0.75rem;
}

.ls {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5ch;
	margin-top: 0.5rem;
	font-family: var(--mono);
	font-size: var(--size-sm);
	list-style: none;
}

.ls a {
	display: inline-flex;
	align-items: center;
	min-height: 2rem;
	color: var(--text-body);
	text-decoration: none;
}

.ls a.ls-dir {
	color: var(--green);
}

.ls a:hover {
	text-decoration: underline;
}

.metric {
	color: var(--green);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	text-shadow: 0 0 18px rgb(61 220 132 / 0.25);
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.05rem 0.55rem;
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-xs);
	font-weight: 400;
	line-height: 1.5;
	white-space: nowrap;
	border: 1px solid var(--border-strong);
	border-radius: 999px;
}

.badge-current {
	color: var(--green);
	background: var(--green-soft);
	border-color: var(--green-line);
}

.badge-current::before {
	content: "";
	width: 0.4rem;
	height: 0.4rem;
	background: var(--green);
	border-radius: 50%;
	box-shadow: 0 0 8px var(--green);
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
}

.chip,
.chips-links a {
	display: inline-flex;
	align-items: center;
	min-height: 1.875rem;
	padding: 0 0.625rem;
	color: var(--text-body);
	font-family: var(--mono);
	font-size: var(--size-xs);
	background: var(--panel-raised);
	border: 1px solid var(--border);
	border-radius: 999px;
}

.chips-links a {
	text-decoration: none;
}

.chips-links a:hover {
	color: var(--green);
	border-color: var(--green-line);
}

/* Key/value records; stacked below ~600px. */
.kv {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 0.35rem 1.5rem;
}

.kv > div {
	display: contents;
}

.kv dt {
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-sm);
	line-height: calc(var(--leading) * 1rem);
}

.kv dt::after {
	content: ":";
}

.kv dd {
	min-width: 0;
	color: var(--text);
	overflow-wrap: anywhere;
}

@media (max-width: 37.49rem) {
	.kv {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.kv dt {
		margin-top: 0.6rem;
	}

	.kv > div:first-child > dt {
		margin-top: 0;
	}
}

.panel {
	background: linear-gradient(180deg, var(--panel-raised), var(--panel) 12rem);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.file {
	padding: 1.5rem var(--pad);
}

.file-title {
	margin-bottom: 0.75rem;
	font-size: 1.125rem;
	font-weight: 600;
}

.prose {
	max-width: var(--prose);
	font-size: 1.0625rem;
}

.prose p + p {
	margin-top: 1em;
}

.button,
.tool {
	display: inline-flex;
	align-items: center;
	gap: 0.6ch;
	font-family: var(--mono);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.button {
	min-height: var(--tap);
	padding: 0 1.125rem;
	color: var(--text);
	font-size: var(--size-sm);
	font-weight: 600;
	background: transparent;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
}

.button:hover {
	color: var(--green);
	border-color: var(--green-line);
}

.button-primary {
	color: var(--on-green);
	background: var(--green);
	border-color: var(--green);
}

.button-primary:hover {
	color: var(--on-green);
	background: var(--green-strong);
	border-color: var(--green-strong);
}

.button-glyph {
	color: var(--green);
	font-weight: 400;
}

.tool {
	min-height: 2.25rem;
	padding: 0 0.75rem;
	color: var(--muted);
	font-size: var(--size-xs);
	background: transparent;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
}

.tool:hover {
	color: var(--text);
	border-color: var(--green-line);
}

.tool-terminal {
	color: var(--green);
	background: var(--green-soft);
	border-color: var(--green-line);
}

/* Top bar ------------------------------------------------------------------------------ */

.topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgb(10 12 11 / 0.86);
	border-bottom: 1px solid var(--border);
	backdrop-filter: saturate(140%) blur(12px);
}

.topbar-inner {
	display: flex;
	align-items: center;
	gap: 0 1.25rem;
	min-height: var(--bar);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0;
	min-height: var(--tap);
	color: var(--text);
	font-family: var(--mono);
	font-size: var(--size-sm);
	text-decoration: none;
	white-space: nowrap;
}

.brand-dot {
	width: 0.5rem;
	height: 0.5rem;
	margin-right: 0.6rem;
	background: var(--green);
	border-radius: 50%;
	box-shadow: 0 0 10px var(--green-line);
}

.site-nav {
	margin-inline: auto;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
}

.nav-links a {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: var(--tap);
	padding-inline: 0.6rem;
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-sm);
	text-decoration: none;
	border-radius: var(--radius-sm);
}

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

.nav-links a[aria-current] {
	color: var(--green);
}

.nav-links a[aria-current]::after {
	content: "";
	position: absolute;
	right: 0.6rem;
	bottom: 0.45rem;
	left: 0.6rem;
	height: 1px;
	background: var(--green);
	box-shadow: 0 0 8px var(--green);
}

.topbar-tools {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

@media (max-width: 67.99rem) {
	.topbar-inner {
		flex-wrap: wrap;
	}

	.topbar-tools {
		margin-left: auto;
	}

	.site-nav {
		order: 3;
		flex-basis: 100%;
		margin: 0 0 0.25rem -0.6rem;
	}
}

@media (max-width: 47.99rem) {
	.topbar {
		position: static;
	}

	html {
		scroll-padding-top: 1rem;
	}

	.tool-palette,
	.tool-pdf {
		display: none;
	}
}

/* Page --------------------------------------------------------------------------------- */

main {
	padding-block: 2.5rem 1rem;
}

.section {
	padding-top: clamp(3.5rem, 7vw, 6rem);
}

.section-head {
	margin-bottom: 1.5rem;
}

.section-title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-top: 0.35rem;
}

.section-title {
	font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem);
	font-weight: 700;
	letter-spacing: -0.03em;
}

.section-tools .tool {
	min-height: 2.25rem;
}

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

.window {
	background: linear-gradient(180deg, #121614, var(--panel));
	border: 1px solid var(--border-strong);
	border-radius: 12px;
	box-shadow:
		0 40px 90px -50px rgb(0 0 0 / 0.9),
		0 0 0 1px rgb(61 220 132 / 0.04) inset,
		0 0 60px -30px rgb(61 220 132 / 0.25);
	overflow: hidden;
}

.window-bar {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 2.5rem;
	padding: 0 1rem;
	background: rgb(255 255 255 / 0.015);
	border-bottom: 1px solid var(--border);
}

.dots {
	display: inline-flex;
	gap: 0.45rem;
}

.dots i {
	width: 0.65rem;
	height: 0.65rem;
	background: #2a302d;
	border-radius: 50%;
}

.dots i:last-child {
	background: var(--green);
	box-shadow: 0 0 8px var(--green-line);
}

.window-title {
	position: absolute;
	left: 50%;
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-xs);
	white-space: nowrap;
	transform: translateX(-50%);
}

.window-body {
	padding: clamp(1.25rem, 4vw, 2.75rem);
}

.hero .cmdline {
	font-size: var(--size-sm);
}

.typed {
	display: inline-block;
	vertical-align: bottom;
}

.caret {
	display: inline-block;
	width: 0.6em;
	height: 1.15em;
	margin-left: 0.25ch;
	vertical-align: -0.2em;
	background: var(--green);
	box-shadow: 0 0 10px var(--green-line);
}

@media (prefers-reduced-motion: no-preference) {
	.typed {
		max-width: 7ch;
		overflow: hidden;
		white-space: nowrap;
		animation: typing 0.42s steps(6, end) 0.1s both;
	}

	.caret {
		animation: blink 1.1s steps(1) 0.6s infinite;
	}
}

@keyframes typing {
	from {
		max-width: 0;
	}
}

@keyframes blink {
	50% {
		opacity: 0;
	}
}

.hero-output {
	margin-top: 1.25rem;
}

.hero-name {
	font-size: clamp(2.375rem, 1.4rem + 4vw, 4.25rem);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.045em;
}

.hero-title {
	margin-top: 0.75rem;
	color: var(--green);
	font-family: var(--mono);
	font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
}

.hero-summary {
	max-width: 60ch;
	margin-top: 1rem;
	color: var(--text-body);
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
}

.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 1.75rem 3rem;
	margin-top: 2.25rem;
	padding-top: 1.75rem;
	border-top: 1px dashed var(--border-strong);
}

.hero-block > .cmdline {
	margin-bottom: 0.75rem;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2.25rem;
}

.hero-hint {
	margin-top: 1rem;
	color: var(--muted);
	font-size: var(--size-sm);
}

@media (max-width: 47.99rem) {
	.hero-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.window-title {
		display: none;
	}
}

/* Experience --------------------------------------------------------------------------- */

.roles {
	display: grid;
	gap: 1.25rem;
	list-style: none;
}

.role {
	overflow: hidden;
}

.role-summary {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.4rem 1.5rem;
	align-items: baseline;
	padding: 1.25rem var(--pad);
	list-style: none;
	cursor: pointer;
}

.role-summary::-webkit-details-marker {
	display: none;
}

.role-toggle {
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-xs);
	text-align: right;
}

.role-toggle::before {
	content: "[+] expand";
}

.role-details[open] > .role-summary .role-toggle::before {
	content: "[\2212] collapse";
}

.role-summary:hover .role-toggle {
	color: var(--green);
}

.role-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 1.25ch;
}

.role-company {
	font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.role-summary:hover .role-company {
	color: var(--green-strong);
}

.role-title {
	color: var(--text-body);
	font-family: var(--mono);
	font-size: var(--size-sm);
}

.role-when {
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-sm);
	text-align: right;
	white-space: nowrap;
}

.role-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
	padding: 1.25rem var(--pad) 1.75rem;
	border-top: 1px solid var(--border);
}

/* Long file names and paths wrap instead of widening their panel on small screens. */
.ls a,
.file-name,
.panel-path,
.topic-file {
	overflow-wrap: anywhere;
}

.role-files .ls {
	margin-top: 0.25rem;
}

.role-lede {
	max-width: var(--prose);
	margin-top: 0.75rem;
}

.role-stack .file-name,
.case-stack .file-name {
	margin-bottom: 0.5rem;
}

.role-projects .file-name {
	display: inline;
	margin-right: 1ch;
}

.topic {
	padding-top: 1.25rem;
	border-top: 1px dashed var(--border);
}

.topic-title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 1ch;
	font-size: 1.0625rem;
	font-weight: 600;
}

.topic-file {
	color: var(--green);
	font-family: var(--mono);
	font-size: var(--size-xs);
	font-weight: 400;
}

.topic-count {
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-xs);
	font-weight: 400;
}

.bullets {
	display: grid;
	gap: 0.7rem;
	max-width: 88ch;
	margin-top: 0.75rem;
	list-style: none;
}

.bullets li {
	position: relative;
	padding-left: 1.6rem;
}

.bullets li::before {
	content: ">";
	position: absolute;
	top: 0;
	left: 0.2rem;
	color: var(--green);
	font-family: var(--mono);
	font-size: var(--size-sm);
	line-height: calc(var(--leading) * 1rem);
	opacity: 0.75;
}

@media (max-width: 47.99rem) {
	.role-summary {
		grid-template-columns: minmax(0, 1fr);
	}

	.role-toggle,
	.role-when {
		text-align: left;
	}

	.role-toggle {
		order: 4;
	}

	.role-when {
		white-space: normal;
	}
}

/* Projects ----------------------------------------------------------------------------- */

.projects {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
	gap: 1.25rem;
	list-style: none;
}

.project {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.25rem var(--pad) 1.5rem;
	transition: border-color 0.2s ease;
}

.project:hover {
	border-color: var(--border-strong);
}

.project-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.project-title {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.project-title a {
	color: var(--text);
	text-decoration: none;
}

.project-title a:hover {
	color: var(--green-strong);
}

.project-readme .file-name {
	margin-bottom: 0.35rem;
}

.project-more {
	margin-top: auto;
	padding-top: 0.25rem;
}

/* "cd warehouse-system && read case study" must wrap inside a 375px card. */
.project-more .button {
	max-width: 100%;
	padding-block: 0.5rem;
	white-space: normal;
	overflow-wrap: anywhere;
}

/* Skills ------------------------------------------------------------------------------- */

.skill-groups {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
	gap: 1.25rem;
	list-style: none;
}

.skill-group {
	padding: 1.25rem 1.25rem 1rem;
}

.skill-group-title {
	margin: 0.3rem 0 0.75rem;
	font-size: 1.125rem;
	font-weight: 600;
}

.skill-note {
	margin-bottom: 0.75rem;
	color: var(--muted);
}

.skill-list {
	list-style: none;
}

.skill-list li {
	display: flex;
	align-items: baseline;
	gap: 1ch;
	min-height: 2.125rem;
	color: var(--text);
	font-family: var(--mono);
	font-size: var(--size-sm);
}

.skill-leader {
	flex: 1 1 2ch;
	min-width: 2ch;
	border-bottom: 1px dotted var(--border-strong);
	transform: translateY(-0.3em);
}

.skill-years {
	color: var(--green);
	white-space: nowrap;
}

/* Education, certifications, contact --------------------------------------------------- */

.two-col {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
	gap: 1.25rem;
}

.file-notes {
	margin-top: 0.75rem;
}

.lang-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 2.5ch;
	color: var(--text);
	list-style: none;
}

.cert-list {
	display: grid;
	gap: 1rem;
	list-style: none;
}

.cert-list li {
	position: relative;
	padding-left: 1.6rem;
}

.cert-list li::before {
	content: ">";
	position: absolute;
	top: 0;
	left: 0.2rem;
	color: var(--green);
	font-family: var(--mono);
	opacity: 0.75;
}

.cert-name {
	color: var(--text);
}

.cert-meta {
	display: block;
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-xs);
}

.kv-contact {
	align-items: center;
}

.kv-contact a {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap);
}

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

.site-footer {
	margin-top: 6rem;
	padding-block: 2rem 6rem;
	border-top: 1px solid var(--border);
}

.footer-inner {
	display: grid;
	gap: 0.75rem;
}

.link-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 2.5ch;
	font-family: var(--mono);
	font-size: var(--size-sm);
	list-style: none;
}

.link-row a,
.footer-meta a {
	display: inline-flex;
	align-items: center;
	gap: 0.6ch;
	min-height: var(--tap);
}

.footer-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0 2ch;
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-xs);
}

/* Case study ----------------------------------------------------------------------------- */

.page-head {
	padding-block: 0.5rem 1.5rem;
}

.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-sm);
	list-style: none;
}

.crumbs li + li::before {
	content: "/";
	margin-inline: 0.5ch;
}

.crumbs a {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap);
}

.case-title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.25rem;
	margin-top: 0.5rem;
}

.case-title {
	font-size: clamp(2.125rem, 1.4rem + 3vw, 3.5rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.04em;
}

.case-readme .lede {
	max-width: var(--prose);
	margin-bottom: 1.25rem;
	color: var(--text);
	font-size: 1.1875rem;
}

.case-stack {
	margin-top: 1.25rem;
}

.case-files {
	display: grid;
	gap: 1.25rem;
	margin-top: 1.25rem;
}

.case-file .file-title {
	font-size: 1.375rem;
}

.pager {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 0.5rem 1rem;
	margin-top: 3rem;
	padding-top: 0.75rem;
	font-family: var(--mono);
	font-size: var(--size-sm);
	border-top: 1px solid var(--border);
}

.pager a {
	display: inline-flex;
	align-items: center;
	gap: 0.6ch;
	min-height: var(--tap);
}

.pager-next {
	justify-self: end;
}

@media (max-width: 37.49rem) {
	.pager {
		grid-template-columns: 1fr 1fr;
	}

	.pager-all {
		grid-column: 1 / -1;
		order: -1;
	}
}

/* Shell pages (404, placeholders) --------------------------------------------------------- */

.shell-page {
	padding-top: 2rem;
}

.shell .shell-line + .shell-line {
	margin-top: 0.25rem;
}

.shell-error {
	color: var(--red);
}

.shell-title {
	margin: 1.75rem 0 0.75rem;
	font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
	letter-spacing: -0.03em;
}

.shell-text {
	margin-bottom: 1.5rem;
}

/* Touch devices: inline links become full-size targets. --------------------------------- */

@media (pointer: coarse) {
	.kv {
		align-items: center;
	}

	.kv a,
	.ls a,
	.cert-name a,
	.role-projects a,
	.project-title a {
		display: inline-flex;
		align-items: center;
		min-height: var(--tap);
	}

	.tool {
		min-height: var(--tap);
	}
}

/* Command palette (site.client.js) -------------------------------------------------------- */

.palette {
	width: min(38rem, 100% - 2rem);
	max-height: min(32rem, 100% - 4rem);
	margin: 12vh auto auto;
	padding: 0;
	color: var(--text);
	background: var(--panel);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.6);
	overflow: hidden;
}

.palette[open] {
	display: flex;
	flex-direction: column;
}

.palette::backdrop {
	background: rgb(0 0 0 / 0.6);
}

.palette-input {
	width: 100%;
	padding: 1rem 1.125rem;
	color: inherit;
	font: inherit;
	font-family: var(--mono);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--border);
}

.palette-input:focus {
	outline: none;
	box-shadow: inset 0 -2px 0 var(--green);
}

.palette-list {
	flex: 1;
	margin: 0;
	padding: 0.375rem;
	overflow-y: auto;
	list-style: none;
}

.palette-option {
	display: grid;
	grid-template-columns: minmax(12ch, 22ch) minmax(0, 1fr);
	gap: 2ch;
	align-items: center;
	min-height: var(--tap);
	padding: 0 0.75rem;
	border-radius: var(--radius-sm);
	cursor: pointer;
}

.palette-option[aria-selected="true"] {
	background: var(--panel-raised);
}

.palette-option[aria-selected="true"] .palette-label {
	color: var(--green);
}

.palette-path {
	overflow: hidden;
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-sm);
	white-space: nowrap;
	text-overflow: ellipsis;
}

.palette-empty {
	padding: 0.75rem;
	color: var(--muted);
}

.palette-hint {
	padding: 0.5rem 1.125rem;
	color: var(--muted);
	font-family: var(--mono);
	font-size: var(--size-xs);
	border-top: 1px solid var(--border);
}

/* Floating terminal (terminal.client.js) --------------------------------------------------- */

.terminal-launch {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 50;
	display: inline-flex;
	align-items: center;
	gap: 0.75ch;
	min-height: var(--tap);
	padding: 0 0.75rem 0 1rem;
	color: var(--green);
	font-family: var(--mono);
	font-size: var(--size-sm);
	background: rgb(10 12 11 / 0.92);
	border: 1px solid var(--green-line);
	border-radius: 999px;
	box-shadow:
		0 12px 32px rgb(0 0 0 / 0.55),
		0 0 24px rgb(61 220 132 / 0.12);
	cursor: pointer;
	backdrop-filter: blur(8px);
}

.terminal-launch:hover {
	background: rgb(20 36 27 / 0.95);
}

.terminal-launch-glyph {
	font-weight: 700;
}

.terminal-launch kbd {
	color: var(--muted);
	font-size: 0.75rem;
}

.terminal-open .terminal-launch {
	display: none;
}

.terminal {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 60;
	display: flex;
	flex-direction: column;
	width: min(42rem, 100vw - 2.5rem);
	height: min(30rem, 100vh - 6rem);
	color: var(--text);
	font-family: var(--mono);
	font-size: var(--size-sm);
	background: #080a09;
	border: 1px solid var(--border-strong);
	border-radius: 12px;
	box-shadow:
		0 30px 80px rgb(0 0 0 / 0.65),
		0 0 0 1px rgb(61 220 132 / 0.06),
		0 0 50px -20px rgb(61 220 132 / 0.3);
	backdrop-filter: blur(10px);
}

.terminal.is-large {
	width: min(72rem, 100vw - 2.5rem);
	height: min(48rem, 100vh - 4rem);
}

@media (prefers-reduced-motion: no-preference) {
	.terminal:not([hidden]) {
		animation: terminal-in 0.16s ease-out;
	}
}

@keyframes terminal-in {
	from {
		transform: translateY(8px);
	}
}

.terminal-bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 2.5rem;
	padding: 0 0.5rem 0 0.875rem;
	border-bottom: 1px solid var(--border);
}

.terminal-dots {
	display: inline-flex;
	gap: 0.4rem;
}

.terminal-dots i {
	width: 0.625rem;
	height: 0.625rem;
	background: #2a302d;
	border-radius: 50%;
}

.terminal-dots i:last-child {
	background: var(--green);
}

.terminal-title {
	flex: 1;
	overflow: hidden;
	color: var(--muted);
	font-size: var(--size-xs);
	text-align: center;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.terminal-actions {
	display: flex;
	gap: 0.25rem;
}

.terminal-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	color: var(--muted);
	font: inherit;
	font-size: 1rem;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	cursor: pointer;
}

.terminal-btn:hover {
	color: var(--text);
	border-color: var(--border-strong);
}

.terminal-output {
	flex: 1;
	padding: 0.75rem 0.9rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-color: var(--border-strong) transparent;
}

.term-line {
	color: var(--text-body);
	line-height: 1.55;
	white-space: pre-wrap;
	word-break: break-word;
}

.term-cmd {
	margin-top: 0.35rem;
	color: var(--text);
}

.term-cmd:first-child {
	margin-top: 0;
}

.term-prompt,
.term-ok,
.term-accent {
	color: var(--green);
}

.term-file {
	color: var(--text-body);
}

.term-dim {
	color: var(--muted);
}

.term-err {
	color: #ff9b9b;
}

.term-denied {
	color: var(--red);
	font-weight: 700;
	text-shadow: 0 0 12px rgb(255 107 107 / 0.35);
}

.term-link a {
	font-size: var(--size-xs);
}

.term-entries {
	display: flex;
	flex-wrap: wrap;
	gap: 0 2ch;
}

.term-long {
	flex-direction: column;
}

.term-entry {
	padding: 0;
	color: var(--text);
	font: inherit;
	text-align: left;
	white-space: pre;
	background: none;
	border: 0;
	cursor: pointer;
}

.term-entry:hover {
	text-decoration: underline;
}

.term-dir {
	color: var(--green);
}

.terminal-form {
	display: flex;
	align-items: center;
	gap: 1ch;
	padding: 0.5rem 0.9rem 0.7rem;
	border-top: 1px solid var(--border);
}

.terminal-form:focus-within {
	border-top-color: var(--green-line);
}

.terminal-prompt {
	flex-shrink: 1;
	max-width: 55%;
	overflow: hidden;
	color: var(--green);
	white-space: nowrap;
	text-overflow: ellipsis;
}

.terminal-input {
	flex: 1;
	min-width: 0;
	padding: 0.25rem 0;
	color: var(--text);
	font: inherit;
	caret-color: var(--green);
	background: transparent;
	border: 0;
}

.terminal-input:focus {
	outline: none;
}

@media (max-width: 47.99rem) {
	.terminal-launch {
		right: 1rem;
		bottom: 1rem;
		justify-content: center;
		width: 3.25rem;
		height: 3.25rem;
		padding: 0;
	}

	.terminal-launch-text,
	.terminal-launch kbd {
		display: none;
	}

	.terminal,
	.terminal.is-large {
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 75vh;
		height: min(75dvh, 40rem);
		border-bottom: 0;
		border-radius: 14px 14px 0 0;
	}

	.terminal-size {
		display: none;
	}

	.terminal-input {
		font-size: 16px;
	}
}

@media (pointer: coarse) {
	.terminal-btn {
		width: var(--tap);
		height: var(--tap);
	}

	.terminal-launch kbd {
		display: none;
	}
}

/* Print: clean black on white, everything expanded, no interactive chrome. ----------------- */

@media print {
	:root {
		--bg: #fff;
		--panel: #fff;
		--panel-raised: #fff;
		--border: #d0d0d0;
		--border-strong: #b0b0b0;
		--text: #000;
		--text-body: #111;
		--muted: #444;
		--green: #000;
		--green-strong: #000;
		--green-soft: transparent;
		--green-line: #999;
		color-scheme: light;
	}

	@page {
		margin: 14mm 13mm 16mm;
	}

	body {
		color: #111;
		font-size: 10pt;
		line-height: 1.45;
		background: #fff;
	}

	.skip-link,
	.topbar,
	.terminal,
	.terminal-launch,
	.palette,
	.section-tools,
	.hero-actions,
	.hero-hint,
	.window-bar,
	.cmdline,
	.ls,
	.role-toggle,
	.role-files,
	.project-files,
	.project-more,
	.pager,
	.footer-meta {
		display: none !important;
	}

	.window,
	.panel {
		background: none;
		border: 0;
		box-shadow: none;
	}

	.window-body,
	.file,
	.project,
	.skill-group,
	.role-summary,
	.role-body {
		padding-right: 0;
		padding-left: 0;
	}

	a {
		color: #000;
		text-decoration: none;
	}

	.metric,
	.badge-current::before {
		text-shadow: none;
		box-shadow: none;
	}

	.hero-grid {
		margin-top: 1rem;
		padding-top: 0.75rem;
	}

	.section {
		padding-top: 1.25rem;
	}

	.section-head {
		margin-bottom: 0.5rem;
		break-after: avoid;
	}

	.role-details::details-content {
		display: block;
		content-visibility: visible;
	}

	.bullets li,
	.skill-group,
	.project,
	.cert-list li {
		break-inside: avoid;
	}

	.kv a,
	.link-row a,
	.kv-contact a {
		min-height: 0;
	}

	.site-footer {
		margin-top: 1.5rem;
		padding: 0.75rem 0 0;
	}
}
