* {
  /* box-sizing: border-box; */
  /* border: 0.5px solid black; */
}

:root {
  --color-light-primary: #111;
  --color-light-secondary: #333;
  --color-light-background: #fff; /* Remember change in header */
  --color-light-tertiary: #da3a25;
  --color-light-code: #111;
  --color-light-code-background: #f6f8fa;
  --color-light-filtering: 0%;

  --color-dark-primary: rgb(255, 255, 255);
  --color-dark-secondary: rgb(175, 175, 175);
  --color-dark-background: #191919;
  --color-dark-tertiary: #de523f;
  --color-dark-code: hsl(211 calc(100% - 10%) 63% / 0.075);
  --color-dark-code-background: hsl(211 calc(100% - 10%) 63% / 0.075);
  --color-dark-filtering: 100%;

  --primary: var(--color-light-primary);
  --secondary: var(--color-light-secondary);
  --tertiary: var(--color-light-tertiary);
  --background: var(--color-light-background);
  --image-filtering: var(--color-light-filtering);
  --code-color: var(--color-light-code);
  --code-background: var(--color-light-code-background);
  /* Font websites: No need to complicate.. */
  /* - https://modernfontstacks.com/ */
  /* - https://systemfontstack.com/ */
  --base-font: ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI Variable Display", "Segoe UI", Helvetica, "Apple Color Emoji",
    Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  --fancy-font: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman,
    Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji,
    Segoe UI Emoji, Segoe UI Symbol;
  --code-font: "Berkeley Mono", "JetBrains Mono", "Fira Code",
    San Francisco Mono, Monaco, "Consolas", "Lucida Console",
    "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
}

body {
  color: var(--primary);
  background-color: var(--background);
  font-family: var(--base-font);
  margin: 0 auto;
  --font-size: 1rem;
  font-size: var(--font-size);
  padding-top: 20px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.article-title {
  font-weight: 600;
  overflow-wrap: break-word;
}

.article-title a {
  text-decoration: none;
}

.article-body a:hover {
  color: var(--tertiary);
}

.article-body p {
  margin-top: 0.5em;
}

.container {
  max-width: 640px;
  padding-left: 20px;
  padding-right: 20px;
  margin-left: auto;
  margin-right: auto;
}

.main-content img {
  max-width: 100%;
}

.no-top > :first-child {
  margin-top: 0;
  line-height: 1.25;
}

.sitename {
  /* font-weight: 600; */
  font-size: 1.2rem;
  line-height: 1.6;
  letter-spacing: 0.004rem;
  margin: 0 0 0.25em 0;
}

.vertical-spacing {
  padding-top: 20px;
  padding-bottom: 20px;
}

header {
  /* margin-bottom: 2em; */
  letter-spacing: -0.009em;
}

header h1 {
  font-size: 1.1rem;
  margin: 0 0 0.5em 0;
  letter-spacing: 0.004rem;
  line-height: 1.6;
}

.header-nav {
  font-size: 0.95rem;
  color: var(--secondary);
}

.header-nav a {
  color: var(--primary);
  text-decoration: none;
}

.header-nav a:hover {
  text-decoration: underline;
}

.article-list {
  display: grid;
  grid-column-gap: 8px;
  grid-row-gap: 8px;
  grid-template-columns: 1fr min-content;
}

.article-content {
  display: grid;
  grid-template-columns: min-content auto;
}

.article-content hr {
  height: 0;
  border: 0;
  margin: 0.5rem;
  align-self: center;
  width: 100%;
  border-bottom: 0.6px dashed var(--tertiary);
  display: none;
}

.article-list time {
  padding-right: 0.25em;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.012em;
  white-space: pre;
}

.article-list > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-list a {
  font-weight: 500;
  letter-spacing: -0.015em;
}

/* .article-list a:visited { */
/*   color: var(--secondary); */
/* } */

a {
  color: var(--primary);
  text-decoration-skip-ink: auto;
  text-decoration: underline;
}

.nu a {
  text-decoration: none;
}

.nu a:hover {
  text-decoration: underline;
  color: var(--tertiary);
}

code {
  font-family: var(--code-font);
  background-color: var(--code-background);
  font-size: 90%;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-left: 2px;
  padding-right: 2px;
  border-radius: 6px;
}

pre code {
  background-color: var(--code-background);
  font-size: 80%;
  display: block;
  white-space: pre;
  --webkit-overflow-scrolling: touch;
  overflow-x: auto;
  max-width: 100%;
  min-width: 100px;
  line-height: 1.5;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 6px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.1);
  border: 0.5px solid black;
}

.shadow {
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  max-width: 100%;
}

footer {
  padding-top: 0px;
  padding-bottom: 20px;
}

div.gallery {
  /* padding: 20px; */
  gap: 5px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

div.gallery > div {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  aspect-ratio: 1;
  /**background-color:red;**/
}

div.gallery img {
  object-fit: cover;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
}

canvas.marks {
  max-width: 100% !important;
  height: auto !important;
}

.talk-title {
  font-weight: 500;
}

.talk-list {
  display: grid;
  grid-column-gap: 8px;
  grid-template-columns: 1fr;
  grid-row-gap: 0px;
}

.talk-list .talk-links {
  padding-bottom: 10px;
  font-size: 95%;
}

.separator {
  border-color: var(--secondary);
}

@media screen and (max-width: 1024px) {
  div.gallery {
    gap: 5px;
  }
}

@media screen and (max-width: 640px) {
  .container {
    width: auto;
  }

  .article-list {
    display: grid;
    grid-template-columns: 1fr;
    grid-row-gap: 0px;
  }

  .article-list > div {
    white-space: normal;
  }

  .article-list time {
    padding-bottom: 20px;
    padding-right: 0;
  }

  .nu a {
    text-decoration: underline;
  }

  .nu a:hover {
    text-decoration: underline;
  }

  div.gallery {
    gap: 2px;
  }

  .article-content hr {
    display: none;
  }

  .article-content {
    display: block;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: var(--color-dark-primary);
    --secondary: var(--color-dark-secondary);
    --tertiary: var(--color-dark-tertiary);
    --background: var(--color-dark-background);
    --image-filtering: var(--color-dark-filtering);
    --code-color: var(--color-dark-code);
    --code-background: var(--color-dark-code-background);
  }

  img.companies {
    filter: invert(100%);
  }

  pre code {
    border: 0.5px solid #444;
    box-shadow:
      0 4px 8px rgba(0, 0, 0, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.2);
  }
}

/* Transcript styles */
.transcript details > summary {
  cursor: pointer;
  list-style: none;
}

.transcript details > summary > * {
  display: inline;
}

.transcript details > summary::-webkit-details-marker,
.transcript details > summary::marker {
  display: none;
  content: "";
}

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

th,
td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--primary);
}

table {
  overflow-x: auto;
  display: block;
}

.greyed-out {
  color: var(--secondary);
}

.highlighted {
  color: var(--tertiary);
  font-weight: bold;
}

.underlined {
  text-decoration: underline !important;
}

.dimmed {
  opacity: 0.8;
}

.listen {
  font-size: 0.8rem;
  opacity: 0.8;
  font-family: var(--code-font);
}

.round-image {
  border-radius: 2px;
}

blockquote {
  margin: 1em 0;
  padding: 0.2em 1em;
  background: none;
  border: none;
  color: inherit;
  font-style: normal;
  border-radius: 0;
}

@media (prefers-color-scheme: dark) {
  blockquote {
    background: none;
    border: none;
    color: inherit;
  }
}
