/* Hello, Tx. — 全新设计 v2 */
:root {
  --bg: #08080d;
  --bg-soft: #0e0e16;
  --surface: #12121b;
  --surface-2: #171722;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f2f7;
  --muted: #9a9aa8;
  --faint: #6b6b78;
  --accent: #8b7bff;
  --accent-2: #00e5cc;
  --grad: linear-gradient(135deg, #8b7bff 0%, #00e5cc 100%);
  --radius: 16px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

[data-theme="light"] {
  --bg: #fafafc;
  --bg-soft: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #f6f6fa;
  --line: rgba(10, 10, 20, 0.09);
  --text: #14141c;
  --muted: #5d5d6e;
  --faint: #9a9aa8;
  --shadow: 0 12px 32px rgba(20, 20, 40, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* 背景光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 15% 0%, rgba(139, 123, 255, 0.12), transparent 60%),
    radial-gradient(500px 380px at 90% 20%, rgba(0, 229, 204, 0.08), transparent 60%);
}
[data-theme="light"] body::before {
  background:
    radial-gradient(600px 400px at 15% 0%, rgba(139, 123, 255, 0.1), transparent 60%),
    radial-gradient(500px 380px at 90% 20%, rgba(0, 229, 204, 0.1), transparent 60%);
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* 顶栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-2); }
.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  margin-left: 6px;
  transition: transform 0.2s;
}
.theme-toggle:hover { transform: rotate(20deg); }

/* Hero */
.hero { padding: 96px 0 56px; }
.hero-kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
}

/* 文章卡片 */
.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--faint);
  text-transform: uppercase;
  margin: 40px 0 20px;
}
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .card-grid .card:first-child { grid-column: 1 / -1; }
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::after { opacity: 1; }
.card:first-child { padding: 36px; }
.card:first-child h3 { font-size: 1.6rem; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--faint);
  margin-bottom: 12px;
}
.tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  white-space: nowrap;
}
.card h3 {
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.45;
  margin-bottom: 10px;
}
.card p {
  font-size: 0.94rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-arrow {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

/* 文章页 */
.article { padding: 72px 0 40px; }
.article-head { margin-bottom: 36px; }
.article-head h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 16px 0 12px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 0.88rem;
}
.article-body { font-size: 1.06rem; color: var(--text); }
.article-body p { margin-bottom: 1.4em; }
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 750;
  margin: 2em 0 0.8em;
  letter-spacing: -0.01em;
}
.article-body a { color: var(--accent); }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 1.6em 0;
  color: var(--muted);
}
.article-body .source-note {
  margin-top: 3em;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--muted);
}
.article-nav {
  display: flex;
  justify-content: space-between;
  margin: 56px 0 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.article-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.article-nav a:hover { color: var(--accent); }

/* 关于 / 归档 */
.page-hero { padding: 88px 0 32px; }
.page-hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 850;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.page-hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-hero p { color: var(--muted); font-size: 1.1rem; max-width: 600px; }
.page-body { padding-bottom: 40px; font-size: 1.05rem; }
.page-body p { margin-bottom: 1.3em; }
.archive-group { margin-bottom: 40px; }
.archive-group h2 {
  font-size: 1.15rem;
  font-weight: 750;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.archive-list { list-style: none; }
.archive-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.archive-list time {
  color: var(--faint);
  font-size: 0.86rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.archive-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 550;
  flex: 1;
}
.archive-list a:hover { color: var(--accent); }

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 72px;
  padding: 36px 0 48px;
  color: var(--faint);
  font-size: 0.88rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 560px) {
  .hero { padding: 64px 0 40px; }
  .card, .card:first-child { padding: 24px; }
  .article { padding: 48px 0 32px; }
}
