:root {
	color-scheme: light;
	--ink: #1d211e;
	--ink-soft: #3a403c;
	--muted: #5f6660;
	--paper: #f4f1ea;
	--paper-raised: #fbf9f3;
	--paper-deep: #e7e1d4;
	--line: rgba(29, 33, 30, 0.12);
	--line-strong: rgba(29, 33, 30, 0.2);
	--green: #234b3b;
	--green-deep: #173228;
	--amber: #845b25;
	--shadow-sm: 0 1px 2px rgba(43, 39, 31, 0.05), 0 2px 6px rgba(43, 39, 31, 0.05);
	--shadow: 0 2px 4px rgba(43, 39, 31, 0.05), 0 12px 30px rgba(43, 39, 31, 0.08);
	--radius: 10px;
	--font-display: Georgia, "Times New Roman", serif;
	--font-body: Georgia, "Times New Roman", serif;
	--font-ui: system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

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

html {
	min-height: 100%;
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}

body {
	min-height: 100vh;
	min-height: 100svh;
	margin: 0;
	color: var(--ink);
	background: radial-gradient(140% 120% at 50% -20%, var(--paper-raised), var(--paper) 46%, var(--paper-deep)) fixed;
	font-family: var(--font-body);
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	opacity: 0.025;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.skip-link {
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 10;
	padding: 8px 12px;
	border-radius: 6px;
	background: var(--green-deep);
	color: var(--paper-raised);
	font: 0.8rem var(--font-ui);
	transform: translateY(-160%);
}

.skip-link:focus {
	transform: translateY(0);
}

.page-shell {
	display: flex;
	width: min(1210px, calc(100% - 56px));
	min-height: 100vh;
	min-height: 100svh;
	margin: 0 auto;
	padding: clamp(12px, 1.8vh, 18px) 0 clamp(10px, 1.5vh, 16px);
	flex-direction: column;
}

.panel {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper-raised);
	box-shadow: var(--shadow-sm);
}

.terminal {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 52px;
	padding: 7px 18px 7px 10px;
	border-radius: 999px;
}

.bead {
	position: relative;
	width: 34px;
	height: 34px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--green);
	box-shadow: 0 3px 9px rgba(35, 75, 59, 0.16);
}

.bead::after {
	content: "";
	position: absolute;
	left: 68%;
	top: 28%;
	width: 15%;
	height: 15%;
	transform: translate(-50%, -50%) rotate(45deg);
	background: var(--paper);
}

.terminal-copy {
	display: flex;
	align-items: baseline;
	gap: 15px;
	min-width: 0;
	font-family: var(--font-mono);
}

.terminal-path {
	color: var(--muted);
	font-size: 0.65rem;
}

.terminal-line {
	min-width: 15ch;
	font-size: 0.86rem;
	font-weight: 600;
}

.prompt {
	color: var(--amber);
}

.cursor {
	display: inline-block;
	width: 0.56em;
	height: 1.05em;
	margin-left: 0.16em;
	vertical-align: -0.15em;
	background: var(--green);
	animation: blink 900ms steps(1) infinite;
}

