/*
	Field Notes theme: layered on top of Massively's main.css.
	Look: dark and monochrome, after ObsidianUI (obsidianui.dev):
	black base, slightly lighter cards with 1px hairline borders, white-to-grey gradient headings,
	pill buttons with inset highlights, Inter + Geist + Geist Mono.
*/

:root {
	--bg: #000000;
	--surface: #0a0a0a;
	--surface-2: #111113;
	--surface-3: #18181a;
	--hairline: rgba(255, 255, 255, 0.08);
	--hairline-strong: rgba(255, 255, 255, 0.16);
	--text: #fafafa;
	--muted: #a1a1a1;
	--dim: #6b6b70;
	--heading: "Inter", "Geist", system-ui, sans-serif;
	--ui: "Geist", "Inter", system-ui, sans-serif;
	--mono: "Geist Mono", Consolas, monospace;
	--radius-xl: 28px;
	--radius-lg: 20px;
	--radius-md: 14px;
	--pill-bg: linear-gradient(180deg, #2c2c2e 0%, #18181a 100%);
	--pill-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 -1px 0 0 rgba(0, 0, 0, 0.45);
	--card-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */

	html, body {
		background-color: var(--bg);
	}

	body {
		color: var(--muted);
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}

	body, input, select, textarea {
		font-family: var(--ui);
		font-weight: 400;
		line-height: 1.75;
	}

	p {
		text-align: left;
	}

	::selection {
		background: rgba(255, 255, 255, 0.9);
		color: #000000;
	}

	a {
		color: var(--text);
		border-bottom-color: rgba(255, 255, 255, 0.25);
	}

		a:hover {
			color: #ffffff !important;
			border-bottom-color: rgba(255, 255, 255, 0.6);
		}

	strong, b {
		color: var(--text);
		font-weight: 600;
	}

	h1, h2, h3, h4, h5, h6 {
		color: var(--text);
		font-family: var(--heading);
		font-weight: 700;
		letter-spacing: -0.035em;
		text-transform: none;
		line-height: 1.15;
	}

	#main h1,
	#main h2,
	#header .logo span {
		background: linear-gradient(180deg, #ffffff 0%, #e4e4e7 50%, #9a9aa3 100%);
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
	}

		#main h2 a {
			-webkit-text-fill-color: transparent;
		}

	a:focus-visible, button:focus-visible, input:focus-visible {
		outline: 2px solid rgba(255, 255, 255, 0.7);
		outline-offset: 3px;
	}

	blockquote {
		border-left: solid 2px var(--hairline-strong) !important;
		font-family: var(--heading);
		font-size: 1.3rem;
		font-weight: 600;
		font-style: normal;
		letter-spacing: -0.02em;
		line-height: 1.45;
		color: var(--text);
		padding: 0.25rem 0 0.25rem 1.5rem;
		margin: 2.5rem 0;
	}

	code {
		font-family: var(--mono);
		font-size: 0.85em;
		background: rgba(255, 255, 255, 0.06) !important;
		border: 1px solid var(--hairline) !important;
		border-radius: 6px;
		color: var(--text);
	}

	pre code {
		background: var(--surface) !important;
		border: 1px solid var(--hairline) !important;
		color: #d4d4d8;
		border-radius: var(--radius-md);
		margin: 0;
		padding: 1.25rem 1.5rem;
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
	}

	kbd {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 1.4rem;
		height: 1.4rem;
		padding: 0 0.35rem;
		border-radius: 6px;
		font-family: var(--mono);
		font-size: 0.72rem;
		line-height: 1;
		color: var(--muted);
		background: var(--surface-3);
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.5);
	}

/* ---------- Background + wrapper ---------- */

	#wrapper > .bg {
		background-color: var(--bg);
		background-image: url("../images/bg.jpg");
		background-size: 100% auto;
		background-position: top center;
		background-repeat: no-repeat;
	}

	@media screen and (orientation: portrait) {
		#wrapper > .bg {
			background-size: auto 140%;
		}
	}

	#wrapper.fade-in:before {
		background: var(--bg);
	}

