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

: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;
}

body.blog-page {
	max-width: 38rem;
}

body.dark-mode {
	--bg: #111;
	--text: #eaeaea;
	--muted: #a7a7a7;
	--line: #2a2a2a;
	--link: #f0f0f0;
	--link-hover: #b8b8b8;
}

.theme-toggle {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0.45rem;
	cursor: pointer;
	color: var(--muted);
}

.theme-toggle:hover {
	color: var(--text);
}

.theme-toggle svg {
	width: 16px;
	height: 16px;
	display: block;
}

.theme-toggle .sun-icon {
	display: none;
}

.theme-toggle .moon-icon {
	display: block;
}

body.dark-mode .theme-toggle .sun-icon {
	display: block;
}

body.dark-mode .theme-toggle .moon-icon {
	display: none;
}

.profile {
	margin-bottom: 1.5rem;
}

.profile h1 {
	font-size: 2rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	margin-bottom: 0.4rem;
	text-transform: lowercase;
}

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

.profile .summary {
	color: var(--text);
	font-size: 1rem;
	margin-top: 0.85rem;
	max-width: 40rem;
}

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

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

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

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

.work-section,
.work-items {
	border-top: 1px solid var(--line);
	padding-top: 1rem;
}

.blog-section {
	padding-top: 0;
}

.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;
}

.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);
}

.blog-item .date,
.work-item .date,
.work-info ul,
.work-info .tech {
	color: var(--muted);
	font-size: 0.95rem;
}

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

.work-page-header {
	margin-bottom: 1.2rem;
}

.work-item {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 1rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--line);
}

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

.work-info ul {
	padding-left: 1.1rem;
}

.work-info ul li {
	margin-bottom: 0.3rem;
}

.work-info .tech {
	margin-top: 0.45rem;
}

#post-content h1 {
	font-size: 2.1rem;
	font-weight: 500;
	line-height: 1.2;
	margin-bottom: 1.25rem;
}

#post-content h2 {
	font-size: 1.4rem;
	font-weight: 500;
	margin: 2.2rem 0 0.85rem;
}

#post-content p,
#post-content ul,
#post-content ol,
#post-content pre,
#post-content table {
	margin-bottom: 1.1rem;
}

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

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

#post-content ul,
#post-content ol {
	padding-left: 1.2rem;
}

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

#post-content pre {
	background: #222;
	color: #f6f6f6;
	padding: 0.9rem;
	overflow-x: auto;
}

body.dark-mode #post-content pre {
	background: #1d1d1d;
}

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

#post-content table {
	width: 100%;
	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;
}

.back-arrow {
	display: inline-block;
	font-size: 1.35rem;
	line-height: 1;
	font-weight: 900;
	padding: 0.35rem 0.45rem;
	margin: -0.35rem -0.45rem;
}

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

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

	.work-item {
		grid-template-columns: 1fr;
		gap: 0.6rem;
	}
}
