/* ═══════════════════════════════════════════════
   KillOne · 个人宇宙 — 共享样式
   ═══════════════════════════════════════════════ */

:root {
  --navy: #020c1b;
  --light-navy: #0a192f;
  --lightest-navy: #112240;
  --slate: #8892b0;
  --light-slate: #a8b2d1;
  --lightest-slate: #ccd6f6;
  --white: #e6f1ff;
  --accent: #ff6b35;
  --accent-tint: rgba(255, 107, 53, 0.08);
  --font: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "Fira Code", monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: transparent;
  color: var(--slate);
  font-family: var(--font);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--lightest-navy); color: var(--lightest-slate); }
:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--lightest-navy); border-radius: 3px; }

/* ═══ LAYOUT ═══ */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  position: relative;
  z-index: 1;
}
.container { max-width: 900px; width: 100%; }

/* ═══ BACKGROUND — WebGL2 GLSL Shader ═══ */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
}

/* Keep old .bg for backward compat — hidden by JS */
.bg { display: none; }

/* ═══ TYPOGRAPHY ═══ */
.page-title {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  color: var(--lightest-slate);
  line-height: 1.1;
  margin-bottom: 12px;
}
.page-subtitle {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--slate);
  margin-bottom: 32px;
  line-height: 1.6;
}
.page-subtitle .hl { color: var(--accent); }

/* ═══ CARDS ═══ */
.card {
  background: rgba(10, 25, 47, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 28px;
  transition: all 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  border-color: var(--accent);
}
.card-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: .05em;
}
.card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--lightest-slate);
  margin-bottom: 8px;
}
.card p {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.7;
}

/* ═══ STATS ═══ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 32px 0;
}
.stat {
  background: rgba(10, 25, 47, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 6px;
  padding: 22px;
  text-align: center;
  transition: all 0.25s ease;
}
.stat:hover { transform: translateY(-3px); }
.stat-num {
  font-family: var(--mono);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  color: var(--slate);
  margin-top: 6px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ═══ SKILLS ═══ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.skill-cat h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--lightest-slate);
  margin-bottom: 16px;
}
.skill-cat ul { list-style: none; }
.skill-cat li {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--slate);
  padding: 4px 0;
  transition: all 0.2s ease;
}
.skill-cat li:hover { color: var(--accent); transform: translateX(4px); }
.skill-cat li::before { content: '▹'; color: var(--accent); margin-right: 8px; }

/* ═══ GUESTBOOK ═══ */
.gb-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.gb-form input, .gb-form textarea {
  background: rgba(10, 25, 47, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 12px 16px;
  color: var(--light-slate);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: all 0.25s ease;
  resize: vertical;
}
.gb-form input:focus, .gb-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.gb-form textarea { min-height: 70px; }
.gb-submit {
  padding: 12px 28px;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
  align-self: flex-start;
}
.gb-submit:hover { background: var(--accent-tint); }
.gb-msg {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--lightest-navy);
}
.gb-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--lightest-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 13px;
}
.gb-name { font-weight: 600; color: var(--light-slate); font-size: 13px; }
.gb-text { color: var(--slate); font-size: 13px; line-height: 1.6; }
.gb-time { font-size: 10px; color: var(--lightest-navy); margin-top: 3px; }

/* ═══ NAV ═══ */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(2, 12, 27, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.top-nav .site-title {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
}
.top-nav .nav-links { display: flex; gap: 20px; }
.top-nav .nav-links a {
  color: var(--slate);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  transition: color 0.25s ease;
}
.top-nav .nav-links a:hover, .top-nav .nav-links a.active { color: var(--accent); }
.lang-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.lang-btn:hover { background: var(--accent-tint); }

/* ═══ FOOTER ═══ */
footer {
  text-align: center;
  padding: 40px 0 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--lightest-navy);
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s cubic-bezier(.645,.045,.355,1) both; }
.d1 { animation-delay: 0.1s; } .d2 { animation-delay: 0.2s; }
.d3 { animation-delay: 0.3s; } .d4 { animation-delay: 0.4s; }

/* ═══ CURSOR ═══ */
.cursor-trail {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  top: 0; left: 0;
}

/* ═══ INDEX PAGE ═══ */
.index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.index-card {
  display: block;
  background: rgba(10, 25, 47, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 32px 24px;
  text-decoration: none;
  color: var(--slate);
  transition: all 0.3s ease;
  text-align: center;
}
.index-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  color: var(--lightest-slate);
}
.index-card .idx-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
}
.index-card .idx-icon { font-size: 40px; margin-bottom: 12px; }
.index-card .idx-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--lightest-slate);
  margin-bottom: 6px;
}
.index-card .idx-desc {
  font-size: 13px;
  color: var(--slate);
  line-height: 1.5;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .page { padding: 60px 16px; min-height: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; gap: 20px; }
  .index-grid { grid-template-columns: 1fr 1fr; }
  .top-nav { flex-wrap: wrap; gap: 8px; }
  .top-nav .nav-links { gap: 10px; overflow-x: auto; }
}
@media (max-width: 480px) {
  .index-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; opacity: 1; transform: none; }
  .bg::before { animation: none; }
}