/* ---------- Intro (hero card) ---------- */

	#intro {
		margin: 0.75rem;
		min-height: calc(100vh - 1.5rem);
		border-radius: 32px;
		background:
			radial-gradient(600px circle at 50% 0%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0) 60%),
			linear-gradient(180deg, #000000 0%, #0d0d0d 50%, #111111 100%);
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), var(--card-shadow);
		overflow: hidden;
		justify-content: center;
		padding-bottom: 10rem;
	}

		#intro > *:not(.watermark) {
			position: relative;
			z-index: 1;
		}

	#intro .kicker {
		display: inline-flex;
		align-items: center;
		gap: 0.55rem;
		font-family: var(--ui);
		font-style: normal;
		font-size: 0.8rem;
		font-weight: 500;
		letter-spacing: 0;
		text-transform: none;
		color: var(--text);
		padding: 0.4rem 0.95rem 0.4rem 0.75rem;
		border-radius: 999px;
		background: var(--pill-bg);
		box-shadow: var(--pill-shadow);
		margin-bottom: 1.75rem;
	}

		.kicker-dot {
			width: 0.45rem;
			height: 0.45rem;
			border-radius: 50%;
			background: #ffffff;
			box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
			animation: pulse 2.4s ease-in-out infinite;
		}

		@keyframes pulse {
			50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
		}

	#intro h1 {
		font-family: var(--heading);
		font-size: clamp(3.4rem, 11vw, 6.5rem);
		font-weight: 700;
		letter-spacing: -0.055em;
		line-height: 0.98;
		margin-bottom: 1.5rem;
	}

		#intro h1 .line-1,
		#intro h1 .line-2 {
			background-size: 250% 100%;
			-webkit-background-clip: text;
			background-clip: text;
			-webkit-text-fill-color: transparent;
			animation: shimmer 7s ease-in-out infinite;
		}

		#intro h1 .line-1 {
			background-image: linear-gradient(100deg, #ffffff 0%, #ffffff 38%, #9a9aa3 50%, #ffffff 62%, #ffffff 100%);
		}

		#intro h1 .line-2 {
			background-image: linear-gradient(100deg, #a1a1aa 0%, #a1a1aa 38%, #f4f4f5 50%, #a1a1aa 62%, #a1a1aa 100%);
		}

	@keyframes shimmer {
		0% { background-position: 100% 0; }
		60%, 100% { background-position: 0% 0; }
	}

	#intro p {
		font-style: normal;
		font-size: 1.2rem;
		color: var(--muted);
	}

	.typed {
		color: var(--text);
		font-weight: 500;
		border-right: 2px solid rgba(255, 255, 255, 0.8);
		padding-right: 0.1em;
		animation: caret 0.9s steps(1) infinite;
	}

	@keyframes caret {
		50% { border-right-color: transparent; }
	}

	#intro ul.actions {
		align-items: center;
		justify-content: center;
		gap: 0.75rem;
	}

		#intro ul.actions li {
			padding-left: 0;
		}

	#intro .button.primary {
		background: var(--text);
		color: #0a0a0a !important;
		box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
	}

		#intro .button.primary:hover {
			background: #ffffff;
			color: #000000 !important;
		}

		#intro .button.primary .icon {
			margin-left: 0.5rem;
			font-size: 0.8em;
			border: 0;
		}

	.search-pill {
		display: inline-flex;
		align-items: center;
		gap: 0.65rem;
		height: 3rem;
		padding: 0 0.6rem 0 1.1rem;
		min-width: 15rem;
		border-radius: 14px;
		border: 0 !important;
		background: var(--surface);
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 0 4px rgba(255, 255, 255, 0.03);
		color: var(--dim) !important;
		font-size: 0.9rem;
		transition: box-shadow 0.3s ease, color 0.3s ease, transform 0.35s var(--ease-out);
	}

		.search-pill .icon {
			border: 0;
			color: var(--muted);
		}

		.search-pill kbd {
			margin-left: auto;
		}

		.search-pill:hover {
			color: var(--muted) !important;
			box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 0 0 4px rgba(255, 255, 255, 0.05);
			transform: translateY(-2px);
		}

	.watermark {
		position: absolute;
		left: 50%;
		bottom: -0.18em;
		transform: translateX(-50%);
		z-index: 0;
		font-family: var(--heading);
		font-size: clamp(6rem, 21vw, 19rem);
		font-weight: 600;
		letter-spacing: -0.06em;
		line-height: 1;
		white-space: nowrap;
		color: rgba(255, 255, 255, 0.07);
		pointer-events: none;
		user-select: none;
		-webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 8%, rgba(0, 0, 0, 0.2) 35%, rgba(0, 0, 0, 0.7) 70%, #000 100%);
		mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 8%, rgba(0, 0, 0, 0.2) 35%, rgba(0, 0, 0, 0.7) 70%, #000 100%);
	}

