/* VV Skill — Agent / AI lab · minimal tech surface */
:root {
  --bg-deep: #030508;
  --bg-elevated: rgba(10, 14, 24, 0.78);
  --bg-card: rgba(12, 16, 28, 0.58);
  --border-subtle: rgba(100, 130, 200, 0.1);
  --border-glow: rgba(56, 189, 248, 0.38);
  --text: #eef2ff;
  --text-muted: rgba(170, 188, 220, 0.62);
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --accent-3: #38bdf8;
  --radius-lg: 16px;
  --radius-md: 10px;
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow-glow: 0 0 80px rgba(34, 211, 238, 0.06);
  --header-bg: rgba(3, 5, 10, 0.72);
  --footer-bg: rgba(3, 5, 10, 0.55);
  --dropdown-bg: rgba(6, 9, 18, 0.97);
  --dropdown-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
  --code-bg: rgba(4, 6, 12, 0.65);
  --surface-a: rgba(14, 18, 32, 0.7);
  --surface-b: rgba(4, 7, 14, 0.4);
  --surface-c: rgba(14, 18, 32, 0.82);
  --surface-d: rgba(4, 7, 14, 0.45);
  --logo-cutout: rgba(3, 5, 10, 0.4);
  --lang-switch-bg: rgba(255, 255, 255, 0.035);
  --chip-active-bg: rgba(34, 211, 238, 0.09);
  --card-hover-shadow: 0 24px 56px rgba(0, 0, 0, 0.4);
  --btn-ghost-hover: rgba(255, 255, 255, 0.05);
  --orbit-core-inset: rgba(255, 255, 255, 0.05);
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-2-soft: rgba(167, 139, 250, 0.1);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg-deep: #f4f7fc;
  --bg-elevated: rgba(255, 255, 255, 0.94);
  --bg-card: rgba(255, 255, 255, 0.97);
  --border-subtle: rgba(55, 75, 120, 0.12);
  --border-glow: rgba(2, 132, 199, 0.32);
  --text: #0f172a;
  --text-muted: rgba(51, 65, 85, 0.72);
  --accent: #0891b2;
  --accent-2: #7c3aed;
  --accent-3: #0284c7;
  --shadow-glow: 0 0 56px rgba(8, 145, 178, 0.1);
  --header-bg: rgba(255, 255, 255, 0.9);
  --footer-bg: rgba(248, 250, 252, 0.96);
  --dropdown-bg: rgba(255, 255, 255, 0.99);
  --dropdown-shadow: 0 22px 52px rgba(15, 40, 80, 0.1);
  --code-bg: rgba(241, 245, 249, 0.98);
  --surface-a: rgba(255, 255, 255, 0.96);
  --surface-b: rgba(238, 244, 252, 0.92);
  --surface-c: rgba(255, 255, 255, 0.99);
  --surface-d: rgba(236, 244, 255, 0.94);
  --logo-cutout: rgba(255, 255, 255, 0.55);
  --lang-switch-bg: rgba(15, 23, 42, 0.05);
  --chip-active-bg: rgba(8, 145, 178, 0.1);
  --card-hover-shadow: 0 22px 52px rgba(15, 40, 80, 0.1);
  --btn-ghost-hover: rgba(15, 23, 42, 0.05);
  --orbit-core-inset: rgba(255, 255, 255, 0.88);
  --accent-soft: rgba(8, 145, 178, 0.1);
  --accent-2-soft: rgba(124, 58, 237, 0.08);
}

html[data-theme="light"] .noise {
  opacity: 0.02;
}

html[data-theme="light"] .grid-bg {
  background:
    radial-gradient(ellipse 85% 55% at 50% -15%, rgba(8, 145, 178, 0.09), transparent),
    radial-gradient(ellipse 65% 45% at 100% 45%, rgba(124, 58, 237, 0.06), transparent),
    radial-gradient(ellipse 55% 35% at 0% 85%, rgba(2, 132, 199, 0.05), transparent);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.58;
  letter-spacing: -0.01em;
  color: var(--text);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 110% 65% at 50% -18%, var(--accent-soft), transparent 58%),
    radial-gradient(ellipse 75% 55% at 100% 20%, var(--accent-2-soft), transparent 52%),
    radial-gradient(ellipse 60% 45% at 0% 75%, rgba(56, 189, 248, 0.04), transparent 50%);
  overflow-x: hidden;
}

