.blog-post-page {
	margin: 0;
	min-height: 100vh;
	background: #000;
	color: #fafafa;
	font-family: 'Inter', system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	position: relative;
}

.post-shell {
	position: relative;
	z-index: 1;
	max-width: 44rem;
	margin: 0 auto;
	padding: 1.75rem 1.25rem 6rem;
}

@media (min-width: 640px) {
	.post-shell {
		padding: 2.25rem 1.5rem 7rem;
	}
}

.post-back {
	display: inline-block;
	margin-bottom: 1.5rem;
	font-size: 0.875rem;
	color: #a1a1aa;
	text-decoration: none;
	transition: color 0.15s ease;
}

.post-back:hover {
	color: #fafafa;
}

.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.post-tag {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	border-radius: 6px;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	background: rgba(255, 255, 255, 0.08);
	color: #e4e4e7;
	border: 1px solid rgba(255, 255, 255, 0.08);
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

a.post-tag:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #fafafa;
}

.post-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.75rem;
	font-size: 0.8125rem;
	color: #a1a1aa;
}

.post-meta-left {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.post-meta-sep {
	opacity: 0.5;
}

.post-read {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.post-read-icon {
	opacity: 0.85;
}

.post-byline {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.post-byline-txt {
	white-space: nowrap;
}

.post-byline-avatar-shell {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 3px;
	box-sizing: border-box;
	border-radius: 50%;
	background: #fff;
	overflow: hidden;
	flex-shrink: 0;
	border: 1px solid rgba(255, 255, 255, 0.18);
}

.post-byline-avatar {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 0;
	border: none;
}

.post-title {
	margin: 0 0 1rem;
	font-size: clamp(1.85rem, 5vw, 2.65rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.12;
	color: #fff;
}

.post-lede {
	margin: 0 0 2rem;
	font-size: 1.05rem;
	line-height: 1.55;
	color: #a1a1aa;
}

.post-hero-banner {
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 0 0 2rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	cursor: zoom-in;
}

.post-body img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 1.25rem auto;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	cursor: zoom-in;
}

.post-body figure.post-body-figure {
	margin: 1.25rem auto;
	max-width: 100%;
}

.post-body figure.post-body-figure > img {
	margin-top: 0;
	margin-bottom: 0;
}

.post-body .post-body-figcaption {
	margin-top: 0.5rem;
	text-align: center;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #a1a1aa;
}

.post-body p img {
	margin-top: 0.65rem;
	margin-bottom: 0.65rem;
}

/* Markdown body */
.post-body {
	font-size: 1rem;
	line-height: 1.75;
	color: #e4e4e7;
}

.post-body h2 {
	margin: 2.25rem 0 0.85rem;
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #fafafa;
	scroll-margin-top: 1.25rem;
}

.post-body h3 {
	margin: 1.75rem 0 0.65rem;
	font-size: 1.1rem;
	font-weight: 600;
	color: #fafafa;
}

.post-body p {
	margin: 0 0 1.1rem;
}

.post-body blockquote {
	margin: 1.15rem 0;
	padding: 0.75rem 1rem 0.75rem 1.1rem;
	border-left: 3px solid rgba(147, 197, 253, 0.65);
	background: linear-gradient(
		90deg,
		rgba(147, 197, 253, 0.09) 0%,
		rgba(255, 255, 255, 0.03) 100%
	);
	border-radius: 0 10px 10px 0;
	color: #d4d4d8;
	font-style: italic;
}

.post-body blockquote p {
	margin: 0 0 0.55rem;
}

.post-body blockquote p:last-child {
	margin-bottom: 0;
}

.post-body blockquote code,
.post-body blockquote pre {
	font-style: normal;
}

.post-body blockquote pre {
	margin: 0.65rem 0 0;
}

.post-body a {
	color: #93c5fd;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.post-body a:hover {
	color: #bfdbfe;
}

.post-body ul,
.post-body ol {
	margin: 0 0 1.1rem;
	padding-left: 1.35rem;
}

.post-body li {
	margin-bottom: 0.35rem;
}

.post-body strong {
	color: #fafafa;
	font-weight: 600;
}

.post-body code {
	font-size: 0.88em;
	padding: 0.12em 0.35em;
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.post-body pre {
	margin: 1.25rem 0;
	padding: 1rem 1.1rem;
	border-radius: 10px;
	background: #141418;
	border: 1px solid rgba(255, 255, 255, 0.08);
	overflow-x: auto;
	font-size: 0.85rem;
	line-height: 1.55;
}

.post-body pre code {
	padding: 0;
	border: none;
	background: none;
	font-size: inherit;
}

.post-body table {
	width: 100%;
	margin: 1.25rem 0;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.post-body th {
	text-align: left;
	padding: 0.5rem 0.65rem;
	text-transform: uppercase;
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	color: #a1a1aa;
	background: rgba(255, 255, 255, 0.06);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-body td {
	padding: 0.55rem 0.65rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.post-h2-row {
	display: flex;
	align-items: flex-start;
	gap: 0.35rem;
	margin-top: 2.25rem;
}

.post-h2-row:first-of-type {
	margin-top: 0;
}

.post-h2-row .post-h2-anchor {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	margin-top: 0.35rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #a1a1aa;
	text-decoration: none;
	transition:
		background 0.15s ease,
		color 0.15s ease,
		transform 0.2s cubic-bezier(0.34, 1.25, 0.64, 1);
}

.post-h2-row .post-h2-anchor:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fafafa;
	transform: scale(1.06);
}

.post-h2-row h2 {
	margin-top: 0;
	flex: 1;
	min-width: 0;
}

.post-footer {
	margin-top: 3.5rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.8125rem;
	line-height: 1.6;
	color: #71717a;
}

.post-footer-copy {
	margin: 0 0 0.65rem;
}

.post-footer-note {
	margin: 0 0 0.65rem;
	max-width: 36rem;
}

.post-footer-canonical {
	margin: 0 0 0.65rem;
	word-break: break-all;
}

.post-footer-canonical a {
	color: #93c5fd;
}

.post-footer-back {
	margin: 0;
}

.post-footer-back a {
	color: #a1a1aa;
	text-decoration: none;
}

.post-footer-back a:hover {
	color: #fafafa;
}

/* Floating dock */
.post-nav-dock {
	position: fixed;
	left: 50%;
	bottom: 1.25rem;
	transform: translateX(-50%) translateY(120%);
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 0;
	padding: 0.35rem;
	border-radius: 999px;
	background: rgba(24, 24, 27, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	opacity: 0;
	pointer-events: none;
	transition:
		opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.45s cubic-bezier(0.34, 1.25, 0.64, 1);
}

.post-nav-dock[data-visible='true'] {
	opacity: 1;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

.post-nav-top {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fafafa;
	cursor: pointer;
	transition: background 0.15s ease;
}

.post-nav-top:hover {
	background: rgba(255, 255, 255, 0.14);
}

.post-nav-divider {
	width: 1px;
	height: 1.5rem;
	margin: 0 0.15rem 0 0.35rem;
	background: rgba(255, 255, 255, 0.12);
}

.post-nav-section {
	position: relative;
	padding-right: 0.25rem;
}

.post-nav-section-toggle {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	max-width: min(14rem, 70vw);
	padding: 0.4rem 0.65rem 0.4rem 0.75rem;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: #e4e4e7;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s ease;
}

.post-nav-section-toggle:hover {
	background: rgba(255, 255, 255, 0.06);
}

.post-nav-section-label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: left;
}

.post-nav-section-caret {
	display: flex;
	opacity: 0.75;
	flex-shrink: 0;
}

.post-nav-menu {
	position: absolute;
	bottom: calc(100% + 0.5rem);
	left: 50%;
	transform: translateX(-50%);
	min-width: 12rem;
	max-width: min(20rem, 90vw);
	max-height: 14rem;
	overflow-y: auto;
	margin: 0;
	padding: 0.35rem;
	list-style: none;
	border-radius: 12px;
	background: rgba(24, 24, 27, 0.98);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.post-nav-menu-btn {
	display: block;
	width: 100%;
	padding: 0.5rem 0.65rem;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #e4e4e7;
	font: inherit;
	font-size: 0.8125rem;
	text-align: left;
	cursor: pointer;
	transition: background 0.12s ease;
}

.post-nav-menu-btn:hover {
	background: rgba(255, 255, 255, 0.08);
}

/* Click-to-enlarge (blog-post-lightbox.js) */
body.post-image-lightbox-open {
	overflow: hidden;
}

.post-image-lightbox {
	position: fixed;
	inset: 0;
	z-index: 300;
	align-items: center;
	justify-content: center;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
		env(safe-area-inset-left);
}

.post-image-lightbox[hidden] {
	display: none !important;
}

.post-image-lightbox:not([hidden]) {
	display: flex;
}

.post-image-lightbox__backdrop {
	position: absolute;
	inset: 0;
	border: none;
	padding: 0;
	margin: 0;
	background: rgba(0, 0, 0, 0.9);
	cursor: zoom-out;
}

.post-image-lightbox__frame {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	max-width: min(92vw, 1200px);
	max-height: 85vh;
	pointer-events: none;
}

.post-image-lightbox__photo {
	max-width: 100%;
	max-height: 85vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
	pointer-events: auto;
}

.post-image-lightbox__close {
	position: absolute;
	top: calc(0.65rem + env(safe-area-inset-top));
	right: calc(0.65rem + env(safe-area-inset-right));
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #fafafa;
	cursor: pointer;
	transition: background 0.15s ease;
}

.post-image-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.24);
}

@media (max-width: 768px) {
	.post-image-lightbox--mobile .post-image-lightbox__frame {
		max-width: 100%;
		max-height: 100%;
		padding: 0;
	}

	.post-image-lightbox--mobile .post-image-lightbox__photo {
		max-width: 100%;
		max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
		border-radius: 0;
		box-shadow: none;
	}
}
