/* Some CSS cribed from Emina Torlak's webpage: https://homes.cs.washington.edu/~emina/ */
/* Contact & Bio */
/** Contact */
#contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.portrait {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 50%;
  background-size: cover;
}

/*** Portrait Title */
.portrait-title {
  margin: 1em auto;
  text-align: center;
}

.portrait-title h3 {
  margin: 0;
}

/*** Contact Links */
.big-icon {
  font-size: 2rem;
}

#contact a {
  border: none;
}

.contact-links {
  display: flex;
  justify-content: space-between;
  width: 200px;
}

.contact-link-item {
  flex: auto;
}

/** Post RSS */
.with-feed {
  display: flex;
  justify-content: space-between;
}

/********** Content *********/
section {
  margin-top: 3em;
}

a {
  color: rgb(0, 0, 0, 0.8);
  text-decoration: none;
  border-bottom: #bbb 0.1em dotted;
}

a:hover,
a:focus {
  background: #fbf3f3;
  transition-property: background;
  transition-duration: 0.2s;
}

/** Remove link styling */
a.unstyled-link {
  border: none;
}

a.unstyled-link:hover,
a.unstyled-link:focus {
  background: none;
}

/********** Layout **********/
body {
  margin: auto;
  width: 80%;
  max-width: 600px;
  background-color: #fffff8;
}

header {
  display: flex;
  flex-flow: row wrap;
  border-bottom: 1px solid #ddd;
  margin-top: 20px;
  justify-content: center;
}

.name {
  white-space: nowrap;
}

header h1 {
  margin-top: 0;
}

header a {
  color: #333333;
}

nav {
  flex: 0 0;
  height: 45px;
  white-space: nowrap;
  display: flex;
  align-content: end;
  align-items: end;
  justify-content: space-between;
}

a.nav-item {
  font-variant: small-caps;
  flex: 1;
  display: block;
  margin: 17px 0 0 0;
  padding: 0;
  text-transform: uppercase;
  font-weight: 500;
  text-align: center;
  border: none;
  border-bottom: 2px solid #fff;
  margin-right: 1em;
  margin-left: 1em;
}

a.nav-item:last-child {
  margin-right: 0;
}

a.nav-item:first-child {
  margin-left: 0;
}

a.nav-item:hover,
a.nav-item:focus {
  transition-property: border-bottom;
  border-bottom: 2px solid #000;
  transition-duration: 0.2s;
  background: none;
}

nav a.active {
  color: #A6A6AF;
}

.container {
  margin-top: 30px;
  margin-bottom: 30px;
}

footer {
  border-top: 1px solid #ddd;
  padding-top: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  font-weight: 300;
  font-size: 80%;
  text-align: center;
}

/********** Basic styling **********/

html,
button,
input,
select,
textarea {
  font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
}

body {
  font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: #333333;
  text-rendering: optimizeLegibility;
  /*hyphens: auto;*/
  counter-reset: sidenote-counter;

}

h1,
h2 {
  margin-top: 1em;
  margin-bottom: 0.1em;
}

h3 {
  margin-top: 0.5em;
}

h1,
h2,
h3 {
  font-weight: 300;
  hyphens: none;
}

/* Subsubheadings are a crutch. Don't use them. */
h4,
h5,
h6 {
  color: red;
}

h1 {
  font-size: 36px;
  line-height: 1.25;
  letter-spacing: -1px;
}

h2 {
  font-size: 24px;
  line-height: 1.35;
}

h3 {
  font-size: 20px;
  line-height: 1.5;
}

hr {
  width: 10rem;
  border: 0;
  height: 1px;
  background: #aaa;
  text-align: left;
  margin-left: 0
}

p {
  margin: 15px 0px 15px 0px;
  max-width: 600px;
  text-align: left;
}

ul {
  list-style: circle;
}

ol {
  list-style: decimal;
}

ol,
ul {
  margin-top: 0;
}

/*li { margin-bottom: 0; }*/

pre {
  font-size: 90%;
  /*white-space: nowrap;*/
  border-radius: 5px;
  max-width: 600px;
  padding-left: 1em;
}

pre {
  background-color: #fffff8;
  border-left: 2px solid #aaa;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-top: 1px solid #E1E1E1;
  border-bottom: 1px solid #E1E1E1;
}

