:root {
  color-scheme: light dark;
  --bg-color: light-dark(#F2F3F4, #222);
  --text-color: light-dark(#222, #F2F3F4);
}

/* Override system default when Light is selected */
:root:has(#theme-light:checked) {
  color-scheme: light;
}

/* Override system default when Dark is selected */
:root:has(#theme-dark:checked) {
  color-scheme: dark;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 170%;
  font-family: monospace;
  font-size: 14px;
  max-width: 600px;
  margin: 0 auto;
  padding-top: 2ch;
}

body > * {
    box-sizing: border-box;
}

h1,h2,h3,h4 {
    font-family: Georgia, Times, serif;
    font-weight: normal;
}

h1 {
    font-size: 1.7rem;
}
h2 {
    font-size: 1.4rem;
    margin-top: 2ch;
    margin-bottom: 1ch;
    padding: 0;
}
h3 {
    font-size: 1.2rem;
}
h4 {
    font-size: 0.8rem;
    font-weight: bold;
    margin: 0;
}

time {
    font-style: italic;
}

ol {
  list-style: decimal;
}

ul {
  list-style: "- ";
  padding: 0 0 0 2ch;
}

ul li ul:nth-child(2) {
  list-style: "% ";
}

ul li ul li ul li {
  list-style: "- ";
}

a {
    color: #a790d5;
    text-decoration: underline;
}
a:hover {
    color: #8570a3;
}
main {
    padding: 2ch;
}

#split {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 6ch;
}

header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    border-bottom: 1px solid;
    padding: 0 2ch 1ch;
}

header input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

header label {
  cursor: pointer;
  text-decoration: underline;
  color: #a790d5;
}

header label:hover {
  opacity: 0.8;
}

header label:has(input:checked) {
  text-decoration: none;
  color: inherit;
  cursor: default;
}

header label:has(input:focus-visible) {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

article::after {
    content: "...";
}

article {
    margin-bottom: 3ch;
}

#about {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2ch;
}
#about img {
    opacity: 0.7;
    border-radius: 1ch;
    width: 150px;
    height: 150px;
}

.masonry {
  columns: 250px auto; 
  column-gap: 16px;
}

.masonry div {
  break-inside: avoid; 
  margin-bottom: 16px;
}

.masonry div img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: solid 2px transparent;
}

.masonry div img:hover {
  border: solid 2px var(--text-color);
}

@media (max-width: 768px) {
    #split,
    #about {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