::selection {
  background: rgba(34, 211, 238, 0.22);
  color: var(--text);
}

html[data-theme="light"] ::selection {
  background: rgba(8, 145, 178, 0.2);
}

html[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 110% 65% at 50% -18%, rgba(8, 145, 178, 0.06), transparent 58%),
    radial-gradient(ellipse 75% 55% at 100% 20%, rgba(124, 58, 237, 0.04), transparent 52%),
    radial-gradient(ellipse 60% 45% at 0% 75%, rgba(2, 132, 199, 0.035), transparent 50%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1240px, 100% - 4rem);
  margin-inline: auto;
}

/* Ambient */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.028;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 无网格线：仅保留柔和光晕，避免「棋盘格」廉价感 */
.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 58% at 50% -10%, rgba(34, 211, 238, 0.075), transparent 55%),
    radial-gradient(ellipse 72% 48% at 100% 42%, rgba(167, 139, 250, 0.055), transparent 58%),
    radial-gradient(ellipse 58% 38% at 0% 88%, rgba(56, 189, 248, 0.04), transparent 60%);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px) saturate(1.15);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.1rem 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--lang-switch-bg);
  border: 1px solid var(--border-subtle);
}

.lang-btn {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

button.lang-btn {
  appearance: none;
}

a.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
}

a.lang-btn:hover {
  color: var(--text);
}

span.lang-btn.is-active {
  cursor: default;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.is-active {
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2);
}

/* 语言下拉：触发器为圆角按钮，面板右对齐；选项为「国旗 + 语言」 */
.lang-dropdown.nav-dropdown {
  padding-bottom: 0.35rem;
}

button.lang-dropdown__trigger {
  appearance: none;
}

.lang-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--lang-switch-bg);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.lang-dropdown__trigger:hover {
  color: var(--text);
}

.lang-dropdown__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* 避免 Outfit 等西文字体“吃掉”国旗 emoji，显式走系统彩色 emoji 字体 */
.lang-dropdown__flag {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Twemoji Mozilla", emoji;
  font-size: 1.15em;
  line-height: 1;
  font-style: normal;
  font-weight: normal;
}

.lang-dropdown__chev::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.45;
}

.lang-dropdown .nav-dropdown__panel {
  left: auto;
  right: 0;
  min-width: 10rem;
}

.lang-dropdown__panel a,
.lang-dropdown__panel .lang-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-dropdown__panel .lang-opt {
  padding: 0.42rem 1rem;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  cursor: default;
}

.lang-dropdown__panel a {
  text-decoration: none;
}

/* 明暗主题：更小字号、弱对比，选中态仅略提亮 */
#theme-switch.lang-switch {
  padding: 0;
  gap: 0.15rem;
  background: transparent;
  border: none;
}

#theme-switch .lang-btn {
  padding: 0.28rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  opacity: 0.55;
  border-radius: 6px;
}

#theme-switch .lang-btn:hover {
  opacity: 0.92;
  color: var(--text);
}

#theme-switch .lang-btn.is-active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  box-shadow: none;
  opacity: 1;
  font-weight: 500;
}

