/* ============================================================
   Custom additions on top of Strata (HTML5 UP)
   - Clickable sidebar navigation with active-section highlight
   - Publication list styling
   ============================================================ */

html { scroll-behavior: smooth; }

/* ---- Larger sidebar headshot (Strata default is 6.25em) ---- */
#header .image.avatar {
	width: 12em;
}

/* ---- Galaxy image as the sidebar background ----
   Layers (top to bottom): dark gradient for text contrast,
   Strata's overlay texture, then the galaxy photo. */
#header {
	background-color: #0b0a12;
	background-image:
		linear-gradient(rgba(13, 10, 20, 0.32), rgba(13, 10, 20, 0.55)),
		url("images/overlay.png"),
		url("../../images/galaxy_rot.jpg");
	background-position: center, top left, center;
	background-repeat: no-repeat, repeat, no-repeat;
	background-size: cover, auto, cover;
	background-attachment: scroll, scroll, scroll;
	/* Center everything in the sidebar (Strata defaults to right-aligned) */
	text-align: center;
	align-items: center;
	/* Soft shadow so text stays legible over the galaxy */
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* ---- Sidebar text sizing ---- */
/* Position + institute lines: smaller and a bit brighter */
#header h1 {
	font-size: 1.05em;
	color: rgba(255, 255, 255, 0.8);
	line-height: 1.6em;
}
/* Name: bigger and bright white */
#header h1 strong {
	display: inline-block;
	font-size: 1.9em;
	line-height: 1.2;
	color: #ffffff;
	margin-bottom: 0.15em;
}

/* ---- Sidebar navigation ---- */
#site-nav {
	margin-top: 1.5em;
	width: 100%;
}

#site-nav ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15em;
}

#site-nav li {
	padding: 0;
}

#site-nav a {
	display: inline-block;
	text-align: center;
	padding: 0.55em 1em;
	border-radius: 6px;
	font-size: 1.1em;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
	border: 0;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

#site-nav a:hover {
	background-color: rgba(73, 191, 157, 0.1);
	color: #49bf9d;
}

#site-nav a.active {
	background-color: #49bf9d;
	color: #ffffff;
}

/* On wide screens the sidebar is vertical; keep the nav stacked.
   On narrow screens Strata turns the header into a top banner,
   so lay the nav out horizontally and let it wrap. */
@media screen and (max-width: 980px) {
	#site-nav ul {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.4em;
	}
	#site-nav a {
		padding: 0.4em 0.8em;
	}
}

/* ---- Research: clickable project tiles ---- */
.project-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25em;
	margin: 1.5em 0;
}

/* Fewer columns as the viewport narrows */
@media screen and (max-width: 736px) {
	.project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 480px) {
	.project-grid { grid-template-columns: 1fr; }
}

.project-tile {
	display: flex;
	flex-direction: column;
	padding: 0;
	border: 1px solid #e7e7e7;
	border-radius: 8px;
	background: #ffffff;
	cursor: pointer;
	overflow: hidden;
	text-align: center;
	transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.project-tile:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
	border-color: #49bf9d;
}

.project-tile.active {
	border-color: #49bf9d;
	box-shadow: 0 0 0 2px #49bf9d;
}

.project-thumb {
	display: block;
	aspect-ratio: 4 / 3;
	background: #f1f3f4;
	position: relative;
}

.project-tile .thumb-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #aab0b3;
	font-size: 0.85em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-bottom: 2px dashed #d6dadc;
}

/* When you drop a real image in, it fills the thumb nicely */
.project-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.project-name {
	padding: 0.7em 0.5em;
	font-weight: 600;
	font-size: 0.95em;
	color: #3c3b3b;
	transition: color 0.2s ease;
}

.project-tile:hover .project-name,
.project-tile.active .project-name {
	color: #49bf9d;
}

/* ---- Research: detail panel ---- */
.project-detail[hidden] { display: none; }

.project-detail {
	border: 1px solid #e7e7e7;
	border-top: 3px solid #49bf9d;
	border-radius: 8px;
	padding: 1.5em 1.75em;
	background: #ffffff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
	animation: detail-fade 0.25s ease;
}

.project-detail h3 {
	margin-top: 0;
	color: #3c3b3b;
}