th:first-child,
td:first-child {
  padding-left: 0;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

figcaption {
  margin-top: 15px;
  font-size: 80%;
}

dt {
  margin-top: 15px;
}

/** Publication styling */
.publication {
  margin-bottom: 0.8em;
  display: flex;
  flex-flow: row wrap;
}

.publication-venue {
  font-weight: 300;
  vertical-align: top;
  flex: 1 100%;
}

.publication-venue i {
  font-weight: 400;
}

.publication-details {
  vertical-align: top;
  flex: 1 100%;
  margin-left: 1em;
  flex: 1 1;
}

.publication-title {
  font-size: 1.1em;
  line-height: 1.25;
  hyphens: none;
  margin-bottom: 0.2em;
}

.publication-author {
  font-size: 0.92em;
  color: #111;
}

.publication-highlight {
  color: black;
  font-weight: bold;
}

.publication-link>a {
  font-size: 0.92em;
  margin-left: -0.6em;
  margin-right: 0.2em;
}

/** Post Styling */

.post-tease {
  color: #999;
  font-size: 0.9em;
}

.post img {
  max-width: 90%;
}

.post h2 {
  padding-top: 15px;
  margin-top: 30px;
  max-width: 600px;
}

.post-header .date {
  margin-top: -0.3em;
}

.post-header {
  margin-bottom: 2em;
}

/*** Sidenotes */
.sidenote::before {
  content: counter(sidenote-counter) " ";
  font-size: 75%;
  top: -0.5rem;
}

.sidenote,
.marginnote {
  float: right;
  clear: right;
  margin-right: -60%;
  width: 300px;
  margin-top: 0.3rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.3;
  vertical-align: baseline;
  position: relative;
}

.sidenote-number {
  counter-increment: sidenote-counter;
}

.sidenote-number::after {
  content: counter(sidenote-counter);
  display: inline-block;
  font-size: 80%;
  /* Remove space before and after footnote in markdown */
  margin-left: -0.5em;
  top: -0.5rem;
  left: 0.1rem;
}

.sidenote-number::after,
.sidenote::before {
  position: relative;
  vertical-align: baseline;
}

label.sidenote-number {
  display: inline;
}

input.margin-toggle {
  display: none;
}

label.margin-toggle:not(.sidenote-number) {
  display: inline;
}


@media (max-width: 1130px) {
  label.margin-toggle:not(.sidenote-number) {
    display: inline;
  }

  .sidenote,
  .marginnote {
    display: none;
  }

  .margin-toggle:checked+.sidenote,
  .margin-toggle:checked+.marginnote {
    display: block;
    float: left;
    left: 1rem;
    clear: both;
    width: 95%;
    margin: 1rem 2.5%;
    vertical-align: baseline;
    position: relative;
  }

  label {
    cursor: pointer;
  }
}

label.sidenote-number {
  display: inline;
}

label.margin-toggle:not(.sidenote-number) {
  display: none;
}

/*** Footnotes */
.footnote-definition>p {
  display: inline;
}

.footnote-definition {
  margin-bottom: 1em;
}

/********** Additional styling **********/

div.footnotes {
  max-width: 600px;
  border-top: 1px dashed #AAAAAA;
  margin-top: 40px;
  font-size: 80%;
}

.center {
  text-align: center;
}

.date {
  font-weight: 300;
  text-align: left;
}

.blurb {
  margin-bottom: 0.8em;
  display: flex;
  flex-flow: row wrap;
}

.blurb>.date {
  vertical-align: top;
  flex: 1 100%;
}

.blurb>.description {
  vertical-align: top;
  margin-left: 1em;
  flex: 1 1;
}

.blurb>.description>.title {
  vertical-align: top;
}

.blurb p {
  display: inline;
}

@media screen and (min-width: 585px) {
  .name {
    flex: 1 0;
  }

  a.nav-item:first-child {
    margin-left: 2em;
  }
}

@media screen and (min-width: 800px) {
  .blurb>.date {
    text-align: right;
    flex: 0 0 65px;
  }

  .blurb {
    margin-bottom: 4px;
  }

  .publication-venue {
    margin-left: 1em;
    text-align: right;
    flex: 0 0 90px;
  }

}

@media screen and (min-width: 900px) {
  body {
    margin-left: 14%;
  }
}