/* ═══════════════════════════════════════════════
   ModStartBlog CF Edition — Premium Stylesheet
   ═══════════════════════════════════════════════ */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #f472b6;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --shadow: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --grad1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --grad2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --grad3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --transition: all .25s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #162032;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow: 0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  transition: background .3s, color .3s;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ─── Layout ─── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding: 40px 0;
  align-items: start;
}
@media(max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ─── Header ─── */
header {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.5);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 20px rgba(99,102,241,.08);
  transition: background .3s;
}
[data-theme="dark"] header {
  background: rgba(15,23,42,.85);
  border-bottom-color: rgba(255,255,255,.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
  display: flex; align-items: center; gap: 8px;
}
.logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--grad1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: white;
}
.logo span { color: var(--primary); }

nav { display: flex; align-items: center; gap: 4px; }
nav a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}
nav a:hover { background: var(--surface2); color: var(--text); }
nav a.active {
  background: #eef2ff;
  color: var(--primary);
  font-weight: 600;
}
[data-theme="dark"] nav a.active { background: rgba(99,102,241,.15); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-btn {
  width: 38px; height: 38px;
  border: none;
  background: var(--surface2);
  border-radius: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  color: var(--text-muted);
}
.theme-btn:hover { background: var(--border); color: var(--text); }

/* ─── Hero Banner ─── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad1);
  color: white;
  text-align: center;
  padding: 100px 24px 80px;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='rgba(255,255,255,.15)'/%3E%3C/svg%3E") repeat;
  animation: bgShift 20s linear infinite;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 60px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
@keyframes bgShift { to { background-position: 60px 60px; } }

.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50px;
  padding: 4px 16px;
  font-size: .82rem;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.hero p {
  font-size: 1.1rem;
  opacity: .9;
  max-width: 520px;
  margin: 0 auto 32px;
}

.search-box {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  transition: var(--transition);
}
.search-box:focus-within {
  background: rgba(255,255,255,.25);
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
  transform: translateY(-1px);
}
.search-box input {
  flex: 1;
  background: none; border: none;
  padding: 14px 22px;
  color: white;
  font-size: 1rem;
  outline: none;
}
.search-box input::placeholder { color: rgba(255,255,255,.7); }
.search-box button {
  background: rgba(255,255,255,.25);
  border: none; border-left: 1px solid rgba(255,255,255,.2);
  padding: 14px 24px;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.search-box button:hover { background: rgba(255,255,255,.4); }

/* ─── Category Bar ─── */
.categories-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
}
.cat-btn {
  padding: 7px 18px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.cat-btn:hover { border-color: var(--primary); color: var(--primary); background: #eef2ff; }
.cat-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
}
[data-theme="dark"] .cat-btn:hover,
[data-theme="dark"] .cat-btn.active { background: var(--primary); }

/* ─── Post Cards ─── */
.post-list { display: flex; flex-direction: column; gap: 20px; }

.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  gap: 0;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .3s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.post-card:hover::before { transform: scaleY(1); }

.post-card-cover {
  width: 200px;
  min-height: 140px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .post-card-cover { background: linear-gradient(135deg, #1e293b, #2d3748); }
.post-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-cover img { transform: scale(1.05); }

.post-card-body {
  flex: 1; min-width: 0;
  padding: 24px 28px;
  display: flex; flex-direction: column; justify-content: center;
}
.post-card-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.post-card-category {
  display: inline-block;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: var(--primary);
  font-size: .74rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 50px;
  letter-spacing: .3px;
}
[data-theme="dark"] .post-card-category {
  background: rgba(99,102,241,.15);
}
.post-card-new {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #d97706;
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
}
.post-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
  color: var(--text);
  transition: color .2s;
}
.post-card:hover h3 { color: var(--primary); }
.post-card-summary {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.post-card-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: .78rem;
  color: var(--text-light);
}
.post-card-meta span { display: flex; align-items: center; gap: 4px; }

@media(max-width: 640px) {
  .post-card { flex-direction: column; }
  .post-card-cover { width: 100%; height: 180px; }
  .post-card-body { padding: 16px 18px; }
}

/* ─── Pagination ─── */
.pagination {
  display: flex; justify-content: center;
  align-items: center; gap: 6px; margin-top: 36px;
}
.pagination button {
  min-width: 40px; height: 40px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: .88rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); background: #eef2ff; }
.pagination button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
}
.pagination button:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }

/* ─── Sidebar ─── */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-widget {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.sidebar-widget:hover { box-shadow: var(--shadow); }

.sidebar-widget-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.sidebar-widget-title .icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}
[data-theme="dark"] .sidebar-widget-title .icon { background: rgba(99,102,241,.15); }

.category-list { list-style: none; }
.category-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}
.category-list li:last-child { border-bottom: none; }
.category-list a {
  font-size: .9rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.category-list a:hover { color: var(--primary); }
.category-list .count {
  background: var(--surface2);
  padding: 2px 9px;
  border-radius: 50px;
  font-size: .74rem;
  color: var(--text-light);
  font-weight: 600;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  padding: 5px 13px;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 500;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.tag:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(99,102,241,.25);
}

/* stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-card {
  background: var(--surface2);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  border: 1px solid var(--border);
}
.stat-card .num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card .label { font-size: .75rem; color: var(--text-light); }

/* ─── Post Detail ─── */
.post-header {
  background: linear-gradient(160deg, #1e293b 0%, #334155 60%, #4f46e5 100%);
  color: white;
  padding: 70px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.post-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,.3) 0%, transparent 60%),
              radial-gradient(circle at 70% 50%, rgba(244,114,182,.2) 0%, transparent 60%);
}
.post-header-inner { position: relative; z-index: 1; }
.post-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  max-width: 860px;
  margin: 0 auto 18px;
  line-height: 1.3;
  text-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.post-header-meta {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 20px; opacity: .8; font-size: .9rem;
}
.post-header-meta span { display: flex; align-items: center; gap: 5px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 24px;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  transition: var(--transition);
}
.back-btn:hover { color: white; }

