/* ===== Theme tokens ===== */
:root {
  color-scheme: light;
  --bg-color: #ffffff;
  --text-color: #000000;
  --link-color: #000000;
  --border-color: #000000;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-color: #1a1a1a;
  --text-color: #eeeeee;
  --link-color: #eeeeee;
  --border-color: #eeeeee;
}

/* ===== Base ===== */
body {
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
  background-color: var(--bg-color);
  color: var(--text-color);
}

img {
  max-width: 100%;
  height: auto;
}

hr {
  border-color: var(--border-color);
}

a,
a:visited {
  color: var(--link-color);
  text-decoration: underline;
}

h1 { font-size: 2.5rem; margin-top: 0; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

.content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Clear the fixed corner buttons, which overlap the title on small screens */
@media (max-width: 767px) {
  .content-container {
    padding-top: 44px;
  }
}

/* ===== Fixed corner controls ===== */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 1000;
}

.back-button {
  position: fixed;
  top: 20px;
  left: 20px;
  text-decoration: none;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 1000;
}

/* ===== Landing page post cards ===== */
.post-list {
  list-style: none;
  padding: 0;
}

.post-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid var(--border-color);
}

.post-card-media {
  display: flex;
  align-items: center;
}

.post-card-media img {
  border: 1px solid var(--border-color);
}

.post-card-title { font-size: 1.5rem; }
.post-card-meta { margin-top: 5px; }
.post-card-desc { margin-top: 10px; }

@media (max-width: 700px) {
  .post-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .post-card-media {
    justify-content: center;
  }
  .post-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* ===== Under-construction marquee ===== */
@keyframes marquee {
  0% { transform: translateX(0); }
  50% { transform: translateX(100px); }
  100% { transform: translateX(0); }
}

.marquee-image {
  animation: marquee 3s linear infinite;
  border: 2px solid var(--border-color);
}

/* ===== Blog page ===== */
.page-title { text-align: center; }
.page-meta { text-align: center; }

/* ===== Index link lists ===== */
.link-list {
  list-style: none;
}

.link-list li {
  font-size: 1.5em;
}

.link-list .icon {
  vertical-align: -0.15em;
}

/* ===== Image shortcode figure ===== */
.figure {
  text-align: center;
  margin: 20px 0;
}

.figure img {
  border: 1px solid var(--border-color);
}

.figure-caption {
  margin-top: 5px;
  font-style: italic;
}

/* ===== Photo collage ===== */
.columns {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 350px;
  column-gap: 0;
}

.item {
  break-inside: avoid;
  margin: 0 4px 8px;
  padding: 0;
  border: 1px solid var(--border-color);
}

.item > img {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.aspect {
  aspect-ratio: 16 / 9;
}
