:root {
  --bg: #14110e;
  --bg-paper: #1c1814;
  --text: #e8e0d4;
  --text-muted: #a89f92;
  --accent: #16e59d;
  --accent-soft: #4dc7ff;
  --line: rgba(232, 224, 212, 0.12);
  --font-ui: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --font-body-latin: "Literata", "Georgia", "Times New Roman", serif;
  --font-body-cjk: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-body: var(--font-body-latin);
  --leading-body: 1.75;
  --text-body: 1.125rem;
  --read-max: 680px;
}

html[lang="zh-Hans"] {
  --font-body: var(--font-body-cjk);
  --leading-body: 1.85;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(22, 229, 157, 0.06), transparent 70%),
    radial-gradient(700px 400px at 80% 20%, rgba(77, 199, 255, 0.04), transparent 65%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover { color: var(--accent-soft); }

.site-header {
  font-family: var(--font-ui);
  width: min(var(--read-max), 92vw);
  margin: 0 auto;
  padding: 2rem 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-brand a {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-brand a:hover { color: var(--accent); }

.site-brand span {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.back-link {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.back-link:hover { color: var(--accent); }

.lang-switch {
  font-family: var(--font-ui);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  align-items: center;
}

.lang-switch a {
  color: var(--text-muted);
  padding: 0.2rem 0;
}

.lang-switch a:hover,
.lang-switch a[aria-current="page"] {
  color: var(--accent);
}

.lang-switch a[aria-current="page"] {
  font-weight: 600;
  border-bottom: 1px solid var(--accent);
}

.lang-sep { color: var(--line); user-select: none; }

main {
  width: min(var(--read-max), 92vw);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.article-date {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 2rem;
}

.article-intro {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 2.5rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(22, 229, 157, 0.35);
  line-height: 1.6;
}

h1 {
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.article-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--text-muted);
  font-weight: 400;
  font-style: italic;
  margin: 0 0 2.5rem;
  line-height: 1.5;
}

article p {
  margin: 0 0 1.25rem;
}

article blockquote {
  margin: 1.5rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--line);
  color: var(--text-muted);
  font-style: italic;
}

article blockquote p {
  margin: 0 0 0.5rem;
}

article blockquote p:last-child { margin-bottom: 0; }

.concept {
  font-weight: 600;
  color: var(--text);
}

.concept-en {
  font-family: var(--font-body-latin);
  font-size: 0.9375rem;
  color: var(--accent);
  font-weight: 500;
}

article ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

article li {
  margin-bottom: 0.35rem;
}

article li::marker { color: var(--accent); }

.article-break {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.closing-lines {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.6;
}

.closing-lines p { margin-bottom: 0.75rem; }

.article-appendix {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.article-appendix h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 1.75rem;
  color: var(--text);
}

.glossary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.glossary-item dt {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.glossary-item dd {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

html[lang="zh-Hans"] .glossary-item dt .term-en,
body.essay-small-system .glossary-item dt .term-en {
  font-family: var(--font-body-latin);
  font-weight: 500;
  color: var(--accent);
}

.author-note {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.author-name {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.author-role {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.author-bio {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
  max-width: 540px;
}

.share-section {
  font-family: var(--font-ui);
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.share-section h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: center;
}

.reprint-note {
  margin: 1.25rem 0 0;
  max-width: 540px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.reprint-note a {
  color: var(--accent);
  text-decoration: none;
}

.reprint-note a:hover {
  color: var(--accent-soft);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--text);
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.share-btn:hover {
  border-color: rgba(22, 229, 157, 0.4);
  color: var(--accent);
}

.share-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.share-btn.copied {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(22, 229, 157, 0.08);
}

.share-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.site-footer {
  font-family: var(--font-ui);
  width: min(var(--read-max), 92vw);
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Index / list page */
.list-hero {
  padding-bottom: 1rem;
}

.list-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.list-desc {
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 3rem;
  max-width: 540px;
}

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

.article-card {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.article-card:last-child { border-bottom: 1px solid var(--line); }

.article-card h2 {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.article-card h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.article-card h2 a:hover { color: var(--accent); }

.article-card .meta {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.article-card .excerpt {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.article-card .read-more {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 1rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.article-card .read-more:hover { color: var(--accent-soft); }

.article-card .read-more:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .site-header { padding-top: 1.25rem; }
  main { padding-top: 1.75rem; }
}
