:root {
	color-scheme: light;
	--bg: #f5f6f2;
	--surface: #ffffff;
	--surface-soft: #eef2ea;
	--ink: #171817;
	--muted: #657064;
	--line: #dde4d9;
	--green: #247a4d;
	--coral: #dc5b3e;
	--blue: #2f6f9f;
	--violet: #7654a6;
	--amber: #b86b18;
	--mint: #2f8a7d;
	--red: #b64245;
	--shadow: 0 18px 50px rgba(23, 24, 23, 0.09);
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-width: 320px;
	min-height: 100vh;
	overflow-x: hidden;
	color: var(--ink);
	background:
		linear-gradient(135deg, rgba(36, 122, 77, 0.1), transparent 32rem),
		linear-gradient(315deg, rgba(220, 91, 62, 0.08), transparent 28rem),
		var(--bg);
	font-family:
		Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
		sans-serif;
	font-size: 16px;
	line-height: 1.45;
}

button,
a {
	color: inherit;
	font: inherit;
}

button {
	cursor: pointer;
}

a {
	text-decoration: none;
}

.skip-link {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 40;
	padding: 0.55rem 0.8rem;
	border-radius: 8px;
	background: var(--ink);
	color: #ffffff;
	font-weight: 750;
	transform: translateY(-6rem);
	transition: transform 160ms ease;
}

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

.page-shell {
	width: min(1120px, calc(100% - 32px));
	max-width: 1120px;
	margin: 0 auto;
	padding: 24px 0 56px;
}

.site-header {
	position: sticky;
	top: 12px;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.45rem;
	border: 1px solid rgba(23, 24, 23, 0.08);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.82);
	backdrop-filter: blur(18px);
	box-shadow: 0 10px 30px rgba(23, 24, 23, 0.06);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.2rem 0.45rem 0.2rem 0.2rem;
}

.brand-mark {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	flex: 0 0 auto;
	border-radius: 8px;
	background: var(--ink);
	color: #ffffff;
	font-size: 0.78rem;
	font-weight: 850;
	letter-spacing: 0;
}

.brand-name,
.brand-subtitle,
.metric-label,
.metric-value,
.eyebrow,
.service-title,
.service-product,
.service-url {
	display: block;
}

.brand-name {
	font-size: 0.96rem;
	font-weight: 850;
	line-height: 1.1;
}

.brand-subtitle {
	margin-top: 0.08rem;
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 650;
	line-height: 1.1;
}

.header-actions,
.site-nav,
.view-switch {
	display: flex;
	align-items: center;
}

.header-actions {
	gap: 0.45rem;
	flex: 0 0 auto;
}

.site-nav {
	gap: 0.25rem;
}

.site-nav a,
.nav-button,
.mobile-menu a,
.mobile-menu button {
	border: 0;
	background: transparent;
	color: var(--muted);
	font-size: 0.86rem;
	font-weight: 750;
}