/* ---------- Header + nav ---------- */

	#header .logo {
		border: 0 !important;
		font-family: var(--heading);
		font-size: 2.6rem;
		font-weight: 700;
		letter-spacing: -0.05em;
		text-transform: none;
		line-height: 1.1;
		padding: 0;
		transition: transform 0.35s var(--ease-out), opacity 0.3s ease;
	}

		#header .logo:hover {
			transform: translateY(-2px);
			opacity: 0.85;
			background-color: transparent !important;
		}

	#nav {
		background: rgba(15, 15, 15, 0.82);
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		border-radius: 18px;
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), var(--card-shadow);
		height: 3.5rem;
		line-height: 3.5rem;
		padding: 0 0.5rem;
		align-items: center;
		margin-bottom: 0.75rem;
	}

		#nav ul.links {
			font-family: var(--ui);
			font-weight: 500;
			letter-spacing: 0;
			text-transform: none;
			gap: 0.25rem;
			align-items: center;
		}

			#nav ul.links li {
				height: 2.25rem;
				line-height: 2.25rem;
				border-radius: 10px;
			}

			#nav ul.links li a {
				font-size: 0.85rem;
				padding: 0 0.95rem;
				border-radius: 10px;
				color: var(--muted);
				border: 0;
			}

				#nav ul.links li a:hover {
					color: var(--text) !important;
					background-color: rgba(255, 255, 255, 0.06);
				}

			#nav ul.links li.active {
				background: #000000;
				box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
			}

				#nav ul.links li.active a,
				#nav ul.links li.active a:hover {
					color: var(--text) !important;
					background: transparent;
				}

		#nav ul.icons {
			display: flex;
			align-items: center;
			padding-right: 0.5rem;
		}

			#nav ul.icons li a.icon {
				border: 0;
			}

			#nav ul.icons li a.icon:before {
				color: var(--muted);
				display: inline-block;
				transition: color 0.2s ease, transform 0.35s var(--ease-out);
			}

			#nav ul.icons li a.icon:hover:before {
				color: var(--text);
				transform: translateY(-2px) rotate(-8deg);
			}

