figure img {
    display: block;
    margin: auto;
    border: 2px solid lightgray;
    padding: 7px;
    box-shadow: 10px 10px 5px lightgray;
}

figure h4 {
    font-weight: 100;
    font-style: italic;
    text-align: center;
    margin-bottom: 20px;
}

div.post-content {
    font-size: 21px;
}
div.post-content table {
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 10px 0 25px;
}

div.post-content th,
div.post-content td {
    padding: 6px 24px 6px 0;
    border-bottom: 1px solid lightgray;
    text-align: left;
    vertical-align: top;
}

/* Home and tag page cards: every image fills the same 16:9 box, so titles
   line up across a row. */
.card .card-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
    background: #f5f5f5;
}

.card .card-img img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}

/* GitHub-style code blocks. */
div.post-content .highlight pre {
    margin: 10px 0 20px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.45;
    background-color: #f6f8fa !important;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    overflow-x: auto;
    word-break: normal;
    word-wrap: normal;
}

div.post-content .highlight pre code {
    white-space: pre;
    font-size: inherit;
    padding: 0;
    background: none;
}

/* GitHub-style inline code. */
div.post-content code {
    padding: 0.2em 0.4em;
    font-size: 85%;
    color: inherit;
    background-color: rgba(175, 184, 193, 0.2);
    border-radius: 6px;
}

/* Footer social links. */
.social-links {
    display: inline-flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-links a {
    display: inline-block;
    padding: 4px 8px;
    font-size: 1.5em;
    border-radius: 6px;
}

.social-links a:hover {
    opacity: 0.7;
}

.social-links a:focus {
    outline: none;
}

.social-links a:focus-visible {
    outline: 2px solid #2a78d6;
    outline-offset: 2px;
}

/* Object diagrams in the Object Oriented JavaScript papers. */
.obj-dumps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    margin: 0 0 1em 30px;
}

div.post-content table.obj-dump {
    display: table;
    width: auto;
    margin: 0;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 15px;
}

div.post-content table.obj-dump td {
    padding: 4px 8px;
    border: 1px solid #333;
    vertical-align: top;
    text-align: left;
}

div.post-content table.obj-dump td.obj-title,
div.post-content table.obj-dump td.obj-proto {
    background-color: tan;
    color: #000;
    font-weight: bold;
}

div.post-content table.obj-dump td.obj-proto {
    font-style: italic;
    font-weight: normal;
}

div.post-content table.obj-dump td.obj-name {
    font-weight: bold;
}

div.post-content table.obj-dump td.obj-value {
    font-family: monospace;
}

div.post-content table.obj-dump table.obj-dump {
    margin-top: 4px;
}

.code-output {
    display: inline-block;
    min-width: 16em;
    margin: 0 0 1em 30px;
    padding: 6px 10px;
    border: 1px solid #333;
    background-color: tan;
    color: #000;
    font-family: monospace;
    font-size: 16px;
}

/* The highlighter doesn't know #private names and marks the # as an error. */
div.post-content pre span[style*="background-color:#82071e"] {
    color: inherit !important;
    background-color: transparent !important;
}

/* Card titles: the full title, with the date underneath. */
.card .panel-title {
    line-height: 1.25;
    margin-bottom: 0.2em;
}

.card .post-meta {
    color: #777;
}

/* Headings: Fraunces for every heading (the theme names Raleway but never
   loads it), and no underline on post titles (the theme underlines them). */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.post-title {
    margin: 0.6em 0 0.3em;
    line-height: 1.2;
    text-decoration: none;
}
