/* vertical centering http://stackoverflow.com/a/27500365 */

html, body{height:100%; margin:0;padding:0;
  font-family: Roboto;
  font-size: 16px;
}

.container-fluid{
  height:100%;
  display:table;
  width: 100%;
  padding: 0;
}

.row-fluid {height: 100%; display:table-cell; vertical-align: middle;}

.centering {
  float:none;
  margin:0 auto;
}

h1 { font-family: 'Open Sans Condensed', sans-serif; letter-spacing: 2px; font-size: 48px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  position: relative;
}
h1.bigname { left: -.5em; }
h1:not(.bigname) { border-bottom: dotted 2px; }

.container.main-region { border-left: solid 2px; min-height: 99.9vh; }
.main-content { padding: 0 1em; }

.popover-content:empty { display: none; }

.role {
  font-family: Roboto, sans-serif; font-size: 20px;
}
.accent-text {
  font-family: 'Slabo 27px';
  font-size: 21px;
}

.caption { font-weight: bold; }

blockquote { font-size: inherit; }

dl.sidebyside { width: 100%; overflow: hidden; }
dl.sidebyside > dt { float: left; width: 20%; text-align: right; }
dl.sidebyside > dd { float: left; width: 80%; padding-left: 2em; }

.sidebar .well { font-size: 90%; width: 90%; margin-top: 2em; padding: .5em; }

.legend > ul { padding: 0; }
@media (min-width: 992px) {
  /* 2-column legend list */
  .legend > ul { width: 100%; overflow: hidden; }
  .legend > ul > li:nth-child(odd) { float: left; width: 70%; }
  .legend > ul > li:nth-child(even) { float: left; width: 30%; }
}
/* in between, default to 1-column legend */
@media (max-width: 768px) {
    /* 2-column legend list */
    .legend > ul { width: 100%; overflow: hidden; }
    .legend > ul > li:nth-child(odd) { float: left; width: 70%; }
    .legend > ul > li:nth-child(even) { float: left; width: 30%; }
}

/*details > summary { font-size: 20px; }*/

#latest {
  font-size: 16px;
  padding-left: 20px;
  list-style-type: square;
}

#contact {
  font-size: 16px;
}
#contact .octicon,#contact .fab,#contact .fas {
  margin-top: 4px;
}

a,a:hover,a:active,a:focus,
nav#pgs a:hover,nav#pgs a:active { color: var(--pg-color); }

nav#pgs a.upnav:hover,nav#pgs a.upnav:active { color: #000; text-decoration: underline; text-decoration-color: #bbb; }

