:root {
	--font-sans: "Faculty Glyphic", ui-sans-serif, system-ui, sans-serif;
	--color-bg: #f5f5f5;
	--color-text: #111111;
	--color-muted: #767676;
	--color-hover-border: #cccccc;
	--color-hover-bg: rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] {
	--color-bg: #192747;
	--color-text: #e9e9f6;
	--color-muted: #96aadf;
	--color-hover-border: #6478b0;
	--color-hover-bg: rgba(255, 255, 255, 0.06);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-sans);
	text-align: center;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	transition: background-color 0.2s ease, color 0.2s ease;
}

a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

a:hover {
	border-bottom-color: var(--color-hover-border);
}

header {
	padding: 4rem 1rem 1rem;
}

header h1 {
	margin: 0 0 0.75rem;
	font-size: 24px;
	font-weight: 400;
}

nav {
	display: flex;
	justify-content: center;
	gap: 1rem;
}

nav a {
	font-size: 12px;
}

main {
	flex: 1;
	padding: 2rem 1rem;
	max-width: 586px;
	margin: 0 auto;
	width: 100%;
}

body.home main {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

body.home main p {
	font-size: 18px;
	line-height: 26px;
	margin-bottom: 2px;
}

main h1 {
	text-align: left;
	font-size: 24px;
}

main p {
	margin: 0;
	text-align: justify;
	text-wrap: pretty;
	font-size: 16px;
	line-height: 24px;
}

main p + p {
	text-indent: 1.5em;
}

.friends-list {
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
	text-align: left;
}

.friends-list li + li {
	margin-top: 1rem;
}

.friends-list a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	border-bottom: none;
}

.friends-list a span {
	border-bottom: 1px solid transparent;
}

.friends-list a:hover span {
	border-bottom-color: var(--color-hover-border);
}

.friends-list a span:last-child {
	color: var(--color-muted);
}

.work-list {
	list-style: none;
	margin: 3rem 0;
	padding: 0;
	text-align: left;
}

.work-list li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
}

.work-list li + li {
	margin-top: 1rem;
}

.work-list li span:last-child {
	font-size: 14px;
	color: var(--color-muted);
	font-variant-numeric: tabular-nums;
}

.reading-list {
	list-style: none;
	margin: 1rem 0;
	padding: 0;
	text-align: left;
}

.reading-list li {
	position: relative;
	z-index: 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0.5rem 0.75rem;
	margin: 0 -0.75rem;
	border-radius: 0.375rem;
}

.reading-list li::before {
	content: '';
	position: absolute;
	z-index: -1;
	top: 0;
	bottom: 0;
	left: calc(-60px - 8px - 0.75rem);
	right: 0;
	border-radius: 0.375rem;
	transition: background-color 0.15s ease;
}

.reading-list li:hover::before {
	background: var(--color-hover-bg);
}

.reading-list li + li {
	margin-top: 1rem;
}

.reading-list li[hidden] {
	display: none;
}

.book-cover {
	position: absolute;
	right: calc(100% + 8px);
	top: 50%;
	transform: translateY(-50%) rotate(0deg) scale(0.9);
	width: 60px;
	height: auto;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.11);
	border-radius: 4px;
	opacity: 0;
	pointer-events: none;
	transition: all 0.2s ease;
}

.reading-list li:hover .book-cover {
	opacity: 1;
	transform: translateY(-50%) rotate(-2deg) scale(1);
}


.book-meta {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.book-title {
	font-size: 18px;
}

.book-author {
	font-size: 14px;
	color: var(--color-muted);
}

.rating {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-shrink: 0;
}

.rating-value {
	font-size: 14px;
	color: var(--color-muted);
	font-variant-numeric: tabular-nums;
}

.star {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: var(--color-muted);
	stroke-width: 1;
}

.review-icon {
	width: 14px;
	height: 14px;
	margin-left: 0.4rem;
	vertical-align: middle;
	fill: none;
	stroke: var(--color-muted);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.section-label {
	text-align: left;
	margin: 2rem 0 0.5rem;
	font-size: 14px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-muted);
}

.reading-list + .section-label {
	margin-top: 2.5rem;
}

.book-detail {
	text-align: left;
}

.book-detail-cover {
	width: 140px;
	height: auto;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	margin-bottom: 1rem;
}

.book-detail h1 {
	margin: 0 0 0.25rem;
}

.book-detail .book-author {
	display: block;
	margin-bottom: 0.75rem;
}

.book-detail .rating {
	justify-content: flex-start;
	margin-bottom: 1.5rem;
}

.page-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
}

.page-intro {
	margin-top: 0.75rem;
}

.page-header h1 {
	margin: 0;
}

.controls {
	display: flex;
	gap: 1rem;
}

.toggle-button {
	border: 0;
	background: none;
	padding: 0;
	font-family: inherit;
	font-size: 14px;
	color: var(--color-muted);
	cursor: pointer;
	border-bottom: 1px solid transparent;
}

.toggle-button:hover {
	border-bottom-color: var(--color-hover-border);
}

.header-link {
	font-size: 14px;
	color: var(--color-muted);
}

.writing-feed {
	text-align: left;
	padding: 48px 0;
}

.post {
	max-width: 550px;
	text-align: left;
}

.post + .post {
	margin-top: 64px;
}

.post-title {
	font-size: 20px;
	font-weight: 400;
	margin: 0 0 0.75rem;
}

.post-body h3 {
	font-size: 18px;
	font-weight: 400;
	margin: 2rem 0 0.75rem;
	text-align: left;
}

.post-body ul {
	margin: 1rem 0;
	padding-left: 1.25rem;
}

.post-body li {
	font-size: 16px;
	line-height: 24px;
	margin-bottom: 0.5rem;
}

.post-body > p > img {
	display: block;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	width: 650px;
	max-width: calc(100vw - 2rem);
	margin: 1.5rem 0;
	border-radius: 2px;
}

.post-figure {
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	width: 650px;
	max-width: calc(100vw - 2rem);
	margin: 1.5rem 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.post-figure img {
	display: block;
	width: 100%;
	border-radius: 8px;
}

.post-figure figcaption {
	margin: 0;
	font-size: 12px;
	line-height: 20px;
	text-align: justify;
	font-style: normal;
	color: var(--color-muted);
}

.post-body p:has(> img) + p,
.post-figure + p {
	text-indent: 0;
}

@media (max-width: 700px) {
	.post-body > p > img,
	.post-figure {
		width: 100%;
		max-width: 100%;
		margin: 1.5rem 0;
		padding: 0;
	}
}

.post-meta {
	display: inline-block;
	margin-top: 1rem;
	font-size: 14px;
	color: var(--color-muted);
}

footer {
	padding: 1.5rem 1rem;
}

footer a {
	margin: 0 0.5rem;
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-muted);
}

.theme-toggle {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--color-text);
	font-family: inherit;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}

.theme-toggle:hover {
	background: var(--color-muted);
	color: var(--color-bg);
}
