:root {
  --page-background-color: #111;
  --page-background-dark-color: #000;
  --page-text-color: #eee;
  --text-background-color: #fcfcfc;
  --text-min-width: 25em;
  --text-min-width-mobile: 10em;
  --text-max-width: 35em;
  --shadow-color: #000;
  --border-color-light: #ccc;
  --border-color-dark: #000;
}

html {
  background-color: var(--page-background-dark-color);
}

body {
  background-color: var(--page-background-color);
}

html,
body {
  font: 1.1em Georgia, serif;
  line-height: 150%;
  padding: 0;
  margin: 0;
  text-align: left;
  color: var(--page-text-color);
}

@media print {

  html,
  body {
    background-color: #fff;
    color: #000;
  }
}

@media print {
  body {
    margin: 0 12pt;
    font-size: 12pt;
  }
}

a:link,
a:visited {
  color: inherit;
}

@media print {
  a {
    text-decoration: none;
  }
}

#header {
  min-width: 29em;
  background-color: #000;
  background: url('/images/header.jpg') bottom;
  background-size: cover;
}

@media print {

  #header,
  #footer,
  object {
    display: none;
  }
}

#title {
  font-weight: bold;
  color: #eee;
}

#title h1 {
  margin: 0 0.4em 0.4em;
  padding-top: 0.5em;
}

#title,
#menu {
  text-shadow: 0 0 4px var(--shadow-color);
  text-align: center;
}

h1 {
  font-size: 2.5em;
}

h1 a:link,
h1 a:visited,
h2 a:link,
h2 a:visited,
#menu a:link,
#menu a:visited,
.post_date a:link,
.post_date a:visited {
  text-decoration: none;
}

h1 a:hover,
h2 a:hover,
#menu a:hover,
.post_date a:hover {
  text-decoration: underline;
}

@media print {

  h1,
  h2,
  h3,
  h4,
  h5,
  img,
  svg,
  table,
  video,
  canvas {
    page-break-inside: avoid;
    page-break-after: avoid;
  }

  h1 a::after,
  h2 a::after,
  h3 a::after,
  h4 a::after,
  h5 a::after {
    content: " (" attr(href) ")";
  }
}

#menu {
  font-weight: bold;
  font-size: 1.2em;
  text-decoration: none;
  text-transform: lowercase;
  padding: 0.25em 0 0.25em 0;
}

#menu li {
  display: inline-block;
  position: relative;
}

#menu a {
  padding: 0 0.5em;
  width: 100%;
  line-height: 125%;
}

#main {
  background-color: var(--text-background-color);
  color: var(--page-background-dark-color);
  border-bottom: solid var(--border-color-dark) 1px;
}

@media print {
  #main {
    border-bottom: none;
    background-color: #fff;
    color: #000;
  }
}

@media (prefers-color-scheme: dark) {
  #main {
    background-color: var(--page-background-color);
    color: var(--page-text-color);
  }
}

#main,
#footer {
  padding: 0 1em;
  min-width: calc(var(--text-min-width) + 2em);
}

#content,
#sidebar {
  margin: 0 auto;
  min-width: var(--text-min-width);
  max-width: var(--text-max-width);
  word-wrap: break-word;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
}

pre {
  overflow-x: scroll;
}

.type-post,
.type-page {
  padding-bottom: 2em;
}

p {
  margin-block-start: 0.25em;
}

@media print {
  p {
    page-break-inside: avoid;
  }
}

h2 {
  font-weight: bold;
  font-size: 1.8em;
  line-height: 110%;
  margin: 0;
  padding: 0.5em 0 0 0;
}

.post_date {
  font-style: normal;
  font-size: 1.2em;
  margin: 0.2em 0;
}

img {
  text-decoration: none;
  border: none;
}

#content img,
#content video,
td img,
td video {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  height: auto;
}

#content video,
td video {
  border: 1px solid var(--border-color-light);
}

