:root {
  --bg: #121917;
  --panel: #0f1512;
  --panel-2: #182019;
  --accent: #e8a84c;
  --accent-2: #e8763c;
  --leaf: #8fbf6e;
  --text: #e6ede9;
  --muted: #8fa39b;
  --rule: #243029;
  --code: #0a100d;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.8;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--rule);
  background: rgba(18, 25, 23, 0.94);
  backdrop-filter: blur(8px);
}

.topbar-inner {
  width: min(1080px, calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.brand img { width: 30px; height: 30px; }
.brand-accent { color: var(--accent); }

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
}

.topnav a { color: var(--muted); text-decoration: none; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--accent); }

.language-link {
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.notes-shell {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.list-header { margin-bottom: 44px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.3; }

.list-header h1 {
  margin: 0 0 14px;
  font-size: clamp(2.35rem, 7vw, 4rem);
  letter-spacing: -0.04em;
}

.list-header .intro {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.note-card {
  display: block;
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.note-card:hover {
  transform: translateY(-2px);
  border-color: #526446;
  background: var(--panel-2);
  color: var(--text);
}

.note-card time { color: var(--muted); font-size: 0.82rem; }

.note-card h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
}

.note-card p { margin: 0 0 18px; color: var(--muted); }
.note-card .read-more { color: var(--accent); font-weight: 700; }

.article-shell {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 60px 0 96px;
}

.back-link {
  display: inline-block;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.article-header {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 42px;
}

.article-header h1 {
  margin: 8px 0 18px;
  font-size: clamp(2rem, 6vw, 3.35rem);
  letter-spacing: -0.035em;
}

.article-meta { margin: 0; color: var(--muted); font-size: 0.88rem; }

.article-body h2 {
  margin: 64px 0 20px;
  padding-top: 8px;
  color: var(--accent);
  font-size: 1.55rem;
}

.article-body p { margin: 0 0 22px; }

.article-body code {
  padding: 0.12em 0.35em;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--code);
  color: #f0c878;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

.article-body pre {
  overflow-x: auto;
  margin: 26px 0;
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--code);
  line-height: 1.65;
}

.article-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: #dbe7df;
  font-size: 0.88rem;
}

.article-body blockquote {
  margin: 28px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  color: #c9d4ce;
}

.article-body blockquote p { margin: 0; }
.article-body ul { margin: 0 0 26px; padding-left: 1.35em; }
.article-body li { margin: 8px 0; padding-left: 0.3em; }

.article-cta {
  margin-top: 56px;
  padding: 28px;
  border: 1px solid #6f5930;
  border-radius: 12px;
  background: linear-gradient(135deg, #1b2118, #211a12);
}

.article-cta p { margin: 0 0 16px; }

.cta-button {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 7px;
  background: var(--accent);
  color: #17130c;
  font-weight: 750;
  text-decoration: none;
}

.cta-button:hover { background: #f3bd6e; color: #17130c; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 20px 44px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar-inner { width: min(100% - 28px, 1080px); }
  .topnav .home-link { display: none; }
  .notes-shell, .article-shell { width: min(100% - 30px, 880px); }
  .notes-shell { padding-top: 48px; }
  .article-shell { padding-top: 36px; }
  .article-body h2 { margin-top: 48px; }
  .note-card, .article-cta { padding: 22px; }
}
