/*
  Layout and styling adapted from the reference UCL faculty homepage.
  The goal here is fidelity to the original visual structure while keeping
  the site portable for GitHub Pages.
*/

body {
  background: white;
  color: #444;
  font-family: Avenir, sans-serif;
  font-size: 80%;
}

a {
  color: #002855;
}

a:link {
  color: #002855;
  text-decoration: none;
  font-weight: bold;
}

a:active {
  color: #ff9621;
  text-decoration: none;
}

@media (hover: hover) {
  a:hover {
    color: #fff;
    text-decoration: none;
    background-color: #f6be00;
  }
}

ul {
  list-style-type: none;
}

li {
  padding: 0 0 4px 0;
}

h1 {
  margin: 0;
  padding: 0 0 1px 0;
  color: black;
  font-size: 180%;
}

body.home-page h1,
body.teaching-page h1,
body.research-page h1 {
  font-size: 205%;
}

@media (hover: hover) {
  h1 a:hover {
    color: black;
  }
}

h2 {
  color: #333333;
  font-size: 115%;
}

h3 {
  margin: 8px 0 0 0;
  color: #333333;
  font-variant: small-caps;
  font-size: 115%;
}

#page {
  margin: 20px auto 0;
  width: 940px;
}

#content {
  margin: 0;
  padding: 0;
}

#content ul {
  margin: 2px 2px 16px 2px;
  padding: 0;
  display: block;
  list-style-type: none;
}

#content li {
  margin-top: 0.5em;
  padding: 0 0 6px 0;
  display: block;
}

#content p {
  text-align: justify;
  line-height: 120%;
  margin: 8px 0;
  font-size: 125%;
}

.main-welcome {
  margin: 14px 0 8px 0;
}

body.home-page #content .main-welcome p,
body.teaching-page #content .main-welcome p,
body.research-page #content .main-welcome p {
  font-size: 140%;
}

body.home-page #content .main-welcome h3,
body.teaching-page #content .main-welcome h3,
body.research-page #content .main-welcome h3 {
  margin-bottom: 14px;
}

#intro p {
  font-size: 102%;
  margin: 0 0 8px 0;
}

.affiliation-text {
  color: #002855;
  font-weight: 600;
}

#intro {
  text-align: left;
}

body.home-page #intro {
  min-height: 0;
  text-align: left;
}

body.home-page #content #intro,
body.home-page #content #intro > p,
body.home-page #content #buttn {
  text-align: left;
}

body.home-page #content .main-welcome,
body.home-page #content .main-welcome h3,
body.home-page #content .main-welcome p,
body.teaching-page #content .main-welcome,
body.teaching-page #content .main-welcome h3,
body.teaching-page #content .main-welcome p,
body.research-page #content .main-welcome,
body.research-page #content .main-welcome h3,
body.research-page #content .main-welcome p {
  text-align: left;
}

#content img {
  padding: 0;
  border: none;
}

.banner-wrap {
  margin: 8px 0 8px 0;
}

.banner-full {
  width: 100%;
}

.banner-home {
  margin-bottom: 18px;
}

.banner-full img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.teaching-banner-wrap {
  width: 100%;
  margin-bottom: 18px;
  height: 240px;
  overflow: hidden;
}

.teaching-banner-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.research-banner-wrap {
  width: 100%;
  margin-bottom: 18px;
}

.research-banner-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

#colA {
  float: left;
  width: 650px;
  padding: 0 12px 0 0;
}

#colB {
  float: right;
  width: 250px;
  padding: 0 0 12px 12px;
}

body.home-page #colA {
  float: left;
  padding: 0 12px 0 0;
}

body.home-page #colB {
  float: right;
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

body.teaching-page #colB {
  display: none;
}

body.research-page #colB {
  display: none;
}

#colB p {
  text-align: justify;
  line-height: 120%;
  margin: 2px 0 16px 0;
  font-size: 104%;
}

#colB h3 {
  margin: 24px 0 8px 0;
  font-size: 90%;
}

#colB .sidebar-links + h3 {
  margin-top: 36px;
}

.sidebar-photo {
  width: 250px;
  height: 250px;
  margin: 8px 0 24px 0;
  object-fit: cover;
  display: block;
}

body.teaching-page .sidebar-photo {
  height: 250px;
}

body.research-page .sidebar-photo {
  height: 250px;
}

.sidebar-top {
  flex: 0 0 auto;
}

.sidebar-bottom-note {
  margin-top: auto;
  padding-bottom: 8px;
}

#buttn {
  padding: 8px 0;
}

a.buttbutt {
  text-align: right;
  font-weight: bold;
  padding: 4px;
  color: #ffffff;
  background-color: #002855;
}

@media (hover: hover) {
  a.buttbutt:hover {
    color: #ffffff;
    background-color: #f6be00;
  }
}

.sidebar-links {
  margin: 8px 0 8px 0;
}