/* ---------- Main card ---------- */

	#main {
		background-color: var(--surface);
		border-radius: var(--radius-xl);
		box-shadow: inset 0 0 0 1px var(--hairline), var(--card-shadow);
		color: var(--muted);
		overflow: hidden;
	}

		#main > * {
			border-top: solid 1px var(--hairline) !important;
		}

			#main > *:first-child {
				border-top: 0 !important;
			}

	#main > .post header.major > h1,
	#main > .post header.major h2 {
		letter-spacing: -0.045em;
		line-height: 1.05;
	}

	#main > .post.featured header.major h2 {
		font-size: clamp(2.4rem, 5vw, 4rem);
	}

	header.major > p,
	#main header > p {
		color: var(--muted);
		font-style: normal;
	}

	header > .date,
	header.major > .date {
		font-family: var(--mono);
		font-weight: 400;
		font-size: 0.78rem;
		color: var(--dim);
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	header.major > .date:before, header.major > .date:after {
		border-top: 1px solid var(--hairline) !important;
	}

	.image.main img,
	.image.fit img {
		border-radius: var(--radius-lg);
	}

	.image.main,
	.image.fit {
		border-radius: var(--radius-lg);
		box-shadow: 0 0 0 1px var(--hairline);
	}

	a.image {
		border-radius: var(--radius-lg);
		border: 0;
	}

	a.image img {
		transition: transform 0.7s var(--ease-out), filter 0.7s ease;
	}

	a.image:hover img {
		transform: scale(1.04);
		filter: brightness(1.12);
	}

/* ---------- Buttons ---------- */

	.button,
	input[type="submit"],
	button {
		font-family: var(--ui);
		font-size: 0.85rem;
		font-weight: 500;
		letter-spacing: 0;
		text-transform: none;
		height: 2.75rem;
		line-height: 2.75rem;
		padding: 0 1.4rem;
		border-radius: 999px;
		background: var(--pill-bg);
		box-shadow: var(--pill-shadow);
		color: var(--text) !important;
		transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.3s var(--ease-out) !important;
	}

		.button:hover,
		button:hover {
			transform: translateY(-2px);
			box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 -1px 0 0 rgba(0, 0, 0, 0.45), 0 10px 24px rgba(0, 0, 0, 0.4);
			color: #ffffff !important;
		}

		.button:active,
		button:active {
			transform: translateY(0);
		}

		.button.large {
			height: 3.1rem;
			line-height: 3.1rem;
			font-size: 0.95rem;
			padding: 0 1.8rem;
		}

		.button.primary,
		#main .button.primary {
			background: var(--text);
			box-shadow: 0 8px 24px rgba(255, 255, 255, 0.06);
			color: #0a0a0a !important;
		}

			.button.primary:hover,
			#main .button.primary:hover {
				background: #ffffff;
				color: #000000 !important;
				box-shadow: 0 10px 30px rgba(255, 255, 255, 0.12);
			}

		.button.icon:before {
			margin-right: 0.6rem;
		}

/* ---------- Post cards ---------- */

	#main > .posts {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.25rem;
		padding: 2.5rem !important;
	}

		#main > .posts > article {
			width: auto !important;
			margin: 0 !important;
			border: 0 !important;
			padding: 1.5rem 1.5rem 1.75rem !important;
			border-radius: var(--radius-xl);
			background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
			box-shadow: inset 0 0 0 1px var(--hairline);
			text-align: center;
			transition: transform 0.5s var(--ease-out), box-shadow 0.5s ease;
		}

			#main > .posts > article.is-visible:hover {
				transform: translateY(-6px);
				box-shadow: inset 0 0 0 1px var(--hairline-strong), 0 24px 50px rgba(0, 0, 0, 0.55);
			}

			#main > .posts > article .image {
				margin: 0 0 1.5rem 0 !important;
			}

			#main > .posts > article h2 {
				font-size: 1.55rem;
				line-height: 1.2;
			}

			#main > .posts > article h2 a {
				border: 0;
				background-image: linear-gradient(180deg, #ffffff 0%, #e4e4e7 50%, #9a9aa3 100%);
				-webkit-background-clip: text;
				background-clip: text;
				transition: opacity 0.2s ease;
			}

			#main > .posts > article:hover h2 a {
				opacity: 0.85;
			}

			#main > .posts > article p {
				text-align: center;
				font-size: 0.95rem;
			}

	ul.tags {
		list-style: none;
		display: flex;
		flex-wrap: wrap;
		gap: 0.4rem;
		padding: 0;
		margin: 0 0 1.25rem 0;
	}

	#main .posts ul.tags {
		justify-content: center;
	}

		ul.tags li {
			font-family: var(--mono);
			font-size: 0.7rem;
			font-weight: 500;
			letter-spacing: 0.02em;
			line-height: 1;
			padding: 0.4rem 0.7rem;
			text-transform: none;
			border-radius: 999px;
			background: rgba(255, 255, 255, 0.04);
			box-shadow: inset 0 0 0 1px var(--hairline);
			color: var(--muted);
		}

			ul.tags li:before {
				content: "#";
				color: var(--dim);
				margin-right: 0.1rem;
			}

	#main > footer.more p {
		text-align: center;
		color: var(--muted);
	}

