/* ============================================================
   labs — Ghost theme
   editorial-terminal: near-black, mono UI, sans body, one accent
   ============================================================ */

:root {
	/* palette */
	--bg:            #0a0a0c;
	--bg-elevated:   #111114;
	--surface:       #16161a;
	--border:        #1f1f24;
	--border-bright: #2a2a31;
	--text:          #ededee;
	--text-dim:      #9ca3af;
	--text-dimmer:   #6b7280;
	--text-faint:    #4b5563;
	--accent:        #fbbf24;
	--accent-dim:    #b8881a;
	--hotfix:        #fb7185;
	--pass:          #86efac;

	/* type */
	--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	--font-sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;

	/* type scale */
	--fs-xs:   0.72rem;
	--fs-sm:   0.85rem;
	--fs-base: 1rem;
	--fs-md:   1.15rem;
	--fs-lg:   1.35rem;
	--fs-xl:   1.85rem;
	--fs-2xl:  2.5rem;
	--fs-3xl:  3.5rem;
	--fs-4xl:  5rem;

	/* layout */
	--content-width: 720px;
	--wide-width:    960px;
	--gutter:        1.5rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

body {
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	line-height: 1.6;
	display: flex;
	flex-direction: column;
}

/* ---------- layout ---------- */
.site {
	flex: 1;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1;
	width: 100%;
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 2rem var(--gutter) 6rem;
}

main.wide  { max-width: var(--wide-width); }
main.flush { max-width: none; padding-left: 0; padding-right: 0; }

/* ---------- header ---------- */
.site-header {
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 10;
	backdrop-filter: blur(8px);
	background: rgba(10, 10, 12, 0.85);
}
.site-header-bar {
	max-width: var(--wide-width);
	margin: 0 auto;
	padding: 0.85rem var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}
.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--text);
	font-family: var(--font-mono);
	font-size: var(--fs-sm);
	text-decoration: none;
	border-bottom: 0;
}
.brand .mark {
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--accent);
	color: var(--bg);
	font-weight: 700;
	font-size: 0.7rem;
	letter-spacing: -0.04em;
	border-radius: 3px;
}
.brand .brand-text {
	color: var(--text-dim);
	transition: color 0.15s ease;
}
.brand:hover .brand-text { color: var(--accent); }

.site-nav {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}
.site-nav a {
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-dim);
	text-decoration: none;
	padding: 0.25rem 0;
	transition: color 0.15s ease;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--accent); }
@media (max-width: 540px) {
	.brand .brand-text { display: none; }
	.site-nav { gap: 1rem; }
}

/* ---------- footer ---------- */
.site-footer {
	border-top: 1px solid var(--border);
	margin-top: auto;
}
.site-footer-bar {
	max-width: var(--wide-width);
	margin: 0 auto;
	padding: 1.5rem var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.05em;
	color: var(--text-dim);
}
.site-footer-bar a { color: var(--text-dim); }
.site-footer-bar a:hover { color: var(--accent); }
.site-footer-bar .sep { color: var(--text-faint); margin: 0 0.5rem; }

/* ---------- typography ---------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-mono);
	font-weight: 500;
	letter-spacing: -0.01em;
	color: var(--text);
	line-height: 1.15;
}
h1 { font-size: var(--fs-3xl); letter-spacing: -0.025em; font-weight: 700; }
h2 { font-size: var(--fs-xl); margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: var(--fs-lg); margin-top: 2rem; margin-bottom: 0.75rem; }

p { margin: 0 0 1.1em 0; color: var(--text); }

a {
	color: var(--accent);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.15s ease;
}
a:hover { border-bottom-color: var(--accent); }

code, kbd, samp, pre {
	font-family: var(--font-mono);
	font-size: 0.92em;
}
code {
	background: var(--surface);
	padding: 0.12em 0.4em;
	border: 1px solid var(--border);
	border-radius: 3px;
	color: var(--accent);
}
pre {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 1rem 1.25rem;
	overflow-x: auto;
	margin: 1.5rem 0;
	line-height: 1.5;
	font-size: var(--fs-sm);
}
pre code { background: transparent; padding: 0; border: 0; color: var(--text); font-size: inherit; }

blockquote {
	border-left: 2px solid var(--accent-dim);
	margin: 1.5rem 0;
	padding: 0.25rem 0 0.25rem 1.25rem;
	color: var(--text-dim);
	font-style: italic;
}
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1.1em 0; }
li { margin-bottom: 0.4em; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- utility ---------- */
.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.95rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text-dim);
	font-weight: 500;
}
.eyebrow.sm  { font-size: 0.78rem; letter-spacing: 0.16em; }
.eyebrow.dim { color: var(--text-faint); }

