/* 由旧版手写博客迁移而来的样式（Hugo 版本） */
::selection { background: #5c7cfa; color: #fff; }
html { scroll-behavior: smooth; }
body { background: #0b0e14; color: #d1d5e0; -webkit-font-smoothing: antialiased; }
body.post-page { background: #0f1117; color: #e1e4ea; }

#constellation { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#progress { position: fixed; top: 0; left: 0; height: 2px; background: linear-gradient(90deg, #5c7cfa, #a78bfa); z-index: 100; transition: width .1s linear; }

/* Cards */
.card {
  background: linear-gradient(165deg, #151922 0%, #1a1e2a 100%);
  border: 1px solid #222836; border-radius: 14px;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), border-color .25s, box-shadow .25s;
  transform-style: preserve-3d; perspective: 800px;
}
.card:hover { border-color: #323a4e; box-shadow: 0 8px 30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(92, 124, 250, .08); transform: translateY(-2px) rotateX(1deg); }
.card.featured { background: linear-gradient(165deg, #181e30 0%, #1d243a 100%); border-color: #2a3350; box-shadow: 0 4px 24px rgba(92, 124, 250, .06); }
.card.featured:hover { border-color: #3b4580; box-shadow: 0 12px 36px rgba(92, 124, 250, .1), 0 0 0 1px rgba(92, 124, 250, .12); }

/* Links */
.link { color: #748ffc; text-decoration: none; background: linear-gradient(#748ffc, #748ffc) 0 100%/0 1px no-repeat; transition: color .15s, background-size .25s; }
.link:hover { color: #91a7ff; background-size: 100% 1px; }
.back-link { color: #748ffc; transition: color .15s; }
.back-link:hover { color: #91a7ff; }

/* Tags */
.tag-pill {
  display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: .75rem;
  background: rgba(92, 124, 250, .10); color: #8498e8; border: 1px solid rgba(92, 124, 250, .12);
  transition: background .15s, color .15s;
}
.tag-pill:hover { background: rgba(92, 124, 250, .18); color: #a0b0ff; }
.tag-pill.systems { background: rgba(72, 199, 142, .10); color: #6cc99a; border-color: rgba(72, 199, 142, .14); }
.tag-pill.systems:hover { background: rgba(72, 199, 142, .18); }
.tag-pill.optimization { background: rgba(255, 170, 80, .10); color: #e0a050; border-color: rgba(255, 170, 80, .14); }
.tag-pill.optimization:hover { background: rgba(255, 170, 80, .18); }

/* Inputs */
input, select {
  background: #131720; border: 1px solid #222836; border-radius: 10px;
  padding: 10px 16px; color: #d1d5e0; outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus { border-color: #5c7cfa; box-shadow: 0 0 0 3px rgba(92, 124, 250, .12); }
input::placeholder { color: #4a5568 }

/* Sidebar */
.sidebar-card { background: #11151e; border: 1px solid #1e2330; border-radius: 12px; }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.post-card { animation: fadeUp .5s cubic-bezier(.16, 1, .3, 1) both; }
.featured-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: linear-gradient(135deg, rgba(92, 124, 250, .2), rgba(167, 139, 250, .15));
  color: #a0b8ff; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}

/* Article prose */
.prose h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: .75rem; color: #f0f2f5; }
.prose h3 { font-size: 1.2rem; font-weight: 600; margin-top: 2rem; margin-bottom: .5rem; color: #e8eaef; }
.prose h4 { font-size: 1.05rem; font-weight: 600; margin-top: 1.6rem; margin-bottom: .4rem; color: #e8eaef; }
.prose p { margin-bottom: 1rem; line-height: 1.8; color: #c8cdd8; }
.prose ul, .prose ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.prose li { margin-bottom: .4rem; line-height: 1.7; color: #c8cdd8; }
.prose code { background: #1e2130; color: #91a7ff; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.prose pre { background: #1a1d27; border: 1px solid #282b36; border-radius: 8px; padding: 1rem; overflow-x: auto; margin-bottom: 1rem; }
.prose pre code { background: none; padding: 0; color: #d4d8e0; font-size: .9em; line-height: 1.6; }
.prose a { color: #748ffc; text-decoration: underline; }
.prose blockquote { border-left: 3px solid #5c7cfa; padding-left: 1rem; margin-left: 0; color: #a0a8b8; font-style: italic; }
.prose img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }
.prose hr { border: 0; border-top: 1px solid #282b36; margin: 1.5rem 0; }
.prose table { border-collapse: collapse; margin: 1rem 0; width: 100%; }
.prose th, .prose td { border: 1px solid #282b36; padding: 8px 12px; color: #c8cdd8; }
.prose th { background: #1a1d27; }

/* 代码高亮（chroma, noClasses=false）背景与内联 code 区分 */
.prose .highlight { background: #1a1d27; border: 1px solid #282b36; border-radius: 8px; padding: 1rem; margin-bottom: 1rem; overflow-x: auto; }
.prose .highlight pre { margin: 0; background: transparent; border: 0; padding: 0; }

/* giscus */
#giscus { color-scheme: dark; }

@media (max-width: 480px) {
  .card { padding: .85rem !important; border-radius: 10px; }
  input, select { padding: 8px 12px; }
}