/* ---------- Single post ---------- */

	.reading-time {
		font-family: var(--mono);
		font-size: 0.75rem !important;
		letter-spacing: 0.04em;
		color: var(--dim) !important;
		margin-top: -0.5rem;
	}

		.reading-time:empty {
			display: none;
		}

	.post.single header.major ul.tags {
		justify-content: center;
		margin-top: -0.5rem;
	}

	.post-body {
		max-width: 42rem;
		margin: 0 auto;
		font-size: 1.05rem;
		color: #b4b4b8;
	}

		.post-body h2 {
			font-size: 1.85rem;
			margin-top: 3rem;
		}

		.post-body ul, .post-body ol {
			margin-bottom: 2rem;
		}

		.post-body li {
			padding-left: 0.25rem;
			margin-bottom: 0.5rem;
		}

		.post-body li::marker {
			color: var(--dim);
			font-family: var(--mono);
		}

	#reading-progress {
		position: fixed;
		top: 0;
		left: 0;
		height: 2px;
		width: 100%;
		background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), #ffffff);
		box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
		transform-origin: 0 50%;
		transform: scaleX(0);
		z-index: 10002;
		pointer-events: none;
	}

	.post-nav {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1.25rem;
		padding: 2.5rem !important;
	}

		.post-nav-link {
			display: block;
			border: 0 !important;
			border-radius: var(--radius-lg);
			padding: 1.25rem 1.5rem;
			background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
			box-shadow: inset 0 0 0 1px var(--hairline);
			color: var(--text);
			font-family: var(--heading);
			font-size: 1.15rem;
			font-weight: 600;
			letter-spacing: -0.02em;
			line-height: 1.35;
			transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
		}

			.post-nav-link span {
				display: block;
				font-family: var(--mono);
				font-size: 0.7rem;
				font-weight: 400;
				letter-spacing: 0.08em;
				text-transform: uppercase;
				color: var(--dim);
				margin-bottom: 0.4rem;
			}

			.post-nav-link.older span:before {
				content: "\2190\00a0\00a0";
			}

			.post-nav-link.newer span:after {
				content: "\00a0\00a0\2192";
			}

			.post-nav-link.newer {
				text-align: right;
			}

			a.post-nav-link:hover {
				transform: translateY(-4px);
				box-shadow: inset 0 0 0 1px var(--hairline-strong), 0 20px 40px rgba(0, 0, 0, 0.5);
				color: #ffffff !important;
			}

			.post-nav-link.empty {
				background: none;
				box-shadow: none;
			}

/* ---------- Archive ---------- */

	.archive-tools {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
		margin-bottom: 2.5rem;
	}

		.chips {
			display: flex;
			flex-wrap: wrap;
			gap: 0.4rem;
			padding: 0.3rem;
			border-radius: 14px;
			background: var(--bg);
			box-shadow: inset 0 0 0 1px var(--hairline);
		}

			.chip {
				height: 2.1rem !important;
				line-height: 2.1rem !important;
				padding: 0 0.9rem !important;
				font-size: 0.8rem !important;
				border-radius: 10px !important;
				background: transparent !important;
				box-shadow: none !important;
				color: var(--muted) !important;
			}

				.chip:hover {
					background: rgba(255, 255, 255, 0.06) !important;
					color: var(--text) !important;
					transform: none;
				}

				.chip.is-active {
					background: var(--pill-bg) !important;
					box-shadow: var(--pill-shadow) !important;
					color: var(--text) !important;
				}

		.search {
			position: relative;
			display: block;
			flex: 0 1 18rem;
			margin: 0;
		}

			.search input {
				width: 100%;
			}

			.search .label {
				position: absolute;
				width: 1px;
				height: 1px;
				overflow: hidden;
				clip: rect(0 0 0 0);
			}

			.search input {
				height: 2.75rem !important;
				border-radius: 14px !important;
				border: 0 !important;
				background: var(--bg) !important;
				box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 0 4px rgba(255, 255, 255, 0.03) !important;
				color: var(--text) !important;
				padding: 0 2.75rem 0 1rem !important;
				transition: box-shadow 0.25s ease;
			}

				.search input:focus {
					box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.06) !important;
				}

			.search kbd {
				position: absolute;
				right: 0.65rem;
				top: 50%;
				transform: translateY(-50%);
				pointer-events: none;
			}

	.archive-list {
		list-style: none;
		padding: 0;
		display: grid;
		gap: 0.75rem;
	}

		.archive-item {
			display: grid;
			grid-template-columns: 13rem 1fr;
			gap: 1.75rem;
			align-items: center;
			padding: 0.9rem 1.5rem 0.9rem 0.9rem !important;
			border-radius: var(--radius-lg);
			background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
			box-shadow: inset 0 0 0 1px var(--hairline);
			transition: transform 0.45s var(--ease-out), box-shadow 0.45s ease;
		}

			.archive-item.is-visible:hover {
				transform: translateY(-3px);
				box-shadow: inset 0 0 0 1px var(--hairline-strong), 0 18px 40px rgba(0, 0, 0, 0.5);
			}

			.archive-item.is-hidden {
				display: none;
			}

			.archive-item .image {
				border-radius: var(--radius-md);
			}

				.archive-item .image img {
					width: 100%;
					border-radius: var(--radius-md);
				}

			.archive-item h3 {
				font-size: 1.4rem;
				line-height: 1.25;
				margin-bottom: 0.4rem;
			}

				.archive-item h3 a {
					border: 0;
				}

			.archive-item .date {
				font-family: var(--mono);
				font-size: 0.72rem;
				letter-spacing: 0.08em;
				text-transform: uppercase;
				color: var(--dim);
			}

			.archive-item p {
				margin-bottom: 0.75rem;
				font-size: 0.95rem;
			}

			.archive-item ul.tags {
				margin-bottom: 0;
			}

	.archive-empty {
		text-align: center !important;
		color: var(--muted);
		padding: 2rem 0;
	}