html[data-theme="light"] #theme-switch .lang-btn.is-active {
  background: rgba(0, 0, 0, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-img {
  display: block;
  height: 32px;
  width: auto;
  max-width: min(160px, 42vw);
  object-fit: contain;
}

/* 与首页 .gradient-text 同系，略偏亮起始色以保证导航条可读性 */
.logo-text {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
  background: linear-gradient(
    115deg,
    rgba(236, 242, 255, 0.92) 0%,
    var(--accent-3) 28%,
    var(--accent) 55%,
    var(--accent-2) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .logo-text {
  background: linear-gradient(115deg, var(--text) 0%, var(--accent-3) 38%, var(--accent) 62%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.nav {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 1.1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.nav a:hover {
  color: var(--text);
}

.nav a.nav-active {
  color: var(--text);
  font-weight: 500;
}

/* 技能库二级菜单 — 面板左缘与一级菜单文字左缘对齐；
   padding-bottom 作为悬停桥，避免鼠标经过 trigger 与面板间隙时菜单收起 */
.nav-dropdown {
  position: relative;
  width: max-content;
  padding-bottom: 0.5rem;
}

.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-dropdown__trigger > a {
  color: inherit;
}

.nav-dropdown__panel {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(-4px);
  margin-top: 0;
  min-width: 11.5rem;
  padding: 0.4rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--dropdown-bg);
  backdrop-filter: blur(14px);
  box-shadow: var(--dropdown-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s,
    visibility 0.2s;
  z-index: 80;
}

.nav-dropdown:hover .nav-dropdown__panel,
.nav-dropdown:focus-within .nav-dropdown__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown__panel a {
  display: block;
  padding: 0.42rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-dropdown__panel a:hover {
  color: var(--text);
  background: rgba(34, 211, 238, 0.06);
}

.nav-dropdown__panel a.nav-active,
.nav-dropdown__panel a[aria-current="page"] {
  color: var(--accent);
  font-weight: 500;
}

.nav-dropdown__panel .nav-submenu-more {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

a.skill-index-card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}

a.skill-index-card:hover {
  transform: translateY(-2px);
}

.skill-index-cta {
  margin-top: 2rem;
  text-align: center;
}

.skill-index-category {
  margin-bottom: 1.75rem;
}

.skill-index-category:last-of-type {
  margin-bottom: 0;
}

.skill-index-cat-title {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.skill-index-cat-title a {
  color: inherit;
  text-decoration: none;
}

.skill-index-cat-title a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* skill/index：分类下子项 — 紧凑列表感，弱化卡片装饰 */
.skill-index-category .cat-strip {
  gap: 0.35rem 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.skill-index-category .cat-tile {
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.skill-index-category .cat-tile:hover {
  transform: none;
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.05);
}

.skill-index-category a.skill-index-card:hover {
  transform: none;
}

.skill-index-category .cat-tile h3 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
}

.skill-index-category .cat-tile p {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skill-page-lead {
  max-width: none;
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.skill-page-body {
  max-width: none;
  margin: 0;
}

.skill-page-body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.skill-page-body ul,
.skill-page-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.skill-page-body li {
  margin-bottom: 0.45rem;
}

.skill-page-body li:last-child {
  margin-bottom: 0;
}

/* Skill detail: extended sections, flow blocks, checklists */
.skill-page-section {
  max-width: none;
  margin: 0 0 1.75rem;
}

.skill-page-section:last-of-type {
  margin-bottom: 0;
}

.skill-page-h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.skill-page-section p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.skill-page-section p:last-child {
  margin-bottom: 0;
}

.skill-page-section ul,
.skill-page-section ol {
  margin: 0.5rem 0 0;
  padding-left: 1.35rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.skill-page-section li {
  margin-bottom: 0.4rem;
}

.skill-flow-block {
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: pre;
}

.skill-page-body + .skill-flow-block {
  margin-top: 1.35rem;
}

.skill-callout {
  margin: 0.85rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border-left: 3px solid rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.06);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.skill-callout strong {
  color: var(--text);
  font-weight: 600;
}

.skill-checklist {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.skill-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.skill-checklist input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--accent-3);
  flex-shrink: 0;
}

.skill-checklist label {
  cursor: pointer;
  flex: 1;
}

.skill-progress-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--border-subtle);
  margin-top: 0.65rem;
  overflow: hidden;
}

.skill-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
  width: 0%;
  transition: width 0.25s ease;
}

.skill-page-toc {
  margin: 1rem 0 0;
  max-width: none;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .skill-page-toc {
  background: rgba(255, 255, 255, 0.5);
}

.skill-page-toc-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.skill-page-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 480px) {
  .skill-page-toc ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem 1.25rem;
    align-items: start;
  }
}

.skill-page-toc a {
  font-size: 0.88rem;
  color: var(--accent-2);
  text-decoration: none;
  line-height: 1.7;
}

.skill-page-toc a:hover {
  text-decoration: underline;
}

.skill-severity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 0.75rem 0 0;
}

.skill-severity-table th,
.skill-severity-table td {
  border: 1px solid var(--border-subtle);
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

.skill-severity-table th {
  background: var(--surface-b);
  font-weight: 600;
}

.skill-severity-table caption {
  caption-side: bottom;
  padding-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: left;
}

/* Skill detail: inline metrics / small forms */
.skill-form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  font-size: 0.9rem;
}

.skill-form-inline label {
  color: var(--text-muted);
}

.skill-input-sm {
  min-width: 0;
  width: 5.25rem;
  padding: 0.42rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.skill-input-sm:focus {
  outline: none;
  border-color: var(--accent-3);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.skill-mono-stat {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--accent-2);
  font-weight: 500;
  font-size: 0.95rem;
}

.skill-section-kicker {
  margin-top: 1.25rem;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.skill-panel-list {
  margin: 0.5rem 0 0;
  padding-left: 1.35rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.skill-expand-actions {
  margin-top: 0.65rem;
}

@media (min-width: 720px) {
  .nav {
    display: flex;
  }
}

@media (min-width: 960px) {
  .nav {
    gap: 1rem 1.35rem;
    font-size: 0.92rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
  color: #020617;
  box-shadow: 0 8px 36px rgba(56, 189, 248, 0.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 44px rgba(34, 211, 238, 0.28);
}

.btn-outline {
  border-color: var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--border-glow);
  background: rgba(34, 211, 238, 0.06);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--btn-ghost-hover);
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 11vw, 6.5rem) 0 clamp(4rem, 8vw, 5.5rem);
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1.1rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.85);
  }
}

/* skill/case hub eyebrow dot（skills.css / cases.css） */
@keyframes sh-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5vw, 3.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.gradient-text {
  background: linear-gradient(115deg, var(--accent-3) 0%, var(--accent) 42%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: none;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border-subtle);
}

.hero-stats dt {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.hero-stats dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin: -0.35rem 0 1.75rem;
  max-width: none;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.hero-meta-label {
  margin-right: 0.2rem;
  font-weight: 500;
}

.hero-meta-sep {
  opacity: 0.45;
  user-select: none;
}

.hero-meta a {
  color: var(--accent-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-meta a:hover {
  color: var(--accent);
}

.home-section {
  border-top: 1px solid var(--border-subtle);
}

.home-code-label {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contribute-copy .hero-actions {
  margin-bottom: 0;
}

.contribute-panel .code-preview:last-child {
  margin-bottom: 0;
}

/* Orbit visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}

.orbit {
  position: relative;
  width: min(320px, 85vw);
  aspect-ratio: 1;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(100, 130, 200, 0.14);
  inset: 0;
  animation: spin 24s linear infinite;
}

.ring-2 {
  inset: 12%;
  animation-duration: 18s;
  animation-direction: reverse;
  border-color: rgba(34, 211, 238, 0.15);
}

.ring-3 {
  inset: 24%;
  animation-duration: 30s;
  border-style: dashed;
  border-color: rgba(167, 139, 250, 0.2);
}

.orbit-core {
  position: absolute;
  inset: 32%;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, rgba(34, 211, 238, 0.1), rgba(56, 189, 248, 0.05) 50%, rgba(167, 139, 250, 0.09));
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-glow), inset 0 1px 0 var(--orbit-core-inset);
}

.orbit-core .mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 8vw, 5.5rem) 0;
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.section-head h2,
.section-head .page-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.page-first {
  padding-top: clamp(2.5rem, 5vw, 3.25rem);
}

.about-shell {
  max-width: none;
}

.about-body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.about-contact a {
  color: var(--accent-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-contact a:hover {
  color: var(--accent);
}

.support-faq .guide-card a {
  color: var(--accent-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-faq .guide-card a:hover {
  color: var(--accent);
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: none;
}

/* Filter */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.chip {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.chip:hover,
.chip.is-active {
  color: var(--text);
  border-color: var(--border-glow);
  background: var(--chip-active-bg);
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.skill-card {
  position: relative;
  padding: 1.4rem 1.45rem 1.3rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px) saturate(1.05);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  overflow: hidden;
}

a.skill-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.skill-card:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 3px;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-3), var(--accent), var(--accent-2), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.25);
  box-shadow: var(--card-hover-shadow);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.skill-card p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.skill-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-3);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.skill-card.hidden {
  display: none;
}

/* Guide (SKILL authoring) */
.guide {
  padding-top: 1rem;
}

.guide-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.guide-card {
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(165deg, var(--surface-a), var(--surface-b));
  transition: border-color 0.2s;
}

.guide-card:hover {
  border-color: rgba(56, 189, 248, 0.25);
}

.guide-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.guide-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Categories */
.categories {
  padding-top: 2rem;
}

.cat-strip {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.cat-tile {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(160deg, var(--surface-c), var(--surface-d));
  transition: border-color 0.2s, transform 0.2s;
}

.cat-tile:hover {
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateY(-2px);
}

.cat-tile h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.cat-tile p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Contribute */
.contribute {
  padding-bottom: 5rem;
}

.contribute-inner {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 880px) {
  .contribute-inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.contribute-copy h2 {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
}

.contribute-copy > p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.checklist {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.checklist li {
  margin-bottom: 0.5rem;
}

.contribute-panel {
  position: relative;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  backdrop-filter: blur(16px);
}

.panel-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), transparent 40%, rgba(167, 139, 250, 0.12));
  z-index: -1;
  opacity: 0.9;
}

.code-preview {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--code-bg);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--text-muted);
}

.code-preview .k {
  color: var(--accent);
}

.code-preview .c {
  color: rgba(167, 139, 250, 0.85);
}

/* Detail pages (.page-first): pre / 代码块与 .shell 主栏同宽 */
.page-first .shell > pre.code-preview {
  display: block;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 1.5rem 0 1.25rem;
}

.page-first .shell > pre.code-preview:last-of-type {
  margin-bottom: 1.5rem;
}

pre.code-preview.code-preview--wide {
  max-width: 100% !important;
}

.page-first .shell > pre.skill-flow-block {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
}

/* Nested JSON / long lines: scroll wrapper optional */
.page-first .shell .tool-code-scroll {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
}

.page-first .shell .tool-code-scroll pre.code-preview {
  max-width: none;
  width: 100%;
  margin: 0;
}

/* pre inside skill-page-section (not direct child of .shell) — align with 40rem column */
.page-first .shell .skill-page-section > pre.code-preview,
.page-first .shell .skill-page-section > pre.skill-flow-block {
  display: block;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
}

.page-first .shell .skill-page-section > pre.code-preview {
  margin-top: 1.1rem;
  margin-bottom: 0.85rem;
}

.page-first .shell .skill-page-section > pre.skill-flow-block {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: clamp(2.25rem, 5vw, 3rem) 0;
  background: var(--footer-bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
}

.footer-inner p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-meta {
  font-size: 0.8rem;
  opacity: 0.75;
}

/* Error pages (404 / 500) */
.error-main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.error-panel {
  text-align: center;
  max-width: min(1240px, 100% - 2rem);
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.error-stack {
  margin: 0 0 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.error-subtitle {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: none;
}

.error-code {
  font-size: clamp(4rem, 12vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.error-stack + .error-lead {
  margin-top: 0.5rem;
}

.error-code--404 {
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-code--500 {
  background: linear-gradient(120deg, #f87171, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-lead {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.error-tech {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.7;
  letter-spacing: 0.04em;
}

/* 技能详情：主栏与代码块与 .shell 同宽（覆盖页面内联 <style> 中晚载入的 40rem） */
.page-first .shell .skill-page-body,
.page-first .shell .skill-page-lead,
.page-first .shell .skill-page-section,
.page-first .shell .skill-page-toc {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.page-first .shell > pre.code-preview,
.page-first .shell > pre.skill-flow-block,
.page-first .shell .tool-code-scroll,
.page-first .shell .skill-page-section > pre.code-preview,
.page-first .shell .skill-page-section > pre.skill-flow-block {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
