/* Shared page shell. Theme tokens and bootstrap remain in base.css/theme.js. */
:root { --site-width: 1120px; --reading-width: 760px; }
[hidden] { display: none !important; }
body { font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; text-underline-offset: .22em; }
a:hover { color: var(--accent-dark); }
button, input { font: inherit; }
img, svg { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
h1,h2,h3,p { margin-top: 0; }
h1,h2,h3 { color: var(--ink); letter-spacing: -.035em; }
h1 { font-size: clamp(32px, 4.5vw, 54px); line-height: 1.3; font-weight: 750; }
h2 { font-size: 27px; line-height: 1.4; font-weight: 720; }
h3 { font-size: 20px; line-height: 1.5; font-weight: 700; }
.accent { color: var(--accent-dark); }
.mono, .eyebrow, .item-date { font-family: ui-monospace, Consolas, "Microsoft YaHei", monospace; }
.mono { font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.eyebrow { color: var(--accent-dark); font-size: 11px; font-weight: 600; letter-spacing: .13em; line-height: 1.6; margin-bottom: 12px; }
.site-header { border-bottom: 1px solid var(--header-line); background: var(--header-bg); position: sticky; top: 0; z-index: 50; backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03); }
.nav { width: min(var(--site-width), calc(100% - 64px)); min-height: 64px; margin: auto; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 15px; white-space: nowrap; letter-spacing: -.025em; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #5856d6 100%);
  color: #ffffff;
  font: 750 14px/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  letter-spacing: -0.05em;
  padding-right: 0;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.2s var(--ease-spring);
}
.brand:hover .brand-mark { transform: scale(1.06); }
.brand-mark span { color: #ffffff; opacity: 0.85; }
.brand-caption { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 6px; }
.nav-actions { gap: 12px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(60, 60, 67, 0.075);
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid var(--line);
}
:root[data-theme="dark"] .nav-links {
  background: rgba(255, 255, 255, 0.06);
}
.nav-links a {
  min-height: 32px;
  padding: 5px 14px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s var(--ease-spring);
}
.nav-links a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}
:root[data-theme="dark"] .nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
}
.nav-links a[aria-current="page"] {
  background: var(--subtle-bg);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
:root[data-theme="dark"] .nav-links a[aria-current="page"] {
  background: var(--subtle-bg);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.nav-links a:active {
  transform: scale(0.96);
}
.search-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  box-shadow: var(--shadow-small);
  transition: all 0.2s var(--ease-spring);
}
.search-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: var(--shadow);
}
.search-link:active {
  transform: scale(0.94);
}
.theme-toggle { border: 0; box-shadow: none; background: transparent; padding: 0; width: 38px; }
.theme-toggle-label { display: none; }
.theme-menu { box-shadow: var(--panel-bevel), var(--shadow-heavy); }
.home, .page { width: min(var(--site-width), calc(100% - 64px)); margin: auto; }
.page { max-width: var(--reading-width); padding: 64px 0 100px; min-height: 65vh; }
.page-wide { max-width: var(--site-width); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-small);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.button:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.button:active {
  transform: scale(0.96);
}
.button.primary {
  background: linear-gradient(180deg, #007aff 0%, #0062cc 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.button.primary:hover {
  opacity: .96;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.button.primary:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
}
.text-link { color: var(--accent); font-size: 13px; font-weight: 600; }
.text-link:hover { text-decoration: underline; }
.home-section { border-top: 1px solid var(--line); padding: 36px 0 48px; scroll-margin-top: 120px; }
.home > .home-section:first-of-type { border-top: 0; padding-top: 44px; }
.home-section h1 { font-size: 30px; line-height: 1.4; margin: 0; }
.home-topic-links { display: flex; flex-wrap: wrap; gap: 8px 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.home-topic-links a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 9999px; background: var(--panel); color: var(--body-copy); text-decoration: none; box-shadow: var(--shadow-small); transition: all 0.2s var(--ease-spring); }
.home-topic-links a:hover { border-color: var(--topic-accent, var(--accent)); color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.home-topic-links a:active { transform: scale(0.96); }
.home-topic-links span:not(.topic-dot) { font-size: 10px; color: var(--muted); padding: 1px 7px; background: var(--alt-bg); border-radius: 9999px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-heading .eyebrow { margin: 0 0 7px; }
.section-heading h2 { margin: 0; }
.section-heading > a { padding-bottom: 5px; flex-shrink: 0; }
.project-feature { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: start; border: 1px solid var(--glass-edge); border-radius: 22px; padding: 32px 34px; margin-bottom: 24px; background: var(--raised-bg); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); box-shadow: var(--panel-bevel), var(--shadow); transition: transform 0.25s var(--ease-spring), border-color 0.22s ease, box-shadow 0.25s ease; }
.project-feature + .project-feature { margin-top: 24px; border-top: 1px solid var(--line); }
@media (hover: hover) {
  .project-feature:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--panel-bevel), var(--shadow-hover); }
}
.project-visual { border-radius: 16px; overflow: hidden; background: var(--alt-bg); border: 1px solid var(--line); display: block; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06); }
.project-visual img { width: 100%; height: auto; display: block; }
.project-copy h3 { font-size: 30px; margin-bottom: 7px; }
.project-copy > p:not(.eyebrow) { font-size: 14px; color: var(--muted); line-height: 1.9; }
.project-copy .text-link { display: inline-block; margin: 24px 0 10px; }
.project-boundary { display: block; color: var(--muted); font-size: 11px; }
.related-link { display: block; font-size: 12px; color: var(--accent); border-top: 1px solid var(--line); padding-top: 15px; margin-top: 20px; }
.article-item { display: grid; grid-template-columns: 96px minmax(0,1fr) 28px; gap: 16px; align-items: baseline; border: 0; border-bottom: 1px solid var(--line); padding: 18px 16px; margin: 0; border-radius: 16px; background: transparent; transition: background-color 0.2s ease, transform 0.2s var(--ease-spring); }
.article-item:last-child { margin-bottom: 0; }
@media (hover: hover) {
  .article-item:hover { background: var(--subtle-bg); transform: scale(1.008); box-shadow: var(--shadow-small); }
  .article-item:hover .item-arrow { color: var(--accent); transform: translate(3px, -3px); }
  .article-item:hover .item-body h3 a { color: var(--accent); }
}
.article-item:focus-within { background: var(--subtle-bg); box-shadow: var(--shadow-small); }
.item-date { font-size: 11.5px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-weight: 600; }
.item-body h3 { margin-bottom: 6px; font-size: 17.5px; font-weight: 700; line-height: 1.45; letter-spacing: -0.015em; }
.item-body h3 a { transition: color 0.16s ease; }
.item-body p { color: var(--muted); font-size: 13px; line-height: 1.75; margin-bottom: 10px; max-width: 720px; }
.item-arrow { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--alt-bg); color: var(--muted); font-size: 13px; transition: transform 0.2s var(--ease-spring), color 0.18s ease, background 0.18s ease; }
.article-item:hover .item-arrow { background: var(--soft); color: var(--accent); }
.item-tags { display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: 11px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.item-tags span { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 9999px; border: 1px solid var(--line); background: var(--alt-bg); color: var(--tag-ink); font-size: 10.5px; font-weight: 600; }
.item-tags span::before { content: '#'; margin-right: 3px; color: var(--accent); font-weight: 700; }
.daily-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; }
.daily-grid > div:first-child { background: var(--raised-bg); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border: 1px solid var(--line); border-radius: 22px; padding: 28px 30px; box-shadow: var(--panel-bevel), var(--shadow); }
.daily-quote { margin: 0; }
.daily-quote blockquote { margin: 0; }
.daily-quote-zh { font-size: 17px; line-height: 1.9; margin-bottom: 12px; }
.daily-quote-en { font-size: 13px; line-height: 1.8; color: var(--muted); }
.daily-quote-meta { color: var(--muted); font-size: 11px; }
.daily-links a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; padding: 18px 22px; border: 1px solid var(--glass-edge); border-radius: 16px; margin-bottom: 14px; background: var(--raised-bg); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); box-shadow: var(--panel-bevel), var(--shadow-small); transition: transform 0.2s var(--ease-spring), border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; }
.daily-links a:last-child { margin-bottom: 0; }
.daily-links a:hover { border-color: var(--accent); background-color: var(--subtle-bg); transform: translateY(-2px); box-shadow: var(--panel-bevel), var(--shadow-hover); }
.daily-links a:active { transform: scale(0.98); }
.daily-links .eyebrow { grid-column: 1/-1; margin: 0; }
.daily-links strong { font-size: 15px; font-weight: 500; }
.site-footer { width: min(var(--site-width), calc(100% - 64px)); display: flex; justify-content: space-between; gap: 30px; margin: 20px auto 0; padding: 30px 0 38px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-brand { font-size: 12px; color: var(--ink); }
.footer-brand span { color: var(--muted); }
.site-footer p { font-size: 10px; margin: 8px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; align-content: start; }
.page-heading { margin-bottom: 36px; }
.page-heading h1 { margin-bottom: 18px; }
.about-contact { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; }
.about-contact a { color: var(--accent-dark); }
.about-contact a:hover { text-decoration: underline; }
.about-guestbook { margin-top: 36px; padding: clamp(18px, 4vw, 32px); border: 1px solid var(--line); border-radius: 12px; background: var(--raised-bg); box-shadow: var(--panel-bevel), var(--shadow-small); }
.about-guestbook h2 { margin: 8px 0 16px; }
.about-guestbook p { line-height: 1.8; overflow-wrap: anywhere; }
.about-guestbook .guestbook-note { color: var(--muted); font-size: 13px; }
.about-guestbook a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.private-message-form { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.private-message-form .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.private-message-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.private-message-form label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.private-message-form .required { color: #ff3b30; }
.private-message-form input,
.private-message-form textarea { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 14.5px; color: var(--ink); background: var(--surface, rgba(255, 255, 255, 0.7)); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.private-message-form input:focus,
.private-message-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--soft); }
.private-message-form textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.private-message-form .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 6px; }
.private-message-form .submit-btn { display: inline-flex; align-items: center; justify-content: center; font-family: inherit; font-size: 14px; font-weight: 600; color: #ffffff; background: var(--accent); border: 0; border-radius: 9999px; padding: 10px 24px; cursor: pointer; transition: all 0.18s var(--ease-spring); box-shadow: var(--shadow-small); }
.private-message-form .submit-btn:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }
.private-message-form .submit-btn:active:not(:disabled) { transform: scale(0.97); }
.private-message-form .submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.private-message-form .form-status { font-size: 13.5px; line-height: 1.5; }
.private-message-form .form-status.success { color: #34c759; font-weight: 600; }
.private-message-form .form-status.error { color: #ff3b30; }
.private-message-form .form-status.info { color: var(--muted); }
.lede { color: var(--muted); font-size: 16px; line-height: 1.9; }
.archive-tools { padding: 26px 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--panel-bevel), var(--shadow); margin-bottom: 30px; scroll-margin-top: 110px; }
.search-controls label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.search-input-wrap { display: flex; align-items: center; max-width: 640px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding-right: 4px; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08); }
.search-input-wrap:focus-within { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.search-input-wrap input { width: 100%; min-width: 0; padding: 13px 15px; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 14px; }
.clear-search { color: var(--accent-dark); background: transparent; border: 0; flex-shrink: 0; padding: 10px 16px; font-size: 12px; cursor: pointer; }
.filter-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.filter-list button { padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--panel); font-size: 12px; min-height: 38px; cursor: pointer; box-shadow: var(--panel-bevel), 0 1.5px 3px rgba(0, 0, 0, 0.06); transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease; }
.filter-list button:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); box-shadow: var(--panel-bevel), 0 3px 8px rgba(0, 0, 0, 0.12); }
.filter-list button:active,
.filter-list button[aria-pressed="true"] { color: var(--accent-dark); border-color: var(--accent); background: var(--soft); font-weight: 750; transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.14); }
.search-status { font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.search-empty { padding: 40px 0; color: var(--muted); }
.end-note { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 45px; color: var(--muted); font-size: 13px; }
.daily-archive-grid { display: grid; gap: 42px; margin-top: 45px; }
.daily-archive-grid section { background: var(--raised-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 12px; padding: 28px 30px; box-shadow: var(--panel-bevel), var(--shadow-small); }
.daily-archive-grid time { font-size: 12px; color: var(--muted); }
.study { background: var(--raised-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 12px; padding: 38px 44px; box-shadow: var(--panel-bevel), var(--shadow); }
.study-sentence { font-size: clamp(20px,3vw,26px); line-height: 1.65; margin: 22px 0; padding-left: 20px; border-left: 2px solid var(--accent-dark); overflow-wrap: anywhere; }
.study-sentence p { margin: 0; }
.study-source,.phonetic,.pos,.note { color: var(--muted); font-size: 13px; }
.vocab,.archive,.day-list { list-style: none; margin: 0; padding: 0; }
.vocab li,.archive li,.day-list li { padding: 23px 0; border-bottom: 1px solid var(--line); }
.archive p,.day-list p { color: var(--muted); margin: 10px 0 0; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.vocab-word { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font-weight: 650; margin-bottom: 6px; }
.vocab-word strong { font-size: 19px; }
.example { font-size: 14px; color: var(--muted); font-style: italic; }
.week { margin-top: 40px; scroll-margin-top: 120px; }
.week h2 { font-size: 22px; }
.pager { margin-top: 35px; display: flex; gap: 24px; justify-content: space-between; }
.pager a,.prose a,.study a { color: var(--accent-dark); text-decoration: underline; }
.prose { font-size: 17px; line-height: 1.9; background: var(--raised-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 12px; padding: 38px 44px; box-shadow: var(--panel-bevel), var(--shadow); }
.prose h2 { margin-top: 40px; font-size: 24px; }
.skills-category { margin-top: 44px; scroll-margin-top: 110px; }
.skills-category-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.skills-category-head h2 { margin: 0; font-size: 23px; }
.skills-category-desc { margin: 10px 0 6px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.skill-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.skill-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 3px; border: 1px solid var(--line); background: var(--alt-bg); color: var(--ink); }
.skill-badge.scope-global { border-color: var(--raised-border); background: var(--soft); color: var(--accent-dark); }
.skill-badge.scope-vendor { border-color: rgba(217, 130, 43, 0.45); color: var(--warm); }
.skill-badge.scope-project { color: var(--note); }
.skills-arch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.skills-arch-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--panel-bevel), var(--shadow-small); transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), border-color 0.2s ease, box-shadow 0.2s ease; }
.skills-arch-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--panel-bevel), var(--shadow-hover); }
.skills-arch-card h3 { font-size: 17px; margin-bottom: 8px; }
.skills-arch-card p { font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 12px; }
.skills-arch-card pre { margin: 0; padding: 14px 16px; overflow-x: auto; border-radius: 6px; background: var(--code-bg); color: var(--code-ink); font-size: 12px; line-height: 1.7; border: 1px solid var(--line); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.05); }
.skills-code-block {
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--code-bg);
}
.skills-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--code-ink);
}
.skills-code-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.skills-code-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  transition: all 0.16s ease;
}
.skills-code-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}
.skills-code-block pre {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.skills-code-block.is-collapsed .skills-code-header {
  border-bottom: none;
  cursor: pointer;
}
.skills-code-block.is-collapsed pre {
  display: none !important;
}
.project-feature > *, .skills-arch-card, .item-body { min-width: 0; }
.skill-badge { max-width: 100%; overflow-wrap: anywhere; }
.project-notes { margin-top: 18px; border-top: 1px solid var(--line); }
.project-notes summary { padding-block: 12px; min-height: 44px; font-size: 13px; color: var(--accent-dark); cursor: pointer; }
.project-notes .related-link { margin-top: 0; padding-block: 12px; line-height: 1.7; }
@media (max-width: 1000px) {
  .brand-caption { display: none; }
}

@media (max-width: 860px) {
  .site-header {
    backdrop-filter: var(--glass);
    -webkit-backdrop-filter: var(--glass);
  }
  .nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    min-height: auto;
    width: calc(100% - 32px);
  }
  .brand {
    order: 1;
    font-size: 15px;
  }
  .brand-caption {
    display: none;
  }
  .nav-actions {
    display: contents;
  }
  .system-status {
    order: 2;
    margin-left: auto;
  }
  .search-link {
    order: 3;
  }
  .theme-picker {
    order: 4;
    position: relative;
  }
  .nav-links {
    order: 5;
    width: 100%;
    position: static;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    background: rgba(60, 60, 67, 0.08);
    border: 1px solid var(--line);
    border-radius: 9999px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-sizing: border-box;
  }
  :root[data-theme="dark"] .nav-links {
    background: rgba(255, 255, 255, 0.08);
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    flex: 1 0 auto;
    text-align: center;
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
    min-height: 32px;
    border-radius: 9999px;
  }
  .project-feature { gap: 30px; }
  .daily-grid { gap: 35px; }
  .skills-arch-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .nav, .home, .page, .site-footer {
    width: calc(100% - 24px);
  }
  .brand {
    font-size: 14.5px;
  }
  .system-status {
    display: none;
  }
  .nav-links {
    gap: 2px;
    padding: 2px;
  }
  .nav-links a {
    padding: 5px 8px;
    font-size: 12.5px;
    min-height: 28px;
  }
  .section-heading {
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
  }
  .section-heading h2 {
    font-size: 22px;
  }
  .section-heading > a {
    font-size: 12px;
  }
  .home-section {
    padding: 26px 0 32px;
  }
  .project-feature {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px 16px;
  }
  .project-copy h3 {
    font-size: 24px;
  }
  .project-copy .text-link, .related-link {
    min-height: 44px;
    padding-block: 12px;
  }
  .project-boundary {
    font-size: 12px;
    line-height: 1.7;
  }
  .item-body h3, .skills-arch-card h3 {
    overflow-wrap: anywhere;
  }
  .item-tags, .skill-badges {
    overflow-wrap: anywhere;
  }
  .skills-arch-card {
    padding: 18px 14px;
  }
  .skills-arch-card pre {
    max-width: 100%;
    overscroll-behavior-x: contain;
  }
  .skills-category-head h2 {
    font-size: 21px;
    overflow-wrap: anywhere;
  }
  .daily-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .site-footer {
    flex-direction: column;
    gap: 20px;
    margin-top: 0;
    padding-top: 24px;
  }
  .page {
    padding: 26px 0 60px;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  .page-heading h1 {
    font-size: 28px;
    overflow-wrap: anywhere;
  }
  .lede {
    font-size: 15px;
  }
  .filter-list {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding: 2px 0 8px;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }
  .filter-list button {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-height: 40px;
    font-size: 12px;
    padding: 6px 14px;
  }
  .clear-search {
    min-height: 44px;
  }
  .search-input-wrap input {
    font-size: 16px;
  }
  .prose {
    font-size: 16px;
    padding: 22px 18px;
    border-radius: 18px;
  }
  .study {
    padding: 22px 18px;
    border-radius: 18px;
  }
}


/* ==========================================================================
   方案 1：工程工作台 / 仪表控制台 (Workbench Console)
   ========================================================================== */
.workbench-home {
  padding-bottom: 70px;
}

/* 控制台外壳机箱 */
.workbench-console {
  margin-top: 24px;
  margin-bottom: 44px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--raised-bg);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  box-shadow: var(--panel-bevel), var(--shadow);
  overflow: hidden;
  position: relative;
}