.post-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 44px 48px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 860px;
  margin: 36px auto;
  font-size: 1rem;
  line-height: 1.85;
}
@media(max-width: 640px) { .post-content { padding: 24px 20px; } }

.post-content h2 {
  font-size: 1.5rem; font-weight: 700;
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}
.post-content h3 {
  font-size: 1.25rem; font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text);
}
.post-content h4 { font-size: 1.1rem; font-weight: 600; margin: 20px 0 10px; }
.post-content p { margin-bottom: 18px; }
.post-content img { border-radius: 10px; margin: 20px auto; box-shadow: var(--shadow); }
.post-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 22px 26px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: .875rem;
  line-height: 1.7;
  border: 1px solid #1e293b;
  position: relative;
}
.post-content code {
  background: rgba(99,102,241,.1);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: .88em;
  font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
}
.post-content pre code { background: none; color: inherit; padding: 0; }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 14px 22px;
  background: linear-gradient(90deg, rgba(99,102,241,.06), transparent);
  border-radius: 0 10px 10px 0;
  margin: 24px 0;
  color: var(--text-muted);
  font-style: italic;
}
.post-content ul, .post-content ol {
  padding-left: 26px; margin-bottom: 18px;
}
.post-content li { margin-bottom: 8px; }
.post-content a { color: var(--primary); border-bottom: 1px solid transparent; }
.post-content a:hover { border-bottom-color: var(--primary); }
.post-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: .9rem;
}
.post-content th, .post-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.post-content th { background: var(--surface2); font-weight: 600; }
.post-content tr:nth-child(even) td { background: var(--surface2); }

.post-tags { margin-top: 28px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Post Nav */
.post-nav {
  max-width: 860px;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media(max-width:640px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.post-nav-item:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.post-nav-label { font-size: .74rem; color: var(--text-light); margin-bottom: 6px; }
.post-nav-title { font-size: .9rem; font-weight: 600; color: var(--text); }

/* ─── Comments ─── */
.comments-section { max-width: 860px; margin: 0 auto 48px; }
.comments-title {
  font-size: 1.2rem; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.comment-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}
.comment-form h3 { margin-bottom: 18px; font-size: 1rem; font-weight: 700; }
.comment-form textarea {
  width: 100%; padding: 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  resize: vertical; min-height: 110px;
  font-family: inherit; font-size: .92rem;
  outline: none; background: var(--surface);
  color: var(--text);
  transition: border-color .2s;
}
.comment-form textarea:focus { border-color: var(--primary); }
.comment-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
@media(max-width:540px) { .comment-form .row { grid-template-columns: 1fr; } }
.comment-form input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: .92rem;
  outline: none; background: var(--surface);
  color: var(--text);
  transition: border-color .2s;
}
.comment-form input:focus { border-color: var(--primary); }

.comment-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  transition: var(--transition);
}
.comment-item:hover { box-shadow: var(--shadow); }
.comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.comment-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad1);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .95rem;
  flex-shrink: 0;
}
.comment-author { font-weight: 600; font-size: .9rem; }
.comment-date { font-size: .75rem; color: var(--text-light); }
.comment-body { font-size: .9rem; line-height: 1.75; color: var(--text-muted); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 24px;
  border-radius: 10px; border: none;
  cursor: pointer; font-size: .9rem;
  font-family: inherit; font-weight: 600;
  transition: var(--transition);
}
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: 0 4px 14px rgba(99,102,241,.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(99,102,241,.4);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ─── Loading / Empty States ─── */
.loading { text-align: center; padding: 70px 20px; color: var(--text-muted); }
.loading .spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 70px 20px; color: var(--text-muted); }
.empty .icon { font-size: 3.5rem; margin-bottom: 14px; filter: grayscale(.5); }
.empty p { font-size: 1rem; }

