/* Visual language of boleizhou.github.io: Bootstrap 4 + MDB + al-folio */

:root {
  --global-bg-color: #ffffff;
  --global-text-color: #000000;
  --global-text-color-light: #828282;
  --global-theme-color: #00369f;
  --global-hover-color: #ffb81c;
  --global-divider: #e8e8e8;
  --nav-height: 56px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --global-bg-color: #1c1c1c;
  --global-text-color: #e8e8e8;
  --global-text-color-light: #c8c8c8;
  --global-theme-color: #3bb3d7;
  --global-hover-color: #2698ba;
  --global-divider: #424246;
}

/* al-folio theme fade: enabled only while html.transition is on */
html.transition,
html.transition body {
  transition-property: color, background-color, border-color, fill, stroke, box-shadow !important;
  transition-duration: 240ms !important;
  transition-timing-function: ease !important;
  transition-delay: 0s !important;
}

html.transition *,
html.transition *::before,
html.transition *::after {
  /* Do not transition `color` here. Nested color transitions stack on
     inherited text (footer, heading leftovers) and look delayed. */
  transition-property: background-color, border-color, box-shadow !important;
  transition-duration: 240ms !important;
  transition-timing-function: ease !important;
  transition-delay: 0s !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: var(--nav-height) 0 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--global-text-color);
  background-color: var(--global-bg-color);
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  line-height: 1.2;
}

.font-weight-bold {
  font-weight: 700;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--global-theme-color);
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background-color: var(--global-bg-color);
  border-bottom: 1px solid var(--global-divider);
  opacity: 0.95;
  box-shadow: none;
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-family: "Roboto", sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  color: inherit;
}

.navbar-brand:hover {
  color: var(--global-hover-color);
  text-decoration: none;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--global-text-color);
  border-radius: 1px;
}

.navbar-toggle:not(.collapsed) .icon-bar.top {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggle:not(.collapsed) .icon-bar.middle {
  opacity: 0;
}

.navbar-toggle:not(.collapsed) .icon-bar.bottom {
  transform: translateY(-7px) rotate(-45deg);
}

.navbar-nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-nav .nav-link {
  display: block;
  padding: 0.5rem 0.7rem;
  color: inherit;
  font-size: 1rem;
  font-weight: 400;
}

.navbar-nav .nav-link:hover {
  color: var(--global-hover-color);
  text-decoration: none;
}

.navbar-nav .nav-item.active .nav-link {
  color: var(--global-theme-color);
  font-weight: 700;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 0.15rem;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 1.05rem;
}

.theme-toggle:hover {
  color: var(--global-hover-color);
}

.theme-toggle i {
  display: none;
}

html:not([data-theme-setting]) .theme-toggle .icon-system,
html[data-theme-setting="system"] .theme-toggle .icon-system {
  display: inline-block;
}

html[data-theme-setting="light"] .theme-toggle .icon-light {
  display: inline-block;
}

html[data-theme-setting="dark"] .theme-toggle .icon-dark {
  display: inline-block;
}

/* Page */
main {
  flex: 1;
  padding: 2rem 0 0;
}

.post-header {
  margin-bottom: 1.25rem;
}

.post-title {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 0.75rem;
}

.desc {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.55;
}

.page-note {
  margin-bottom: 1.5rem;
}

/* About: circular photo left, name and title right */
.intro-row {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

.intro-photo {
  flex: 0 0 170px;
}

.intro-photo img {
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.intro-text {
  flex: 1;
  min-width: 0;
}

.intro-text .post-title {
  margin-top: 0.15rem;
  margin-bottom: 0.55rem;
}

.social .contact-icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 1.55rem;
}

.social .contact-icons a {
  color: inherit;
  line-height: 1;
}

.social .contact-icons a:hover {
  color: var(--global-theme-color);
  text-decoration: none;
}

.bio p {
  margin-bottom: 1rem;
}

/* Teaching / awards / experience: plain Bootstrap-like lists */
.content-block {
  margin-bottom: 0.35rem;
}

.content-block > p,
.section-label {
  margin-bottom: 0.4rem;
}

h3 {
  font-size: 1.75rem;
  font-weight: 300;
  margin: 1.6rem 0 0.7rem;
}

.content-list {
  margin: 0.35rem 0 1.35rem;
  padding-left: 2rem;
}

.content-list li {
  margin: 0.35rem 0;
}

/* Publications */
.publications h2.year {
  color: var(--global-divider);
  border-top: 1px solid var(--global-divider);
  margin: 2rem 0 0.5rem;
  padding-top: 0.1rem;
  text-align: right;
  font-family: "Roboto", sans-serif;
  font-size: 2.25rem;
  font-weight: 300;
}

html[data-theme="dark"] .publications h2.year {
  color: #4a4a4a;
}

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

.bibliography li {
  margin-bottom: 1.1rem;
}

.pub-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.abbr {
  flex: 0 0 148px;
  padding-top: 0.2rem;
}

.abbr abbr {
  display: inline-block;
  background-color: var(--global-theme-color);
  color: #ffffff;
  padding: 0.1rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 500;
  font-style: normal;
  text-decoration: none;
}

html[data-theme="dark"] .abbr abbr {
  color: #1c1c1c;
}

.pub-body {
  flex: 1;
  min-width: 0;
}

.pub-body .title {
  font-weight: 500;
  margin-bottom: 0.1rem;
}

.pub-body .author {
  font-size: 0.98rem;
}

.pub-body .author em {
  border-bottom: 1px solid currentColor;
  font-style: normal;
  font-weight: 700;
}

.pub-body .periodical {
  font-size: 0.95rem;
}

.pub-body .links {
  margin-top: 0.35rem;
}

.btn {
  display: inline-block;
  color: inherit;
  border: 1px solid currentColor;
  padding: 0.15rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 2px;
}

.btn:hover {
  color: var(--global-theme-color);
  border-color: var(--global-theme-color);
  text-decoration: none;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--global-divider);
  padding: 40px 0;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--global-bg-color);
    border-bottom: 1px solid var(--global-divider);
    padding: 0.4rem 0 0.7rem;
  }

  .navbar-nav.open {
    display: flex;
  }

  .navbar-nav .nav-link {
    padding: 0.7rem 1.1rem;
  }

  .theme-toggle {
    margin: 0.2rem 0.9rem 0.4rem;
  }

  .intro-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .intro-photo {
    flex: none;
  }

  .social .contact-icons {
    justify-content: center;
  }

  .pub-row {
    flex-direction: column;
    gap: 0.35rem;
  }

  .abbr {
    flex: none;
  }

  .post-title {
    font-size: 2rem;
  }
}
