@font-face {
    font-family: "chaparral-pro";
    src: url("/font/ChaparralPro-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "p22-underground";
    src: url("/font/P22-Underground.woff2") format("woff2");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Operator Mono SSm";
    src: url("/font/OperatorMonoSSm-Book.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
  color: #222;
  font-family: "chaparral-pro", serif;
  font-weight: 400;
  font-size: 14pt;
  line-height: 1.4em;
  margin: 0 5%;
}

a {
  color: #222;
  text-decoration-color: #222;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:visited { text-decoration-color: #AAA; }
a:hover, a:visited:hover { text-decoration-color: transparent; }
a.image { text-decoration: none; }

h1, h2, h3, h4 {
  font-family: "p22-underground", sans-serif;
  line-height: 1.5em;
  margin-bottom: 0.3em;
}

h3.subtitle {
  margin-top: -0.3em;
}

.clear { clear: both; }


#header {
  margin: 2em 1em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 2em;
}

#header h1 {
  margin: 0;
}

#header nav {
  display: flex;
  gap: 0 1em;
}

#content {
  margin: 0 4em;
  min-width: 25em;
  max-width: 40em;
}


#footer {
  margin: 6em 4em 3em 4em;
  font-size: 0.8rem;
  text-align: right;
}


/** Posts list on homepage **/
#content.home {
  display: flex;
  flex-direction: row;
  column-gap: 3em;
  justify-content: space-between;
  max-width: 100%;
}

h2.year {
  margin-top: 0;
  clear: left;
}

.posts {
  flex: 1;
}

.posts ul, .notes ul {
  margin: 0 0 0 0;
  padding: 0 0 3.5rem 0;
  list-style: none outside;
  position: relative;
}

.posts li {
  line-height: 1.25em;
  clear: left;
}

.posts .post-date {
  position: absolute;
  left: 0;
  font-family: "Operator Mono SSm Book", Menlo, Monaco, monospace;
  font-size: 1rem;
}

.posts .post-name {
  float: left;
  margin-left: 5em;
  padding-bottom: 0.5em;
}

.notes {
  max-width: 30em;
  flex: 0.75;
}

.notes ul {
  padding-bottom: 1em;
}

.notes .note-link {
  text-align: right;
}

.notes .date {
  font-family: "Operator Mono SSm Book", Menlo, Monaco, monospace;
  font-size: 1rem;
}

/** Post show page **/
.post-date {
  float: right;
  margin: 0;
}

.post-title {
  clear: right;
}

.last-post {
  float: left;
}

.next-post {
  float: right;
}

.callout {
  display: block;
  background-color: #F2F2F2;
  padding: 10px 15px;
}


code {
  background-color: #F2F2F2;
  font-size: 0.9em;
}

pre {
  overflow: hidden;
  background-color: #F2F2F2;
  padding: 10px;
  line-height: 1.0em;
}

pre code {
  background-color: transparent;
  overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
  white-space: pre-wrap; /* css-3 */
  white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
  white-space: -pre-wrap; /* Opera 4-6 */
  white-space: -o-pre-wrap; /* Opera 7 */
  width: 99%;
  word-wrap: break-word; /* Internet Explorer 5.5+ */
}

.gist {
  font-size: 0.8rem;
}

small, .aside {
  font-size: 0.75rem;
  display: inline-block;
  line-height: 1.4;
}

#content img {
  width: 100%;
}


/* Talks page */

.talk-title {
  font-family: "p22-underground", sans-serif;
  font-weight: 600;
  margin-left: 0;
  margin-top: 1em;
  clear: both;
}

.talk-info {
  padding-left: 40px;
  font-size: 1rem;
  line-height: 1.25em;
}

.talk-description {
  margin-bottom: 0;
}

.talk-post {
  display: inline-block;
  margin-top: 1em;
}

ul.talk-events {
  list-style-type: none;
  margin-top: 1.5em;
  padding: 0;
}

.talk-event {
  clear: both;
  font-size: 0.9rem;
}

.talk-event-date {
  float: left;
  clear: left;
  margin-right: 1em;
  font-family: "Operator Mono SSm Book", Menlo, Monaco, monospace;
  line-height: 1rem;
}

.talk-event-name {
  float: left;
  font-size: 1rem;
  line-height: 1rem;
}

.talk-event-slides, .talk-event-video {
  display: block-inline;
  margin-left: 1.5em;
  margin-right: 0;
}

.group:after {
  content: "";
  display: table;
  clear: both;
}

.resume-entry {
  margin: 2em 0 1.5em 0;
}

.resume-client {
  margin: 0.5em 0 0.5em 2em;
}

.resume-info {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  gap: 0 0.25em;
}

.resume-company, .resume-location {
  text-align: right;
}

.resume-title {
  font-family: "p22-underground", sans-serif;
}

.resume-client .resume-title {
  font-family: "chaparral-pro", sans-serif;
}

.resume-location {
  font-style: italic;
}

.resume-body {
  display: flex;
  margin-bottom: 0.5em;
}

.resume-body:before {
  content: " ";
  flex: 0 0 0.2em;
  background-color: #DDD;
  margin: 5px 0.4em 8px 0.4em;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: black;
    color: #DDD;
  }

  a {
    color: #DDD;
  }

  .callout, code, pre {
    background-color: #262626;
  }
}

@media only screen and (max-width: 700px) {
  body {
    margin: 0;
    padding: 0 10px;
    min-width: auto;
    max-width: auto;
  }

  #header {
    margin: 0;
    padding-bottom: 1em;
  }

  #content {
    margin: 0;
    width: 100%;
    min-width: auto;
    max-width: auto;
  }

  .posts .post-name {
    float: left;
    margin-left: 4em;
    padding-bottom: 0.5em;
  }

  #footer {
    margin: 0;
    width: 100%;
  }
}

@media only screen and (max-width: 1024px) {
  #content.home {
    flex-direction: column-reverse;
  }

  #content.home .notes {
    margin-bottom: 1em;
  }

  #content.home .notes ul li:nth-child(n+2) {
    display: none;
  }
}

@media only screen and (max-width: 1200px) {
  body {
    margin: 1rem;
    padding: 0 10px;
    min-width: auto;
    max-width: auto;
  }

  #header {
    margin: 0;
    padding-bottom: 1em;
  }

  #content {
    margin: 0;
    width: 100%;
  }

  .posts .post-name {
    float: left;
    margin-left: 4em;
    padding-bottom: 0.5em;
  }

  #footer {
    margin: 0;
    width: 100%;
  }
}
