/* ─── post.css — single blog post page (pt- prefix) ─── */

:root {
	--pt-accent: #a259ff;
	--pt-accent-dim: rgba(162, 89, 255, 0.12);
	--pt-border: rgba(255, 255, 255, 0.07);
	--pt-surface: rgba(255, 255, 255, 0.03);
	--pt-surface-2: rgba(255, 255, 255, 0.05);
	--pt-text: rgba(255, 255, 255, 0.88);
	--pt-muted: rgba(255, 255, 255, 0.48);
}

/* ──────────────────────────────────────────────
   Breadcrumb bar
────────────────────────────────────────────── */
.pt-back-bar {
	padding: 1.1rem 0;
	border-bottom: 1px solid var(--pt-border);
	background: rgba(255, 255, 255, 0.015);
}
.pt-back-bar__container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 2rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.82rem;
	color: var(--pt-muted);
}
.pt-back-bar__link {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--pt-accent);
	text-decoration: none;
	font-weight: 500;
	transition: opacity 0.2s;
}
.pt-back-bar__link:hover {
	opacity: 0.8;
}
.pt-back-bar__chevron {
	opacity: 0.35;
}
.pt-back-bar__current {
	color: var(--pt-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 440px;
}

/* ──────────────────────────────────────────────
   Hero
────────────────────────────────────────────── */
.pt-hero {
	padding: 4rem 0 3rem;
	border-bottom: 1px solid var(--pt-border);
}
.pt-hero__container {
	max-width: 820px;
	margin: 0 auto;
	padding: 0 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}
.pt-hero__meta-top {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	font-size: 0.82rem;
}
.pt-hero__cat {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--pt-accent);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	transition: opacity 0.2s;
}
.pt-hero__cat:hover {
	opacity: 0.8;
}
.pt-hero__cat-icon {
	display: flex;
	align-items: center;
}
.pt-hero__cat-icon svg {
	width: 14px;
	height: 14px;
}
.pt-hero__meta-sep {
	color: var(--pt-muted);
	opacity: 0.5;
}
.pt-hero__date,
.pt-hero__read {
	color: var(--pt-muted);
	display: flex;
	align-items: center;
	gap: 0.3rem;
}
.pt-hero__title {
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 700;
	line-height: 1.18;
	color: #fff;
	margin: 0;
}
.pt-hero__excerpt {
	font-size: 1.05rem;
	line-height: 1.72;
	color: var(--pt-muted);
	max-width: 680px;
	margin: 0;
}
.pt-hero__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}
.pt-hero__tag {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 500;
	padding: 0.28rem 0.7rem;
	border-radius: 100px;
	background: var(--pt-surface-2);
	border: 1px solid var(--pt-border);
	color: rgba(255, 255, 255, 0.65);
}

/* ──────────────────────────────────────────────
   Layout (content + TOC sidebar)
────────────────────────────────────────────── */
.pt-layout {
	padding: 3.5rem 0 4rem;
}
.pt-layout__container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 2rem;
	display: grid;
	grid-template-columns: 1fr 240px;
	gap: 4rem;
	align-items: start;
}

/* ──────────────────────────────────────────────
   Article content typography
────────────────────────────────────────────── */
.pt-content {
	font-size: 1rem;
	line-height: 1.82;
	color: var(--pt-text);
	min-width: 0;
}
.pt-content__placeholder {
	color: var(--pt-muted);
	font-style: italic;
}

.pt-content h2 {
	font-size: 1.55rem;
	font-weight: 700;
	color: #fff;
	margin: 2.4rem 0 0.9rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--pt-border);
	scroll-margin-top: 100px;
}
.pt-content h3 {
	font-size: 1.18rem;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.92);
	margin: 1.8rem 0 0.6rem;
	scroll-margin-top: 100px;
}
.pt-content h4 {
	font-size: 1rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.85);
	margin: 1.4rem 0 0.4rem;
	scroll-margin-top: 100px;
}

