/*
	Additions to the Strata template: readable text colours, sidebar navigation,
	publication list, research themes, software list, movie captions.
*/

@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:600");

/* Readability: the template's grey-on-white body text is hard to read. */

	body, input, select, textarea { color: #5a5f62; }
	h1, h2, h3, h4, h5, h6 { color: #33383b; }
	strong, b { color: #33383b; font-weight: 600; }
	a { color: #2f9e7e; }
	a:hover { color: #23775f; }

	#main > section > h2,
	#main > section > header.major h2 { letter-spacing: -0.01em; }

	html { scroll-behavior: smooth; }
	@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Sidebar */

	#header strong, #header b { font-weight: 600; }
	#header h1 { font-size: 1.5em; line-height: 1.35em; margin: 0 0 0.5em 0; }
	#header .tagline { font-size: 1em; line-height: 1.6em; margin: 0 0 1.75em 0; color: rgba(255,255,255,0.7); }
	#header .side-nav { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15em; margin: 0 0 1.5em 0; }
	#header .side-nav a { border-bottom: 0; color: rgba(255,255,255,0.75); font-size: 1em; line-height: 1.7em; }
	#header .side-nav a:hover { color: #ffffff; }
	#header .side-links { font-size: 0.85em; margin: 0; color: rgba(255,255,255,0.45); }
	#header .side-links a { color: rgba(255,255,255,0.75); }
	#header .side-links a:hover { color: #ffffff; }
	#header .image.avatar img { display: block; }

	@media screen and (max-width: 980px) {
		#header .side-nav { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0 1.1em; margin-bottom: 1em; }
		#header .tagline { margin-bottom: 1.1em; }
	}

/* Section furniture */

	#main > section { scroll-margin-top: 2em; }
	h3.sub { font-size: 0.85em; letter-spacing: 0.12em; text-transform: uppercase; color: #8a9296; margin: 2.2em 0 1.2em 0; }
	h2 + h3.sub { margin-top: 0.5em; }
	.small-note { font-size: 0.88em; color: #8a9296; }

/* Research themes */

	.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6em 2.5em; }
	.theme h3 { font-size: 1.05em; margin: 0 0 0.5em 0; color: #33383b; font-weight: 600; }
	.theme p { font-size: 0.9em; line-height: 1.6em; margin: 0 0 0.6em 0; }
	@media screen and (max-width: 736px) { .themes { grid-template-columns: 1fr; } }

/* Explainer cards */

	.explainer-card { border: 1px solid #e3ebe8; border-radius: 0.35em; overflow: hidden; background: #f4f8f7; }
	.explainer-card svg { display: block; width: 100%; height: auto; }
	.work-item h3 a { border-bottom: 0; color: inherit; }
	.work-item h3 a:hover { color: #2f9e7e; }
	.work-item h3 { color: #33383b; font-weight: 600; line-height: 1.4em; }
	.work-item p { font-size: 0.85em; line-height: 1.55em; }

/* Publications */

	ul.pubs { list-style: none; padding: 0; margin: 0 0 1em 0; }
	.pub { display: flex; gap: 1.4em; padding: 1.3em 0; border-top: 1px solid #efefef; }
	.pub:first-child { border-top: 0; padding-top: 0.2em; }
	.pub-thumb { flex: 0 0 9.5em; height: 6.4em; border-radius: 0.35em; overflow: hidden; border: 0; background: #f1f3f3; display: block; }
	.pub-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
	a.pub-thumb:hover img { transform: scale(1.04); }
	.pub-thumb-blank { display: flex; align-items: center; justify-content: center; color: #b4bdc0; font-size: 1.4em; letter-spacing: 0.08em; }
	.pub-body { flex: 1 1 auto; min-width: 0; }
	.pub-body h4 { font-size: 1.02em; line-height: 1.4em; font-weight: 600; color: #33383b; margin: 0 0 0.3em 0; }
	.pub-body p { font-size: 0.86em; line-height: 1.55em; margin: 0 0 0.35em 0; }
	.pub-body p.pub-meta { color: #8a9296; }
	.pub-body p.pub-links { margin: 0; }
	@media screen and (max-width: 480px) {
		.pub { flex-direction: column; gap: 0.8em; }
		.pub-thumb { flex-basis: auto; width: 100%; height: 9em; }
		.pub-thumb-blank { display: none; }
	}

	ul.pubs-compact { list-style: none; padding: 0; margin: 0 0 2em 0; }
	ul.pubs-compact li { font-size: 0.88em; line-height: 1.55em; padding: 0.7em 0; border-top: 1px solid #efefef; }
	ul.pubs-compact li:first-child { border-top: 0; padding-top: 0; }
	ul.pubs-compact em { color: #33383b; font-style: normal; }

/* Movies: axis-free clips in tiles of a fixed shape, so rows line up */

	figure.movie { margin: 0 0 2em 0; }
	figure.movie video { display: block; width: 100%; height: auto; border-radius: 0.35em; background: #f4f1e6; object-fit: cover; cursor: pointer; }
	figure.movie figcaption { font-size: 0.85em; line-height: 1.55em; margin-top: 0.8em; }
	figure.movie-wide video { aspect-ratio: 2 / 1; }
	figure.movie-square video { aspect-ratio: 1 / 1; }
	figure.movie-landscape video { aspect-ratio: 3 / 2; }
	figure.movie-hd video { aspect-ratio: 16 / 9; background: #04040a; }
	/* a square clip beside its caption */
	figure.movie-side { display: grid; grid-template-columns: minmax(0, 26em) minmax(0, 1fr); gap: 0 1.8em; align-items: center; }
	figure.movie-side video { aspect-ratio: 1 / 1; }
	figure.movie-side figcaption { margin-top: 0; }
	@media screen and (max-width: 736px) { figure.movie-side { grid-template-columns: 1fr; } figure.movie-side figcaption { margin-top: 0.8em; } }
	/* a tall clip sits beside its caption instead of above it */
	figure.movie-tall { display: grid; grid-template-columns: minmax(0, 17em) minmax(0, 1fr); gap: 0 1.8em; align-items: center; }
	figure.movie-tall video { aspect-ratio: 1 / 2; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }   /* its field is white at rest */
	figure.movie-tall figcaption { margin-top: 0; }
	@media screen and (max-width: 480px) { figure.movie-tall { grid-template-columns: 1fr; } figure.movie-tall figcaption { margin-top: 0.8em; } }
	.movie-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.6em; }
	@media screen and (max-width: 480px) { .movie-grid { grid-template-columns: 1fr; } }

/* Software */

	ul.software { list-style: none; padding: 0; margin: 0; }
	ul.software li { display: grid; grid-template-columns: 12.5em 1fr; gap: 1em; padding: 0.75em 0; border-top: 1px solid #efefef; font-size: 0.9em; line-height: 1.55em; }
	ul.software li:first-child { border-top: 0; padding-top: 0; }
	ul.software li > a { border-bottom: 0; }
	ul.software li > a strong { color: #2f9e7e; }
	@media screen and (max-width: 736px) { ul.software li { grid-template-columns: 1fr; gap: 0.1em; } }
