:root {
  color-scheme: light dark;

  --light-bg: #ffffff;
  --light-primary-text: #444444;
  --light-secondary-text: #737373;
  --light-heading: #000000;
  --light-link: #3548cf;
  --light-visited-link: #3548cf;
  --light-highlight: #dae5ec;

  --dark-bg: #1a1a1a;
  --dark-primary-text: #e2e2e2;
  --dark-secondary-text: #737373;
  --dark-heading: #ffffff;
  --dark-link: #79a8ff;
  --dark-visited-link: #79a8ff;
  --dark-highlight: #2f3849;
}

html {
  height: 100%;

  background-color: light-dark(var(--light-bg), var(--dark-bg));
  color: light-dark(var(--light-primary-text), var(--dark-primary-text));
}

body {
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
  min-height: 100%;
  overflow-wrap: break-word;
}

*:target {
  background-color: light-dark(var(--light-highlight), var(--dark-highlight));
  color: light-dark(var(--light-primary-text), var(--dark-primary-text));
}

header {
  margin-bottom: 2rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong {
  color: light-dark(var(--light-heading), var(--dark-heading));
}

h2,
h3,
h4,
h5,
h6 {
  margin-top: 1.5rem;
}

p {
  margin: 1rem 0;
  text-align: justify;
}

li {
  margin: 0.4rem 0;
}

a {
  color: light-dark(var(--light-link), var(--dark-link));
}

a:visited {
  color: light-dark(var(--light-visited-link), var(--dark-visited-link));
}

a:hover {
  text-decoration: underline;
}

a#special-home-link {
  color: light-dark(var(--light-primary-text), var(--dark-primary-text));
}

hr {
  margin: 2rem 0;
}

pre {
  padding: 1em;
  /* Fix pre content overflowing parent without scroll bar */
  overflow-x: auto;
}

table {
  width: 100%;
  margin: 1rem auto;
}

table,
th,
td {
  border-collapse: collapse;
  padding: 0.4rem;
  border: thin solid light-dark(var(--light-primary-text), var(--dark-primary-text));
}

code {
  text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

code {
  font-size: 90% !important;
}

code:not(pre > code) {
  padding: 0.1rem 0.2rem;
}

blockquote {
  border: thin solid light-dark(var(--light-primary-text), var(--dark-primary-text));
  padding: 1rem;
}

blockquote > p {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
  margin: 2rem auto;
}

figure {
  margin: 0;
}

figcaption {
  text-align: left;
  margin-top: -1rem;
  color: light-dark(var(--light-secondary-text), var(--dark-secondary-text));
}

details {
  padding: 1rem;
  border: thin solid light-dark(var(--light-primary-text), var(--dark-primary-text));
}

details summary {
  text-decoration: none;
  color: light-dark(var(--light-primary-text), var(--dark-primary-text));
}

details[open] summary {
  margin-bottom: 0.5em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid light-dark(var(--light-primary-text), var(--dark-primary-text));
}

picture.op > img {
  cursor: pointer;
}

header, main, footer {
  max-width: 640px;
  margin: 0 auto;
}

header {
  padding-top: 4rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

main {
  padding: 0 2rem;
}

footer {
  padding-bottom: 4rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* for mobile */
@media all and (max-width: 1100px) {
  header {
    padding-top: 1rem;
    padding-left: .75rem;
    padding-right: .75rem;
  }

  main {
    padding: 0 .75rem;
  }

  footer {
    padding-bottom: 4rem;
    padding-left: .75rem;
    padding-right: .75rem;
  }
}

.toc {
  border: thin solid light-dark(var(--light-primary-text), var(--dark-primary-text));
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 55px;
  aspect-ratio: 1;
  --g1: conic-gradient(from 90deg at top 3px left 3px, #0000 90deg, #737373 0);
  --g2: conic-gradient(from -90deg at bottom 3px right 3px, #0000 90deg, #737373 0);
  background:
    var(--g1), var(--g1), var(--g1), var(--g1),
    var(--g2), var(--g2), var(--g2), var(--g2);
  background-position: 0 0, 100% 0, 100% 100%, 0 100%;
  background-size: 25px 25px;
  background-repeat: no-repeat;
  animation: l11 1.5s infinite;
}

@keyframes l11 {
  0% {
    background-size: 35px 15px, 15px 15px, 15px 35px, 35px 35px
  }

  25% {
    background-size: 35px 35px, 15px 35px, 15px 15px, 35px 15px
  }

  50% {
    background-size: 15px 35px, 35px 35px, 35px 15px, 15px 15px
  }

  75% {
    background-size: 15px 15px, 35px 15px, 35px 35px, 15px 35px
  }

  100% {
    background-size: 35px 15px, 15px 15px, 15px 35px, 35px 35px
  }
}

#largePictureView {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  z-index: 100;
}

#largePictureContainer {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#largePictureViewImage {
  margin: 0;
  max-height: 100vh;
}

#largePictureCaption {
  padding: 1rem;
  position: fixed;
  bottom: 0;
  width: calc(100vw - 2rem);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
}

/* .hidden and .remove-scrolling are utility classes for the image viewer */
.hidden {
  display: none !important;
}

.remove-scrolling {
  height: 100%;
  overflow: hidden;
}

/*
Source - https://stackoverflow.com/questions/18611195/x-close-button-only-using-css
Posted by andycrone
Retrieved 2025-11-30, License - CC BY-SA 3.0
*/
#largePictureViewCloseButton:after {
  display: inline-block;
  content: "\00d7";
  /* This will render the 'X' */
  cursor: pointer;
  margin-right: 1rem;
  font-size: 2.5rem;
  color: #fff;
}

.collection-title {
  margin-top: 2rem;
}

.collection-list {
  padding: 0;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.collection-list-item {
  list-style: none;
  display: flex;
  justify-content: space-between;
}

.collection-list-item > span {
  text-align: right;
  white-space: nowrap;
}

.cvitem {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cvitem-date {
  text-align: left;
  white-space: nowrap;
}

.cvitem-title {
  text-align: right;
}

.post-meta {
  display: flex;
  flex-direction: column;
  align-items: left;
  color: light-dark(var(--light-secondary-text), var(--dark-secondary-text));
}

.cvlist {
  font-style: italic;
  color: light-dark(var(--light-secondary-text), var(--dark-secondary-text));
}