:root {
  --bg: #070b14;
  --bg-soft: #0c1222;
  --panel: rgba(12, 18, 34, 0.88);
  --text: #d7ecf5;
  --dim: #7a9bb0;
  --cyan: #00f0ff;
  --magenta: #ff2bd6;
  --border: rgba(0, 240, 255, 0.28);
  --radius: 14px;
  --max: 960px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: "Share Tech Mono", "Segoe UI", Consolas, monospace;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 240, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(255, 43, 214, 0.08), transparent 50%),
    linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  pointer-events: none;
}

/* Cyberpunk trail behind the native cursor */
.cursor-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

html.cursor-on .cursor-layer {
  opacity: 1;
}

.cursor-dot,
.cursor-ring,
.trail-dot {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  will-change: transform;
}

/* Soft glow only — keep native cursor visible */
.cursor-dot {
  width: 22px;
  height: 22px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.28) 0%, transparent 68%);
}

.cursor-ring {
  width: 42px;
  height: 42px;
  border: 1px dashed rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.08);
  transition: width 0.18s ease, height 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  opacity: 0.7;
}

html.cursor-hot .cursor-ring {
  width: 56px;
  height: 56px;
  border-color: rgba(255, 43, 214, 0.55);
  opacity: 1;
}

html.cursor-hot .cursor-dot {
  background: radial-gradient(circle, rgba(255, 43, 214, 0.35) 0%, transparent 70%);
}

.trail-dot {
  width: 7px;
  height: 7px;
  background: rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

html.cursor-hot .trail-dot {
  background: rgba(255, 43, 214, 0.45);
  box-shadow: 0 0 8px rgba(255, 43, 214, 0.3);
}

@media (pointer: coarse) {
  .cursor-layer { display: none; }
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--cyan); }
.logo:hover { text-decoration: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.92rem;
}
.nav a { color: var(--dim); text-decoration: none; }
.nav a:hover { color: var(--text); }
/* 右上角 GitHub 入口：沿用 projects/userscripts 的 .gh-corner 外观
   （同一枚徽标 + 32x32 圆角方块 + 毛玻璃底 + 悬停转青）。
   保留 nav-cta 类名：窄屏下 .nav a:not(.nav-cta) 会被隐藏，
   去掉 nav-cta 会把这个唯一入口一起藏掉。 */
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border: 1px solid rgba(0, 240, 255, 0.14);
  border-radius: 9px;
  background: rgba(7, 11, 20, 0.75);
  backdrop-filter: blur(8px);
  color: var(--dim);
  transition: 0.15s ease;
}
/* 内联 SVG 不给尺寸会被容器撑大，这里锁死 */
.nav-cta svg { width: 16px; height: 16px; display: block; }
.nav-cta:hover {
  color: var(--cyan);
  border-color: var(--border);
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.2);
  text-decoration: none;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px 64px;
}

.hero {
  padding: 108px 0 88px;
}

.eyebrow {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--dim);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: normal;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.45);
}

.lead {
  color: var(--dim);
  font-size: 1.05rem;
  max-width: 34em;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Hero 状态药丸行 */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.hero-pills .pill {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.hero-pills .pill:first-child {
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.07);
}

/* 卡片标签行 */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.tag-row .tag {
  font-size: 0.75rem;
  color: var(--dim);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 3px 11px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn.primary {
  color: #041018;
  background: var(--cyan);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.35);
}
.btn.primary:hover { box-shadow: 0 0 30px rgba(0, 240, 255, 0.5); }

.btn.ghost {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}
.btn.ghost:hover { border-color: var(--border); }

.section { padding: 28px 0 12px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 18px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.section-head h2 {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  color: var(--text);
}
.section-head p { color: var(--dim); font-size: 0.9rem; }

.cards {
  display: grid;
  /* auto-fill + 更小的下限：让三张卡在常见桌面宽度下并排一行，
     避免 auto-fit 把第三张挤到第二行留下空缺 */
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: block;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  text-decoration: none;
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 240, 255, 0.08);
}

.card.featured {
  border-color: rgba(0, 240, 255, 0.35);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: #041018;
  background: var(--cyan);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.card-cat {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 6px;
}

.card-art {
  height: 176px;
  position: relative;
  background:
    radial-gradient(circle at 70% 40%, rgba(255, 43, 214, 0.25), transparent 40%),
    linear-gradient(160deg, #0a1528, #121a30);
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
}

.snake-art .orb {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 18px var(--magenta);
  top: 58px;
  right: 48px;
}

.snake-art .snake-seg {
  position: absolute;
  width: 34px;
  height: 19px;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.7);
  top: 76px;
}
.snake-art .s1 { left: 42px; }
.snake-art .s2 { left: 78px; opacity: 0.85; }
.snake-art .s3 { left: 114px; opacity: 0.65; }

.card-body { padding: 18px 18px 20px; }
.card-body h3 {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.card-body p {
  color: var(--dim);
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.card-link {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
}
.card-link.dim { color: var(--dim); }

.card.muted {
  opacity: 0.85;
  cursor: default;
}
.card.muted:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.about-text {
  color: var(--dim);
  margin-bottom: 16px;
}
.about-text:last-child {
  margin-bottom: 0;
}
.about-text a { border-bottom: 1px solid rgba(0, 240, 255, 0.35); }

/* 两行间距收窄 */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 22px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-size: 0.85rem;
  text-align: center;
}

/* 个人 slogan：单行小字，刻意压低存在感 ——
   不加异色、不加发光，破折号是普通文本字符（能被直接选中复制，
   不用 ::before 生成，那样复制时会漏掉），
   只靠整体不透明度淡出，别抢正文与版权号的注意力 */
.slogan {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--dim);
  opacity: 0.5;
  white-space: nowrap;
}
.footer-copy { opacity: 0.7; }

/* 页脚里的 GitHub 链接 */
.site-footer .footer-link {
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}
.site-footer .footer-link:hover {
  color: var(--cyan);
  text-decoration-color: var(--cyan);
}

@media (max-width: 560px) {
  .nav a:not(.nav-cta) { display: none; }
  .hero { padding: 48px 0 36px; }
}