.workbench-console::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #007aff 0%, #5856d6 35%, #ff9500 70%, #34c759 100%);
  opacity: 0.85;
}

/* 控制台状态顶栏 */
.workbench-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(60, 60, 67, 0.035);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
}

:root[data-theme="dark"] .workbench-header {
  background: rgba(255, 255, 255, 0.02);
}

.workbench-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--soft);
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid var(--line);
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.25);
  animation: status-pulse-glow 2s infinite ease-in-out;
}

@keyframes status-pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.workbench-meta-tags {
  display: flex;
  gap: 8px;
}

.workbench-meta-tags .chip {
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--alt-bg);
  color: var(--muted);
  font-weight: 500;
}

/* 主面板网格：左侧介绍+指标，右侧仪器示波器 */
.workbench-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  padding: 36px 36px 28px;
  align-items: center;
}

.workbench-intro {
  min-width: 0;
}

.workbench-eyebrow {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
  display: inline-block;
  background: var(--soft);
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid var(--line);
}

.workbench-main-title {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #5856d6 50%, #af52de 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.workbench-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--body-copy);
  margin-bottom: 24px;
  max-width: 520px;
}

/* 4 格仪表指标 HUD */
.workbench-hud-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--alt-bg);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.hud-item {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding-right: 8px;
}

