/* Inter - latin-ext */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("/static/fonts/inter-latin-ext.woff2") format("woff2");
	unicode-range:
		U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter - latin */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("/static/fonts/inter-latin.woff2") format("woff2");
	unicode-range:
		U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
	--text: #1a1a1a;
	--text-2: #555;
	--text-3: #666;
	--accent: #14b8a6;
	--accent-hover: #0d9488;
	--bg: #fafafa;
	--border: #e5e5e5;
}

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family:
		"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	color: var(--text);
	background: var(--bg);
	line-height: 1.65;
}

main {
	max-width: 640px;
	margin: 0 auto;
	padding: 5rem 1.5rem 6rem;
}

a {
	color: var(--text);
	text-decoration-color: var(--accent);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	transition: color 0.15s ease;
}

a:hover {
	color: var(--accent-hover);
}

/* ---- Header ---- */

.header {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	margin-bottom: 2.5rem;
}

.avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	border: 2px solid var(--border);
	transition: border-color 0.2s ease;
	flex-shrink: 0;
}

.avatar:hover {
	border-color: var(--accent);
}

h1 {
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.25;
}

.tagline {
	color: var(--text-2);
	font-size: 0.9rem;
	margin-top: 0.2rem;
}

/* ---- Sections ---- */

section {
	margin-bottom: 3rem;
}

.section-title {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-3);
	margin-bottom: 1.25rem;
}

/* ---- Intro ---- */

.intro {
	margin-bottom: 3rem;
}

.intro p {
	color: var(--text-2);
	margin-bottom: 0.75rem;
}

.intro p:last-child {
	margin-bottom: 0;
}

/* ---- Shared: projects + repos ---- */

.stars {
	display: none;
	align-items: center;
	gap: 0.2rem;
	font-size: 0.75rem;
	color: var(--text-3);
	font-weight: 500;
	vertical-align: middle;
	margin-left: 0.25rem;
}

.stars.loaded {
	display: inline-flex;
}

.stars::before {
	content: "\2605";
	color: #e3b341;
	font-size: 0.8rem;
}

/* ---- Projects (featured) ---- */

.projects {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.projects li {
	line-height: 1.55;
}

.projects a {
	font-weight: 500;
}

.projects .desc {
	color: var(--text-3);
}

.projects .desc::before {
	content: " \2014  ";
}

/* ---- Writing ---- */

.writing {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.writing li {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
}

.writing .date {
	color: var(--text-3);
	font-size: 0.8rem;
	min-width: 5.5rem;
	flex-shrink: 0;
}

.writing a {
	font-weight: 500;
}

/* ---- Personal ---- */

.personal {
	color: var(--text-3);
	font-size: 0.85rem;
	margin-top: 2rem;
}

/* ---- Footer / Social ---- */

footer {
	margin-top: 3rem;
}

.links {
	display: flex;
	gap: 1.5rem;
}

.links a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.9rem;
	color: var(--text-2);
	text-decoration: none;
	transition: color 0.15s ease;
}

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

/* ---- Text header (writing/post pages) ---- */

.text-header {
	margin-bottom: 2.5rem;
}

.text-header .name {
	font-size: 0.9rem;
	font-weight: 600;
}

.text-header .name a {
	text-decoration: none;
}

.text-header .name a:hover {
	color: var(--accent-hover);
}

.text-header nav {
	display: flex;
	gap: 1.25rem;
	margin-top: 0.35rem;
}

.text-header nav a {
	font-size: 0.85rem;
	color: var(--text-3);
	text-decoration: none;
}

.text-header nav a:hover {
	color: var(--accent-hover);
}

.text-header nav a.active {
	color: var(--text);
}

/* ---- Post ---- */

.post-title {
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: -0.025em;
	margin-bottom: 0.35rem;
}

.post-date {
	color: var(--text-3);
	font-size: 0.8rem;
	margin-bottom: 2.5rem;
}

.post-body {
	color: var(--text-2);
}

.post-body h2 {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text);
	margin: 2rem 0 0.75rem;
}

.post-body h3 {
	font-size: 1rem;
	font-weight: 600;
	color: var(--text);
	margin: 1.5rem 0 0.5rem;
}

.post-body p {
	margin-bottom: 1rem;
}

.post-body ul,
.post-body ol {
	margin-bottom: 1rem;
	padding-left: 1.5rem;
}

.post-body li {
	margin-bottom: 0.35rem;
}

.post-body code {
	font-family: "JetBrains Mono", monospace;
	font-size: 0.85em;
	background: var(--border);
	padding: 0.15rem 0.35rem;
	border-radius: 3px;
}

.post-body pre {
	background: var(--text);
	color: var(--bg);
	padding: 1rem 1.25rem;
	border-radius: 6px;
	overflow-x: auto;
	margin-bottom: 1rem;
	font-size: 0.85rem;
	line-height: 1.5;
}

.post-body pre code {
	background: none;
	padding: 0;
	border-radius: 0;
	color: inherit;
}

.post-body blockquote {
	border-left: 3px solid var(--accent);
	padding-left: 1rem;
	margin: 1.5rem 0;
	color: var(--text-3);
	font-style: italic;
}

.post-body img {
	max-width: 100%;
	border-radius: 6px;
	margin: 1.5rem 0;
}

.muted {
	color: var(--text-3);
}

/* ---- Subscribe ---- */

.subscribe {
	margin-top: 3rem;
	padding: 1.5rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg);
}

.subscribe .subscribe-label {
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 0.25rem;
}

.subscribe .subscribe-desc {
	color: var(--text-3);
	font-size: 0.8rem;
	margin-bottom: 0.75rem;
}

.subscribe form {
	display: flex;
	gap: 0.5rem;
}

.subscribe input[type="email"] {
	font-family: inherit;
	font-size: 0.85rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: 5px;
	outline: none;
	flex: 1;
	color: var(--text);
	background: white;
}

.subscribe input[type="email"]:focus {
	border-color: var(--accent);
}

.subscribe button {
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	padding: 0.5rem 1.25rem;
	border: none;
	border-radius: 5px;
	background: var(--text);
	color: white;
	cursor: pointer;
}

.subscribe button:hover {
	background: var(--text-2);
}

.subscribe .subscribe-ok {
	color: var(--accent);
	font-size: 0.85rem;
	display: none;
}

/* ---- 404 ---- */

.error-page {
	text-align: center;
	padding-top: 8rem;
}

.error-page h1 {
	font-size: 1.2rem;
	margin-bottom: 0.75rem;
}

.error-page p {
	color: var(--text-2);
}

/* ---- Responsive ---- */

@media (max-width: 480px) {
	main {
		padding: 3rem 1.25rem 4rem;
	}

	.header {
		gap: 1rem;
	}

	.avatar {
		width: 56px;
		height: 56px;
	}

	h1 {
		font-size: 1.2rem;
	}

	.period {
		margin-left: 0;
		width: 100%;
	}
}