#content embed,
#content object,
#content iframe {
  max-width: 100%;
}

@media print {
  #content {
    padding: 0;
    margin: 0;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
  }
}

h3,
#toctitle {
  font-size: 1.4em;
  margin: 1.5em 0 0 0;
}

h4 {
  font-size: 1.2em;
  margin: 1.5em 0 0 0;
}

h5 {
  font-size: 1em;
  margin: 1.5em 0 0 0;
}

#content img,
td img {
  padding: 4px;
  border: 1px solid var(--border-color-light);
  border-radius: 5px;
  background-color: var(--text-background-color);
}

.index-lists p img,
.type-post img {
  display: block;
  margin-bottom: 4px;
}

.speakerdeck-thumb {
  width: 321px;
  height: 181px;
  float: left;
  margin: 0 1em 1.5em 0;
  padding-top: 0.6em;
}

.speakerdeck-thumb img {
  padding: 0 !important;
  max-height: 181px;
}

@media only screen and (max-device-width: 730px) {
  .speakerdeck-thumb {
    float: none;
  }
}

table caption {
  font-weight: bold;
  font-size: 1.1em;
  text-align: left;
}

table {
  width: 100%;
}

table,
thead,
tr,
td,
th {
  border: none;
  border-collapse: collapse;
}

thead th,
tbody td {
  text-align: center;
  padding: 0 0.2em;
}

th,
tfoot {
  font-weight: bold;
  border: 1px var(--border-color-dark) none;
}

#sidebar {
  margin-top: 1em;
}

#sidebar th,
#sidebar tfoot {
  border-color: var(--page-text-color);
}

th {
  text-align: center;
  border-bottom-style: solid;
}

tfoot {
  border-top-style: solid;
}

.noborder,
.noborders img {
  border: none !important;
}

blockquote {
  font-size: 1.2em;
}

blockquote::before {
  display: block;
  font-size: 4em;
  content: "\201C";
  height: 0;
  margin: 0.5em 0 -0.3em -0.45em;
}

#latest-posts {
  padding-bottom: 2em;
}

#latest-posts h3 {
  margin-top: 0;
}

#newsletter {
  border: 1px solid var(--border-color-light);
  margin-bottom: 3em;
  padding: 0 1em 1em 1em;
  text-align: center;
  border-radius: 5px;
}

#newsletter-email {
  border: 1px solid var(--border-color-light);
  margin-top: 0.5em;
  font-size: 1.2em;
  padding: 0.1em;
  text-align: center;
  width: 20.5em;
}

#newsletter-submit {
  border: 1px solid var(--border-color-light);
  font-size: 1em;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--text-background-color);
  color: var(--page-background-dark-color);
  border-radius: 5px;
  padding: 0.25em 0.5em;
  box-shadow: 0 1px 1px var(--border-color-light);
}

#footer {
  background-color: var(--page-background-dark-color);
  padding: 0.5em 1em;
}

#leftbar {
  width: 60%;
  float: left;
}

#rightbar {
  width: 40%;
  float: right;
}

.sidebartext {
  font-size: 0.8em;
  padding-right: 1em;
}

#sidebar h2 {
  font-size: 1.2em;
  margin: 0.5em 0 0 0;
}

.index-lists h2 {
  font-size: 1.2em;
}

.index-lists ul,
.stealth-lists ul {
  padding: 0;
}

.index-lists li,
.stealth-lists li {
  list-style: none;
  margin-bottom: 1.5em;
}

.index {
  padding-top: 1em;
}

@media only screen and (max-device-width: 730px) {
  .talks h2 {
    margin-top: 0;
    padding-top: 0;
  }

  .talks li {
    margin-bottom: 3.5em;
  }
}

#sidebar ul,
#menu ul {
  padding: 0;
  margin: 0;
}

#sidebar li,
#menu li {
  list-style: none;
}