.site-nav a,
.nav-button {
	padding: 0.45rem 0.65rem;
	border-radius: 8px;
	transition:
		background 160ms ease,
		color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.nav-button:hover,
.nav-button:focus-visible {
	background: var(--ink);
	color: #ffffff;
	outline: 0;
}

.menu-button {
	display: none;
	width: 2.45rem;
	height: 2.45rem;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 0.32rem;
	border: 0;
	border-radius: 8px;
	background: var(--ink);
}

.menu-button span {
	display: block;
	width: 1.15rem;
	height: 2px;
	border-radius: 999px;
	background: #ffffff;
	transition:
		transform 160ms ease,
		opacity 160ms ease;
}

.menu-button[aria-expanded="true"] span:first-child {
	transform: translateY(3px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:last-child {
	transform: translateY(-3px) rotate(-45deg);
}

.mobile-menu {
	position: sticky;
	top: 76px;
	z-index: 19;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.45rem;
	margin-top: 0.5rem;
	padding: 0.55rem;
	border: 1px solid rgba(23, 24, 23, 0.08);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(18px);
	box-shadow: 0 10px 30px rgba(23, 24, 23, 0.06);
}

.mobile-menu[hidden] {
	display: none;
}

.mobile-menu a,
.mobile-menu button {
	min-height: 2.45rem;
	border-radius: 8px;
	background: var(--surface-soft);
	text-align: center;
}

.mobile-menu a {
	display: grid;
	place-items: center;
}

.mobile-view-switch {
	grid-column: 1 / -1;
}

.intro {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
	align-items: end;
	gap: 2rem;
	padding: 3.6rem 0 2.2rem;
}

.eyebrow {
	margin: 0 0 0.4rem;
	color: var(--green);
	font-size: 0.78rem;
	font-weight: 850;
	letter-spacing: 0;
	text-transform: uppercase;
}

h1,
h2,
p {
	margin: 0;
}

h1 {
	font-size: 3.35rem;
	font-weight: 850;
	letter-spacing: 0;
	line-height: 0.98;
}

h2 {
	font-size: 1.55rem;
	font-weight: 850;
	letter-spacing: 0;
	line-height: 1.1;
}

.lede {
	max-width: 34rem;
	margin-top: 0.75rem;
	color: #485247;
	font-size: 1.03rem;
	font-weight: 600;
}

.about-card {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.65rem 1rem;
	padding: 0.95rem;
	border: 1px solid rgba(23, 24, 23, 0.08);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.78);
	text-align: left;
	box-shadow: var(--shadow);
	transition:
		border-color 160ms ease,
		transform 160ms ease;
}

.about-card:hover,
.about-card:focus-visible {
	border-color: rgba(23, 24, 23, 0.22);
	outline: 0;
	transform: translateY(-2px);
}

.metric-label {
	color: var(--muted);
	font-size: 0.82rem;
	font-weight: 700;
}

.metric-value {
	text-align: right;
	font-size: 0.92rem;
	font-weight: 850;
}

.section {
	padding: 1.15rem 0 2.5rem;
	scroll-margin-top: 6rem;
}

.section-bar {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
	min-width: 0;
	margin-bottom: 0.85rem;
}

.view-switch {
	gap: 0.25rem;
	padding: 0.28rem;
	border: 1px solid rgba(23, 24, 23, 0.08);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.72);
}

.view-switch .view-button {
	display: grid;
	place-items: center;
	width: 2.15rem;
	height: 2.15rem;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--muted);
}

.view-button.is-active {
	background: var(--ink);
	color: #ffffff;
}

.grid-glyph,
.list-glyph {
	display: block;
	width: 1rem;
	height: 1rem;
}

.grid-glyph {
	background:
		linear-gradient(currentColor, currentColor) left top / 0.42rem 0.42rem no-repeat,
		linear-gradient(currentColor, currentColor) right top / 0.42rem 0.42rem no-repeat,
		linear-gradient(currentColor, currentColor) left bottom / 0.42rem 0.42rem no-repeat,
		linear-gradient(currentColor, currentColor) right bottom / 0.42rem 0.42rem no-repeat;
}

.list-glyph {
	background:
		linear-gradient(currentColor, currentColor) left 0.08rem / 1rem 2px no-repeat,
		linear-gradient(currentColor, currentColor) left 0.45rem / 1rem 2px no-repeat,
		linear-gradient(currentColor, currentColor) left 0.82rem / 1rem 2px no-repeat;
}

.service-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.75rem;
	width: 100%;
	min-width: 0;
}

.admin-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
	position: relative;
	display: flex;
	min-width: 0;
	min-height: 9.4rem;
	flex-direction: column;
	justify-content: space-between;
	gap: 1rem;
	overflow: hidden;
	padding: 0.9rem;
	border: 1px solid rgba(23, 24, 23, 0.08);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.78);
	box-shadow: 0 10px 30px rgba(23, 24, 23, 0.05);
	transition:
		transform 160ms ease,
		border-color 160ms ease,
		box-shadow 160ms ease;
}

.service-card::after {
	content: ">";
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	display: grid;
	place-items: center;
	width: 1.55rem;
	height: 1.55rem;
	border-radius: 50%;
	background: rgba(23, 24, 23, 0.06);
	color: rgba(23, 24, 23, 0.68);
	font-size: 0.82rem;
	font-weight: 850;
	transition:
		background 160ms ease,
		color 160ms ease,
		transform 160ms ease;
}

.service-card:hover,
.service-card:focus-visible {
	transform: translateY(-2px);
	border-color: rgba(23, 24, 23, 0.2);
	box-shadow: var(--shadow);
	outline: 0;
}

.service-card:hover::after,
.service-card:focus-visible::after {
	background: var(--ink);
	color: #ffffff;
	transform: translate(1px, -1px);
}

