/* ========================================
   极简博客样式 - Minimal Blog Stylesheet
   ======================================== */

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 隐藏滚动条但保持滚动功能 */
html::-webkit-scrollbar {
  display: none;
}

html {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1e293b;
  background-color: #f8f9fb;
  background-image:
    linear-gradient(rgba(208, 213, 221, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(208, 213, 221, 0.5) 1px, transparent 1px);
  background-size: 20px 20px;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========================================
   Header / Navigation
   ======================================== */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(208, 213, 221, 0.3);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo a {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
  letter-spacing: -0.3px;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  padding: 0.25rem 0;
}

nav a:hover {
  color: #1a1a1a;
}

nav a.active {
  color: #1a1a1a;
}

/* ========================================
   Main Content
   ======================================== */

main {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* Page Header */
.page-header {
  margin-bottom: 2.5rem;
}

.page-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1a1a1a;
}

.page-subtitle {
  font-size: 0.9rem;
  color: #999;
  margin-top: 0.35rem;
}

/* ========================================
   Loading & Empty States
   ======================================== */

.loading-state,
.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: #999;
  font-size: 0.95rem;
}

.empty-state code {
  background: #f0f0f0;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* ========================================
   Article List (Home)
   ======================================== */

.article-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.article-card {
  background-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(208, 213, 221, 0.3);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.article-card:hover {
  border-color: rgba(208, 213, 221, 0.6);
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.article-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #aaa;
}

.article-meta time {
  color: #aaa;
}

.category-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: #888;
  background: #f5f5f5;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  font-weight: 500;
}

.article-card h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  letter-spacing: -0.3px;
}

.article-summary {
  font-size: 0.92rem;
  color: #777;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 0.25rem;
  transition: opacity 0.2s;
}

.article-card:hover .read-more {
  opacity: 0.7;
}

/* ========================================
   Article Detail Page
   ======================================== */

.article-detail {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-detail-card {
  background-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(208, 213, 221, 0.3);
  border-radius: 12px;
  padding: 2rem 2.25rem;
}

.article-detail-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eaeaea;
}

.article-detail-header h1 {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.5px;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
}

.article-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #aaa;
}

.article-detail-meta time {
  color: #aaa;
}

/* Article Content - Markdown rendered */
.article-content {
  font-size: 1rem;
  line-height: 1.85;
  color: #2c2c2c;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.3px;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.article-content h1 { font-size: 1.6rem; }
.article-content h2 { font-size: 1.35rem; }
.article-content h3 { font-size: 1.15rem; }

.article-content h1:first-child,
.article-content h2:first-child {
  margin-top: 0;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content a {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #ccc;
  transition: text-decoration-color 0.2s;
}

.article-content a:hover {
  text-decoration-color: #1a1a1a;
}

.article-content strong {
  font-weight: 600;
  color: #1a1a1a;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.25rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.4rem;
}

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid #1a1a1a;
  background: #f8f8f8;
  color: #555;
  font-style: normal;
}

.article-content blockquote p {
  margin-bottom: 0;
}

.article-content code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.88em;
  background: #f0f0f0;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.article-content pre {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: #f5f5f5;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}

.article-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
}

.article-content hr {
  border: none;
  border-top: 1px solid #eaeaea;
  margin: 2rem 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.article-content th,
.article-content td {
  padding: 0.6rem 0.75rem;
  border: 1px solid #eaeaea;
  text-align: left;
}

.article-content th {
  background: #f8f8f8;
  font-weight: 600;
}

/* Article Footer */
.article-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eaeaea;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: #1a1a1a;
}

/* ========================================
   About Page
   ======================================== */

.page-about {
  animation: fadeIn 0.25s ease;
}

.page-about .article-detail-card {
  padding: 2rem 2.25rem;
}

.about-content {
  font-size: 0.95rem;
  line-height: 1.85;
  color: #2c2c2c;
}

.about-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.3px;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.about-content p {
  margin-bottom: 1.25rem;
}

.about-content ul,
.about-content ol {
  margin: 0 0 1.25rem 1.5rem;
}

.about-content li {
  margin-bottom: 0.4rem;
}

.about-content code {
  background: #f0f0f0;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* ========================================
   Footer
   ======================================== */

footer {
  border-top: 1px solid rgba(208, 213, 221, 0.3);
  background-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

footer p {
  font-size: 0.82rem;
  color: #bbb;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 640px) {
  main {
    padding: 2rem 1rem 3rem;
  }

  .header-inner {
    padding: 0 1rem;
  }

  .article-card {
    padding: 1.25rem 1.25rem;
  }

  .article-detail-header h1 {
    font-size: 1.45rem;
  }

  .article-content {
    font-size: 0.95rem;
  }

  .article-content h2 {
    font-size: 1.2rem;
  }

  .page-header h2 {
    font-size: 1.4rem;
  }
}