.hud-item:last-child {
  border-right: 0;
  padding-right: 0;
}

.hud-num {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.hud-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
}

.hud-sub {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* 快捷按钮组 */
.workbench-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.workbench-actions .button {
  gap: 8px;
  font-size: 13.5px;
}

.button-arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}

.button:hover .button-arrow {
  transform: translate(2px, -2px);
}

/* 仪器示波器机舱 */
.workbench-scope-bay {
  min-width: 0;
  position: relative;
}

.scope-bay-frame {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  box-shadow: var(--shadow);
  padding: 14px 16px 14px;
  position: relative;
}

.scope-bay-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  color: var(--accent);
}

.scope-bezel-screws {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
}

.scope-bezel-screws .screw {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.scope-title-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 6px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
}

.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34c759;
}

.scope-screen-spec {
  justify-self: end;
  line-height: 1;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.scope-bay-body {
  position: relative;
  border-radius: 16px;
  background: var(--alt-bg);
  border: 1px solid var(--line);
  overflow: visible;
  padding: 8px;
}

.scope-bay-body .theme-spectrum-wrap {
  margin: 0;
}

.scope-bay-body .robot-stage {
  height: 120px;
  margin-bottom: 0;
}

.scope-bay-body .theme-spectrum {
  margin-top: 8px;
}

/* 控制台底部专题频带 */
.workbench-channel-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  border-top: 1px solid var(--line);
  background: rgba(60, 60, 67, 0.03);
}