/* ---------- About ---------- */

	.topics {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 1rem;
		margin-bottom: 3rem;
	}

		.topic {
			border-radius: var(--radius-lg);
			padding: 1.5rem 1.5rem 0.5rem;
			background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
			box-shadow: inset 0 0 0 1px var(--hairline);
			transition: transform 0.45s var(--ease-out), box-shadow 0.45s ease;
		}

			.topic.is-visible:hover {
				transform: translateY(-6px);
				box-shadow: inset 0 0 0 1px var(--hairline-strong), 0 20px 40px rgba(0, 0, 0, 0.5);
			}

			.topic .icon {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				width: 2.75rem;
				height: 2.75rem;
				border-radius: 12px;
				background: var(--pill-bg);
				box-shadow: var(--pill-shadow);
				color: var(--text);
				margin-bottom: 1rem;
			}

				.topic .icon:before {
					line-height: 1;
				}

			.topic h3 {
				font-size: 1.15rem;
				margin-bottom: 0.4rem;
			}

			.topic p {
				font-size: 0.92rem;
			}

	ul.facts {
		list-style: none;
		padding: 0;
	}

		ul.facts li {
			padding: 0.65rem 0 0.65rem 1.5rem;
			border-top: 1px solid var(--hairline);
			position: relative;
		}

			ul.facts li:before {
				content: "";
				position: absolute;
				left: 0.2rem;
				top: 1.4rem;
				width: 0.4rem;
				height: 0.4rem;
				border-radius: 50%;
				background: var(--text);
				box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
			}