body.pg-about div.main-region a,body.pg-about .well a  { text-decoration: underline; text-decoration-color: #bbb; /*background-color: rgba(0, 0, 0, .05); border-radius: 3px;*/ }
body.pg-about div.main-region a:hover,body.pg-about div.main-region a:active { color: #000; background-color: rgba(0, 0, 0, .03); }

body.pg-teaching .current { }
body.pg-teaching .term { font-variant: small-caps; }
body.pg-teaching .details > li > a:first-of-type {
  padding-left: 4px; padding-right: 4px; border-radius: 3px;
  font-weight: bold; background-color: #ee0; color: #444;
}

ul.details { list-style-type: none; padding-left: 5px; }
ul.details > li > ul { list-style-type: none; padding-left: 20px; }
body.pg-teaching ul.details > li,body.pg-teaching ul.details > li > ul > li { margin-top: 5px; }

/* image hover fade from grayscale effect https://gist.github.com/gedankennebel/a4c9367cda02ad7e826f */
a:hover img.grayscale-fade {
  -webkit-filter: grayscale(0%);
  -webkit-transition: .5s ease-in-out;
  -moz-filter: grayscale(0%);
  -moz-transition: .5s ease-in-out;
  -o-filter: grayscale(0%);
  -o-transition: .5s ease-in-out;
  filter: grayscale(0%);
}

img.grayscale-fade {
  -webkit-filter: grayscale(100%);
  -webkit-transition: .5s ease-in-out;
  -moz-filter: grayscale(100%);
  -moz-transition: .5s ease-in-out;
  -o-filter: grayscale(100%);
  -o-transition: .5s ease-in-out;
  filter: grayscale(100%);
}


/* menu wheel */

.circle {
  color: #333;
  text-align: center;
  width: 100px;
  height: 100px;
  -moz-border-radius: 55px;
  -webkit-border-radius: 55px;
  border-radius: 55px;
  border: solid 5px #222;
  margin-left: auto; margin-right: auto;
}
.circlelink {
  color: #333; text-decoration: none;
  display: block;
  font-family: 'Open Sans Condensed', sans-serif;
  font-size: 24pt;
  text-align: center;
}
.circlelink > span { display: block; }
.circlelink > span > span {
  font-size: 64px;
  padding: 18px 0px 18px 0px;
}

body.pg-research,.circlelink.research > .circle,nav#pgs > a.research { --pg-color: #f93; }
body.pg-papers,.circlelink.papers > .circle,nav#pgs > a.papers { --pg-color: #f09; }
body.pg-teaching,.circlelink.teaching > .circle,nav#pgs > a.teaching { --pg-color: #cccc00; }
body.pg-group,.circlelink.group > .circle,nav#pgs > a.group { --pg-color: #96e; }
body.pg-blog,.circlelink.blog > .circle,nav#pgs > a.blog { --pg-color: #0b0; }
body.pg-code,.circlelink.code > .circle,nav#pgs > a.code { --pg-color: #09f; }

/* hex-friendly, less saturated:  #f09 #f93 #f3ff33 #0d0 #09f #96e */
/* more saturated:      #ff0080 #ff8000 #f3ff00 #00ff00 #0080ff #cc1cff */


.circlelink > .circle,.container.main-region,.container.main-region .page-header { border-color: var(--pg-color); }
.pg-icon { font-size: 95%; color: var(--pg-color); text-shadow: none; position: absolute; left: -1.5em; bottom: 10px; }
/* Override color in table of contents plugin */
nav[data-toggle="toc"] .nav > li > a:focus,
nav[data-toggle="toc"] .nav > li > a:hover {
  color: var(--pg-color);
  border-color: var(--pg-color);
}
nav[data-toggle="toc"] .nav > .active:focus > a,
nav[data-toggle="toc"] .nav > .active:hover > a,
nav[data-toggle="toc"] .nav > .active > a {
  color: var(--pg-color);
  border-color: var(--pg-color);
}
nav[data-toggle="toc"] { min-height: 50pt; }

nav#pgs a { color: inherit; } /* don't color nav icons by default */
nav#pgs { background-color: #eee; margin-left: -15px; margin-right: 15px;
  text-align: center; }
nav#pgs > .upnav { margin-right: 10px; }

/* in small nav menu, color the current page's icon */
body.pg-research nav#pgs > a.research { color: var(--pg-color); }
body.pg-papers nav#pgs > a.papers { color: var(--pg-color); }
body.pg-teaching nav#pgs > a.teaching { color: var(--pg-color); }
body.pg-group nav#pgs > a.group { color: var(--pg-color); }
body.pg-blog nav#pgs > a.blog { color: var(--pg-color); }
body.pg-code nav#pgs > a.code { color: var(--pg-color); }

/* Override fixed position in table of contents */
@media (max-width: 767px) {
    .affix {
        position: static;
    }
}
@media (min-width: 767px) {
    .affix {
        width: inherit;
        height: 100vh;
    }
    .affix > #datestamp { position: absolute; bottom: 0; right: 30px; }
    .affix > #toc { width: 75%; }
}
#datestamp,.more-latest { color: #aaa; font-size: 14px; text-align: right; }
.more-latest { float: left; list-style-type: none; margin-left: -1em; padding-top: 5px; }
.more-latest:hover { text-decoration: underline; cursor: pointer; }

/*
.circlelink.research > .circle,.container.research,.container.research .page-header { border-color: #f93; }
.circlelink.papers > .circle  ,.container.papers  ,.container.papers .page-header { border-color: #f39; }
.circlelink.teaching > .circle,.container.teaching,.container.teaching .page-header { border-color: #f3ff33; }
.circlelink.group > .circle   ,.container.group   ,.container.group .page-header { border-color: #96e; }
.circlelink.blog > .circle    ,.container.blog    ,.container.blog .page-header { border-color: #3d3; }
.circlelink.code > .circle    ,.container.code    ,.container.code .page-header { border-color: #09f; }
a.circlelink.code:visited > .circle { color: #09f; }
*/
a.circlelink:hover { text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2); text-decoration: none; color: #333; }


/* undo Bootstrap border-bottom that results in double underlining on Firefox and Chrome */
abbr[title] {
  border-bottom: none;
  text-decoration: underline;
  text-decoration-style: dotted;
  -webkit-text-decoration-style: dotted;
}


.wheel-container .wheel-row { margin:20px; text-align: center;}
.wheel-container .wheel-row > .circlelink { margin:0 20px; width: 150px;
  display: inline-block; vertical-align: middle; }
/* hack to align vertical-align: middle on contents http://codepen.io/edge0703/pen/iHJuA */
.wheel-container .wheel-row:before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  height: 100%;
}

