@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Serif:wght@400;600;700&display=swap");
:root {
  --border-radius: 2px;
  --color-bg: #ffffff;
  --color-logo: #bb0028;
  --color-tag-bg: #6ad2d2;
  --color-tag-border: #007979;
  --color-secondary: #004f4f;
  --color-text: #1f2328;
  --color-muted: #57606a;
  --color-border: #d0d7de;
  --color-accent: #ca5b00;
  --color-surface: #f6f8fa;
  --font-body: "Noto Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-width: 50rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0d1117;
    --color-logo: #79001a;
    --color-tag-bg: #004f4f;
    --color-tag-border: #007979;
    --color-secondary: #6ad2d2;
    --color-text: #e6edf3;
    --color-muted: #8b949e;
    --color-border: #30363d;
    --color-accent: #ff9239;
    --color-surface: #161b22;
  }
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  line-height: 1.6;
}

body, button {
  color: var(--color-text);
  font-family: var(--font-body);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a[target=_blank]::after {
  content: "⧉";
  padding-left: 0.25rem;
  font-size: 1rem;
}

h1 {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  margin: 0;
}

h2 {
  font-size: 1.2rem;
}

hr {
  background-color: darkgrey;
  border: none;
  height: 1px;
  margin: 2rem auto;
  width: 30%;
}

ul {
  list-style-type: square;
}

.site-header {
  display: flex;
  align-content: center;
  justify-content: center;
  padding: 1.5rem 0 0.25rem 0;
  width: 100vw;
}

.site-title {
  display: flex;
  color: var(--color-text);
  flex-direction: column;
  font-weight: 700;
}

.site-title svg {
  fill: var(--color-logo);
  height: max(5vh, 3rem);
  margin: 0 auto;
  width: max(5vw, 3rem);
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background-color 0.2s;
}

.lang-switch:hover {
  background: var(--color-border);
  text-decoration: none;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-main {
  max-width: var(--max-width);
  margin: 0 auto 1rem auto;
  padding: 0 1.25rem;
}

.site-main h1 {
  margin-bottom: 0.5rem;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  margin: 0 auto;
  max-width: var(--max-width);
}
.site-footer p {
  margin: 0;
}
.site-footer .site-version {
  color: var(--color-bg);
}

.entry-header {
  margin-top: 1rem;
}
.entry-header h1 {
  margin-bottom: 0.75rem;
  line-height: 2.25rem;
}
.entry-header .entry-meta {
  margin: 0;
  max-width: 90vw;
}

.entry-breadcrumb {
  color: var(--color-muted);
  font-family: var(--font-sans);
}

.entry-meta {
  display: block;
  margin-top: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.entry-content {
  border-bottom: 1px dotted var(--color-border);
  border-top: 1px dotted var(--color-border);
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0.5rem 0 0;
}

.tag-list li {
  background: var(--color-tag-bg);
  border: 1px solid var(--color-tag-border);
  font-weight: 600;
  padding: 0.25rem 0.75rem;
}

.tag-list a {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.8rem;
}

details {
  margin: 1rem 0;
}
@media (prefers-reduced-motion: no-preference) {
  details {
    interpolate-size: allow-keywords;
  }
}
details summary {
  font-size: 1.2rem;
}
details summary h2 {
  display: inline-block;
  margin: 0;
}
details summary h2, details summary h3 {
  cursor: pointer;
}
details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: content-visibility 1s allow-discrete, block-size 1s;
}
details[open]::details-content {
  block-size: auto;
}

.entry-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.entry-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.entry-list li:first-of-type {
  padding-top: 0;
}

.entry-list li:last-child {
  border-bottom: none;
}

.entry-list a {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
}

.article-published {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-style: italic;
}

.related-posts {
  margin: 1rem 0;
}
.related-posts h2 {
  margin: 0 0 0.5rem;
}
.related-posts ul {
  margin: 0;
  padding-left: 1.25rem;
}

.literature h1 {
  margin: 0;
}
.literature .filter-list {
  margin-bottom: 1rem;
}
.literature .filter-list button {
  background: transparent;
  border: 0;
  font-size: 1rem;
  padding: 0.25rem 0 0.05rem 0;
}
.literature .filter-list button:not(:first-of-type)::before {
  content: "▪";
  padding: 0 1rem 0 0.75rem;
}
.literature .filter-list button:not([data-active=true]) span {
  opacity: 0.25;
}
.literature .filter-list button span {
  cursor: pointer;
}
.literature .entry-list li {
  border-bottom: 0;
  padding: 0.5rem 0;
}
.literature .entry-list[hidden] {
  display: none;
}
.literature .entry-content {
  white-space: pre-wrap;
  border-bottom: 0;
}
.literature .entry-content p {
  margin: 0;
}
.literature .entry-content p:first-of-type {
  margin-top: 1rem;
}

.home-section {
  margin-bottom: 2.5rem;
}

.home-section h2 {
  font-family: var(--font-sans);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.35rem;
}

.word-count-demo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-surface);
}

.word-count-demo textarea {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-bg);
  color: var(--color-text);
  resize: vertical;
}

.captioned-figure {
  margin: 1.5rem 0;
}
.captioned-figure img {
  border: 1px solid var(--color-border);
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}
.captioned-figure figcaption {
  color: var(--color-muted);
  margin: 0.4rem 0 0 0;
  padding-bottom: 0.5rem;
  font-size: 0.9rem;
}
.captioned-figure figcaption .caption-source {
  display: block;
  font-style: italic;
}

.image-gallery {
  margin: 1.5rem 0;
}
.image-gallery .gallery-main .slide {
  margin: 0;
}
.image-gallery .gallery-main .slide a[target=_blank]::after {
  content: none;
}
.image-gallery figcaption {
  border-bottom: 1px dotted var(--color-border);
}
.image-gallery .gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: calc(0.5rem + 2px);
}
.image-gallery .gallery-thumbs .gallery-thumb {
  display: block;
  box-sizing: border-box;
  width: 5rem;
  height: 5rem;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  overflow: hidden;
  opacity: 0.7;
}
.image-gallery .gallery-thumbs .gallery-thumb:hover {
  opacity: 1;
}
.image-gallery .gallery-thumbs .gallery-thumb[aria-current=true] {
  border-color: var(--color-accent, currentColor);
  opacity: 1;
}
.image-gallery .gallery-thumbs .gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}