/* ---------- Footer card ---------- */

	#footer {
		background-color: var(--surface);
		color: var(--muted);
		border-radius: var(--radius-xl);
		box-shadow: inset 0 0 0 1px var(--hairline), var(--card-shadow);
		margin-top: 0.75rem;
		overflow: hidden;
	}

		#footer > section,
		#footer > section.split > section {
			border-color: var(--hairline) !important;
			border-width: 1px !important;
		}

		#footer p {
			text-align: left;
			line-height: 1.75;
			color: var(--muted);
			font-size: 0.9rem;
		}

		#footer h3 {
			font-family: var(--mono);
			font-size: 0.72rem;
			font-weight: 500;
			letter-spacing: 0.1em;
			text-transform: uppercase;
			color: var(--dim);
		}

		#footer .button {
			color: var(--text) !important;
		}

	#footer ul.footer-links {
		list-style: none;
		padding: 0;
		font-size: 0.9rem;
	}

		#footer ul.footer-links li {
			padding: 0.2rem 0;
		}

		#footer ul.footer-links a {
			color: var(--muted);
			border-bottom: 0;
			background-image: linear-gradient(#ffffff, #ffffff);
			background-size: 0 1px;
			background-position: 0 100%;
			background-repeat: no-repeat;
			transition: background-size 0.35s var(--ease-out), color 0.2s ease;
		}

			#footer ul.footer-links a:hover {
				background-size: 100% 1px;
				color: var(--text) !important;
			}

	#footer .social-link {
		display: inline-flex;
		align-items: center;
		gap: 0.9rem;
		border: 0;
		color: var(--text);
	}

		#footer .social-link .icon {
			display: inline-flex;
			align-items: center;
			justify-content: center;
			width: 2.75rem;
			height: 2.75rem;
			border-radius: 12px;
			background: var(--pill-bg);
			box-shadow: var(--pill-shadow);
			color: var(--text);
			font-size: 1.2rem;
			transition: transform 0.35s var(--ease-out), box-shadow 0.25s ease;
		}

			#footer .social-link .icon:before {
				line-height: 1;
			}

		#footer .social-link > span:last-child {
			font-weight: 500;
			line-height: 1.35;
		}

		#footer .social-link small {
			display: block;
			font-family: var(--mono);
			font-size: 0.75rem;
			color: var(--dim);
		}

		#footer .social-link:hover .icon {
			transform: translateY(-3px) rotate(-8deg);
			box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 10px 24px rgba(0, 0, 0, 0.5);
		}

	#copyright {
		font-family: var(--mono);
		font-weight: 400;
		letter-spacing: 0.04em;
		text-transform: none;
		color: var(--dim);
	}

		#copyright a {
			color: var(--muted);
		}

/* ---------- Mobile menu ---------- */

	#navPanelToggle {
		font-family: var(--ui) !important;
		font-weight: 500 !important;
		letter-spacing: 0 !important;
		text-transform: none !important;
		border-radius: 999px !important;
		background: rgba(15, 15, 15, 0.82) !important;
		backdrop-filter: blur(12px);
		-webkit-backdrop-filter: blur(12px);
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
		color: var(--text) !important;
	}

	#navPanel {
		background: var(--surface);
		box-shadow: inset 1px 0 0 var(--hairline);
		color: var(--text);
	}

		#navPanel .links li {
			border-top-color: var(--hairline) !important;
			border-radius: 10px;
		}

		#navPanel .links li a {
			font-family: var(--ui);
			font-weight: 500;
			letter-spacing: 0;
			text-transform: none;
			font-size: 1rem;
			color: var(--muted);
			border-bottom: 0;
			padding-left: 1rem;
			padding-right: 1rem;
		}

			#navPanel .links li a:hover {
				color: var(--text) !important;
			}

		#navPanel .links li.active {
			background: var(--pill-bg);
			box-shadow: var(--pill-shadow);
		}

			#navPanel .links li.active a {
				color: var(--text) !important;
			}

		#navPanel .close {
			color: var(--dim);
		}

			#navPanel .close:hover {
				color: var(--text);
			}

		#navPanel ul.icons li a.icon {
			border: 0;
		}

		#navPanel ul.icons li a.icon:before {
			color: var(--text);
			box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
		}

/* ---------- Scroll reveal (only when JS is running) ---------- */

	.js-reveal .reveal {
		opacity: 0;
		transform: translateY(28px);
		filter: blur(6px);
		transition: opacity 0.8s ease, transform 0.8s var(--ease-out), filter 0.8s ease;
	}

		.js-reveal .reveal.is-visible {
			opacity: 1;
			transform: none;
			filter: none;
		}

