* {
  box-sizing: border-box;
}

html {
  background: #fff;
  color: #111;
}

body {
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 56px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: #0000b8;
}

a:visited {
  color: #551a8b;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 7px;
  margin-bottom: 36px;
  padding-bottom: 10px;
  border-bottom: 1px solid #999;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;
  font-size: 2.25rem;
  line-height: 1.1;
}

h2 {
  margin-bottom: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid #bbb;
  font-size: 1.35rem;
}

h3 {
  margin-bottom: 3px;
  font-size: 1rem;
}

section {
  margin-top: 34px;
}

.intro {
  min-height: 180px;
}

.portrait-block {
  float: right;
  width: 150px;
  margin: 0 0 18px 24px;
  text-align: center;
}

.portrait {
  width: 100%;
  height: auto;
  display: block;
  padding: 3px;
  border: 1px solid #555;
}

.portrait-block figcaption {
  margin-top: 3px;
  font-size: 14px;
}

.contact,
.links,
.muted,
.venue {
  color: #444;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 7px;
  margin-bottom: 24px;
}

.links .link {
  white-space: nowrap;
}

.publications {
  padding-left: 24px;
}

.publications li,
.cv-list li,
.cv-pubs li {
  margin-bottom: 14px;
}

.publications p {
  margin-bottom: 2px;
}

.cv-head {
  text-align: center;
}

.cv-head p {
  margin-bottom: 8px;
}

.cv-entry {
  margin-bottom: 18px;
}

.cv-entry-head,
.cv-entry-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.cv-entry p {
  margin: 3px 0 0;
}

.cv-list,
.cv-pubs {
  padding-left: 24px;
}

.award {
  font-weight: bold;
}

.blog-head {
  margin-bottom: 30px;
}

.blog-head p,
.blog-meta {
  color: #444;
}

.blog-list {
  padding-left: 24px;
}

.blog-list li {
  margin-bottom: 24px;
}

.blog-list h2 {
  margin-bottom: 3px;
  padding: 0;
  border: 0;
  font-size: 1.1rem;
}

.blog-meta {
  margin: 0;
  font-size: 14px;
}

.article-shell {
  max-width: 700px;
  margin: 0 auto;
}

.article-head {
  margin-bottom: 32px;
}

.article-head h1 {
  margin-bottom: 8px;
  font-size: 2rem;
}

.article-byline,
.article-crosspost,
.article-postscript,
.article-shell figcaption {
  color: #555;
  font-size: 14px;
}

.article-byline {
  margin-bottom: 0;
}

.article-crosspost {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.article-shell h2 {
  margin-top: 38px;
}

.article-shell h3 {
  margin: 28px 0 7px;
  font-size: 1.1rem;
}

.article-shell p,
.article-shell li {
  line-height: 1.65;
}

.article-shell ol,
.article-shell ul {
  padding-left: 24px;
}

.sec-num {
  margin-right: 7px;
  color: #666;
}

.article-shell figure {
  margin: 32px 0;
}

.article-shell figure img,
.article-shell .figure-video {
  display: block;
  width: 100%;
  height: auto;
}

.article-shell figcaption {
  margin-top: 8px;
  line-height: 1.5;
}

.article-shell blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid #999;
}

.article-shell blockquote p {
  margin: 0;
}

.article-shell pre {
  margin: 0;
  overflow-x: auto;
  padding: 12px;
  border: 1px solid #bbb;
  background: #f7f7f7;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.article-shell code {
  font-family: Consolas, "Liberation Mono", monospace;
}

.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 22px 0 26px;
}

.code-grid section {
  min-width: 0;
  margin: 0;
}

.code-grid h3 {
  margin-top: 0;
  font-size: 14px;
}

.references {
  list-style: none;
  padding-left: 0 !important;
  font-size: 14px;
}

.references li {
  margin-bottom: 8px;
  padding-left: 16px;
  text-indent: -16px;
}

.article-back {
  margin-top: 38px;
  padding-top: 12px;
  border-top: 1px solid #999;
}

.photo-page img {
  display: block;
  width: 100%;
  height: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td {
  padding: 3px 0;
  vertical-align: top;
}

td:last-child {
  width: 4rem;
  text-align: right;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 44px;
  padding-top: 10px;
  border-top: 1px solid #999;
  color: #444;
  font-size: 14px;
}

footer p {
  margin: 0;
}

@media (max-width: 560px) {
  body {
    width: min(100% - 28px, 760px);
    padding-top: 18px;
  }

  .portrait-block {
    width: 112px;
    margin-left: 16px;
  }

  .cv-entry-head,
  .cv-entry-top,
  footer {
    display: block;
  }

  .cv-entry-head span,
  .cv-entry-top span {
    display: block;
    margin-top: 2px;
  }

  .article-head h1 {
    font-size: 1.7rem;
  }

  .code-grid {
    grid-template-columns: 1fr;
  }

  footer p + p {
    margin-top: 3px;
  }
}