.pt-content p {
	margin: 0 0 1.2rem;
}
.pt-content ul,
.pt-content ol {
	margin: 0.6rem 0 1.2rem;
	padding-left: 1.6rem;
}
.pt-content li {
	margin-bottom: 0.45rem;
}
.pt-content li::marker {
	color: var(--pt-accent);
}

.pt-content a {
	color: var(--pt-accent);
	text-decoration: underline;
	text-decoration-color: rgba(162, 89, 255, 0.35);
	transition: text-decoration-color 0.2s;
}
.pt-content a:hover {
	text-decoration-color: var(--pt-accent);
}

/* inline code */
.pt-content code:not([class]) {
	font-family: 'Fira Code', 'Consolas', monospace;
	font-size: 0.88em;
	background: rgba(162, 89, 255, 0.1);
	color: #e2b8ff;
	padding: 0.15em 0.45em;
	border-radius: 5px;
	border: 1px solid rgba(162, 89, 255, 0.2);
}

/* blockquote */
.pt-content blockquote {
	margin: 1.6rem 0;
	padding: 1rem 1.4rem;
	border-left: 3px solid var(--pt-accent);
	background: var(--pt-accent-dim);
	border-radius: 0 8px 8px 0;
	color: rgba(255, 255, 255, 0.8);
	font-style: italic;
}
.pt-content blockquote p {
	margin: 0;
}

/* callout boxes */
.pt-callout {
	display: flex;
	gap: 0.85rem;
	padding: 1rem 1.3rem;
	border-radius: 10px;
	margin: 1.4rem 0;
	border: 1px solid var(--pt-border);
	background: var(--pt-surface);
}
.pt-callout--info {
	border-color: rgba(58, 134, 255, 0.25);
	background: rgba(58, 134, 255, 0.06);
}
.pt-callout--warn {
	border-color: rgba(255, 190, 50, 0.25);
	background: rgba(255, 190, 50, 0.06);
}
.pt-callout--tip {
	border-color: rgba(50, 200, 120, 0.25);
	background: rgba(50, 200, 120, 0.06);
}
.pt-callout__icon {
	font-size: 1.1rem;
	line-height: 1.6;
	flex-shrink: 0;
}
.pt-callout__text {
	font-size: 0.93rem;
	color: rgba(255, 255, 255, 0.8);
	line-height: 1.65;
}
.pt-callout__text p {
	margin: 0;
}

.pt-content hr {
	border: none;
	border-top: 1px solid var(--pt-border);
	margin: 2.2rem 0;
}
.pt-content img {
	max-width: 100%;
	border-radius: 10px;
	border: 1px solid var(--pt-border);
	display: block;
	margin: 1.6rem auto;
}
.pt-content figure {
	margin: 1.6rem 0;
}
.pt-content figcaption {
	text-align: center;
	font-size: 0.78rem;
	color: var(--pt-muted);
	margin-top: 0.5rem;
}

/* ──────────────────────────────────────────────
   Code blocks (Prism.js overrides + copy btn)
────────────────────────────────────────────── */
.pt-content pre {
	margin: 1.4rem 0;
	border-radius: 12px;
	border: 1px solid var(--pt-border);
	overflow: hidden;
	position: relative;
}
/* Prism tomorrow theme override */
.pt-content pre[class*='language-'] {
	margin: 0 !important;
	border-radius: 0 0 12px 12px !important;
	font-size: 0.875rem !important;
	line-height: 1.65 !important;
	background: #111827 !important;
}
/* header bar above each code block */
.pt-code-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 1rem;
	background: #0d1117;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pt-code-lang {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--pt-muted);
}
.pt-code-copy {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.72rem;
	color: var(--pt-muted);
	background: transparent;
	border: 1px solid var(--pt-border);
	border-radius: 5px;
	padding: 0.22rem 0.6rem;
	cursor: pointer;
	transition:
		color 0.2s,
		border-color 0.2s;
	font-family: inherit;
}
.pt-code-copy:hover {
	color: rgba(255, 255, 255, 0.85);
	border-color: rgba(255, 255, 255, 0.15);
}
.pt-code-copy--copied {
	color: #4ade80 !important;
	border-color: rgba(74, 222, 128, 0.35) !important;
}