/* ---------- Smaller screens ---------- */

	@media screen and (max-width: 980px) {
		.topics {
			grid-template-columns: 1fr;
		}

		#header .logo {
			font-size: 2.2rem;
		}
	}

	@media screen and (max-width: 736px) {
		#intro {
			margin: 0.5rem;
			min-height: calc(100vh - 1rem);
			border-radius: 24px;
			padding-left: 1.5rem;
			padding-right: 1.5rem;
		}

		#intro p {
			font-size: 1.05rem;
		}

		#intro .actions {
			display: flex !important;
			flex-direction: column;
			width: 100%;
			max-width: 18rem;
		}

			#intro .actions li,
			#intro .actions .button,
			#intro .actions .search-pill {
				width: 100%;
				justify-content: center;
			}

		.search-pill {
			min-width: 0;
		}

		#main,
		#footer {
			border-radius: 22px;
		}

		#main > .posts {
			grid-template-columns: 1fr;
			padding: 1rem !important;
			gap: 1rem;
		}

		blockquote {
			font-size: 1.1rem;
		}

		.post-body {
			font-size: 1rem;
		}

		.post-body h2 {
			font-size: 1.45rem;
		}

		.post-nav {
			grid-template-columns: 1fr;
			padding: 1rem !important;
		}

			.post-nav-link.newer {
				text-align: left;
			}

			.post-nav-link.empty {
				display: none;
			}

		.archive-item {
			grid-template-columns: 1fr;
			gap: 1rem;
			padding: 0.75rem 0.75rem 1.25rem !important;
		}

		.search {
			flex-basis: 100%;
		}

		#header .logo {
			font-size: 1.9rem;
		}
	}

/* ---------- Reduced motion ---------- */

	@media (prefers-reduced-motion: reduce) {
		*, *:before, *:after {
			animation: none !important;
			transition: none !important;
		}

		.js-reveal .reveal {
			opacity: 1;
			transform: none;
			filter: none;
		}

		#intro h1 .line-1 { -webkit-text-fill-color: #ffffff; }
		#intro h1 .line-2 { -webkit-text-fill-color: #a1a1aa; }
	}

/* ---------- Logo ---------- */

	/* The mark has a black rim, so a thin light ring keeps its edge visible on the dark page. */
	.logo-mark,
	.nav-brand img,
	.hero-logo {
		display: block;
		border-radius: 50%;
		box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85);
	}

	#header .logo {
		display: inline-flex;
		align-items: center;
		gap: 0.9rem;
	}

		#header .logo .logo-mark {
			width: 3rem;
			height: 3rem;
			transition: transform 0.6s var(--ease-out);
		}

		#header .logo:hover .logo-mark {
			transform: rotate(-12deg) scale(1.06);
		}

	#nav .nav-brand {
		display: flex;
		align-items: center;
		flex-shrink: 0;
		border: 0;
		padding: 0 0.85rem 0 0.5rem;
		margin-right: 0.35rem;
		height: 2.25rem;
		box-shadow: 1px 0 0 var(--hairline);
	}

		#nav .nav-brand img {
			width: 1.75rem;
			height: 1.75rem;
			transition: transform 0.5s var(--ease-out);
		}

		#nav .nav-brand:hover img {
			transform: rotate(-14deg) scale(1.08);
		}

	#navPanel .nav-brand {
		display: inline-block;
		border: 0;
		margin: 0 0 1.25rem 0.25rem;
	}

		#navPanel .nav-brand img {
			width: 2.5rem;
			height: 2.5rem;
		}

	.hero-logo {
		width: 5.5rem;
		height: 5.5rem;
		margin-bottom: 1.5rem;
		box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 0 8px rgba(255, 255, 255, 0.04), 0 20px 60px rgba(255, 255, 255, 0.1);
		animation: float 6s ease-in-out infinite;
	}

		.hero-logo .eye {
			transform-box: fill-box;
			transform-origin: center;
			animation: blink 5.5s ease-in-out infinite;
		}

		.hero-logo .eye-right {
			animation-delay: 0.04s;
		}

	@keyframes float {
		50% { transform: translateY(-8px) rotate(-3deg); }
	}

	@keyframes blink {
		0%, 93%, 100% { transform: scaleY(1); }
		96% { transform: scaleY(0.08); }
	}

	@media screen and (max-width: 736px) {
		.hero-logo {
			width: 4.5rem;
			height: 4.5rem;
		}

		#header .logo .logo-mark {
			width: 2.4rem;
			height: 2.4rem;
		}
	}