@keyframes detail-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Figure placeholder (swap the inner div for an <img> when ready) */
.topic-figure {
	margin: 0 0 1.25em 0;
}
.figure-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	aspect-ratio: 16 / 9;
	border: 2px dashed #cdd2d4;
	border-radius: 6px;
	background: #f7f8f9;
	color: #9aa0a3;
	font-size: 0.95em;
	letter-spacing: 0.03em;
}
.figure-placeholder small {
	color: #b3b8bb;
	font-size: 0.8em;
}
.topic-figure img {
	width: 100%;
	border-radius: 6px;
	display: block;
}
.topic-figure figcaption {
	margin-top: 0.5em;
	font-size: 0.85em;
	color: #909090;
	font-style: italic;
}

/* ---- Publication list ---- */
.pub-filter {
	margin: 2em 0 1.25em 0;
}

.pub-filter-label {
	display: block;
	margin-bottom: 0.55em;
	font-size: 0.82em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #7b8a8c;
}

.pub-filter-input {
	width: 100%;
	max-width: 34em;
}

.pub-filter-empty {
	margin: 0.5em 0 0 0;
	color: #7b8a8c;
	font-style: italic;
}

.pub-list {
	margin: 1.5em 0 0 0;
	padding-left: 1.5em;
}

.pub-list li {
	margin-bottom: 1.25em;
	line-height: 1.5;
}

.pub-year-group {
	margin-top: 2.25em;
}

.pub-year-group h3 {
	margin-bottom: 1em;
	padding-bottom: 0.35em;
	border-bottom: 1px solid rgba(73, 191, 157, 0.22);
}

.pub-item {
	margin-bottom: 1.4em;
	padding: 1.15em 1.25em;
	border: 1px solid #e7e7e7;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.pub-item:last-child {
	margin-bottom: 0;
}

.pub-role,
.pub-title,
.pub-authors,
.pub-venue,
.pub-links {
	display: block;
}

.pub-role {
	margin-bottom: 0.55em;
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #7b8a8c;
}

.pub-role-first {
	color: #49bf9d;
}

.pub-title {
	margin-bottom: 0.45em;
	font-weight: 600;
	font-size: 1.04em;
	color: #3c3b3b;
}

.pub-authors {
	margin-bottom: 0.4em;
	color: #555;
}

.author-highlight {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.14em;
	font-weight: 600;
}

.pub-authors-inline {
	display: inline;
}

.pub-authors-inline summary {
	display: inline;
	cursor: pointer;
	color: #49bf9d;
	font-size: 0.9em;
	font-weight: 600;
	list-style: none;
}

.pub-authors-inline summary::-webkit-details-marker {
	display: none;
}

.pub-authors-inline summary:hover {
	color: #2f9f81;
}

.pub-authors-rest {
	color: #666;
}

.pub-venue {
	color: #777;
	font-size: 0.95em;
}

.pub-links {
	margin-top: 0.7em;
}

/* ---- Talks list ---- */
.talk-list {
	list-style: none;
	padding: 0;
	margin: 1.75em 0 0 0;
}

.talk-item {
	margin-bottom: 1.2em;
	padding: 1.15em 1.25em;
	border: 1px solid #e7e7e7;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.talk-item:last-child {
	margin-bottom: 0;
}

.talk-title,
.talk-meta,
.talk-links {
	display: block;
}

.talk-title {
	margin-bottom: 0.35em;
	font-weight: 600;
	font-size: 1.02em;
	color: #3c3b3b;
}

.talk-meta {
	color: #777;
	font-size: 0.95em;
}

.talk-links {
	margin-top: 0.75em;
}

/* ---- CV page ---- */
.cv-overview {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(16em, 1fr);
	gap: 1.35em;
	margin-top: 1.75em;
}