/* ──────────────────────────────────────────────
   Table of contents sidebar
────────────────────────────────────────────── */
.pt-toc {
	position: sticky;
	top: 100px;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}
.pt-toc__label {
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--pt-muted);
}
.pt-toc__nav {
	display: flex;
	flex-direction: column;
	border-left: 1px solid var(--pt-border);
}
.pt-toc__item {
	display: block;
	padding: 0.38rem 0.85rem;
	font-size: 0.8rem;
	color: var(--pt-muted);
	text-decoration: none;
	border-left: 2px solid transparent;
	margin-left: -1px;
	transition:
		color 0.2s,
		border-color 0.2s;
	line-height: 1.4;
}
.pt-toc__item--h3 {
	padding-left: 1.5rem;
	font-size: 0.75rem;
}
.pt-toc__item:hover {
	color: var(--pt-text);
}
.pt-toc__item--active {
	color: var(--pt-accent) !important;
	border-left-color: var(--pt-accent) !important;
}

/* ──────────────────────────────────────────────
   Prev / Next nav
────────────────────────────────────────────── */
.pt-nav {
	border-top: 1px solid var(--pt-border);
	padding: 2.5rem 0 4rem;
}
.pt-nav__container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 2rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}
.pt-nav__spacer {
	display: block;
}
.pt-nav__card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.3rem 1.5rem;
	border: 1px solid var(--pt-border);
	border-radius: 14px;
	background: var(--pt-surface);
	text-decoration: none;
	transition:
		border-color 0.25s,
		transform 0.25s,
		box-shadow 0.25s;
}
.pt-nav__card:hover {
	border-color: rgba(162, 89, 255, 0.3);
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.pt-nav__card--next {
	align-items: flex-end;
	text-align: right;
}
.pt-nav__dir {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pt-accent);
}
.pt-nav__dir--right {
	flex-direction: row-reverse;
}
.pt-nav__title {
	font-size: 0.93rem;
	font-weight: 600;
	color: #fff;
	line-height: 1.35;
}
.pt-nav__meta {
	font-size: 0.75rem;
	color: var(--pt-muted);
}

/* ──────────────────────────────────────────────
   404 state
────────────────────────────────────────────── */
.pt-404 {
	min-height: 60vh;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pt-404__container {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}
.pt-404__code {
	font-size: 6rem;
	font-weight: 800;
	color: var(--pt-accent);
	opacity: 0.22;
	line-height: 1;
}
.pt-404__title {
	font-size: 1.8rem;
	font-weight: 700;
	color: #fff;
	margin: 0;
}
.pt-404__desc {
	font-size: 0.95rem;
	color: var(--pt-muted);
	margin: 0;
}
.pt-404__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin-top: 0.5rem;
	padding: 0.6rem 1.4rem;
	background: var(--pt-accent);
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	border-radius: 8px;
	text-decoration: none;
	transition: filter 0.2s;
}
.pt-404__btn:hover {
	filter: brightness(1.15);
}

/* ──────────────────────────────────────────────
   Responsive
────────────────────────────────────────────── */
@media (max-width: 980px) {
	.pt-layout__container {
		grid-template-columns: 1fr;
	}
	.pt-toc {
		display: none;
	}
}
@media (max-width: 640px) {
	.pt-hero {
		padding: 2.5rem 0 2rem;
	}
	.pt-hero__container,
	.pt-back-bar__container,
	.pt-layout__container,
	.pt-nav__container {
		padding: 0 1rem;
	}
	.pt-nav__container {
		grid-template-columns: 1fr;
	}
	.pt-nav__card--next {
		align-items: flex-start;
		text-align: left;
	}
	.pt-nav__dir--right {
		flex-direction: row;
	}
	.pt-back-bar__current {
		max-width: 200px;
	}
}