.mono  { font-family: var(--font-mono); }
.dim   { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.hairline { border: 0; border-top: 1px solid var(--border); margin: 0; }

::selection { background: var(--accent); color: var(--bg); }
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------- home / hero ---------- */
.hero { margin-bottom: 4rem; padding-top: 1rem; }
.hero-meta { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: center; }
.hero-title {
	font-size: clamp(2rem, 6vw, var(--fs-4xl));
	font-weight: 700;
	letter-spacing: -0.035em;
	line-height: 1.05;
	margin: 0 0 1.75rem;
}
.hero-title .accent { color: var(--accent); }
.hero-title .dim    { color: var(--text-dim); font-weight: 500; }
.hero-lede {
	font-size: var(--fs-md);
	max-width: 56ch;
	color: var(--text-dim);
	margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-primary, .btn-ghost {
	font-family: var(--font-mono);
	font-size: var(--fs-sm);
	letter-spacing: 0.04em;
	padding: 0.65rem 1rem;
	border-radius: 4px;
	text-decoration: none;
	border-bottom: 0;
	transition: all 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--bg); font-weight: 500; }
.btn-primary:hover { background: #fcd34d; }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border-bright); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }

/* ---------- ventures grid ---------- */
.ventures { margin: 0 0 4rem; }
.venture-grid {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}
.venture { margin: 0; }
.venture-link {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1.25rem 1.25rem 1.5rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg-elevated);
	text-decoration: none;
	color: var(--text);
	height: 100%;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
	border-bottom-width: 1px;
}
.venture-link:hover {
	border-color: var(--border-bright);
	background: #15151a;
	border-bottom-width: 1px;
}
.venture-link:hover .venture-name { color: var(--accent); }
.venture-link:hover .arrow { transform: translate(2px, -2px); }
.venture-role {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--text-faint);
}
.venture-name {
	font-family: var(--font-mono);
	font-size: 1.2rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--text);
	display: inline-flex;
	align-items: baseline;
	gap: 0.4rem;
}
.venture-name .arrow {
	color: var(--text-dim);
	font-weight: 400;
	display: inline-block;
	transition: transform 0.15s ease;
}
.venture-blurb {
	font-size: var(--fs-sm);
	color: var(--text-dim);
	line-height: 1.55;
}
@media (max-width: 820px) {
	.venture-grid { grid-template-columns: 1fr; }
}

/* ---------- sections ---------- */
.section-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 1.25rem;
	gap: 1rem;
	flex-wrap: wrap;
}
.section-caption {
	font-family: var(--font-mono);
	font-size: 0.82rem;
	letter-spacing: 0.06em;
	color: var(--text-dim);
	line-height: 1.6;
}
.explainer {
	margin-top: 1rem;
	max-width: 68ch;
	font-size: 0.92rem;
	color: var(--text-dim);
	font-family: var(--font-mono);
	line-height: 1.6;
}
.explainer em { font-style: italic; color: var(--text); }
.explainer a  { color: var(--accent); border-bottom: 1px solid var(--accent-dim); }
.all-link {
	font-family: var(--font-mono);
	font-size: 0.82rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-dim);
	text-decoration: none;
	border-bottom: 0;
}
.all-link:hover { color: var(--accent); }