/* ─── Toast ─── */
#toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  background: #1e293b; color: white;
  padding: 13px 22px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  transform: translateY(80px) scale(.95);
  opacity: 0; transition: all .35s cubic-bezier(.4,0,.2,1);
  pointer-events: none; font-size: .9rem;
  display: flex; align-items: center; gap: 8px;
  max-width: 320px;
}
#toast.show { transform: translateY(0) scale(1); opacity: 1; }
#toast.success { background: linear-gradient(135deg, #059669, #10b981); }
#toast.error { background: linear-gradient(135deg, #dc2626, #ef4444); }
#toast.info { background: linear-gradient(135deg, #0284c7, #0ea5e9); }

/* ─── Footer ─── */
footer {
  background: #0f172a;
  color: #475569;
  text-align: center;
  padding: 40px 20px 30px;
  font-size: .85rem;
  margin-top: 48px;
}
[data-theme="dark"] footer { background: #020617; }
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-logo { font-size: 1.2rem; font-weight: 800; color: #94a3b8; margin-bottom: 12px; }
.footer-logo span { color: var(--primary); }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 16px; }
.footer-links a { color: #475569; font-size: .82rem; }
.footer-links a:hover { color: var(--primary); }
footer p { color: #334155; }

/* ─── Archive ─── */
.archive-year { margin-bottom: 36px; }
.archive-year-title {
  font-size: 1.8rem; font-weight: 800;
  color: var(--primary); margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.archive-year-title::after {
  content: '';
  flex: 1; height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 1px;
}
.archive-post {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 4px;
  transition: var(--transition);
}
.archive-post:hover { background: var(--surface); }
.archive-post-date {
  color: var(--text-light); font-size: .82rem;
  width: 90px; flex-shrink: 0;
  font-family: monospace;
}
.archive-post-title { font-size: .95rem; color: var(--text); flex: 1; }
.archive-post-title:hover { color: var(--primary); }
.archive-post-cat {
  font-size: .74rem; color: var(--primary);
  background: #eef2ff; padding: 2px 9px; border-radius: 50px;
}
[data-theme="dark"] .archive-post-cat { background: rgba(99,102,241,.15); }

/* ─── Page header ─── */
.page-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(99,102,241,.3), transparent 60%);
}
.page-header-inner { position: relative; }
.page-header h1 { font-size: 2.2rem; font-weight: 800; }
.page-header p { opacity: .75; margin-top: 10px; font-size: 1rem; }

/* ─── About ─── */
.about-card {
  max-width: 780px; margin: 0 auto;
  padding: 40px 0;
}
.about-profile {
  display: flex; gap: 28px; align-items: center;
  background: var(--surface); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  margin-bottom: 24px;
}
@media(max-width: 560px) { .about-profile { flex-direction: column; text-align: center; } }
.about-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--grad1);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(99,102,241,.3);
}
.about-name { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.about-bio { color: var(--text-muted); font-size: .95rem; margin-bottom: 14px; }
.about-social { display: flex; gap: 10px; flex-wrap: wrap; }
.social-btn {
  padding: 6px 16px; border-radius: 8px; font-size: .82rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  background: var(--surface2); color: var(--text-muted);
  border: 1px solid var(--border); transition: var(--transition);
}
.social-btn:hover { color: var(--primary); border-color: var(--primary); background: #eef2ff; }
.about-content {
  background: var(--surface); border-radius: var(--radius);
  padding: 32px 36px; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.about-content h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.about-content p { color: var(--text-muted); font-size: .95rem; margin-bottom: 14px; }

/* ─── Tags Page ─── */
.tags-container {
  max-width: 860px; margin: 0 auto;
  padding: 40px 0;
}
.tag-group { margin-bottom: 48px; }
.tag-group-title {
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.tag-big {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 50px; font-size: .88rem; font-weight: 500;
  background: var(--surface); color: var(--text-muted);
  border: 1.5px solid var(--border);
  cursor: pointer; margin: 5px; transition: var(--transition);
}
.tag-big:hover {
  background: var(--primary); color: white; border-color: var(--primary);
  transform: translateY(-2px); box-shadow: 0 6px 16px rgba(99,102,241,.25);
}
.tag-big .count {
  background: rgba(0,0,0,.08); color: inherit;
  padding: 1px 7px; border-radius: 50px; font-size: .74rem;
}

/* ─── Fade in animation ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease forwards; }

/* ─── Skeleton loader ─── */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
