/* ===================================================================
   Andy's Blog Design System - Style 3: 暗夜流光 · 现代 Bento 极简
   Colors, Typography, Responsive Bento Grid & Glassmorphism
   =================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d111a;
  --bg-card: rgba(16, 22, 36, 0.65);
  --bg-card-hover: rgba(22, 30, 49, 0.85);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(56, 189, 248, 0.35);
  
  --accent-cyan: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-purple: #c084fc;
  --accent-emerald: #34d399;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 85% 60%, rgba(129, 140, 248, 0.08), transparent),
    var(--bg-primary);
}

/* 顶部流光微背景网格 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* 链接基础样式 */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* 容器版心 */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===================================================================
   导航栏 Header
   =================================================================== */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin-bottom: 48px;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(13, 17, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: 9999px;
  box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.6);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  color: #07090e;
  font-weight: 800;
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--accent-emerald);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ===================================================================
   首屏 Hero
   =================================================================== */
.hero {
  padding: 40px 0 60px;
  text-align: left;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 9999px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 640px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #05070c;
  box-shadow: 0 4px 20px -4px rgba(56, 189, 248, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -4px rgba(56, 189, 248, 0.6);
  color: #000;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-card);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ===================================================================
   Bento Grid 便当盒卡片矩阵
   =================================================================== */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, var(--border-card), transparent);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}

.bento-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

/* 顶部微高光边界线 */
.bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  pointer-events: none;
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-card-hover);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.5);
}

/* 卡片布局尺寸定义 */
.bento-col-8 { grid-column: span 8; }
.bento-col-4 { grid-column: span 4; }
.bento-col-6 { grid-column: span 6; }
.bento-col-12 { grid-column: span 12; }

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  margin-bottom: 14px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  color: #fff;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.9rem;
}

.bento-card:hover .card-link svg {
  transform: translateX(4px);
}

.card-link svg {
  transition: transform var(--transition-fast);
}

/* 哲学卡片金句样式 */
.quote-highlight {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  color: #e2e8f0;
  position: relative;
  padding-left: 16px;
  border-left: 3px solid var(--accent-indigo);
  margin-bottom: 14px;
}

/* 技能与雷达标签组 */
.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ===================================================================
   文章列表 Articles Section
   =================================================================== */
.articles-section {
  margin-bottom: 80px;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.article-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(4px);
}

.article-main {
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.article-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.article-item:hover .article-item-title {
  color: var(--accent-cyan);
}

.article-arrow {
  color: var(--text-muted);
  margin-left: 16px;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.article-item:hover .article-arrow {
  color: var(--accent-cyan);
  transform: translateX(4px);
}

/* ===================================================================
   文章详情页 Post Detail Page
   =================================================================== */
.post-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 40px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  border-radius: 9999px;
  transition: all var(--transition-fast);
}

.back-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(-3px);
}

.post-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #fff;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.post-content {
  max-width: 780px;
  margin: 0 auto 80px;
  font-size: 1.05rem;
  line-height: 1.85;
  color: #cbd5e1;
}

.post-content h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  margin: 48px 0 20px;
  letter-spacing: -0.015em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.post-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 32px 0 16px;
}

.post-content p {
  margin-bottom: 22px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 24px 24px;
  color: #cbd5e1;
}

.post-content li {
  margin-bottom: 10px;
}

.post-content blockquote {
  margin: 28px 0;
  padding: 18px 24px;
  background: rgba(129, 140, 248, 0.05);
  border-left: 3px solid var(--accent-indigo);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: #e2e8f0;
  font-style: italic;
}

.post-content code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent-cyan);
}

.post-content pre {
  margin: 28px 0;
  padding: 20px;
  background: #0d121d;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.post-content pre code {
  background: transparent;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===================================================================
   页脚 Footer
   =================================================================== */
.site-footer {
  border-top: 1px solid var(--border-card);
  padding: 48px 0 40px;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-socials {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-socials a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-socials a:hover {
  color: var(--accent-cyan);
}

/* ===================================================================
   响应式设计 Media Queries (Mobile First Tuning)
   =================================================================== */
@media (max-width: 900px) {
  .bento-col-8 { grid-column: span 12; }
  .bento-col-4 { grid-column: span 12; }
  .bento-col-6 { grid-column: span 12; }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  
  .site-header {
    top: 8px;
    margin-bottom: 32px;
  }
  
  .nav-wrapper {
    padding: 10px 16px;
  }
  
  .nav-links {
    gap: 14px;
    font-size: 0.85rem;
  }
  
  .status-pill span:last-child {
    display: none; /* 手机端只留绿点简化空间 */
  }
  
  .hero {
    padding: 24px 0 40px;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
  }
  
  .bento-grid {
    gap: 14px;
  }
  
  .bento-card {
    padding: 20px;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}
