/*
	Theme: chunk — "Blog Restyle"
	Palette / typography from the Claude Design project "Blog Restyle.dc.html"
*/

:root {
	--ink: #0a1220;
	--body: #15202f;
	--slate-deep: #2f4361;
	--slate: #46586f;
	--muted-2: #6b7f97;
	--muted: #7b8ca1;
	--cloud: #9fb2c8;
	--line: #e3edf7;
	--tint: #eaf2fb;
	--tint-line: #d9e6f4;
	--accent: #ff3b21;
	--paper: #ffffff;
	--font-display: 'Space Grotesk', system-ui, sans-serif;
	--font-body: 'IBM Plex Sans', system-ui, sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	background: var(--paper);
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--ink);
	font-family: var(--font-body);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--paper); }

img { max-width: 100%; height: auto; }

.wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 40px;
}

/* ---------------------------------------------------------- header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
}

.site-header-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 30px 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
}

.site-logo {
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 16px;
	font-family: var(--font-display);
	font-size: 34px;
	font-weight: 700;
	letter-spacing: -0.04em;
	color: var(--ink);
}

.site-logo-dot {
	width: 16px;
	height: 16px;
	background: var(--accent);
	border-radius: 50%;
	display: block;
	flex: none;
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 28px;
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: -0.01em;
}

.site-nav a {
	text-decoration: none;
	color: var(--slate);
	transition: color 0.18s;
}
.site-nav a:hover,
.site-nav a.active { color: var(--accent); }

/* ---------------------------------------------------------- layout */

.page-main {
	flex: 1;
	width: 100%;
}

.page-main > .wrap { padding-bottom: 130px; }

/* ---------------------------------------------------------- hero (index) */

.hero { padding: 88px 0 72px; }

.hero-kicker {
	font-family: var(--font-mono);
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 24px;
}

.hero-title {
	font-family: var(--font-display);
	font-size: clamp(48px, 9vw, 104px);
	line-height: 0.94;
	font-weight: 700;
	letter-spacing: -0.05em;
	margin: 0 0 26px;
}

.hero-tagline {
	font-family: var(--font-display);
	font-size: clamp(21px, 3vw, 30px);
	line-height: 1.24;
	font-weight: 500;
	letter-spacing: -0.03em;
	color: var(--slate-deep);
	margin: 0;
	text-wrap: pretty;
}

/* listing header used on tag / category / author pages */
.listing-title { padding: 64px 0 48px; }

.listing-title .hero-kicker { margin-bottom: 18px; }

.listing-title h1 {
	font-family: var(--font-display);
	font-size: clamp(34px, 5vw, 56px);
	line-height: 1.05;
	font-weight: 700;
	letter-spacing: -0.045em;
	margin: 0;
}

/* ---------------------------------------------------------- archive list */

.archive-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-top: 2px solid var(--ink);
	padding-top: 14px;
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted);
}

.post-row {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 40px;
	padding: 36px 0;
	border-bottom: 1px solid var(--line);
}

.post-row-meta {
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-family: var(--font-mono);
	font-size: 12px;
	line-height: 1.5;
}

.post-row-date { color: var(--ink); font-weight: 500; }

.post-row-cat {
	align-self: flex-start;
	padding: 4px 9px;
	background: var(--tint);
	border-radius: 999px;
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--slate-deep);
	text-decoration: none;
}
.post-row-cat:hover { color: var(--accent); }

.post-row-title {
	margin: -6px 0 12px;
	font-family: var(--font-display);
	font-size: 32px;
	line-height: 1.14;
	font-weight: 600;
	letter-spacing: -0.035em;
	text-wrap: pretty;
}

.post-row-title a {
	text-decoration: none;
	color: var(--ink);
	display: inline-block;
	transition: color 0.18s;
}
.post-row-title a:hover { color: var(--accent); }

.post-row-excerpt {
	margin: 0 0 18px;
	font-size: 16.5px;
	line-height: 1.68;
	color: var(--slate);
	max-width: 70ch;
	text-wrap: pretty;
}

