/* Theme variables */

:root {
	--font-body: "Crimson Pro", Georgia, "Times New Roman", serif;
	--font-display: "Libra";
	--font-size-body: 21px;
}

body.theme-kiki {
	--font-body: "Space Mono", "Courier New", monospace;
	--font-display: "PP Cirka", Georgia, serif;	
	--font-size-body: 16px;
}

/* Base */

html {
	background: #fff;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: #fff;
	color: #111;
	font-family: var(--font-body);
	font-size: var(--font-size-body);
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "kern", "liga", "onum";
	transition:
		font-family 0.3s ease,
		font-size 0.3s ease;
}

main {
	max-width: 44rem;
	margin: 0 auto;
	padding: 5rem 1.5rem 3rem;
}

p {
	margin: 0 0 1.1rem;
	text-align: justify;
	hyphens: auto;
}

a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover {
	text-decoration-thickness: 2px;
}

/* Headings */

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: bold !important;
}

h1 {
	font-weight: 500;
	font-size: 3rem;
	line-height: 1.05;
	margin: 0 0 1.25rem;
	letter-spacing: -0.015em;
}

h2 {
	font-weight: 500;
	font-size: 1.6rem;
	margin: 2.5rem 0 1rem;
	letter-spacing: -0.01em;
}

/* Header (profile photo, name, links) */

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

.header-text {
	min-width: 0;
}

.header-text h1 {
	margin: 0 0 0.5rem;
}

.header-links {
	margin: 0;
	font-size: 0.9em;
	text-align: left;
}

.photo {
	flex: 0 0 auto;
	width: 130px;
	height: 130px;
	object-fit: cover;
	object-position: center top;
}

/* Publications and experience entries */

.pub {
	margin-bottom: 1.75rem;
}

.pub em {
	font-style: italic;
}

/* News box */

.news-box {
	border: 1px solid #111;
	max-height: 18rem;
	overflow-y: auto;
	padding: 0.5rem 1.1rem;
	font-size: 0.95em;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.news-box::-webkit-scrollbar {
	display: none;
}

.news-item {
	display: grid;
	grid-template-columns: 5.5rem 1fr;
	gap: 1rem;
	padding: 0.7rem 0;
	border-bottom: 1px solid #eee;
}

.news-item:last-child {
	border-bottom: none;
}

.news-date {
	color: #666;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.news-body {
	margin: 0;
	text-align: left;
	hyphens: none;
}

.footer {
	color: grey;
}

/* Mobile */

@media (max-width: 560px) {
	:root {
		--font-size-body: 17px;
	}

	body.theme-kiki {
		--font-size-body: 14px;
	}

	h1 {
		font-size: 1.85rem;
	}

	.header {
		gap: 1.25rem;
	}

	.photo {
		width: 100px;
		height: 100px;
	}
}
