/*
 *  __                  __
 * /\ \                /\ \
 * \ \ \___   __  __   \_\ \     __
 *  \ \  _ `\/\ \/\ \  /'_` \  /'__`\
 *   \ \ \ \ \ \ \_\ \/\ \_\ \/\  __/
 *    \ \_\ \_\/`____ \ \___,_\ \____\
 *     \/_/\/_/`/___/> \/__,_ /\/____/
 *                /\___/
 *                \/__/
 *
 * Designed, built, and released under MIT license by @mdo. Learn more at
 * https://github.com/poole/hyde.
 */


/*
 * Contents
 *
 * Global resets
 * Sidebar
 * Container
 * Reverse layout
 * Themes
 */


/*
 * Global resets
 *
 * Update the foundational and global aspects of the page.
 */

html {
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
}
@media (min-width: 48em) {
  html {
    font-size: 16px;
  }
}
@media (min-width: 58em) {
  html {
    font-size: 20px;
  }
}


/*
 * Sidebar
 *
 * Flexible banner for housing site name, intro, and "footer" content. Starts
 * out above content in mobile and later moves to the side with wider viewports.
 */

/*
.sidebar {
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(255,255,255,.5);
  background-color: #202020;
}
 */

body {
  background-color: #f7f7f5;
}

.sidebar {
  text-align: center;
  padding: 2rem 1rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  background-image: url("../images/heic2018a_flip2.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
}

.sidebar * {
  position: relative;
  z-index: 1;
}

@media (min-width: 48em) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 18rem;
    text-align: left;
  }
  .sidebar-icons { justify-content: flex-start; }
}

/* Sidebar links */
.sidebar a {
  color: #fff;
}

/* About section */
.sidebar-about h1 {
  color: #fff;
  margin-top: 0;
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1.8rem;
  line-height: 1.2;
}

/* Sidebar nav */
.sidebar-nav {
  margin-bottom: 1rem;
}
.sidebar-nav-item {
  display: block;
  line-height: 1.75;
}
a.sidebar-nav-item:hover,
a.sidebar-nav-item:focus {
  text-decoration: underline;
}
.sidebar-nav-item.active {
  font-weight: bold;
}

/* Sticky sidebar
 *
 * Add the `sidebar-sticky` class to the sidebar's container to affix it the
 * contents to the bottom of the sidebar in tablets and up.
 */

@media (min-width: 48em) {
  .sidebar-sticky {
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    left: 1rem;
    right: 1rem;

    display: flex;
    flex-direction: column;
  }

  /* keep bottom pinned */
  .sidebar-bottom {
    flex: 0 0 auto;
  }

  /* the "upper" part takes the remaining space */
  .sidebar-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;

    /* THIS is what moves it lower */
    justify-content: flex-end;
    padding-bottom: 0.1rem;  /* adjust this number */
  }
}

/* Container
 *
 * Align the contents of the site above the proper threshold with some margin-fu
 * with a 25%-wide `.sidebar`.
 */

.content {
  padding-top:    4rem;
  padding-bottom: 4rem;
}

@media (min-width: 48em) {
  .content {
    max-width: 38rem;
    margin-left: 20rem;
    margin-right: 2rem;
  }
}

@media (min-width: 64em) {
  .content {
    margin-left: 22rem;
    margin-right: 4rem;
  }
}


/*
 * Reverse layout
 *
 * Flip the orientation of the page by placing the `.sidebar` on the right.
 */

@media (min-width: 48em) {
  .layout-reverse .sidebar {
    left: auto;
    right: 0;
  }
  .layout-reverse .content {
    margin-left: 2rem;
    margin-right: 20rem;
  }
}

@media (min-width: 64em) {
  .layout-reverse .content {
    margin-left: 4rem;
    margin-right: 22rem;
  }
}

@media (max-width: 48em) {
  .profile-photo-right {
    float: none;
    display: block;
    margin: 0 auto 1.5rem auto;
  }
}

/*
 * Themes
 *
 * As of v1.1, Hyde includes optional themes to color the sidebar and links
 * within blog posts. To use, add the class of your choosing to the `body`.
 */

/* Base16 (http://chriskempson.github.io/base16/#default) */

/* Red 

.theme-base-08 .sidebar {
  background-color: #ac4142;
}
.theme-base-08 .content a,
.theme-base-08 .related-posts li a:hover {
  color: #ac4142;
}


/* Orange 
.theme-base-09 .sidebar {
  background-color: #d28445;
}
.theme-base-09 .content a,
.theme-base-09 .related-posts li a:hover {
  color: #d28445;
}

/* Yellow 
.theme-base-0a .sidebar {
  background-color: #f4bf75;
}
.theme-base-0a .content a,
.theme-base-0a .related-posts li a:hover {
  color: #f4bf75;
}

/* Green 
.theme-base-0b .sidebar {
  background-color: #90a959;
}
.theme-base-0b .content a,
.theme-base-0b .related-posts li a:hover {
  color: #90a959;
}

/* Cyan 
.theme-base-0c .sidebar {
  background-color: #75b5aa;
}
.theme-base-0c .content a,
.theme-base-0c .related-posts li a:hover {
  color: #75b5aa;
}

/* Blue 
.theme-base-0d .sidebar {
  background-color: #6a9fb5;
}
.theme-base-0d .content a,
.theme-base-0d .related-posts li a:hover {
  color: #6a9fb5;
}

/* Magenta 
.theme-base-0e .sidebar {
  background-color: #aa759f;
}
.theme-base-0e .content a,
.theme-base-0e .related-posts li a:hover {
  color: #aa759f;
}

/* Brown 
.theme-base-0f .sidebar {
  background-color: #8f5536;
}
.theme-base-0f .content a,
.theme-base-0f .related-posts li a:hover {
  color: #8f5536;
}
*/

/* Profile photo: circular */
.profile-photo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  object-fit: cover;
}

.profile-photo-right {
  float: right;
  margin: -60px 0 25px 30px;
}

@media (max-width: 48em) {
  .profile-photo {
    width: 160px;
    height: 160px;
  }
}

.content a {
  text-decoration: underline;
}

.content a:hover {
  text-decoration: none;
}

.footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
  color: #999;
  text-align: center;
}

.sidebar-icons {
  margin-top: 1.2rem; /* optional */
  display: flex;
  gap: 1.1rem;
  justify-content: center;
}

.sidebar-icons img {
  width: 24px;
  height: 24px;
  opacity: 0.75;
  filter: invert(100%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar-icons img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.sidebar-icons img.no-invert {
  filter: none;
}

.sidebar-copyright {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

/* Research page – highlight cards */
.research-highlight {
  margin: 1.5rem 0;
}

.research-section-divider {
  margin: 2.5rem 0;
  border-top: 1px solid #eee;
}

.research-highlight img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem 0 1.2rem 0;
}

.research-highlight h3 {
  margin-top: 0;
}

.research-highlight figure {
  margin: 1rem 0 1.5rem 0;
}

.research-highlight figcaption {
  font-size: 0.85rem;
  font-style: italic;
  color: #666;
  margin-top: 0.4rem;
  line-height: 1.4;
  text-align: center;
}

.research-highlight .creditcaption {
  text-align: right;
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.05rem;
  font-style: normal;
}

.page-cartoon {
  text-align: center;
  margin: 2rem 0;
}

.page-cartoon img {
  max-width: 400px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;

  background: #fff;
  padding: 4px;

  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-sizing: border-box;

  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.14),
    0 6px 16px rgba(0, 0, 0, 0.12);
}

