/* ========================================
   IT求知网 — Global Stylesheet
   ======================================== */

/* ---------- System Fonts Default ---------- */
/* Removed Google Fonts import to comply with strict local dependency rule. 
   Relies on fallback system fonts defined in --font-sans */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --primary-glow: rgba(59, 130, 246, 0.15);

  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --accent-light: #22d3ee;

  /* Neutral Colors — semi-transparent for particle visibility */
  --bg-body: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.75);
  --bg-card-hover: rgba(39, 53, 72, 0.8);
  --bg-surface: rgba(22, 32, 51, 0.7);
  --bg-header: rgba(15, 23, 42, 0.75);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;

  --border-color: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(148, 163, 184, 0.25);

  /* Gradients — semi-transparent */
  --gradient-primary: linear-gradient(135deg, #3b82f6, #06b6d4);
  --gradient-hero: linear-gradient(160deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 58, 95, 0.7) 50%, rgba(15, 23, 42, 0.8) 100%);
  --gradient-card: linear-gradient(145deg, rgba(30, 41, 59, 0.75), rgba(22, 32, 51, 0.7));
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 60%);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);

  /* Typography */
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --container-max: 1200px;
  --container-padding: 1.5rem;
  --section-gap: 5rem;
  --card-radius: 16px;
  --btn-radius: 12px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-normal: 0.35s var(--ease-out);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

/* ---------- Header / Navbar ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--border-color);
  transition: box-shadow var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

.logo-text span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Desktop Nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: 2.5rem;
}

.nav-links a {
  position: relative;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: width var(--transition-normal);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Header Search */
.header-search {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.2rem 0.5rem;
  margin-left: auto;
  margin-right: 1.5rem;
  transition: border-color var(--transition-fast);
}

.header-search:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.header-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 0.3rem 0.5rem;
  width: 140px;
  transition: width var(--transition-normal);
}

.header-search input:focus {
  width: 180px;
}

.header-search button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Header Search */
.header-search {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.2rem 0.5rem;
  margin-left: auto;
  margin-right: 1.5rem;
  transition: border-color var(--transition-fast);
}

.header-search:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.header-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 0.3rem 0.5rem;
  width: 140px;
  transition: width var(--transition-normal);
}

.header-search input:focus {
  width: 180px;
}

.header-search input::placeholder {
  color: var(--text-muted);
}

.header-search button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger (Mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.mobile-nav.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

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

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: 68px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 2rem var(--container-padding);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero h1 .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--btn-radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-2px);
}

/* ---------- Section ---------- */
.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.section-alt {
  background: var(--bg-surface);
  backdrop-filter: blur(4px);
}

/* ---------- Features Grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Article Cards ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.article-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

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

.article-thumb {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.8), rgba(13, 33, 55, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
  position: relative;
}

.article-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--bg-card));
}

.article-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-tag {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--primary-glow);
  color: var(--primary-light);
  margin-bottom: 0.75rem;
  width: fit-content;
}

.article-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.article-card h3 a {
  color: inherit;
}

.article-card h3 a:hover {
  color: var(--primary-light);
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.article-read-more {
  font-weight: 600;
  color: var(--primary-light);
  font-size: 0.85rem;
}

.article-read-more:hover {
  color: var(--accent-light);
}

/* ---------- WeChat / QR Section ---------- */
.wechat-section {
  text-align: center;
}

.wechat-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.wechat-card .qr-wrapper {
  width: 180px;
  height: 180px;
  margin: 0 auto 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid rgba(59, 130, 246, 0.2);
  box-shadow: var(--shadow-glow);
  background: #fff;
  padding: 8px;
}

.wechat-card .qr-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wechat-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.wechat-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.wechat-card .keyword-tip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--primary-light);
}

/* ---------- Article Detail Page ---------- */
.article-hero {
  padding: calc(68px + 4rem) 0 3rem;
  background: var(--gradient-hero);
  position: relative;
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.article-hero .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb .sep {
  color: var(--text-muted);
}

.article-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.article-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-info .info-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Article Content */
.article-content-wrapper {
  padding: 3rem 0 var(--section-gap);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.article-content code {
  font-family: var(--font-mono);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--primary-light);
}

.article-content pre {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.article-content pre code {
  background: none;
  padding: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 0 12px 12px 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.article-content img {
  border-radius: 12px;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
}

/* Resource box inside articles */
.resource-box {
  background: var(--gradient-card);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--card-radius);
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.resource-box h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.resource-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.resource-box .qr-small {
  width: 140px;
  height: 140px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-glow);
}

.resource-box .qr-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
  box-shadow: none;
}

.resource-box .keyword-highlight {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.35rem 1rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-light);
}

/* Article Pagination */
.article-pagination {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.article-pagination a {
  flex: 1;
  padding: 1.25rem;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.article-pagination a:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.article-pagination .label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.article-pagination .title {
  font-weight: 600;
  font-size: 0.95rem;
}

.article-pagination .next {
  text-align: right;
}

/* ---------- Article List Page ---------- */
.list-hero {
  padding: calc(68px + 3rem) 0 2rem;
  background: var(--gradient-hero);
  position: relative;
}

.list-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.list-hero .container {
  position: relative;
  z-index: 1;
}

.list-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.list-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Tags filter */
.tags-filter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.tag-btn {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-btn:hover,
.tag-btn.active {
  border-color: var(--primary);
  color: var(--primary-light);
  background: var(--primary-glow);
}

/* Article list items */
.article-list-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  margin-bottom: 1rem;
  transition: all var(--transition-normal);
}

.article-list-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.article-list-thumb {
  width: 220px;
  height: 150px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.8), rgba(13, 33, 55, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
}

.article-list-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-list-content h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.article-list-content h2 a {
  color: inherit;
}

.article-list-content h2 a:hover {
  color: var(--primary-light);
}

.article-list-content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.article-list-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
  backdrop-filter: blur(4px);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: 0.75rem;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

/* ---------- About Page ---------- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.about-content p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.about-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.about-content li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.about-value-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 1.75rem;
  text-align: center;
  transition: all var(--transition-fast);
}

.about-value-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.about-value-card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.about-value-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.about-value-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .features-grid,
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .about-values {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-gap: 3.5rem;
    --container-padding: 1.25rem;
  }

  /* Hide logo text on mobile, show icon only */
  .logo-text {
    display: none;
  }

  /* Nav */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    min-height: 80vh;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  /* Grids */
  .features-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }

  /* Article list */
  .article-list-item {
    flex-direction: column;
  }

  .article-list-thumb {
    width: 100%;
    height: 180px;
  }

  /* Article detail */
  .article-header h1 {
    font-size: 1.8rem;
  }

  .article-pagination {
    flex-direction: column;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Section title */
  .section-title {
    font-size: 1.6rem;
  }

  .about-values {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .list-hero h1 {
    font-size: 1.7rem;
  }
}

/* ---------- Animations ---------- */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fade-in-up 0.6s var(--ease-out) both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ---------- Particle Canvas ---------- */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
