:root {
  --paper: #fffdf4;
  --ink: #191919;
  --muted: #5d5d5d;
  --line: #191919;
  --panel: #f4f0df;
  --accent: #6b2fb9;
  --link: #b11b1b;
  font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a { color: var(--link); }
a:visited { color: #315f35; }
a:hover { color: #d4008f; }

.site-header,
.site-shell,
.site-footer {
  width: min(900px, calc(100% - 28px));
  margin-inline: auto;
}

.welcomeBanner {
  margin-top: 14px;
  padding: 10px 18px;
  border: 3px outset var(--accent);
}

.welcomeBanner h1,
.welcomeBanner p { margin: 0; }
.welcomeBanner h1 { font-size: clamp(2rem, 7vw, 4rem); line-height: 1; }
.welcomeBanner h1 a { color: inherit; text-decoration: none; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.site-shell { padding: 24px 0 56px; }
.site-shell > :first-child { margin-top: 0; }

.site-footer {
  display: flex;
  gap: 8px;
  padding: 14px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

.content-list { list-style: none; padding: 0; }
.content-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0;
  border-bottom: 1px dotted var(--line);
}

.post-date, .meta { color: var(--muted); font-size: .9rem; }
.commit-list .meta { white-space: nowrap; }
.commit-list .commit-message { min-width: 0; }
.entry-header { margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.entry-header h1 { margin-bottom: 4px; }
.entry-body img { max-width: 100%; height: auto; }
.entry-body { font-size: 1.08rem; }
.entry-body::after { content: ""; display: block; clear: both; }

.image-gallery figure,
.inline-photo {
  float: left;
  width: min(220px, 42%);
  margin: 0 1rem 1rem 0;
}
.inline-photo.right { float: right; margin: 0 0 1rem 1rem; }
.gallery-link { display: block; text-decoration: none !important; }
.gallery-link img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.image-gallery figcaption,
.inline-photo figcaption {
  padding: .35rem 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.3;
}
.full-screen-overlay {
  display: none;
  position: fixed;
  inset: 0;
  padding: 3rem 1rem 1rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .9);
  text-align: center;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.full-screen-overlay[aria-hidden="false"] { display: flex; }
.full-screen-overlay img {
  max-width: min(90vw, 1200px);
  max-height: 75vh;
  border: 3px solid white;
  cursor: zoom-in;
}
.full-screen-close {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 5px;
  background: white;
  color: black;
  cursor: pointer;
  z-index: 1001;
}
.full-screen-overlay .description {
  max-width: min(90vw, 900px);
  margin: 14px auto;
  color: white;
  text-align: center;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .7rem;
  padding: .4rem 0 1rem;
  line-height: 1.35;
}

.tag-cloud__tag {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px dotted var(--line);
}

.tag-cloud__tag:hover {
  color: var(--link);
  border-bottom-style: solid;
}

.tag-s1 { font-size: .85rem; opacity: .75; }
.tag-s2 { font-size: 1.05rem; }
.tag-s3 { font-size: 1.3rem; }
.tag-s4 { font-size: 1.65rem; }
.tag-s5 { font-size: 2.05rem; font-weight: bold; }

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .4rem 0 0;
}

.entry-tag {
  display: inline-block;
  padding: .1rem .45rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-size: .85rem;
}

.entry-tag:hover { color: var(--link); }

.tag-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dotted var(--line);
}

.tag-section h2 { margin-bottom: .4rem; }
.tag-cloud-empty { color: var(--muted); }

blockquote {
  margin-left: 0;
  padding-left: 18px;
  border-left: 4px solid var(--accent);
}

code {
  padding: 1px 4px;
  background: var(--panel);
}

pre {
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
th { background: var(--panel); }

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171713;
    --ink: #f3efdf;
    --muted: #b8b3a3;
    --line: #d9d2bd;
    --panel: #27261f;
    --link: #ff7777;
  }
}

@media (max-width: 560px) {
  .content-list li { display: block; }
  .post-date { display: block; margin: 2px 0 0; }
}