:root[data-theme="dark"] .workbench-channel-bar {
  background: rgba(255, 255, 255, 0.015);
}

.channel-label {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex-shrink: 0;
}

.workbench-channel-bar .home-topic-links {
  border-bottom: 0;
  padding-bottom: 0;
  gap: 8px;
}

.home-topic-links .topic-dot,
.topic-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  padding: 0;
  border-radius: 50%;
  background: var(--topic-accent, var(--accent));
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.home-topic-links a:hover .topic-dot {
  transform: scale(1.35);
}

/* ==========================================================================
   工程交互项目展台 (快速预览小卡片矩阵)
   ========================================================================== */
.workbench-demos-section {
  padding-top: 6px;
  padding-bottom: 28px;
}

.workbench-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-mini-card {
  display: flex;
  flex-direction: column;
  background: var(--raised-bg);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--panel-bevel), var(--shadow);
  transition: transform 0.25s var(--ease-spring),
              border-color 0.22s ease,
              box-shadow 0.25s ease;
  position: relative;
  min-width: 0;
}

.project-mini-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--panel-bevel), var(--shadow-hover);
}

.project-mini-card:active {
  transform: scale(0.98);
}

.project-mini-link {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.project-mini-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 20px;
}

.project-mini-visual {
  position: relative;
  width: 100%;
  aspect-ratio: auto;
  min-height: 170px;
  background: var(--panel);
  overflow: hidden;
  border-bottom: 0;
  border-right: 1px solid var(--line);
}

