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

::selection {
	background: #ece5dc;
	color: var(--text);
}

:root {
	--bg: #faf9f7;
	--text: #1f1f1f;
	--muted: #666;
	--line: #e3e0dc;
	--link: #111;
	--link-hover: #6b6b6b;
}

body {
	font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.55;
	max-width: 44rem;
	margin: 0 auto;
	padding: 5rem 1.4rem 4rem;
}

.profile {
	margin-bottom: 1.5rem;
}

.profile .title {
	color: var(--muted);
	font-size: 1rem;
}

.social-links {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.85rem;
}

.social-links a {
	color: var(--muted);
	transition: color 0.15s ease;
}

.social-links a:hover {
	color: var(--text);
}

.social-links svg {
	width: 18px;
	height: 18px;
}

.work-section {
	margin-top: 2.8rem;
}

.work-section .work-link {
	display: inline-block;
	color: var(--muted);
	font-size: 0.95rem;
	letter-spacing: 0.01em;
}

.work-section .work-link:hover {
	color: var(--text);
}


body.work-page .work-items {
	padding-top: 1.4rem;
}

.blog-item,
.work-link {
	display: block;
	margin-bottom: 0.8rem;
}

.blog-item a,
.work-link,
.work-info h3 a,
.back-arrow {
	color: var(--link);
	text-decoration: none;
	transition: color 0.15s ease;
}

.blog-item a {
	display: inline-block;
}

.blog-item a:hover,
.work-link:hover,
.work-info h3 a:hover,
.back-arrow:hover {
	color: var(--link-hover);
}

.date {
	font-variant-numeric: tabular-nums;
}

.blog-item .date,
.work-item .date {
	color: var(--muted);
	font-size: 0.9rem;
}

.blog-item .date {
	display: block;
}

body.work-page .work-page-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1.5rem;
	margin-bottom: 1.6rem;
}

.blog-page-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1.6rem;
}

.work-page-title {
	text-align: right;
}

.work-page-title h1 {
	font-size: 1.65rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.work-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem);
	column-gap: 2rem;
	align-items: start;
	padding: 1.35rem 0;
}

.work-item:first-child {
	padding-top: 0;
}

.work-item + .work-item {
	border-top: 1px solid var(--line);
}

.work-info h3 {
	font-size: 1.1rem;
	font-weight: 500;
	margin-bottom: 0.35rem;
}

.work-summary {
	max-width: 38rem;
	font-size: 0.98rem;
	line-height: 1.6;
}

.work-meta {
	padding-left: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

#post-content[aria-busy="true"] {
	min-height: 8rem;
}

.post-status {
	color: var(--muted);
}

.post-date {
	color: var(--muted);
	font-size: 0.9rem;
}

#post-content {
	border-top: 1px solid var(--line);
	padding-top: 1.35rem;
}

#post-content h1 {
	font-size: 1.65rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin-bottom: 1rem;
}

#post-content h2 {
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin: 2rem 0 0.75rem;
}

#post-content h3 {
	font-size: 1.12rem;
	font-weight: 500;
	line-height: 1.35;
	margin: 1.7rem 0 0.65rem;
}

#post-content p {
	margin-bottom: 1.1rem;
}

#post-content ul,
#post-content ol {
	margin-bottom: 1.25rem;
	padding-left: 1.5rem;
}

#post-content pre,
#post-content .table-scroll {
	margin-bottom: 1.5rem;
}

#post-content hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 1.6rem 0;
}

#post-content p,
#post-content li {
	font-size: 1rem;
	line-height: 1.68;
}

#post-content a {
	color: var(--link);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.16em;
	transition: color 0.15s ease;
}

#post-content a:hover {
	color: var(--link-hover);
}

#post-content blockquote {
	border-left: 1px solid var(--line);
	color: var(--muted);
	margin: 0 0 1.1rem;
	padding-left: 1rem;
}

#post-content blockquote p:last-child {
	margin-bottom: 0;
}

#post-content img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 1.2rem 0;
}

#post-content pre {
	background: #222;
	color: #f6f6f6;
	line-height: 1.55;
	padding: 0.9rem;
	overflow-x: auto;
	tab-size: 4;
}

#post-content code {
	font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	font-size: 0.92em;
}

.table-scroll {
	overflow-x: auto;
	overscroll-behavior-inline: contain;
}

#post-content table {
	width: 100%;
	min-width: 36rem;
	border-collapse: collapse;
}

#post-content table th,
#post-content table td {
	border: 1px solid var(--line);
	padding: 0.55rem;
}

#post-content table th {
	text-align: left;
}

.post-pager {
	margin-top: 3.5rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--line);
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.9rem;
}

.post-pager a {
	color: var(--muted);
	text-decoration: none;
	transition: color 0.15s ease;
}

.post-pager a:hover {
	color: var(--link-hover);
}

.external::after {
	content: "";
	display: inline-block;
	width: 0.62em;
	height: 0.62em;
	margin-left: 0.25em;
	vertical-align: 0.06em;
	background-color: currentColor;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E");
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	opacity: 0.85;
	transition: color 0.15s ease;
}

.back-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	line-height: 1;
	margin: -0.7rem;
	transition: color 0.15s ease, transform 0.15s ease;
}

.back-arrow svg {
	width: 22px;
	height: 22px;
}

.back-arrow:hover,
.back-arrow:focus-visible {
	transform: translateX(-2px);
}

a:focus-visible {
	outline: 2px solid var(--text);
	outline-offset: 3px;
}

.front-arrow {
	display: inline-block;
	font-weight: 900;
	padding: 0.2rem 0.3rem;
	margin: -0.2rem -0.3rem;
}

.post-pager a {
	display: inline-flex;
	align-items: baseline;
}

.post-pager a svg {
	width: 0.72em;
	height: 0.72em;
	flex-shrink: 0;
}

.post-pager a svg:first-child {
	margin-right: 0.35rem;
}

.post-pager a svg:last-child {
	margin-left: 0.35rem;
}

@media (max-width: 768px) {
	body {
		padding-top: 4.5rem;
	}

	body.work-page .work-page-header {
		align-items: flex-start;
	}

	.work-page-title {
		text-align: left;
	}

	.work-item {
		grid-template-columns: 1fr;
		gap: 0.85rem;
		padding: 1.2rem 0;
	}

	.work-meta {
		padding-left: 0;
		padding-top: 0.75rem;
		gap: 0.45rem;
	}
}
