/* Styled to match the academicpages theme (default light) as used on
   lagernils.github.io: Libertinus Serif, white background, teal links,
   plain left author sidebar. */

/* ---- Libertinus Serif (self-hosted, copied from Nils' site) ---- */
@font-face {
	font-family: "Libertinus Serif";
	src: url("assets/fonts/libertinus/LibertinusSerif-Regular.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Libertinus Serif";
	src: url("assets/fonts/libertinus/LibertinusSerif-Italic.woff") format("woff");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Libertinus Serif";
	src: url("assets/fonts/libertinus/LibertinusSerif-Bold.woff") format("woff");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Libertinus Serif";
	src: url("assets/fonts/libertinus/LibertinusSerif-BoldItalic.woff") format("woff");
	font-weight: 700;
	font-style: italic;
	font-display: swap;
}

/* ---- academicpages default-light palette ---- */
:root {
	--ap-text: #494e52;
	--ap-link: #52adc8;
	--ap-link-hover: #235f6e;
	--ap-border: #f2f3f3;
	--ap-serif: "Libertinus Serif", "Linux Libertine", Georgia, Times, serif;
}

html {
	font-size: 16px;
}

@media (min-width: 768px) {
	html {
		font-size: 17px;
	}
}

body {
	background: #fff;
	color: var(--ap-text);
	font-family: var(--ap-serif);
	line-height: 1.5;
}

a {
	color: var(--ap-link);
	text-decoration: none;
}

a:hover {
	color: var(--ap-link-hover);
	text-decoration: underline;
}

/* ---- Masthead (navbar) ---- */
.navbar {
	background: #fff !important;
	border-bottom: 1px solid var(--ap-border);
	font-family: var(--ap-serif);
	padding-top: 0.5em;
	padding-bottom: 0.5em;
}

.navbar .navbar-brand {
	color: var(--ap-text);
	font-weight: 700;
	font-size: 1.1em;
}

.navbar .nav-link {
	color: var(--ap-text) !important;
	font-size: 1em;
}

.navbar .nav-link:hover {
	color: #17191b !important;
}

.navbar .nav-link.active {
	font-weight: 700;
	border-bottom: 2px solid var(--ap-text);
}

/* ---- Layout ---- */
/* Width comes from the Quarto grid settings in _quarto.yml; auto margins
   here would collapse the page-layout: full CV page to fit-content. */
.content {
	padding: 2rem 1em 3rem;
}

.quarto-title-block {
	display: none;
}

.columns {
	display: grid !important;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
}

.columns > .column {
	width: auto !important;
	padding: 0 !important;
	min-width: 0;
}

/* ---- Author sidebar (plain, academicpages-style) ---- */
.columns > .column:first-child {
	position: sticky;
	top: 2rem;
	align-self: start;
	font-size: 0.85em;
}

.columns > .column:first-child img {
	max-width: 175px;
	width: 100%;
	border-radius: 8px;
	padding: 5px;
	border: 1px solid var(--ap-border);
	display: block;
}

.author-name {
	font-size: 1.18em;
	font-weight: 700;
	margin: 10px 0;
}

.author-bio {
	margin: 10px 0 20px;
}

.author-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.author-links li {
	margin-bottom: 5px;
}

.author-links a {
	display: block;
	color: inherit;
	padding: 2px 5px 2px 0;
	margin-bottom: 5px;
}

.author-links a:hover {
	color: inherit;
	text-decoration: underline;
}

.author-links .bi {
	width: 1.3em;
	display: inline-block;
	text-align: center;
	margin-right: 0.25em;
}

/* ---- Content typography (academicpages type scale) ---- */
.content p,
.columns p {
	line-height: 1.5;
	margin-bottom: 1.3em;
}

.content h1,
.content h2,
.content h3,
.columns h1,
.columns h2,
.columns h3 {
	font-family: var(--ap-serif);
	color: var(--ap-text);
	font-weight: 700;
	line-height: 1.2;
	border: none;
	margin: 2em 0 0.5em;
}

.content h1,
.columns h1 {
	font-size: 1.563em;
	margin-top: 0;
	margin-bottom: 1em;
}

.content h2,
.columns h2 {
	font-size: 1.25em;
	margin-top: 2.5em;
	padding-bottom: 0.5em;
	border-bottom: 1px solid var(--ap-border);
}

.columns > .column:last-child h2:first-child,
.content h2:first-child {
	margin-top: 0;
}

.content h3,
.columns h3 {
	font-size: 1em;
	margin-top: 2em;
}

.page-footer-note {
	margin-top: 3em;
	font-size: 0.85em;
	color: #9ba1a6;
}

/* ---- CV page ---- */
/* The CV page uses page-layout: full, so the viewer sizes with the
   viewport instead of fixed pixels. */
.cv-embed-desktop {
	border: 1px solid var(--ap-border);
	border-radius: 4px;
	overflow: hidden;
}

.cv-embed-desktop iframe {
	border: none;
	display: block;
	width: 100%;
	height: 85vh;
}

.cv-embed-mobile {
	display: none;
	text-align: center;
	padding: 2rem 1rem;
	border: 1px solid var(--ap-border);
	border-radius: 4px;
}

/* ---- Popular writing article cards (from Nils's site) ---- */
.article-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px 0 16px;
}

.article-card {
	border: 1px solid #e0e0e0;
	border-radius: 5px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s;
}

.article-card:hover {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.article-card a {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: row;
	align-items: stretch;
}

.article-card a:hover {
	text-decoration: none;
	color: inherit;
}

.article-card__img {
	width: 130px;
	min-height: 80px;
	object-fit: cover;
	background-color: #f0f0f0;
	flex-shrink: 0;
}

.article-card__body {
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.article-card__source {
	font-size: 0.65rem;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 2px;
}

.article-card__title {
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.3;
	color: #222;
	margin-bottom: 0;
}

.article-card__date {
	font-size: 0.65rem;
	color: #999;
	margin-top: 4px;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.columns {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.columns > .column:first-child {
		position: static;
	}
}

@media (max-width: 900px) {
	.article-card__img {
		width: 100px;
	}
}

@media (max-width: 768px) {
	.cv-embed-desktop {
		display: none;
	}

	.cv-embed-mobile {
		display: block;
	}
}