.project-mini-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease-spring);
}

.project-mini-card:hover .project-mini-visual img {
  transform: scale(1.06);
}

.project-mini-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

:root[data-theme="dark"] .project-mini-chip {
  background: rgba(0, 0, 0, 0.75);
  border-color: rgba(255, 255, 255, 0.15);
}

.project-mini-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 8px;
}

.project-mini-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.project-mini-title {
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
  transition: color 0.18s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-mini-card:hover .project-mini-title {
  color: var(--accent);
}

.project-mini-arrow {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-spring), background 0.2s ease, color 0.2s ease;
  margin-top: 1px;
}

.project-mini-card:hover .project-mini-arrow {
  color: #ffffff;
  background: var(--accent);
  transform: translate(2px, -2px);
}

.project-mini-subtitle {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.project-mini-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}

.project-mini-cta {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--soft);
  padding: 4px 12px;
  border-radius: 9999px;
  transition: gap 0.2s ease, background 0.2s ease, color 0.2s ease;
}

:root[data-theme="dark"] .project-mini-cta {
  color: var(--accent);
}

.project-mini-card:hover .project-mini-cta {
  gap: 6px;
  background: var(--accent);
  color: #ffffff;
}

.project-mini-note-count {
  color: var(--muted);
  font-size: 11px;
  font-family: ui-monospace, Consolas, monospace;
}

@media (max-width: 1040px) {
  .workbench-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-mini-card,
  .project-mini-visual img,
  .project-mini-arrow {
    transition: none !important;
    transform: none !important;
  }
}

/* ==========================================================================
   双列主工作区 (Workbench Main Deck: 左文章，右侧栏遥测)
   ========================================================================== */
.deck-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(290px, 1fr);
  gap: 36px;
  align-items: start;
}

.deck-primary-column {
  min-width: 0;
}

.deck-articles-list {
  background: var(--raised-bg);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 8px;
  box-shadow: var(--panel-bevel), var(--shadow);
}

.deck-more-articles {
  margin-top: 20px;
}

.load-more-btn {
  width: 100%;
  padding: 13px 20px;
  font-weight: 700;
  font-size: 13.5px;
  gap: 10px;
  background: var(--panel);
  border-radius: 9999px;
  border: 1px solid var(--line);
}

/* 侧栏遥测面板 (iOS 18 Smart Stack) */
.deck-aside-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 96px;
}

.aside-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--raised-bg);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  padding: 22px 24px;
  box-shadow: var(--panel-bevel), var(--shadow);
}

.aside-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.aside-badge {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--soft);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--line);
}

.aside-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

/* 每日思考在侧栏的优化 */
.daily-quote-box .eyebrow {
  display: none;
}

.daily-quote-box blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin: 0;
}

.daily-quote-box .daily-quote-zh {
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 8px;
}

.daily-quote-box .daily-quote-en {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

/* 日常追踪卡片中的条目 */
.aside-feed-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--alt-bg);
  transition: transform 0.2s var(--ease-spring), border-color 0.18s ease, background 0.18s ease;
}

.feed-item:hover {
  border-color: var(--accent);
  background: var(--subtle-bg);
  transform: translateY(-2px);
}

.feed-tag {
  grid-column: 1 / -1;
  font-size: 10.5px;
  font-family: ui-monospace, Consolas, monospace;
  color: var(--accent);
  font-weight: 600;
}

.feed-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.feed-arrow {
  color: var(--accent);
  font-size: 13px;
}

/* 常用小工具卡片 */
.aside-text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.aside-tools-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.aside-tools-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--alt-bg);
  border: 1px solid var(--line);
  transition: all 0.18s var(--ease-spring);
}

.aside-tools-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--soft);
  transform: translateY(-1.5px);
}

.aside-more-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* ==========================================================================
   响应式断点适配
   ========================================================================== */
@media (max-width: 980px) {
  .workbench-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 26px 20px;
  }

  .deck-split-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .deck-aside-column {
    position: static;
  }
}


