:root {
  --bg: #f7f5ef;
  --text: #1f1f1f;
  --muted: #6b6b63;
  --link: #1d4f91;
  --rule: #dcd8cc;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 17px;
  line-height: 1.55;
}

main {
  max-width: 660px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

.photo {
  float: right;
  width: 180px;
  height: 180px;
  margin: 0 0 16px 28px;
  border-radius: 50%;
  object-fit: cover;
}

h1 {
  margin: 8px 0 6px;
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  clear: both;
  margin: 40px 0 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
  font-size: 19px;
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--link);
}

a:hover {
  text-decoration-thickness: 2px;
}

.contact {
  margin-bottom: 4px;
  color: var(--muted);
}

.links {
  margin-bottom: 18px;
}

.entry {
  margin-bottom: 20px;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.when {
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}

.entry p {
  margin: 4px 0 0;
}

@media (max-width: 560px) {
  main {
    padding-top: 32px;
  }

  .photo {
    float: none;
    display: block;
    width: 140px;
    height: 140px;
    margin: 0 0 16px;
  }

  .entry-head {
    flex-direction: column;
    gap: 0;
  }
}

/* Write-up pages */

.back {
  margin-bottom: 24px;
  font-size: 15px;
}

.writeup h2 {
  margin-top: 36px;
}

.writeup ol,
.writeup ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.writeup li {
  margin-bottom: 10px;
}

figure {
  margin: 20px 0 24px;
}

figure svg {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0 auto;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.d-box rect {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.2;
}

.d-remote rect {
  fill: var(--rule);
}

.d-text text {
  fill: var(--text);
  font-size: 14px;
}

.d-line path {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.2;
}

.d-head {
  fill: var(--text);
}

.d-note {
  fill: var(--muted);
  font-size: 12px;
}

pre {
  margin: 0 0 16px;
  padding: 12px 14px;
  overflow-x: auto;
  border-radius: 4px;
  background: #efece3;
  font-size: 14px;
  line-height: 1.45;
}

code {
  font-family: Consolas, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
}

pre code {
  font-size: inherit;
}

table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 16px;
}

th,
td {
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
