/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* ---------- Theme tokens ---------- */
:root {
  --bg: #fafafa;
  --bg-dot: rgba(0, 0, 0, 0.10);
  --fg: #1c1c1c;
  --fg-muted: #6b6b6b;
  --border: rgba(0, 0, 0, 0.10);
  --chip-bg: rgba(255, 255, 255, 0.55);
  --header-bg: rgba(250, 250, 250, 0.72);
}

:root[data-theme="dark"] {
  --bg: #0f0f10;
  --bg-dot: rgba(255, 255, 255, 0.08);
  --fg: #ededed;
  --fg-muted: #9a9a9a;
  --border: rgba(255, 255, 255, 0.12);
  --chip-bg: rgba(255, 255, 255, 0.04);
  --header-bg: rgba(15, 15, 16, 0.72);
}

/* ---------- Body ---------- */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  font-family:
    -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑",
    "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: min(720px, 92vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--fg);
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--fg);
}

.brand-name {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}

.site-nav a {
  font-size: 15px;
  color: var(--fg-muted);
  transition: color 0.15s ease;
}

.site-nav a:hover { color: var(--fg); }

.theme-toggle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--fg-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover { color: var(--fg); background: var(--border); }

.theme-toggle .icon { width: 18px; height: 18px; }

:root[data-theme="light"] .theme-toggle .icon-moon,
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

/* ---------- Container ---------- */
.container {
  flex: 1;
  width: 100%;
  max-width: min(720px, 92vw);
  margin: 0 auto;
  padding: 96px 0 64px;
}

/* ---------- Hero ---------- */
.hero { margin-bottom: 64px; }

.hero-title {
  margin: 0 0 28px;
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.sparkle { margin-right: 6px; }

.name { color: var(--fg); }

.lead {
  margin: 0 0 28px;
  color: var(--fg-muted);
  font-size: 16px;
}

.stack-line {
  margin: 0 0 18px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.stack-label {
  color: var(--fg);
  font-weight: 600;
  margin-right: 2px;
}

.stack-suffix { color: var(--fg-muted); }

/* ---------- Chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--brand, var(--fg));
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  transform: translateY(-1px);
  border-color: var(--brand, var(--fg));
}

.chip .logo {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.chip span:last-child {
  color: var(--fg);
}

/* ---------- Page links ---------- */
.page-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 48px;
}

.page-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--chip-bg);
  color: var(--fg);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.page-link:hover {
  transform: translateY(-2px);
  border-color: var(--fg);
  box-shadow: 0 6px 20px -10px rgba(0, 0, 0, 0.25);
}

:root[data-theme="dark"] .page-link:hover {
  box-shadow: 0 6px 20px -10px rgba(0, 0, 0, 0.6);
}

.page-link:active {
  transform: translateY(0);
  transition-duration: 0.05s;
}

.page-link-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.page-link-title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.page-link-arrow {
  width: 16px;
  height: 16px;
  color: var(--fg-muted);
  flex-shrink: 0;
  transition: transform 0.18s ease, color 0.18s ease;
}

.page-link:hover .page-link-arrow {
  color: var(--fg);
}

.page-link[target="_blank"]:hover .page-link-arrow {
  transform: translate(2px, -2px);
}

.page-link:not([target="_blank"]):hover .page-link-arrow {
  transform: translateX(3px);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px 0 32px;
  text-align: center;
  color: var(--fg-muted);
  font-style: italic;
  font-size: 13px;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .site-header-inner { height: 56px; }
  .brand-name { font-size: 15px; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 14px; }
  .container { padding: 56px 0 48px; }
  .hero { margin-bottom: 48px; }
  .hero-title { line-height: 1.5; }
}