.tag-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	font-family: var(--font-mono);
	font-size: 11.5px;
}

.tag-row a {
	color: var(--muted);
	text-decoration: none;
}
.tag-row a:hover { color: var(--accent); }

/* ---------------------------------------------------------- pagination */

.pagination {
	margin-top: 52px;
	display: flex;
	justify-content: center;
	gap: 16px;
}

.pagination a {
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-decoration: none;
	color: var(--ink);
	border: 1.5px solid var(--ink);
	border-radius: 999px;
	padding: 13px 28px;
	transition: all 0.18s;
}

.pagination a:hover {
	background: var(--ink);
	color: var(--paper);
}

/* ---------------------------------------------------------- article hero */

.article-hero {
	background: var(--tint);
	border-bottom: 1px solid var(--tint-line);
}

.article-hero-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 32px 40px 60px;
}

.article-hero .backlink {
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-decoration: none;
	color: var(--slate-deep);
}
.article-hero .backlink:hover { color: var(--accent); }

.article-hero-head {
	max-width: 800px;
	padding-top: 44px;
}

.article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted-2);
	margin-bottom: 22px;
}

.article-meta a { color: inherit; text-decoration: none; }
.article-meta a:hover { color: var(--accent); }

.article-meta .article-cat { color: var(--accent); font-weight: 500; }

.article-title {
	margin: 0 0 24px;
	font-family: var(--font-display);
	font-size: clamp(36px, 5.4vw, 60px);
	line-height: 1.03;
	font-weight: 700;
	letter-spacing: -0.045em;
	text-wrap: balance;
}

.article-lede {
	margin: 0;
	font-size: 20px;
	line-height: 1.6;
	color: var(--slate-deep);
	max-width: 62ch;
	text-wrap: pretty;
}

/* ---------------------------------------------------------- article body */

.article-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 40px 140px;
}

.article-grid {
	display: grid;
	grid-template-columns: minmax(0, 740px) 230px;
	gap: 80px;
	padding-top: 60px;
	align-items: start;
}

.entry-content {
	font-size: 17.5px;
	line-height: 1.75;
	color: var(--body);
}

.entry-content p { margin: 0 0 26px; }

.entry-content h1,
.entry-content h2 {
	margin: 44px 0 18px;
	font-family: var(--font-display);
	font-size: 31px;
	line-height: 1.16;
	font-weight: 600;
	letter-spacing: -0.035em;
	color: var(--ink);
	scroll-margin-top: 110px;
	text-wrap: pretty;
}

.entry-content h3,
.entry-content h4 {
	margin: 36px 0 14px;
	font-family: var(--font-display);
	font-size: 23px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: -0.03em;
	color: var(--ink);
	scroll-margin-top: 110px;
}

.entry-content blockquote {
	margin: 40px 0;
	padding: 4px 0 4px 26px;
	border-left: 3px solid var(--accent);
	font-family: var(--font-display);
	font-size: 24px;
	line-height: 1.32;
	font-weight: 500;
	letter-spacing: -0.03em;
	color: var(--ink);
}

.entry-content blockquote p { margin: 0 0 12px; }
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content ul,
.entry-content ol {
	margin: 0 0 26px;
	padding-left: 26px;
}
.entry-content li { margin-bottom: 10px; }

.entry-content code {
	font-family: var(--font-mono);
	font-size: 14.5px;
	background: var(--tint);
	padding: 2px 6px;
	border-radius: 3px;
}

.entry-content pre {
	margin: 0 0 32px;
	background: var(--ink);
	border-radius: 6px;
	padding: 24px 22px;
	overflow-x: auto;
	font-size: 13px;
	line-height: 1.75;
	color: #dce9f7;
}

.entry-content pre code {
	background: none;
	padding: 0;
	border-radius: 0;
	font-size: inherit;
	color: inherit;
}

