/* Simple academic website. Customise colours and typography here. */
:root {
  --text: #303e50;
  --heading: #17385a;
  --muted: #56677a;
  --link: #245a88;
  --line: #dce5ed;
  --accent: #8b3c55;
  --sidebar: #ebf2f8;
  --body-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --heading-font: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--body-font);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
p { margin: 0 0 1.15rem; }
h1, h2, h3 { margin-top: 0; color: var(--heading); }
h1, h2 { font-family: var(--heading-font); font-weight: 400; }
h1 { font-size: 2.2rem; line-height: 1.25; margin-bottom: 1.5rem; }
h2 { font-size: 1.6rem; line-height: 1.35; margin-bottom: .6rem; }
h3 { font-size: 1.0625rem; line-height: 1.6; font-weight: 600; }
strong { font-weight: 600; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
.layout {
  width: min(1120px, calc(100% - 4rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  column-gap: 48px;
  padding: 40px 0 40px;
}
.sidebar { align-self: start; position: sticky; top: 24px; padding: 28px; background: var(--sidebar); border-top: 4px solid var(--accent); }
.main-column > main { padding-top: 16px; }
.site-name {
  display: block;
  color: var(--heading);
  font-family: var(--heading-font);
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  margin-bottom: 1.1rem;
}
.site-name:hover { text-decoration: none; color: var(--link); }
.position, .affiliation { font-size: .9375rem; line-height: 1.6; color: var(--muted); }
.position { margin-bottom: .3rem; }
.affiliation { margin-bottom: 0; }
.portrait { width: 9.5rem; max-width: 100%; margin: 1.1rem 0 0; }
.portrait img { display: block; width: 100%; height: auto; border-radius: 2px; }
.site-nav {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.site-nav a { color: var(--heading); padding: .3rem .8rem; border-left: 2px solid transparent; }
.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-left-color: var(--accent);
}
.academic-links { display: flex; flex-direction: column; align-items: flex-start; margin-top: 1.6rem; font-size: .875rem; line-height: 2; }
.sidebar-contact { display: inline-block; margin-top: 1.2rem; font-size: .875rem; }
.main-column { min-width: 0; }
.introduction { margin-bottom: 2rem; }
.introduction p { font-size: 1.0625rem; }
.home-section { margin-top: 2rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-heading > a { font-size: .875rem; flex-shrink: 0; }
.recent-papers { border-top: 1px solid var(--line); }
.recent-papers li { display: grid; grid-template-columns: 45px minmax(0, 1fr); gap: 1.2rem; padding: .875rem 0; border-bottom: 1px solid var(--line); }
.paper-year { font-size: .875rem; color: var(--accent); padding-top: .15rem; }
.recent-papers h3 { margin-bottom: .35rem; }
.recent-papers p { font-size: .9375rem; color: var(--muted); margin: 0; line-height: 1.6; }
.publication-status { font-style: italic; color: var(--accent); }
.page-heading { margin-bottom: 1.6rem; }
.page-heading p { font-size: 1.0625rem; }
.page-index {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.35rem;
  padding-bottom: .5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
}
.paper-group { margin-bottom: 1.5rem; }
.paper-group:last-child { margin-bottom: 0; }
.paper { padding: .875rem 0; border-top: 1px solid var(--line); }
.paper h3 { margin-bottom: .4rem; }
.paper p { font-size: .9375rem; line-height: 1.65; margin-bottom: .3rem; }
.paper .venue { color: var(--muted); }
.paper-links { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .875rem; margin-top: .45rem; }
.course { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 1.25rem; border-top: 1px solid var(--line); padding: 1rem 0; }
.teaching-period + .teaching-period { margin-top: 1.25rem; }
.teaching-label { color: #626970; font-size: .875rem; line-height: 1.6; font-weight: 400; margin-bottom: .35rem; }
.current-course { color: var(--heading); font-size: 1.0625rem; font-weight: 600; margin-bottom: 0; }
.past-courses { color: var(--text); font-size: 1rem; font-weight: 400; margin-bottom: 0; }
.course h3, .course h4 { margin: 0 0 .15rem; color: var(--heading); font-size: 1.0625rem; line-height: 1.6; font-weight: 600; }
.course p { font-size: .9375rem; color: var(--muted); margin: 0; }
.course-date { font-size: .875rem; color: var(--muted); margin-bottom: .4rem; }
.mini-course { padding: 1rem 0; border-top: 1px solid var(--line); }
.mini-course h3 { margin-bottom: .6rem; }
.mini-course p { margin-bottom: .6rem; font-size: .9375rem; }
.mini-course .course-date { font-size: .875rem; }
.mini-course > a { font-size: .9375rem; }
.mini-meta { color: var(--muted); }
.contact { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.6rem; }
.contact h2 { font-size: 1.4rem; margin-bottom: .65rem; }
.email { display: inline-block; margin-bottom: 1rem; overflow-wrap: anywhere; }
.contact-details { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; font-size: .875rem; line-height: 1.8; color: var(--muted); }
.contact-details p { margin: 0; }
.skip-link { position: absolute; top: -10rem; left: 1rem; padding: .5rem 1rem; background: var(--heading); color: #fff; z-index: 5; }
.skip-link:focus { top: 1rem; }

@media (max-width: 900px) {
  .layout { width: calc(100% - 3rem); grid-template-columns: 248px minmax(0, 1fr); gap: 32px; padding-top: 36px; }
  .sidebar { padding: 22px; }
  .site-name { font-size: 1.8rem; }
  .contact-details { grid-template-columns: 1fr; gap: .85rem; }
}
@media (max-width: 680px) {
  .layout { display: block; width: calc(100% - 2rem); padding-top: 20px; }
  .sidebar { position: static; padding: 20px; margin-bottom: 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 16px; }
  .identity-copy { align-self: center; }
  .portrait { width: 5rem; }
  .site-nav, .academic-links, .sidebar-contact { grid-column: 1 / -1; }
  .main-column > main { padding-top: 0; }
  .site-name { font-size: 1.7rem; margin-bottom: .7rem; }
  .position br { display: none; }
  .position { margin-bottom: .15rem; }
  .site-nav { flex-direction: row; gap: 1.25rem; border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .7rem; flex-wrap: wrap; }
  .site-nav a { min-height: 40px; padding: .3rem 0; border-left: 0; border-bottom: 2px solid transparent; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
  .academic-links { flex-direction: row; gap: .5rem 1.3rem; flex-wrap: wrap; margin-top: .5rem; }
  .sidebar-contact { margin-top: .4rem; }
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.45rem; }
  .introduction { margin-bottom: 2rem; }
  .recent-papers li { gap: .85rem; grid-template-columns: 40px minmax(0, 1fr); }
  .contact { margin-top: 2.5rem; }
}
@media (max-width: 380px) {
  .sidebar { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  .site-name { font-size: 1.5rem; }
  .section-heading { display: block; margin-bottom: 1rem; }
  .section-heading h2 { margin-bottom: .35rem; }
  .course { grid-template-columns: 1fr; gap: .2rem; }
}
@media (max-height: 820px) {
  .sidebar { position: static; }
}
@media print {
  .layout { display: block; width: 100%; padding: 0; }
  .sidebar { position: static; margin-bottom: 2rem; background: none; padding: 0; border: 0; }
  .site-name br { display: none; }
  .site-nav, .academic-links, .sidebar-contact, .page-index { display: none; }
  .paper, .mini-course, .course { break-inside: avoid; }
  a { color: inherit; }
}