/* Task-first hierarchy shared by the archive, home and project directory. */
.section-articles .site-ambience, .layout-article .site-ambience, .layout-skill .site-ambience { opacity: .88; }
.section-tools .site-ambience { opacity: .92; }
.page-heading .lede { max-width: 48em; }
.workbench-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 22px 0 0; }
.workbench-actions > .text-link { padding: 12px 0; }
.workbench-projects-grid .project-mini-card { box-shadow: var(--panel-bevel), var(--shadow); }
.project-mini-visual { border-bottom: 0; border-right: 1px solid var(--line); background: var(--alt-bg); }
.project-mini-body { padding: 24px 18px; gap: 12px; min-width: 0; }
.project-mini-subtitle { font-size: 13px; line-height: 1.8; }
.project-mini-note-count { font-size: 11px; }
.project-mini-footer { flex-wrap: wrap; }
.scope-pause { display: block; margin: 0 0 4px auto; border: 1px solid var(--glass-edge); border-radius: 9999px; background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--muted); padding: 6px 12px; font: inherit; font-size: 12px; cursor: pointer; min-height: 32px; box-shadow: var(--panel-bevel), var(--shadow-small); }
.scope-pause[aria-pressed="true"] { color: var(--accent); }
.explore-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.explore-links a { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; border: 1px solid var(--glass-edge); border-radius: 20px; background: var(--raised-bg); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); box-shadow: var(--panel-bevel), var(--shadow-small); min-width: 0; transition: transform 0.2s var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease; }
.explore-links a:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--panel-bevel), var(--shadow-hover); }
.explore-links .eyebrow { margin: 0; }
.explore-links strong { font-size: 17px; line-height: 1.6; }
.explore-links a > span:last-child { font-size: 13px; color: var(--accent); font-weight: 600; }
.project-selected-notes .related-link { margin: 10px 0 0; padding-top: 10px; line-height: 1.8; }
.section-articles .archive-tools { padding: 28px 24px; border: 1px solid var(--glass-edge); border-radius: 24px; box-shadow: var(--panel-bevel), var(--shadow); background: var(--raised-bg); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); }
.section-articles .search-input-wrap { max-width: 780px; }
.clear-topic { margin-top: 8px; padding-left: 0; text-decoration: underline; }
mark { background: var(--soft); color: var(--accent); border-radius: 4px; padding: 0 2px; }
.filter-list button { box-shadow: var(--panel-bevel), var(--shadow-small); border-color: var(--glass-edge); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 13px; min-height: 40px; border-radius: 9999px; padding: 6px 16px; }
.filter-list button[aria-pressed="true"] { box-shadow: var(--panel-bevel), var(--shadow-small); transform: none; }
@media (max-width: 980px) and (min-width: 621px) {
  .workbench-hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 20px; }
  .workbench-meta-tags { display: none; }
}
@media (max-width: 720px) {
  .project-mini-link {
    grid-template-columns: 1fr;
  }
  .project-mini-visual {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    aspect-ratio: 16 / 9;
    max-height: 190px;
    min-height: 140px;
  }
  .workbench-projects-grid {
    grid-template-columns: 1fr;
  }
  .project-mini-body {
    padding: 18px 16px;
    gap: 10px;
  }
  .project-mini-title {
    font-size: 17px;
  }
  .project-mini-subtitle {
    font-size: 13px;
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .workbench-console {
    margin-top: 18px;
    margin-bottom: 28px;
    border-radius: 20px;
  }
  .workbench-header {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .workbench-scope-bay,
  .workbench-meta-tags,
  .workbench-eyebrow {
    display: none;
  }
  .workbench-main-title {
    font-size: clamp(23px, 6.8vw, 27px);
    line-height: 1.4;
  }
  .workbench-hero-grid {
    padding: 18px 14px;
    gap: 18px;
  }
  .workbench-hud-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
  }
  .hud-item {
    border-right: 0;
  }
  .hud-item:nth-child(1),
  .hud-item:nth-child(2) {
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
  }
  .hud-num {
    font-size: 20px;
  }
  .workbench-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .workbench-actions .button {
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
  }
  .workbench-actions > .text-link {
    text-align: center;
    padding: 6px 0;
    min-height: 36px;
  }
  .workbench-summary {
    margin-top: 10px;
    font-size: 11px;
  }
  .workbench-channel-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
  }
  .workbench-channel-bar .channel-label {
    font-size: 11px;
  }
  .workbench-channel-bar .home-topic-links {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding-bottom: 2px;
  }
  .workbench-channel-bar .home-topic-links::-webkit-scrollbar {
    display: none;
  }
  .workbench-channel-bar .home-topic-links a {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 5px 12px;
    font-size: 12px;
  }
  .aside-card {
    padding: 16px 14px;
    border-radius: 18px;
  }
  .article-item {
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 8px 12px;
    padding: 16px 14px;
    border-radius: 14px;
  }
  .item-date {
    grid-column: 1 / -1;
    padding: 0;
    font-size: 11px;
  }
  .item-body h3 {
    font-size: 17px;
  }
  .item-body p {
    font-size: 13px;
  }
  .workbench-demos-section .section-heading .eyebrow {
    display: none;
  }
  .explore-links {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .explore-links a {
    padding: 16px 18px;
    border-radius: 16px;
  }
  .section-articles .archive-tools {
    padding: 18px 14px;
    border-radius: 18px;
  }
  .scope-pause {
    min-height: 44px;
  }
}

.workbench-console,
.scope-bay-frame,
.project-mini-card,
.project-feature,
.deck-articles-list,
.aside-card,
.archive-tools,
.daily-grid > div:first-child,
.daily-links a,
.daily-archive-grid section,
.study,
.prose,
.skills-arch-card,
.article-robot-card,
.back-to-top,
.explore-links a,
.load-more-btn {
  background: var(--raised-bg);
  border-color: var(--glass-edge);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
}

.theme-menu {
  background: var(--popover-bg);
  border-color: var(--glass-edge);
  -webkit-backdrop-filter: blur(36px) saturate(210%);
  backdrop-filter: blur(36px) saturate(210%);
}

.robot-speech {
  background: var(--speech-bg, rgba(255, 255, 255, 0.55));
  border-color: var(--speech-border, var(--glass-edge));
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  backdrop-filter: blur(16px) saturate(190%);
}

.button:not(.primary),
.home-topic-links a,
.system-status,
.search-link {
  border-color: var(--glass-edge);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  backdrop-filter: blur(20px) saturate(190%);
  box-shadow: var(--panel-bevel), var(--shadow-small);
}

/* ==========================================================================
   iOS 18 Fluid Interactive Motion System (全站流体弹簧动效体系)
   ========================================================================== */

/* 1. 顶部导航栏胶囊流体滑块 (Segmented Control Fluid Glider) */
.nav-links {
  position: relative;
}

.nav-links a {
  position: relative;
  z-index: 1;
  transition:
    color 0.22s ease,
    transform 0.34s var(--ease-spring-bounce),
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-pill-glider {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 9999px;
  background: var(--subtle-bg);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.09),
    0 1px 2px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.96);
  transition:
    transform 0.38s var(--ease-spring-snappy),
    width 0.34s var(--ease-spring-snappy),
    height 0.34s var(--ease-spring-snappy),
    opacity 0.2s ease,
    background-color 0.22s ease;
  will-change: transform, width, height;
}