/* ---------- post list ---------- */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { border-top: 1px solid var(--border); }
.post-list li:last-child { border-bottom: 1px solid var(--border); }
.post-list a {
	display: grid;
	grid-template-columns: 110px 1fr;
	grid-template-rows: auto auto;
	gap: 0.15rem 1.25rem;
	padding: 1rem 0.5rem;
	color: var(--text);
	text-decoration: none;
	border-bottom: 0;
	transition: background 0.15s ease, padding 0.15s ease;
}
.post-list a:hover {
	background: var(--bg-elevated);
	padding-left: 1rem;
}
.post-list a:hover .post-title { color: var(--accent); }
.post-list .post-date {
	grid-row: 1 / 3;
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	color: var(--text-faint);
	letter-spacing: 0.04em;
	padding-top: 0.15rem;
}
.post-list .post-title {
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: var(--fs-md);
	transition: color 0.15s ease;
}
.post-list .post-desc {
	font-size: var(--fs-sm);
	line-height: 1.5;
	color: var(--text-dim);
}
@media (max-width: 560px) {
	.post-list a { grid-template-columns: 1fr; }
	.post-list .post-date { grid-row: auto; }
}

/* ---------- single post ---------- */
.post-header { margin-bottom: 2.5rem; }
.post-back {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.08em;
	color: var(--text-dim);
	text-decoration: none;
	border-bottom: 0;
	margin-bottom: 2rem;
}
.post-back:hover { color: var(--accent); }
.post-date-row {
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-faint);
	margin-bottom: 1rem;
}
.post-title-h {
	font-size: clamp(2rem, 5vw, 3.2rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.1;
	margin: 0 0 1rem;
}
.post-description {
	font-family: var(--font-sans);
	font-size: var(--fs-md);
	max-width: 60ch;
	line-height: 1.5;
	color: var(--text-dim);
	margin-bottom: 2rem;
}
.post-feature-image {
	margin: 2rem 0 3rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow: hidden;
}
.post-content {
	font-size: 1.05rem;
	line-height: 1.7;
}
.post-content p { margin-bottom: 1.3em; }
.post-content h2 { margin-top: 3rem; font-size: var(--fs-xl); }
.post-content h3 { margin-top: 2.25rem; font-size: var(--fs-lg); }
.post-content a { border-bottom: 1px solid var(--accent-dim); }
.post-content a:hover { border-bottom-color: var(--accent); }

/* ---------- Koenig editor card widths (wide / full bleed media) ---------- */
.post-content :is(.kg-width-wide, .kg-card.kg-width-wide) {
	position: relative;
	width: calc(100vw - 2 * var(--gutter));
	max-width: var(--wide-width);
	margin-left: 50%;
	transform: translateX(-50%);
}
.post-content :is(.kg-width-full, .kg-card.kg-width-full) {
	position: relative;
	width: 100vw;
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
	border-radius: 0;
}
.post-content :is(.kg-width-wide, .kg-width-full) img {
	width: 100%;
	height: auto;
	display: block;
}
.post-content .kg-image { display: block; margin: 1.5rem auto; }
.post-content figure { margin: 1.75rem 0; }
.post-content figcaption {
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	color: var(--text-dim);
	letter-spacing: 0.04em;
	text-align: center;
	margin-top: 0.6rem;
}

/* ---------- Ghost custom font setting hooks ----------
   Ghost injects --gh-font-heading / --gh-font-body when a site admin
   selects a font under Settings → Design. Honor them when present, fall
   back to our defaults otherwise. */
html, body {
	font-family: var(--gh-font-body, var(--font-sans));
}
h1, h2, h3, h4, h5, h6 {
	font-family: var(--gh-font-heading, var(--font-mono));
}

/* ---------- pagination ---------- */
.pagination {
	display: flex;
	justify-content: space-between;
	margin-top: 3rem;
	font-family: var(--font-mono);
	font-size: var(--fs-sm);
}
.pagination a { color: var(--text-dim); text-decoration: none; }
.pagination a:hover { color: var(--accent); }
.pagination .meta { color: var(--text-faint); }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
	html { font-size: 16px; }
	h1 { font-size: var(--fs-2xl); }
	main { padding: 1.5rem var(--gutter) 4rem; }
}
