:root {
  color-scheme: dark;
  --bg: #1a1a1a;
}

html {
  background-image: url("/assets/images/starfield_001-3ea7505db68a3e5272f9cbb8123ed8f6.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100%;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0 0 16px;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0.012em;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 960px;
  margin: 0 auto;
  padding: 12px;
  line-height: 1.5;
  color: #ffffff;
}

:lang(zh-CN) {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

:lang(ja) {
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

:lang(ko) {
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 72px;
}

.site-title,
.lang-switcher {
  flex-shrink: 0;
}

.site-title {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-decoration: none;
  text-transform: lowercase;
  color: #6fe3ff;
}

.site-nav {
  margin-left: 16px;
}

.lang-switcher {
  margin-left: auto;
}

.site-nav a + a {
  margin-left: 16px;
}

@media (max-width: 600px) {
  .lang-switcher {
    order: 1;
  }

  .site-nav {
    order: 2;
    flex-basis: 100%;
    margin-left: 0;
    margin-top: 8px;
  }
}

.hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 24px;
}

/* An image placed in a post's body - distinct from .hero-image, which is the
   single image at the top of a post driven by `hero_image` front matter. Its
   own class rather than reusing .hero-image or adding a bare `img` rule: see
   root CLAUDE.md on why this project has no unscoped img selector.

   It sits *between* cards, never inside one (card_sections treats a
   standalone image as a section break), so it carries its own vertical
   margin - a little more than the 16px gap between cards, so a figure reads
   as a break rather than as another card in the stack. */
.post-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px 0;
}

.header-logotype {
  display: inline-block;
  vertical-align: middle;
  height: 40px;
  width: auto;
}

.card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow:
    0 0 3px rgba(142, 229, 54, 0.55),
    0 0 8px rgba(27, 30, 24, 0.35),
    0 0 24px rgba(255, 255, 255, 0.15);
}

.card p:last-child {
  margin-bottom: 0;
}

.card-fit {
  display: inline-block;
}

.continue-reading {
  color: LinkText;
  text-decoration: underline;
}

.post-date {
  display: block;
  font-weight: normal;
  font-size: 80%;
}

.x-link {
  display: inline-flex;
  align-items: center;
  gap: 6.4px;
  color: #6fe3ff;
  text-decoration: none;
}

.feed-link {
  display: inline-block;
}

.feed-link img {
  display: inline;
  vertical-align: baseline;
}


/* The "#" link after every heading (_shared_plugins/heading_anchors.rb).
   Muted by default so it doesn't compete with the heading itself, picking up
   the site's cyan on hover/focus. Always visible, not hover-only, so it works
   on touch. margin-left is the gap after the heading text. */
.heading-anchor {
  margin-left: 8px;
  color: #5a5a5a;
  text-decoration: none;
  font-weight: normal;
}

.heading-anchor:hover,
.heading-anchor:focus {
  color: #6fe3ff;
}

/* kramdown's footnote markup. The reference markers stay inline with the
   text; the list sits at the end of the post inside its own card (the
   footnotes heading is a real <h2>, so card_sections gives it one). */
.footnotes-heading {
  margin-top: 32px;
}

.footnotes {
  font-size: 90%;
}

.footnotes ol {
  margin: 0;
  padding-left: 24px;
}

.footnotes li {
  margin-bottom: 8px;
}

.footnotes li:last-child {
  margin-bottom: 0;
}

/* The ↩ back-link returning the reader to where they were reading. */
.reversefootnote {
  margin-left: 4px;
  color: #6fe3ff;
  text-decoration: none;
}

/* The superscript reference marker in the body text. */
sup .footnote {
  color: #6fe3ff;
  text-decoration: none;
}