.sidebar-link {
  display: inline-block;
  margin: 0 10px 8px 0;
}

.photo-credit {
  font-size: 90%;
}

#colB .photo-credit,
#colB .site-design-note {
  font-size: 75%;
}

body.home-page #colB .site-design-note {
  margin-bottom: 0;
}

body.teaching-page #colB .site-design-note {
  margin-bottom: 0;
}

body.home-page #colB .photo-credit {
  margin-top: 4px;
}

body.teaching-page #colB .photo-credit {
  margin-top: 4px;
}

a.dsphead {
  text-decoration: none;
  margin-left: 0.15em;
  padding: 0 0 4px 0;
}

@media (hover: hover) {
  a.dsphead:hover {
    padding: 0 0 4px 0;
  }
}

a.dsphead.is-open {
  font-weight: bold;
}

a.dsphead span.dspchar {
  font-family: monospace;
  font-weight: normal;
  padding: 0 0 4px 0;
}

.dspcont {
  display: none;
  border: 1px #232951;
  padding: 10px;
  color: #000;
  background: #f1f1f1;
  margin: 10px 10px 10px 10px;
  box-shadow: 0 0 0 #000;
  border-radius: 5px;
}

.coauthor {
  font-size: 78%;
  color: #666;
}

.site-footer {
  margin: 32px auto 16px;
  width: 940px;
  border-top: 1px solid #ddd;
  padding-top: 8px;
  font-size: 80%;
  color: #999;
  text-align: center;
}

@media (max-width: 980px) {
  .site-footer {
    width: auto;
    margin: 32px 16px 16px;
    font-size: 70%;
  }
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

body.teaching-page #page.teaching-layout {
  width: 940px;
}

body.teaching-page #colA {
  float: none;
  width: 940px;
  padding: 0;
}

body.research-page #page.research-layout {
  width: 940px;
}

body.research-page #content {
  display: block;
}

body.research-page #colA {
  float: none;
  width: 940px;
  padding: 0;
  display: block;
}

body.research-page #intro,
body.research-page .main-welcome,
body.research-page .save {
  width: 100%;
  max-width: none;
}

body.research-page .save {
  margin-top: 18px;
}

hr.research-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 28px 0;
}

.research-line {
  margin-bottom: 8px;
}

.research-line-title {
  font-size: 118%;
  font-variant: small-caps;
  color: #333;
  margin: 0 0 8px 0;
  font-weight: bold;
}

.line-num {
  color: #aaa;
  font-weight: normal;
  margin-right: 4px;
}

.research-line-desc {
  color: #555;
  font-style: italic;
  text-align: left;
  margin: 0 0 16px 0;
  font-size: 108%;
  line-height: 150%;
  background: #f7f7f7;
  border-left: 3px solid #002855;
  padding: 10px 14px;
  border-radius: 0 3px 3px 0;
}

.paper-status {
  font-size: 85%;
  color: #999;
  font-style: italic;
  font-weight: normal;
}

.teaching-hero {
  margin: 10px 0 24px 0;
}

.teaching-hero h2 {
  margin: 0 0 10px 0;
  font-size: 165%;
}

.teaching-hero p {
  margin: 0 0 10px 0;
  font-size: 118%;
  line-height: 128%;
}

.teaching-list li {
  margin-bottom: 1rem;
}

#content .teaching-list {
  padding: 0 16px;
  box-sizing: border-box;
}

body.teaching-page .save {
  margin-top: 18px;
}

.teaching-institution {
  margin: 0 0 12px 0;
}

.teaching-title-toggle,
.teaching-title-toggle:link,
.teaching-title-toggle:visited {
  margin-left: 0;
  padding: 0;
  color: inherit;
  font-weight: inherit;
}

@media (hover: hover) {
  .teaching-title-toggle:hover {
    color: #fff;
    padding: 0;
  }
}

.teaching-detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.teaching-role {
  min-width: 0;
  text-align: left;
}

.teaching-term {
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 980px) {
  #page {
    width: auto !important;
    max-width: 100%;
    margin-left: 16px !important;
    margin-right: 16px !important;
    box-sizing: border-box;
  }

  #colA, #colB {
    float: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  body.home-page #colB {
    display: block !important;
    min-height: unset !important;
    margin-top: 24px;
    border-top: 1px solid #ddd;
    padding-top: 16px;
  }

  body.home-page .sidebar-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 16px;
  }

  body.home-page .sidebar-photo {
    width: 90px !important;
    height: 90px !important;
    margin: 0 !important;
    flex-shrink: 0;
  }

  body.home-page .sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  body.home-page .sidebar-link {
    display: block;
  }

  body.home-page .sidebar-bottom-note {
    display: block;
    margin-top: 16px !important;
    width: 100%;
  }

  .teaching-banner-wrap {
    height: auto;
  }

  .teaching-banner-wrap img {
    height: auto;
    object-fit: unset;
  }
}
