/* Preen — website */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --line: #e4e8ee;
  --text: #0f1419;
  --muted: #5f6b78;
  --accent: #1479e6;
  --accent-2: #3ec1ff;
  --accent-soft: rgba(20, 121, 230, 0.1);
  --shadow: 0 1px 2px rgba(15, 20, 25, 0.04), 0 8px 28px rgba(15, 20, 25, 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e12;
    --surface: #151a21;
    --line: #252c35;
    --text: #e8ecf1;
    --muted: #9aa5b1;
    --accent: #4aa3ff;
    --accent-soft: rgba(74, 163, 255, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Language: every bilingual string exists twice; show only the active one. */
html:not(.zh) body [lang="zh-Hans"],
html.zh body [lang="en"] { display: none !important; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
header.site nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 15px; }
.lang-toggle {
  font: inherit; font-size: 13px; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; cursor: pointer;
}
.lang-toggle:hover { color: var(--text); }

/* Hero */
.hero { text-align: center; padding-top: 96px; padding-bottom: 112px; }
.hero img { width: 128px; height: 128px; filter: drop-shadow(0 14px 30px rgba(20, 121, 230, 0.25)); }
.hero h1 { font-size: clamp(40px, 7vw, 60px); line-height: 1.05; letter-spacing: -0.02em; margin: 26px 0 12px; }
.hero p.lead { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 560px; margin: 0 auto 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #0f6fe0, #3ec1ff);
  color: #fff; font-weight: 600; font-size: 16px;
  padding: 12px 24px; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(20, 121, 230, 0.3);
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }

/* Article pages */
main.page { padding: 64px 0 80px; }
main.page .wrap { max-width: 720px; }
main.page h1 { font-size: clamp(32px, 5vw, 42px); letter-spacing: -0.015em; margin: 0 0 8px; }
main.page .sub { color: var(--muted); margin: 0 0 36px; }
main.page h2 { font-size: 20px; margin: 40px 0 10px; }
main.page p, main.page li { color: var(--text); }
main.page ul, main.page ol { padding-left: 1.3em; }
main.page li { margin: 4px 0; }
.contact {
  margin-top: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; box-shadow: var(--shadow);
}
.contact .mail { font-size: 20px; font-weight: 600; word-break: break-all; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--accent); }
details[open] summary::before { content: "–"; }
details > div { padding: 6px 0 0 1.2em; color: var(--muted); }
details > div p { margin: 6px 0; color: var(--muted); }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
footer.site a { color: var(--muted); }
footer.site .links { display: flex; gap: 18px; margin-left: auto; }

@media (max-width: 560px) {
  header.site nav { gap: 14px; }
  .hero { padding-top: 64px; padding-bottom: 80px; }
  footer.site .links { margin-left: 0; }
}
