/* ============================================
   RPJTO.COM - 蓝橙互补色博客模板
   布局：左右分栏 + 大留白
   设计：毛玻璃 / 渐变背景 / 圆角 / 细边框轻阴影 / 几何装饰
   色彩：蓝 #2563eb + 橙 #f97316 互补色
   ============================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --accent: #f97316;
  --accent-light: #fb923c;
  --accent-warm: #fff7ed;
  --bg: #ffffff;
  --bg-tint: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.7);
  --text: #0f172a;
  --text-light: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(37, 99, 235, 0.04);
  --shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
  --shadow-md: 0 8px 24px rgba(37, 99, 235, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.3);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'PingFang SC', 'Noto Sans SC', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(249, 115, 22, 0.06) 0%, transparent 50%);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================
   HEADER - 毛玻璃导航
   ============================================ */
.site-header {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 44px;
  width: auto;
  border-radius: 10px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover img { transform: scale(1.06); }

.main-nav ul {
  display: flex;
  gap: 4px;
}

.main-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.main-nav a:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.main-nav a i { font-size: 12px; }

.nav-toggle {
  display: none;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  font-size: 16px;
  cursor: pointer;
  color: var(--text);
  padding: 9px 11px;
  border-radius: 10px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(249, 115, 22, 0.02) 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 36px 0;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.page-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
}

.page-breadcrumb a { color: var(--primary); }
.page-breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* ============================================
   CONTENT AREA - 大留白布局
   ============================================ */
.content-wrapper {
  padding: 48px 0 80px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  align-items: start;
}

.main-content { min-width: 0; }

/* ============================================
   SECTION TITLE
   ============================================ */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--accent)) 1;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-title i {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   ARTICLE CARD - 渐变边框卡片
   ============================================ */
.article-card {
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 100px 1fr;
  overflow: hidden;
  transition: all 0.35s ease;
  position: relative;
}

.article-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  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.35s ease;
}

.article-card:hover::before { opacity: 1; }

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.article-thumb {
  position: relative;
  height: 100%;
  min-height: 140px;
  overflow: hidden;
  background: var(--bg-tint);
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-thumb img { transform: scale(1.08); }

.article-category {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.article-category:empty { display: none; }

.article-content {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  transition: color 0.2s;
  letter-spacing: -0.2px;
}

.article-title a:hover { color: var(--primary); }

.article-desc {
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.article-desc:empty { display: none; min-height: 0; }

.article-meta {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: auto;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ============================================
   SIDEBAR - 毛玻璃侧栏
   ============================================ */
.sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
}

.widget-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.widget-title i {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-list li:last-child { border-bottom: none; }

.sidebar-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-light);
  font-size: 13px;
  transition: all 0.2s;
}

.sidebar-list a:hover { color: var(--primary); }

.sidebar-list a .count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-tint);
  padding: 2px 8px;
  border-radius: 10px;
}

.sidebar-list a::before {
  content: '';
  width: 5px;
  height: 5px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 8px;
}

.sidebar-list a:hover::before { transform: scale(1.5); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-item {
  display: inline-block;
  padding: 5px 12px;
  background: var(--bg-tint);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-light);
  transition: all 0.2s;
}

.tag-item:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-tint);
  border-top: 1px solid var(--border-light);
  padding: 28px 0;
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-bottom a { color: var(--primary); }
.footer-bottom a:hover { color: var(--accent); text-decoration: underline; }

/* ============================================
   ARTICLE DETAIL
   ============================================ */
.article-detail {
  background: var(--bg);
  border-radius: 14px;
  padding: 32px 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 32px;
}

.detail-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.detail-category {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.detail-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.detail-meta {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.detail-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.detail-content {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.detail-content p { margin-bottom: 16px; }

.detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}

.detail-tags {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-tags i { color: var(--primary); }
.detail-tags a { color: var(--text-light); padding: 3px 10px; background: var(--bg-tint); border-radius: 20px; font-size: 12px; margin: 4px; }
.detail-tags a:hover { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }

/* ============================================
   RELATED ARTICLES
   ============================================ */
.related-articles { margin-top: 36px; }

.related-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--accent)) 1;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.related-title i {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.related-articles .content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.related-articles .article-card { margin-bottom: 0; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 40px 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.pagination a, .pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pagination a:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
}

.pagination .page-num-current {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }

  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 80px 24px 24px;
    z-index: 99;
  }

  .main-nav.active { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { color: var(--text); font-size: 17px; padding: 14px 0; border-bottom: 1px solid var(--border-light); border-radius: 0; }
  .main-nav a:hover { background: none; color: var(--primary); }
  .nav-toggle { display: block; z-index: 101; }

  .article-card { grid-template-columns: 1fr; }
  .article-thumb { height: 180px; min-height: auto; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .article-content { padding: 16px 18px; }
  .article-title { font-size: 16px; }
  .article-thumb { height: 160px; }
  .article-detail { padding: 24px 20px; }
  .detail-title { font-size: 22px; }
  .content-wrapper { padding: 32px 0 60px; }
}

/* Stretched link for article cards */
.article-card {
    position: relative;
}
.article-card .card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 12px;
}
.article-card .article-thumb,
.article-card .article-content {
    position: relative;
    z-index: 0;
}