:root[data-theme="dark"] .nav-pill-glider {
  background: var(--subtle-bg);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.nav-pill-glider.is-gliding {
  transform: translate3d(var(--glider-x, 0px), var(--glider-y, 0px), 0) scaleX(1.04) scaleY(0.94);
}

.nav-links.has-glider a[aria-current="page"],
.nav-links.has-glider a:hover {
  background: transparent;
  box-shadow: none;
}

.nav-links a:active,
.nav-links a.is-pressing {
  transform: scale(0.91) !important;
  transition-duration: 80ms !important;
}

/* 2. 品牌徽标与搜索按钮弹簧微动效 */
.brand {
  transition: transform 0.34s var(--ease-spring-bounce), opacity 0.2s ease;
}

.brand-mark {
  transition: transform 0.42s var(--ease-spring-bounce), box-shadow 0.28s var(--ease-spring);
}

@media (hover: hover) {
  .brand:hover .brand-mark {
    transform: scale(1.1) rotate(-6deg);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.38), inset 0 1px 1px rgba(255, 255, 255, 0.55);
  }
}

.brand:active,
.brand.is-pressing {
  transform: scale(0.95) !important;
  transition-duration: 80ms !important;
}

.search-link {
  transition:
    transform 0.38s var(--ease-spring-bounce),
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.25s var(--ease-spring);
}

.search-link svg {
  transition: transform 0.38s var(--ease-spring-bounce);
}

@media (hover: hover) {
  .search-link:hover {
    transform: scale(1.08);
  }

  .search-link:hover svg {
    transform: scale(1.12) rotate(-8deg);
  }
}

.search-link:active,
.search-link.is-pressing {
  transform: scale(0.88) !important;
  transition-duration: 80ms !important;
}

/* 3. 按钮、药丸胶囊与筛选器物理按压回弹 (Tactile Press & Spring Release) */
.button,
.load-more-btn,
.home-topic-links a,
.filter-list button,
.scope-pause {
  transition:
    transform 0.38s var(--ease-spring-bounce),
    box-shadow 0.28s var(--ease-spring),
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.button span[aria-hidden="true"],
.load-more-btn span[aria-hidden="true"],
.aside-tools-list a span[aria-hidden="true"],
.explore-links a > span:last-child,
.feed-arrow {
  display: inline-block;
  transition: transform 0.34s var(--ease-spring-bounce), color 0.2s ease;
}

@media (hover: hover) {
  .button:hover,
  .load-more-btn:hover {
    transform: translateY(-2.5px) scale(1.02);
  }

  .button:hover span[aria-hidden="true"],
  .load-more-btn:hover span[aria-hidden="true"] {
    transform: translateX(4px);
  }

  .home-topic-links a:hover {
    transform: translateY(-2.5px) scale(1.03);
  }

  .filter-list button:hover {
    transform: translateY(-2px) scale(1.03);
  }

  .scope-pause:hover {
    transform: scale(1.05);
    border-color: var(--accent);
    color: var(--ink);
  }
}

.button:active,
.button.is-pressing,
.load-more-btn:active,
.load-more-btn.is-pressing,
.home-topic-links a:active,
.home-topic-links a.is-pressing,
.filter-list button:active,
.filter-list button.is-pressing,
.scope-pause:active,
.scope-pause.is-pressing,
.clear-search:active,
.clear-search.is-pressing {
  transform: scale(0.93) !important;
  transition-duration: 80ms !important;
}

/* 文本链接微动效 */
.text-link,
.aside-more-link,
.related-link {
  transition: color 0.18s ease, transform 0.32s var(--ease-spring-bounce), opacity 0.18s ease;
}

@media (hover: hover) {
  .text-link:hover,
  .aside-more-link:hover {
    transform: translateX(3px);
  }

  .related-link:hover {
    transform: translateX(4px);
  }
}

.text-link:active,
.aside-more-link:active,
.related-link:active {
  transform: scale(0.96);
}

/* 4. 列表行、工具入口与 HUD 指标微交互 (Inset Grouped Row Physics) */
.article-item {
  transition:
    background-color 0.22s ease,
    transform 0.36s var(--ease-spring),
    box-shadow 0.24s var(--ease-spring);
}

.item-arrow {
  transition:
    transform 0.36s var(--ease-spring-bounce),
    color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.item-tags span {
  transition: transform 0.3s var(--ease-spring-bounce), border-color 0.2s ease, background-color 0.2s ease;
}

@media (hover: hover) {
  .article-item:hover {
    background: var(--subtle-bg);
    transform: scale(1.008) translateX(2px);
    box-shadow: var(--shadow-small);
  }

  .article-item:hover .item-arrow {
    background: var(--accent);
    color: #ffffff;
    transform: translate(3px, -3px) scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 122, 255, 0.3);
  }

  .article-item:hover .item-tags span {
    border-color: rgba(0, 122, 255, 0.24);
  }

  .feed-item:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-small);
  }

  .feed-item:hover .feed-arrow {
    transform: translate(3px, -3px) scale(1.15);
  }

  .aside-tools-list a:hover {
    transform: translateX(4px) scale(1.01);
    box-shadow: var(--shadow-small);
  }

  .aside-tools-list a:hover span[aria-hidden="true"] {
    transform: translateX(4px);
  }

  .explore-links a:hover > span:last-child {
    transform: translateX(5px);
  }
}

