*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #050b18; --ink: #e3f1ff; --dim: #5f7f9e; --dim2: #9fb4cb; --acc: #a6dcff; --gold: #e8cf8f;
  --rule: rgba(120, 190, 255, .15); --glass: rgba(10, 32, 56, .45);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", Menlo, Consolas, "Roboto Mono", "Noto Sans SC", "PingFang SC", monospace;
  color-scheme: dark;
}
html { scroll-behavior: smooth; }
body.sub { background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(63, 169, 204, .10), transparent 60%), var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; min-height: 100svh; }
/* one language at a time */
html[lang="en"] [lang="zh-CN"], html[lang="zh-CN"] [lang="en"] { display: none !important; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 16px 24px; background: rgba(5, 11, 24, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.topbar .brand { font-family: var(--mono); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: rgba(227, 241, 255, .6); text-decoration: none; }
.topbar .site { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.topbar .links { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar .links a { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim2); text-decoration: none; }
.topbar .links a:hover { color: var(--ink); }
#langBtn { font: 500 12px/1 var(--mono); letter-spacing: .12em; color: var(--dim); background: rgba(5, 11, 24, .4); border: 1px solid var(--rule); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
#langBtn:hover { color: var(--ink); border-color: rgba(166, 220, 255, .45); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 56px 24px 96px; }
.hero { margin-bottom: 40px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 300; letter-spacing: .02em; line-height: 1.25; }
.lede { margin-top: 14px; color: var(--dim2); font-size: 1.02rem; line-height: 1.8; max-width: 60ch; }
.foot { max-width: 1120px; margin: 0 auto; padding: 0 24px 48px; font-family: var(--mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
.foot a { color: var(--dim2); text-decoration: none; }
.chip { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; padding: 3px 9px; border: 1px solid var(--rule); border-radius: 999px; color: var(--dim2); }
.chip-tech, .chip-final { color: var(--gold); border-color: rgba(232, 207, 143, .45); }
.chip-concept, .chip-lab { color: var(--acc); border-color: rgba(166, 220, 255, .4); }
time { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--dim); }

/* ── blog list ── */
.filters { display: flex; gap: 8px; margin-bottom: 28px; }
.filters button { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.filters button.on { color: var(--ink); border-color: rgba(166, 220, 255, .5); background: rgba(166, 220, 255, .08); }
.posts { max-width: 760px; }
.post { padding: 26px 0; border-top: 1px solid var(--rule); }
.post .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 400; line-height: 1.4; }
.post h2 a { color: var(--ink); text-decoration: none; }
.post h2 a:hover { color: var(--acc); }
.post p { margin-top: 8px; color: var(--dim2); line-height: 1.8; }

/* ── blog article ── */
.back { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim2); text-decoration: none; margin-bottom: 28px; }
.back:hover { color: var(--ink); }
.article { max-width: 760px; }
.article header .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.article header .lede { font-size: 1.1rem; color: #b9cde3; }
.article .body { margin-top: 40px; font-size: 1.02rem; line-height: 1.9; color: #c9d8e8; }
.article .body h2 { font-size: 1.45rem; font-weight: 400; color: var(--ink); margin: 44px 0 14px; }
.article .body h3 { font-size: 1.15rem; font-weight: 500; color: var(--ink); margin: 30px 0 10px; }
.article .body p, .article .body ul, .article .body ol { margin: 0 0 18px; }
.article .body ul, .article .body ol { padding-left: 1.4em; }
.article .body li { margin: 6px 0; }
.article .body strong { color: var(--acc); font-weight: 500; }
.article .body a { color: var(--acc); }
.article .body blockquote { border-left: 2px solid var(--gold); padding: 4px 0 4px 18px; color: var(--dim2); margin: 0 0 18px; }
.article .body code { font-family: var(--mono); font-size: .9em; background: rgba(166, 220, 255, .08); padding: 2px 6px; border-radius: 5px; }
.article .body pre { background: #040914; border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; overflow-x: auto; margin: 0 0 18px; }
.article .body pre code { background: none; padding: 0; font-size: .88rem; line-height: 1.6; }
.article .body table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: .95rem; }
.article .body th, .article .body td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.article .body th { color: var(--dim); font-weight: 400; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.article .body img { max-width: 100%; border-radius: 12px; }
.article .body .note { color: var(--dim); font-style: italic; }
.concept-card { margin-top: 48px; padding: 22px; border: 1px solid var(--rule); border-radius: 14px; background: var(--glass); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.concept-card .eyebrow { margin: 0; width: 100%; }
.concept-card b { font-weight: 400; font-size: 1.1rem; flex: 1; }
.btn { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); border: 1px solid rgba(166, 220, 255, .4); border-radius: 999px; padding: 10px 16px; text-decoration: none; }
.btn:hover { background: rgba(166, 220, 255, .12); }
.pn { max-width: 760px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); }
.pn a { color: var(--ink); text-decoration: none; line-height: 1.5; }
.pn a:hover { color: var(--acc); }
.pn a small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.pn .next { text-align: right; }

/* ── UX Sandbox ── */
.sect { margin: 44px 0 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 14px; }
.sect::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 16px; border: 1px solid var(--rule); border-radius: 16px; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--acc); transform: translateY(-2px); }
.card .k { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.card h2 { font-size: 1.15rem; font-weight: 400; letter-spacing: .02em; }
.card p { color: var(--dim2); font-size: .92rem; line-height: 1.7; }
.card .go { margin-top: auto; font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--acc); }
/* live preview: an iframe rendered at 1280×800 and scaled to the box */
.pv { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #0a1a33, #071226 60%, #0c2240); border: 1px solid rgba(120, 190, 255, .12); }
.pv::before { content: attr(data-letter); position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 200; color: rgba(166, 220, 255, .18); }
.pv iframe { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; pointer-events: none; opacity: 0; transition: opacity .6s; background: var(--bg); }
.pv iframe.in { opacity: 1; }

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; gap: 12px; }
  .topbar .site { display: none; }
  .wrap { padding: 36px 16px 72px; }
  .pn { grid-template-columns: 1fr; }
  .pn .next { text-align: left; }
}