/* <680px = not wide enough for the wheel */
@media only screen and (max-width : 680px) {
  /*body { background-color: black; }*/
  .wheel-container { display: table; position: relative; }
  .wheel-container .wheel-row { margin: 0; }
  .wheel-container .wheel-row::before { display: none; }
.wheel-container .wheel-row > .circlelink { width: unset; display: block; text-align: left; /*position: absolute; left: 0; top: unset;*/ }
  .circlelink > span { display: inline-block; }
  .circlelink > span.circle { width: 75px; height: 75px; }
  .circlelink > span > span { font-size: 24pt; }
}

/***********************/
/******* PAPERS ********/
/***********************/

.pubs-list { list-style-type: none; /*letter-spacing: -.03em;*/ font-size: 0.9em; padding-left: 0; }
.pubs-list > li { color: #444; margin-left: 0em; padding-top: 2em; clear: left;
					text-indent: 0em; line-height: 1.15;
					counter-increment: list; }
.pubs-list > li:first-child { padding-top: 0.5em; }
.pubs-list > li > a,.pubs-list > li:hover > a { color: #000; }
.pubs-me:before { content: "*"; color: #f39; }
.pubs-equal:after { content: "="; vertical-align: super; font-size: 80%; font-weight: bold; color: #f39; }
.pubs-title { background-color: #fff;
	border: 1px solid #aaa; border-radius: 4px;
	font-family: "Open Sans"; font-weight: 300;
	color: #333; letter-spacing: .02em; font-size: 120%; line-height: 1.2;
	display: block; width: 100%;
	margin-left: 0; margin-top: 4px; margin-bottom: 4px;
	padding: 0.4em 1em; text-indent: 0;
/* TODO: test margin, padding changes in IE */
}
.pubs-title:before { content: counter(list, decimal-leading-zero); position: absolute; left: .7em;
					 font-size: 0.85em; color: #aaa; background-color: #fff; }
.pubs-list > li:only-child .pubs-title:before { content: none; }

li:hover .pubs-title {
	/*background-color: #fff;*/
  border-color: var(--pg-color);
}
.pubs-venue { white-space: nowrap; margin-left: -2em; }
.pubs-list li .bib { white-space: pre-wrap; font-family: monospace; }
.pubs-list li .meta > span { display: block; margin-left: -2em; padding: 0.5em; }
.pubs-list li .meta a.selected { font-weight: bold; }

/* Content type images from https://www.zotero.org/trac/browser/extension/trunk/chrome/skin/default/zotero/ */
.pubs-list li .content { font-size: 0; text-decoration: none !important; display: inline-block; line-height: 30px; position: relative; background-repeat: no-repeat; width: 16px; height: 16px; }
.pubs-list li .content.conference { background-image:url('img/pubs/conferencePaper.png'); }
.pubs-list li .content.article { background-image:url('img/pubs/journalArticle.png'); }
.pubs-list li .content.toappear { opacity: 0.3; filter:alpha(opacity=40); }
.pubs-list li .content.report { background-image:url('img/pubs/report.png'); }
.pubs-list li .content.slides { background-image:url('img/pubs/videoRecording.png'); }
.pubs-list li .content.video { background-image:url('img/pubs/tvBroadcast.png'); }
.pubs-list li .content.poster { background-image:url('img/pubs/artwork.png'); }
.pubs-list li .content.booksection { background-image:url('img/pubs/bookSection.png'); }

.pubs-details { /*white-space: nowrap;*/ display: block; padding-left: 4em; /*text-indent: -2em;*/ }
.pubs-details a { white-space: nowrap; }
.pubs-details .abstract,.pubs-details .errata,.pubs-details .bib,pubs-details .note,.pubs-details .software,.pubs-details .press { white-space: normal; }



/*
 * Fix Bootstrap bug with <details>/<summary>
 */

summary {
  display: list-item;
}

/* From Bootstrap 4, for modal dialog */

#contactModal .panel-body a { text-decoration: underline; }

.modal-title { font-size: 1.25rem }

.modal-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
  border-top-left-radius: .3rem;
  border-top-right-radius: .3rem;
}

.modal-header .close {
  padding: 1rem;
  margin: -1rem -1rem -1rem auto;
}

.close {
  float: right;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: .5;  
}
.close:focus, .close:hover {
  color: #000;
  text-decoration: none;
  opacity: .75;
}
.close:not(:disabled):not(.disabled) {
  cursor: pointer;
}

/*
// Additional properties for button version
// iOS requires the button element instead of an anchor tag.
// If you want the anchor version, it requires `href="#"`.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile

// stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type
*/
button.close {
  padding: 0;
  background-color: transparent;
  border: 0;
  -webkit-appearance: none;
}