.article-item:active,
.article-item.is-pressing {
  transform: scale(0.985) !important;
  transition-duration: 85ms !important;
}

.feed-item:active,
.feed-item.is-pressing,
.aside-tools-list a:active,
.aside-tools-list a.is-pressing {
  transform: scale(0.965) !important;
  transition-duration: 80ms !important;
}

/* HUD 指标悬停微弹跳 */
.hud-item {
  transition: transform 0.34s var(--ease-spring-bounce);
}

.hud-num {
  transition: transform 0.38s var(--ease-spring-bounce), color 0.2s ease;
  display: inline-block;
  transform-origin: left center;
}

@media (hover: hover) {
  .hud-item:hover .hud-num {
    transform: scale(1.07) translateY(-1px);
  }
}

/* 5. 卡片按压触感与毛玻璃动态追光 (Specular Glass Spotlight & Card Squish) */
.project-mini-card,
.project-feature,
.aside-card,
.skills-arch-card,
.explore-links a,
.daily-links a {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.42s var(--ease-spring),
    border-color 0.24s ease,
    box-shadow 0.32s var(--ease-spring),
    background-color 0.24s ease;
}

.project-mini-card:active,
.project-mini-card.is-pressing,
.explore-links a:active,
.explore-links a.is-pressing,
.daily-links a:active,
.daily-links a.is-pressing,
.skills-arch-card:active,
.skills-arch-card.is-pressing {
  transform: scale(0.976) !important;
  transition-duration: 90ms !important;
}

.ios-specular {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  background: radial-gradient(
    360px circle at var(--spot-x, 50%) var(--spot-y, 0%),
    rgba(255, 255, 255, 0.28),
    transparent 68%
  );
  transition: opacity 0.35s ease;
}

:root[data-theme="dark"] .ios-specular {
  background: radial-gradient(
    360px circle at var(--spot-x, 50%) var(--spot-y, 0%),
    rgba(255, 255, 255, 0.09),
    transparent 68%
  );
}

@media (hover: hover) and (pointer: fine) {
  *:hover > .ios-specular {
    opacity: 1;
  }
}

/* 6. 折叠详情面板 (Accordion Details) 与搜索筛选流体动画 */
.project-notes summary {
  transition: color 0.2s ease, transform 0.28s var(--ease-spring-bounce);
}

.project-notes summary:active {
  transform: scale(0.97);
}

.project-notes[open] > *:not(summary) {
  animation: ios-accordion-in 0.34s var(--ease-spring);
}

@keyframes ios-accordion-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.article-item.is-filtering-in {
  animation: ios-filter-pop 0.38s var(--ease-spring) both;
  animation-delay: calc(var(--filter-idx, 0) * 32ms);
}

@keyframes ios-filter-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   7. 全站胶囊、按钮、徽章与图标几何/视觉居中校准 (Optical & Flex Text Centering)
   ========================================================================== */
.nav-links a,
.button,
.load-more-btn,
.home-topic-links a,
.filter-list button,
.project-mini-cta,
.scope-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

.load-more-btn {
  display: flex;
}

.scope-pause {
  display: flex;
  width: fit-content;
  margin: 0 0 6px auto;
}

.workbench-status-badge,
.workbench-eyebrow,
.workbench-meta-tags .chip,
.project-mini-chip,
.aside-badge,
.skill-badge,
.item-tags span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

.home-topic-links span:not(.topic-dot) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  line-height: 1;
  text-align: center;
}

.item-arrow,
.project-mini-arrow,
.search-link,
.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

.item-arrow {
  align-self: center;
  justify-self: center;
}

.feed-arrow {
  align-self: center;
  line-height: 1;
}

@media (max-width: 620px) {
  .workbench-header {
    justify-content: center;
    text-align: center;
  }

  .workbench-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .workbench-main-title,
  .workbench-desc {
    text-align: center;
    margin-inline: auto;
  }

  .workbench-actions {
    width: 100%;
    align-items: center;
  }

  .workbench-hud-grid .hud-item {
    align-items: center;
    text-align: center;
    padding-right: 0;
  }

  .workbench-hud-grid .hud-num {
    transform-origin: center;
  }

  .workbench-actions > .text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  .workbench-summary {
    justify-content: center;
    text-align: center;
  }

  .workbench-channel-bar {
    align-items: center;
    text-align: center;
  }

  .workbench-channel-bar .home-topic-links {
    justify-content: safe center;
  }

  .site-footer {
    align-items: center;
    text-align: center;
  }

  .site-footer nav {
    justify-content: center;
  }
}