.cv-card,
.cv-entry,
.cv-award,
.cv-collapse {
	border: 1px solid #e7e7e7;
	border-radius: 10px;
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.cv-card {
	padding: 1.35em 1.45em;
}

.cv-card h3,
.cv-section h3,
.cv-award h4,
.cv-entry h4 {
	margin-bottom: 0.45em;
	color: #3c3b3b;
}

.cv-facts {
	list-style: none;
	padding: 0;
	margin: 0 0 1.2em 0;
}

.cv-facts li {
	display: grid;
	grid-template-columns: 8.5em minmax(0, 1fr);
	gap: 0.85em;
	padding: 0.45em 0;
	border-bottom: 1px solid #f0f1f2;
}

.cv-facts li:last-child {
	border-bottom: 0;
}

.cv-facts strong {
	color: #3c3b3b;
}

.cv-summary {
	margin-bottom: 0;
	color: #666;
}

.cv-highlights {
	margin: 0;
	padding-left: 1.15em;
}

.cv-highlights li {
	margin-bottom: 0.75em;
}

.cv-highlights li:last-child {
	margin-bottom: 0;
}

.cv-section {
	margin-top: 2.25em;
}

.cv-timeline {
	display: grid;
	gap: 1em;
	margin-top: 1.15em;
}

.cv-entry {
	display: grid;
	grid-template-columns: 11.5em minmax(0, 1fr);
	gap: 1.15em;
	padding: 1.2em 1.3em;
}

.cv-entry-period,
.cv-award-year {
	align-self: start;
	display: inline-flex;
	justify-content: center;
	padding: 0.45em 0.8em;
	border-radius: 999px;
	background: rgba(73, 191, 157, 0.12);
	color: #2f9f81;
	font-size: 0.84em;
	font-weight: 700;
	letter-spacing: 0.03em;
}

.cv-entry-org {
	color: #666;
	font-weight: 600;
}

.cv-entry-body p:last-child,
.cv-award p:last-child {
	margin-bottom: 0;
}

.cv-award-link {
	color: inherit;
	border-bottom: 0;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: repeat-x;
	background-size: 100% 1px;
	text-decoration: none;
	transition: color 0.2s ease, background-size 0.2s ease;
}

.cv-award-link:hover {
	color: #49bf9d;
	background-size: 100% 1px;
}

.cv-awards {
	display: grid;
	gap: 1em;
	margin-top: 1.15em;
}

.cv-award {
	display: grid;
	grid-template-columns: 6.5em minmax(0, 1fr);
	gap: 1em;
	padding: 1.15em 1.25em;
}

.cv-collapse {
	margin-top: 1.5em;
	overflow: hidden;
}

.cv-collapse summary {
	cursor: pointer;
	padding: 1.05em 1.25em;
	font-weight: 700;
	color: #3c3b3b;
	list-style: none;
}

.cv-collapse summary::-webkit-details-marker {
	display: none;
}

.cv-collapse summary::after {
	content: "+";
	float: right;
	color: #49bf9d;
	font-size: 1.15em;
	line-height: 1;
}

.cv-collapse[open] summary::after {
	content: "-";
}

.cv-collapse-body {
	padding: 0 1.25em 1.15em 1.25em;
	border-top: 1px solid #f0f1f2;
}

.cv-talk-list {
	margin-top: 1.15em;
}

.cv-talk-entry {
	display: grid;
	grid-template-columns: 9em minmax(0, 1fr);
	gap: 1.25em;
	padding: 1.2em 0;
	border-top: 1px solid #e9ecef;
}

.cv-talk-entry:first-of-type {
	border-top: 0;
	padding-top: 0.2em;
}

.cv-talk-date {
	align-self: start;
	display: inline-flex;
	justify-content: center;
	padding: 0.45em 0.8em;
	border-radius: 0.35em;
	background: #0f9d95;
	color: #ffffff;
	font-size: 0.92em;
	font-weight: 700;
	letter-spacing: 0.03em;
	line-height: 1;
	box-shadow: 0 6px 14px rgba(15, 157, 149, 0.18);
}

.cv-talk-body h4 {
	margin-bottom: 0.25em;
	color: #0f9d95;
}

.cv-talk-body p {
	margin: 0;
	color: #3c3b3b;
	font-size: 1.05em;
}

.cv-bullets {
	margin: 0.85em 0 0 0;
	padding-left: 1.15em;
}

.cv-bullets li {
	margin-bottom: 0.7em;
}

.cv-bullets li:last-child {
	margin-bottom: 0;
}

@media screen and (max-width: 980px) {
	.cv-overview,
	.cv-entry,
	.cv-award,
	.cv-talk-entry {
		grid-template-columns: 1fr;
	}

	.cv-facts li {
		grid-template-columns: 1fr;
		gap: 0.25em;
	}

	.cv-talk-date {
		justify-self: start;
	}
}