.entry-content .highlight {
	margin: 0 0 32px;
	background: var(--ink);
	border-radius: 6px;
}
.entry-content .highlight pre { margin: 0; background: none; }

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 32px;
	font-size: 15.5px;
}
.entry-content th,
.entry-content td {
	text-align: left;
	padding: 10px 14px;
	border-bottom: 1px solid var(--line);
}
.entry-content th {
	font-family: var(--font-display);
	font-weight: 600;
	border-bottom: 2px solid var(--ink);
}

.entry-content hr {
	border: none;
	border-top: 1px solid var(--line);
	margin: 44px 0;
}

.entry-content img {
	border-radius: 6px;
	margin: 8px 0 26px;
}

/* article footer: tags */
.article-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-top: 48px;
	padding-top: 26px;
	border-top: 1px solid var(--line);
	font-family: var(--font-mono);
	font-size: 11.5px;
}

.article-tags .label {
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
	margin-right: 8px;
}

.article-tags a {
	color: var(--slate);
	text-decoration: none;
}
.article-tags a:hover { color: var(--accent); }

/* prev / next cards */
.article-nav {
	margin-top: 52px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 16px;
}

.article-nav a {
	background: var(--tint);
	border-radius: 8px;
	padding: 24px;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
	transition: background 0.18s;
}
.article-nav a:hover { background: var(--tint-line); }

.article-nav .label {
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted-2);
}

.article-nav .title {
	font-family: var(--font-display);
	font-size: 20px;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: -0.03em;
	color: var(--ink);
}

/* table of contents */
.article-toc {
	position: sticky;
	top: 100px;
	font-size: 13.5px;
	line-height: 1.5;
}

.article-toc .label {
	margin: 0 0 16px;
	font-family: var(--font-mono);
	font-size: 10.5px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--cloud);
}

.article-toc nav {
	display: flex;
	flex-direction: column;
	gap: 14px;
	border-left: 2px solid var(--line);
	padding-left: 18px;
}

.article-toc a {
	text-decoration: none;
	color: var(--slate);
}
.article-toc a:hover { color: var(--accent); }

/* ---------------------------------------------------------- simple pages / archives */

.plain-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	font-family: var(--font-mono);
	font-size: 13px;
}

.plain-list a {
	display: inline-block;
	padding: 8px 14px;
	background: var(--tint);
	border-radius: 999px;
	text-decoration: none;
	color: var(--slate-deep);
	transition: all 0.18s;
}
.plain-list a:hover { background: var(--ink); color: var(--paper); }

.archive-dl { margin: 0; }

.archive-dl dt {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--muted);
	margin-top: 22px;
}

.archive-dl dd {
	margin: 6px 0 0;
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.03em;
}

.archive-dl dd a { text-decoration: none; }

/* ---------------------------------------------------------- footer */

.site-footer {
	background: var(--ink);
	color: var(--cloud);
}

.site-footer-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 44px 40px;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
}

.site-footer .footer-name {
	font-family: var(--font-display);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.03em;
	color: var(--paper);
}

.site-footer .footer-note {
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: 0.08em;
}

.site-footer a { color: var(--accent); }

/* ---------------------------------------------------------- responsive */

@media (max-width: 1000px) {
	.article-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.article-toc { display: none; }
}

@media (max-width: 700px) {
	.wrap,
	.site-header-inner,
	.article-hero-inner,
	.article-wrap,
	.site-footer-inner { padding-left: 22px; padding-right: 22px; }

	.site-header-inner { padding-top: 18px; padding-bottom: 18px; }
	.site-nav { gap: 18px; }
	.site-logo { font-size: 22px; gap: 10px; }
	.site-logo-dot { width: 12px; height: 12px; }

	.hero { padding: 56px 0 48px; }

	.post-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
		padding: 28px 0;
	}

	.post-row-meta {
		flex-direction: row;
		align-items: center;
		gap: 12px;
	}

	.post-row-title { font-size: 25px; margin-top: 0; }

	.entry-content { font-size: 16.5px; }
}