.index-lists {
  margin-top: 0;
  padding-left: 0;
}

.clearboth {
  clear: both;
}

@media print {
  #referencesreferences {
    display: none;
  }
}

#references-available-on-request {
  display: none;
}

@media print {
  #references-available-on-request {
    display: inherit;
  }
}

details>summary {
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  margin: 1em 0;
}

details>summary ul {
  padding: 0;
  margin: 0;
}

.type-thought {
  margin: 0 0 2em 0;
  padding-top: 1.5em;
}

.thoughts-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25em;
}

.index-lists .thought-card {
  margin-bottom: 2em;
}

.thought-card {
  border: 1px solid var(--border-color-light);
  border-radius: 10px;
  padding: 1em 1em 0.5em 1em;
}

.thought-header {
  display: flex;
  align-items: flex-start;
  gap: 0.65em;
  text-align: left;
}

.thought-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50% !important;
  object-fit: cover;
  padding: 0 !important;
  margin: 0.1em 0 0 0 !important;
}

.thought-meta {
  display: flex;
  flex-direction: column;
}

.thought-author {
  font-weight: bold;
  font-size: 1.05em;
}

.thought-date {
  color: #555;
  font-size: 0.95em;
}

@media (prefers-color-scheme: dark) {
  .thought-date {
    color: #cdd1da;
  }
}

.thought-body p {
  margin-block-start: 0.5em;
  margin-block-end: 0.5em;
}

.thought-link-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color-light);
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.5em;
}

.thought-link-card-image img {
  width: 100%;
  height: auto;
  max-height: 200px;
  display: block;
  object-fit: cover;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.thought-link-card-body {
  padding: 0.3em 0.75em 0.5em 0.75em;
}

.thought-link-card-host {
  font-size: 0.8em;
  opacity: 0.7;
}

.thought-link-card-title {
  font-weight: bold;
}

.thought-link-card-description {
  font-size: 0.95em;
  opacity: 0.8;
}

.interview-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-top: 0.4em;
  margin-bottom: 0.5em;
  padding-bottom: 0.7em;
}

.interview-media-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.interview-audio-embed {
  width: 100%;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.index-lists.index .interview-card {
  padding-bottom: 0.7em;
}

.thought-actions {
  display: flex;
  gap: 0.75em;
}

.thought-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  padding: 0.5em 0.25em;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  background: var(--text-background-color);
  color: inherit;
  font-family: sans-serif;
  font-size: 18px;
  flex: 1 1 0;
  text-decoration: none;
}

.thought-button svg {
  fill: currentColor;
}

.thought-button:hover {
  background: color-mix(in srgb, var(--text-background-color) 90%, #000);
}

@media (prefers-color-scheme: dark) {
  .thought-button {
    background-color: var(--page-background-color);
  }

  .thought-button:hover {
    background: color-mix(in srgb, var(--page-background-color) 90%, #fff);
  }
}

.thought-js-button {
  display: none;
}

@media only screen and (max-device-width: 480px) {

  html,
  body {
    font-size: 1em;
    line-height: 125%;
  }

  h1 {
    font-size: 2.1em;
  }

  h2 {
    font-size: 1.4em;
  }

  h3,
  #toctitle {
    font-size: 1.2em;
  }

  h4 {
    font-size: 1em;
  }

  .post_date {
    font-size: 1.1em;
  }

  #header,
  #main,
  #footer {
    min-width: calc(var(--text-min-width-mobile) + 2em);
  }

  #content,
  #sidebar {
    min-width: var(--text-min-width-mobile);
    margin: 0;
  }

  blockquote {
    margin-right: 0;
  }

  #newsletter-email {
    width: 12em;
  }

  .index-lists h2 {
    padding: 0;
  }

  .thought-actions {
    gap: 0.25em;
  }

  .thought-button {
    font-size: 0.9em;
    padding: 0.5em 0.15em;
  }
}