.service-logo {
	display: grid;
	place-items: center;
	width: 3.15rem;
	height: 3.15rem;
	border-radius: 8px;
	background: #f4f6f1;
	flex: 0 0 auto;
}

.service-logo img {
	display: block;
	width: 70%;
	height: 70%;
	object-fit: contain;
}

.service-logo img[src$="homelab.svg"],
.service-logo img[src$="shlink.svg"],
.service-logo img[src$="metube.png"] {
	width: 100%;
	height: 100%;
	border-radius: 8px;
}

.service-content {
	min-width: 0;
}

.service-title {
	overflow: hidden;
	font-size: 1rem;
	font-weight: 850;
	line-height: 1.1;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.service-product {
	overflow: hidden;
	margin-top: 0.22rem;
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.service-url {
	overflow: hidden;
	margin-top: 0.58rem;
	color: #7a8378;
	font-family: "SF Mono", "Roboto Mono", ui-monospace, monospace;
	font-size: 0.68rem;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body[data-view="list"] .service-grid,
body[data-view="list"] .admin-grid {
	grid-template-columns: 1fr;
}

body[data-view="list"] .service-card {
	min-height: 4.9rem;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	justify-content: initial;
	gap: 0.85rem;
	padding: 0.75rem 3rem 0.75rem 0.75rem;
}

body[data-view="list"] .service-logo {
	width: 3rem;
	height: 3rem;
}

body[data-view="list"] .service-url {
	margin-top: 0.22rem;
}

.about-dialog {
	width: min(34rem, calc(100% - 28px));
	padding: 1.1rem;
	border: 1px solid rgba(23, 24, 23, 0.12);
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink);
	box-shadow: 0 30px 90px rgba(23, 24, 23, 0.26);
}

.about-dialog::backdrop {
	background: rgba(23, 24, 23, 0.32);
	backdrop-filter: blur(6px);
}

.about-dialog form {
	float: right;
	margin: 0 0 0.5rem 1rem;
}

.close-button {
	display: grid;
	place-items: center;
	width: 2.1rem;
	height: 2.1rem;
	border: 0;
	border-radius: 8px;
	background: var(--surface-soft);
	color: var(--ink);
	font-weight: 850;
}

.about-copy {
	margin-top: 0.7rem;
	color: var(--muted);
	font-weight: 600;
}

.about-metrics {
	display: grid;
	gap: 0.55rem;
	margin-top: 1rem;
}

.about-metrics > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0.8rem;
	border-radius: 6px;
	background: var(--surface-soft);
}

@media (max-width: 920px) {
	.intro {
		grid-template-columns: 1fr;
		padding-top: 2.4rem;
	}

	.about-card {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.metric-value {
		text-align: left;
	}

	.service-grid,
	.admin-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.page-shell {
		width: min(calc(100% - 20px), 370px);
		margin-left: 10px;
		margin-right: auto;
		padding-top: 10px;
	}

	.site-header {
		top: 8px;
		padding: 0.38rem;
	}

	.site-nav {
		display: none;
	}

	.menu-button {
		display: flex;
	}

	.intro {
		display: none;
	}

	.section {
		padding: 1.15rem 0 1.5rem;
		scroll-margin-top: 6rem;
	}

	.section-bar {
		align-items: center;
		margin-bottom: 0.65rem;
	}

	h2 {
		font-size: 1.4rem;
	}

	.service-grid,
	.admin-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.55rem;
	}

	.service-card {
		min-height: 6.85rem;
		gap: 0.45rem;
		padding: 0.7rem;
	}

	.service-card::after {
		display: none;
	}

	.service-logo {
		width: 2.35rem;
		height: 2.35rem;
	}

	.service-title {
		font-size: 0.94rem;
	}

	.service-product {
		font-size: 0.76rem;
	}

	.service-url {
		display: none;
	}

	body[data-view="list"] .service-card {
		min-height: 4.2rem;
		padding: 0.65rem;
	}

	body[data-view="list"] .service-logo {
		width: 2.7rem;
		height: 2.7rem;
	}

	body[data-view="list"] .service-url {
		display: block;
		font-size: 0.66rem;
	}
}

@media (max-width: 380px) {
	.brand-subtitle {
		display: none;
	}

	.service-grid,
	.admin-grid {
		gap: 0.48rem;
	}

	.service-card {
		min-height: 6.5rem;
		padding: 0.62rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