.terminal-note {
	margin-left: auto;
	color: var(--muted);
	font: 0.64rem/1 var(--font-ui);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

main {
	margin-top: clamp(12px, 1.7vh, 16px);
}

.feature-card {
	position: relative;
	display: flex;
	width: min(540px, 100%);
	min-height: clamp(136px, 17vh, 154px);
	margin: 0 auto;
	padding: 22px 34px;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	overflow: hidden;
	isolation: isolate;
	border-color: var(--green-deep);
	background: var(--green-deep);
	color: var(--paper-raised);
	transition: transform 150ms ease, box-shadow 150ms ease;
}

.feature-card:hover,
.project-card:hover {
	transform: translateY(-2px);
	border-color: var(--line-strong);
	box-shadow: var(--shadow);
}

.feature-card:focus-visible,
.project-card:focus-visible {
	outline: 2px solid var(--green);
	outline-offset: 3px;
}

.feature-card > *:not(.feature-art),
.project-card > *:not(.card-art) {
	position: relative;
	z-index: 1;
}

.card-meta {
	display: flex;
	align-items: center;
	gap: 11px;
	color: var(--muted);
	font: 0.64rem/1 var(--font-ui);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.card-meta strong {
	color: var(--green);
	font-weight: 700;
}

.feature-card .card-meta,
.feature-card .card-url {
	color: rgba(251, 249, 243, 0.68);
}

.feature-card .card-meta strong {
	color: var(--paper-raised);
}

.feature-title {
	margin: 10px 0 0;
	font-family: var(--font-display);
	font-size: clamp(3rem, 5vw, 4rem);
	font-weight: 400;
	line-height: 0.9;
	letter-spacing: -0.045em;
}

.card-url {
	margin-top: 13px;
	color: var(--muted);
	font: 0.65rem/1.2 var(--font-mono);
	letter-spacing: 0.015em;
}

.feature-art {
	position: absolute;
	top: 50%;
	right: 0;
	width: 43%;
	height: 180%;
	transform: translateY(-50%);
	opacity: 1;
	pointer-events: none;
}

.feature-art img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 62%;
	max-width: none;
	height: auto;
	transform: translate(-50%, -50%);
}

.index-heading {
	display: flex;
	justify-content: space-between;
	padding: clamp(17px, 2.5vh, 23px) 2px 9px;
	color: var(--muted);
	font: 0.62rem/1 var(--font-ui);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(10px, 1.4vh, 14px) 16px;
}

.project-card {
	position: relative;
	display: flex;
	min-width: 0;
	min-height: clamp(118px, 14.5vh, 134px);
	padding: 19px 23px;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	isolation: isolate;
	transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.project-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(90deg, var(--paper-raised) 0%, var(--paper-raised) 34%, transparent 76%);
	pointer-events: none;
}

.project-card .card-meta {
	position: absolute;
	top: 18px;
	left: 23px;
	right: 20px;
	justify-content: space-between;
}

.card-title {
	max-width: 72%;
	margin: 0;
	font-family: var(--font-display);
	font-size: 1.42rem;
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.025em;
}

.project-card .card-url {
	max-width: 68%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.card-art {
	position: absolute;
	z-index: 0;
	right: 16px;
	bottom: 10px;
	width: auto;
	height: calc(100% - 40px);
	max-width: 64%;
	object-fit: contain;
	object-position: right bottom;
	filter: none;
	opacity: 0.59;
	pointer-events: none;
}

footer {
	display: flex;
	justify-content: space-between;
	margin-top: auto;
	padding: clamp(12px, 1.8vh, 18px) 2px 0;
	color: var(--muted);
	font: 0.62rem/1 var(--font-ui);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

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

@media (min-width: 1100px) and (min-height: 740px) {
	.page-shell {
		width: min(1560px, calc(100% - 40px));
	}

	.feature-card {
		width: min(620px, 100%);
		min-height: clamp(136px, 17vh, 180px);
	}

	.card-grid {
		gap: 16px 20px;
	}

	.project-card {
		min-height: clamp(130px, calc(33.333svh - 126px), 194px);
		padding: 22px 27px;
	}

	.project-card .card-meta {
		top: 20px;
		left: 27px;
		right: 24px;
	}

	.card-title {
		font-size: 1.56rem;
	}

	.project-card .card-url {
		font-size: .7rem;
	}

	.project-card > .card-art {
		right: 14px;
		bottom: 10px;
		height: calc(100% - 46px);
	}
}

@media (max-width: 900px) {
	.card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.page-shell {
		width: min(100% - 28px, 1210px);
		padding-top: 14px;
	}

	.terminal-note,
	.terminal-path {
		display: none;
	}

	.feature-card {
		width: 100%;
		min-height: 160px;
		padding: 24px;
	}

	.feature-title {
		font-size: clamp(2.9rem, 15vw, 4rem);
	}

	.card-grid {
		grid-template-columns: 1fr;
	}

	.project-card {
		min-height: 138px;
	}

	footer {
		gap: 20px;
		line-height: 1.4;
	}

	footer span:last-child {
		text-align: right;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cursor {
		animation: none;
	}

	.feature-card,
	.project-card {
		transition: none;
	}
}
