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


/* Cooper Hewitt font families */

@font-face {
  font-family: "CH_heavy";
  src: url('/fonts/cooper_hewitt/CooperHewitt-Heavy.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "CH_heavy_italic";
  src: url('/fonts/cooper_hewitt/CooperHewitt-HeavyItalic.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "CH_bold";
  src: url('/fonts/cooper_hewitt/CooperHewitt-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "CH_bold_italic";
  src: url('/fonts/cooper_hewitt/CooperHewitt-BoldItalic.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "CH_medium";
  src: url('/fonts/cooper_hewitt/CooperHewitt-Medium.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "CH_medium_italic";
  src: url('/fonts/cooper_hewitt/CooperHewitt-MediumItalic.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "CH_book";
  src: url('/fonts/cooper_hewitt/CooperHewitt-Book.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "CH_book_italic";
  src: url('/fonts/cooper_hewitt/CooperHewitt-BookItalic.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "CH_semibold";
  src: url('/fonts/cooper_hewitt/CooperHewitt-Semibold.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: "CH_semibold_italic";
  src: url('/fonts/cooper_hewitt/CooperHewitt-SemiboldItalic.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;
}

html {
  font-family: 'CH_book';
  font-weight: normal;
  font-size: 16px; /* Prevents font-size jumps between responsive states. */
}

/*
 * 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 {
  font-family: 'CH_semibold';
  font-weight: normal;
  text-align: center; /* Mobile-first alignment. */
  padding: 2rem 1rem;
  color: rgba(255,255,255,.5);
  background-color: #202020;
}

.sidebar-photo {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-48px); /* Base offset; the current sidebar include overrides it. */
}

@media (min-width: 65em) {
  .sidebar {
    position: fixed; /* Keeps the sidebar visible while the main page scrolls. */
    bottom: 0;
    top: 0; 
    left: 0;
    width: 16rem; /* Desktop sidebar width. */
    text-align: right;
  }
}

/* Sidebar links */
.sidebar a {
  color: #fff;
  text-decoration: none;
}
/* Sidebar About section */
.sidebar-about {
  position: relative;
  padding-top: 16rem;
  padding-bottom: 3rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 65em) {
  .sidebar-about {
    position: absolute; /* Anchors the bio block to the bottom on desktop. */
    bottom: 0;
    padding: 2rem 1rem;
  }
}

.sidebar-about h1 {
  color: #fff;
  margin-top: 0;
  font-family: 'CH_heavy';
  font-style: normal;
  font-weight: normal;
  font-size: 3.25rem;
}

.sidebar-about p {
  font-family: 'CH_semibold';
  font-weight: normal;
  font-size: 3.25rem;
  color: #eee;
}

.sidebar-about a {
  color: #eee;
  text-decoration: none;
}

a:hover,
a:focus {
  filter: brightness(1.2);
}

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

/* Blog links */
.post-title a {
  text-decoration: none;
}
.post-title a:hover {
  color: #2D6A4F;
}

.recent-posts a {
  text-decoration: none;
}
.recent-posts a:hover {
  color: #2D6A4F;
}

.post-tags a {
  text-decoration: none;
}
.post-tags a:hover {
  color: #2D6A4F;
  text-decoration-color: #CFE3D4;
}

/* 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;
    right:  1rem;
    bottom: 1rem;
    left:   1rem;
  }
}


/* 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;
  text-align: justify;
}

@media (min-width: 65em) {
  .content {
    max-width: 45rem; /* Keeps long academic text readable. */
    margin-left: 22rem; /* Clears the fixed desktop sidebar. */
    margin-right: 4rem;
    text-align: justify;
  }
}

/*
 * 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;
  }
}



/*
 * 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`.
 */

/* Forest green (active theme) */
.theme-base-forest {
  --forest-sidebar: #2C4A3B; /* Sidebar background. */
  --forest-link:    #2D6A4F; /* Links in the main content. */
  --forest-heading: #24402F; /* Section headings. */
  --forest-accent:  #8C6A3A; /* Labels such as "Job Market Paper". */
  --forest-muted:   #6F7F74; /* Secondary notes such as "Draft coming soon". */
  --forest-sage:    #CFE3D4; /* Hover tint on the dark sidebar. */
}
.theme-base-forest .sidebar {
  background-color: var(--forest-sidebar);
}
.theme-base-forest .content a,
.theme-base-forest .related-posts li a:hover {
  color: var(--forest-link);
}
.theme-base-forest .content h3 {
  color: var(--forest-heading);
}

/* Forest green, dark mode (html[data-theme="dark"] is set in head.html) */
html[data-theme="dark"] {
  color-scheme: dark; /* Dark scrollbars and form controls. */
}
html[data-theme="dark"] .theme-base-forest {
  --forest-sidebar: #22392D;
  --forest-link:    #8CC5A4;
  --forest-heading: #A9CDB5;
  --forest-accent:  #C9A46A;
  --forest-muted:   #8FA096;
  color: #C9D3CC;
  background-color: #141A16;
}
html[data-theme="dark"] .theme-base-forest h1,
html[data-theme="dark"] .theme-base-forest h2,
html[data-theme="dark"] .theme-base-forest h4,
html[data-theme="dark"] .theme-base-forest strong {
  color: #E1E8E3;
}
html[data-theme="dark"] .theme-base-forest hr {
  border-top-color: #2A332D;
  border-bottom-color: #141A16;
}

/* Green */
.theme-base-mygreen .sidebar {
  background-color: #4A5D4E;
}
.theme-base-mygreen .content a,
.theme-base-mygreen .related-posts li a:hover {
  color: #3D7A66;
}

/* 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;
}
/* Social icons */
.fa-envelope:hover {
  color: #CFE3D4;
}
.fa-github:hover {
  color: #CFE3D4;
}
.fa-linkedin:hover {
  color: #CFE3D4;
}
.fa-youtube:hover {
  color: #CFE3D4;
}
.fa-twitter:hover {
  color: #CFE3D4;
}
