*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  background: #fff;
  color: #222;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  padding: 0 1.5rem;
}

::selection {
  background: #222;
  color: #fff;
}

a {
  color: inherit;
  text-decoration-color: #bbb;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
a:hover {
  text-decoration-color: #222;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 6rem 0 4rem;
}

h1 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

p {
  color: #555;
  font-size: 0.95rem;
}

ul {
  list-style: none;
  margin: 2rem 0;
}

ul li {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

ul li a {
  font-weight: 500;
  color: #222;
}

ul li {
  color: #999;
}

.elsewhere {
  font-size: 0.88rem;
  color: #999;
}

.elsewhere a,
.elsewhere span {
  color: #555;
}

.spaced-out-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.spaced-out-header p {
  font-size: 0.82rem;
  color: #777;
  white-space: nowrap;
  margin-bottom: 1rem;
}

.inspired-by {
  font-size: small;
}

.back {
  display: inline-block;
  font-size: 0.88rem;
  color: #999;
  margin-bottom: 2rem;
}

.page h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.page h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.page .post-list {
  margin: 0;
}

.page .post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.page .post-list .date {
  font-size: 0.82rem;
  color: #777;
  white-space: nowrap;
}

.page .now-content p {
  margin-bottom: 1rem;
}

.page .project {
  margin-bottom: 1.5rem;
}

.page .project h3 {
  font-size: 0.95rem;
  font-weight: 500;
}

.page .project p {
  font-size: 0.9rem;
}

.page .project .meta {
  font-size: 0.82rem;
  color: #999;
}

.page .project .meta a {
  color: #555;
}

.page.page-wide {
  max-width: 900px;
}

.pics-header {
  max-width: 520px;
  margin-bottom: 2rem;
}

.gallery {
  column-count: 2;
  column-gap: 2rem;
  margin-top: 2rem;
}

.photo-card {
  break-inside: avoid;
  margin-bottom: 2.25rem;
  display: inline-block;
  width: 100%;
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #f4f4f5;
}

.photo-card figcaption {
  padding: 0.6rem 0.1rem 0;
}

.photo-card .photo-desc {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.5;
}

@media (max-width: 680px) {
  .gallery {
    column-count: 1;
    column-gap: 0;
    margin-top: 1.5rem;
  }

  .photo-card {
    margin-bottom: 2rem;
  }
}

@media (max-width: 500px) {
  .page {
    padding: 4rem 0 3rem;
  }
}

.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0;
}

pre,
pre[class*="language-"] {
  background: #f7f7f8 !important;
  border: 1px solid #e8e8ec;
  border-radius: 6px;
  padding: 1rem !important;
  margin: 1.5rem 0 !important;
  font-size: 0.85rem !important;
  line-height: 1.55 !important;
  overflow-x: auto;
}

code,
code[class*="language-"] {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace !important;
  font-size: 0.88em;
}

p code,
li code {
  background: #f3f3f5;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

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

.page > img,
.page > video {
  display: block;
  width: 100%;
  margin: 1.5rem 0;
  border-radius: 6px;
}



