/* ============================================================
   🎨 DESIGN SYSTEM — McKinsey-Inspired Professional Palette
   Shared across all pages via <link rel="stylesheet" href="/site-styles.css">
   ============================================================ */
:root {
  --brand-navy:       #002B5C;
  --brand-navy-dark:  #001F42;
  --brand-blue:       #005A9C;
  --brand-blue-light: #0078D4;
  --brand-accent:     #0066CC;

  --bg:               #FFFFFF;
  --bg-alt:           #F5F7FA;
  --surface:          #FFFFFF;
  --surface-hover:    #F0F3F8;
  --text-primary:     #1A1A2E;
  --text-secondary:   #4A4A6A;
  --text-muted:       #8899AA;
  --text-inverse:     #FFFFFF;
  --border:           #E2E8F0;
  --border-light:     #F0F3F8;
  --shadow-sm:        0 1px 3px rgba(0,43,92,0.06);
  --shadow-md:        0 4px 12px rgba(0,43,92,0.08);
  --shadow-lg:        0 8px 30px rgba(0,43,92,0.12);

  --card-accent:      #0066CC;
  --tag-bg:           #EBF4FF;
  --tag-text:         #005A9C;
  --tag-border:       #C5DFFF;
  --footer-bg:        #001F3F;
  --footer-text:      #8899B0;

  --radius-sm:        6px;
  --radius-md:        10px;
  --radius-lg:        16px;
  --transition-fast:  0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg:               #0A1628;
  --bg-alt:           #0F1F38;
  --surface:          #132644;
  --surface-hover:    #1A3050;
  --text-primary:     #F5F7FB;
  --text-secondary:   #CCD5E4;
  --text-muted:       #8E9EB8;
  --text-inverse:     #FFFFFF;
  --border:           #1E3555;
  --border-light:     #162840;
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:        0 8px 30px rgba(0,0,0,0.5);
  --tag-bg:           #0D2B50;
  --tag-text:         #8BC4F8;
  --tag-border:       #1A4878;
  --footer-bg:        #060F1F;
  --footer-text:      #8E9EB8;
}

/* ============================================================
   🔤 TYPOGRAPHY & RESET
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

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

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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background var(--transition-base), color var(--transition-base);
  min-height: 100dvh;
  overflow-x: hidden;
}

::selection { background: rgba(0,90,156,0.2); color: var(--brand-navy); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

a { color: inherit; text-decoration: none; }

/* ============================================================
   🧭 HEADER
   ============================================================ */
.header { background: var(--brand-navy); color: #fff; }
.header-top {
  max-width: 1400px; margin: 0 auto; padding: 0 48px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.header-brand { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.header-logo { width: 38px; height: 38px; border-radius: var(--radius-sm); object-fit: contain; flex-shrink: 0; }
.header-brand-text { font-family: 'Noto Serif SC', 'SimSun', serif; font-size: 22px; font-weight: 700; letter-spacing: 0.5px; }
.header-right { display: flex; align-items: center; gap: 24px; }
.header-search { position: relative; width: 280px; }
.header-search input {
  width: 100%; padding: 10px 40px 10px 16px;
  border: 1px solid rgba(255,255,255,0.25); border-radius: 30px;
  background: rgba(255,255,255,0.1); color: #fff;
  font-size: 14px; font-family: inherit; outline: none;
  transition: all var(--transition-fast);
}
.header-search input::placeholder { color: rgba(255,255,255,0.65); }
.header-search input:focus { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); }
.header-search-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: none; background: transparent;
  color: rgba(255,255,255,0.85); cursor: pointer;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  transition: all var(--transition-fast);
}
.header-search-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.header-links { display: flex; align-items: center; gap: 20px; font-size: 13px; color: rgba(255,255,255,0.92); }
.header-links a { color: rgba(255,255,255,0.92); text-decoration: none; transition: color var(--transition-fast); }
.header-links a:hover { color: #fff; }
.header-lang { font-weight: 600; cursor: pointer; }

/* ============================================================
   🧭 NAVIGATION
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-base), border-color var(--transition-base);
}
[data-theme="dark"] .nav { background: rgba(13,22,40,0.96); }
.nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 48px;
  height: 52px; display: flex; align-items: center; gap: 32px;
}
.nav-menu { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-menu a {
  display: block; padding: 8px 16px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 15px; font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.nav-menu a:hover { color: var(--brand-navy); background: var(--bg-alt); }
[data-theme="dark"] .nav-menu a:hover { color: var(--text-inverse); }
.nav-menu a.active { color: var(--brand-blue); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.theme-toggle {
  width: 36px; height: 36px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--radius-md);
  cursor: pointer; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
}
.theme-toggle:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.theme-toggle svg { width: 18px; height: 18px; }
.nav-login-btn {
  padding: 8px 20px; border: none; border-radius: var(--radius-md);
  background: var(--brand-navy); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all var(--transition-fast); font-family: inherit;
}
.nav-login-btn:hover { background: var(--brand-blue); transform: translateY(-1px); }

/* ============================================================
   📌 BREADCRUMB
   ============================================================ */
.breadcrumb {
  max-width: 1400px; margin: 0 auto; padding: 16px 48px 0;
  font-size: 13px; color: var(--text-muted);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.breadcrumb li::before { content: '/'; margin-right: 8px; color: var(--border); }
.breadcrumb li:first-child::before { display: none; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color var(--transition-fast); }
.breadcrumb a:hover { color: var(--brand-blue); }
.breadcrumb .current { color: var(--text-primary); font-weight: 500; }

/* ============================================================
   🃏 CARDS & GRID (shared)
   ============================================================ */
.card-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: all var(--transition-base); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-blue-light); }
.card-thumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
  background: var(--bg-alt); transition: transform var(--transition-base);
}
.card:hover .card-thumb { transform: scale(1.03); }
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-tag {
  display: inline-block; padding: 4px 12px; border-radius: 4px;
  background: var(--tag-bg); color: var(--tag-text);
  font-size: 12px; font-weight: 600; border: 1px solid var(--tag-border);
  margin-bottom: 12px; align-self: flex-start; letter-spacing: 0.5px;
}
.card h3, .article-card h3 {
  font-family: 'Noto Serif SC', 'SimSun', serif;
  font-size: 16px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 8px; line-height: 1.45; transition: color var(--transition-fast);
}
.card:hover h3, .article-card:hover h3 { color: var(--brand-blue); }
.card-desc {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 18px; flex: 1;
}
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand-blue); font-size: 13px; font-weight: 600;
  transition: gap var(--transition-fast); margin-top: auto;
}
.card:hover .card-link { gap: 10px; }

/* ============================================================
   📌 SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 76px; }
.sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm);
}
.sidebar-card h4 {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border-light);
}
.sidebar-card h4 .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-update { background: #EF4444; animation: dot-pulse 2s ease-in-out infinite; }
.dot-hot { background: #F59E0B; animation: dot-pulse 2s ease-in-out 0.5s infinite; }
@keyframes dot-pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.3; transform:scale(0.6); } }
.update-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-light); cursor: pointer; }
.update-item:last-child { border-bottom: none; padding-bottom: 0; }
.update-item:hover .update-text { color: var(--brand-blue); }
.update-date { font-family: 'Inter', sans-serif; font-size: 11px; color: var(--text-muted); font-weight: 500; min-width: 44px; padding-top: 2px; }
.update-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; transition: color var(--transition-fast); }
.hot-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.hot-item:hover .hot-text { color: var(--brand-blue); }
.hot-badge { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.hot-badge-1 { background: #E53E3E; } .hot-badge-2 { background: #DD6B20; } .hot-badge-3 { background: #3182CE; } .hot-badge-4 { background: #718096; }
.hot-text { font-size: 13px; color: var(--text-secondary); line-height: 1.4; transition: color var(--transition-fast); }

/* ============================================================
   🦶 FOOTER
   ============================================================ */
.footer { background: var(--footer-bg); padding: 56px 48px 32px; color: var(--footer-text); transition: background var(--transition-base); }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 40px; }
.footer-brand { max-width: 380px; }
.footer-brand-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-logo { width: 40px; height: 40px; border-radius: var(--radius-md); object-fit: contain; }
.footer-brand-name { font-family: 'Noto Serif SC', 'SimSun', serif; font-size: 20px; font-weight: 700; color: #FFFFFF; }
.footer-intro { font-size: 13px; color: var(--footer-text); line-height: 1.8; }
.footer-col h5 { font-size: 14px; font-weight: 700; color: #FFFFFF; margin-bottom: 16px; letter-spacing: 0.5px; }
.footer-col a { display: block; font-size: 13px; color: var(--footer-text); text-decoration: none; padding: 5px 0; transition: color var(--transition-fast); }
.footer-col a:hover { color: #FFFFFF; }
.footer-divider { height: 1px; background: rgba(255,255,255,0.08); margin-bottom: 24px; }
.footer-bottom { display: flex; justify-content: space-between; font-size: 12px; color: var(--footer-text); }

/* ============================================================
   📱 RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image { min-height: 300px; aspect-ratio: 16/7; }
  .hero-content { padding: 40px 48px; }
  .featured-article { grid-template-columns: 1fr; }
  .featured-image { aspect-ratio: 16/7; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .header-top, .nav-inner, .page-layout, .breadcrumb, .featured-section, .articles-section {
    padding-left: 24px; padding-right: 24px;
  }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .hero-content { padding: 32px 24px; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .header-top { padding: 0 16px; height: 56px; }
  .header-search { width: 180px; }
  .header-search input { padding: 8px 36px 8px 14px; font-size: 13px; }
  .header-links { display: none; }
  .header-brand-text { font-size: 18px; }
  .nav-inner { padding: 0 16px; height: 48px; overflow-x: auto; }
  .nav-menu a { padding: 6px 12px; font-size: 14px; white-space: nowrap; }
  .nav-right { display: none; }
  .hero-image { min-height: 200px; aspect-ratio: 16/9; }
  .hero-content { padding: 24px 16px; }
  .hero h1 { font-size: 24px; }
  .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
  .page-layout { padding: 24px 16px; }
  .sidebar { grid-template-columns: 1fr; }
  .breadcrumb, .featured-section, .articles-section { padding-left: 16px; padding-right: 16px; }
  .featured-content { padding: 28px 20px; }
  .article-grid { grid-template-columns: 1fr; }
  .footer { padding: 40px 16px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 20px; }
  .section-title { font-size: 17px; }
  .featured-content h1 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   🧰 TOOLBOX PAGE
   ============================================================ */
.tools-hero {
  max-width: 1400px; margin: 0 auto; padding: 48px 48px 24px; text-align: center;
}
.tools-hero h1 {
  font-family: 'Noto Serif SC', 'SimSun', serif;
  font-size: clamp(24px, 3vw, 36px); font-weight: 900;
  color: var(--text-primary); margin-bottom: 12px;
}
.tools-hero p { font-size: 15px; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }
.tools-grid {
  max-width: 1400px; margin: 0 auto; padding: 24px 48px 56px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 24px; text-align: center;
  cursor: pointer; transition: all var(--transition-base); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-blue-light); }
.tool-icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: var(--tag-bg); color: var(--brand-blue);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
  transition: all var(--transition-base);
}
.tool-card:hover .tool-icon { background: var(--brand-blue); color: #fff; transform: scale(1.1); }
.tool-icon svg { width: 28px; height: 28px; }
.tool-card h3 { font-family: 'Noto Serif SC', serif; font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.tool-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.tool-card .coming-soon {
  margin-top: 12px; padding: 3px 10px; border-radius: 4px;
  background: var(--bg-alt); color: var(--text-muted);
  font-size: 11px; font-weight: 600;
}
@media (max-width: 1024px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .tools-grid { grid-template-columns: 1fr; } .tools-hero { padding: 32px 16px 16px; } .tools-grid { padding: 16px 16px 40px; } }

/* ============================================================
   🔍 SEARCH RESULTS
   ============================================================ */
.search-results { max-width: 1400px; margin: 0 auto; padding: 24px 48px 56px; }
.search-result-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px 24px; margin-bottom: 16px;
  transition: all var(--transition-fast); cursor: pointer; text-decoration: none; color: inherit; display: block;
}
.search-result-item:hover { border-color: var(--brand-blue-light); box-shadow: var(--shadow-md); }
.search-result-item h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.search-result-item p { font-size: 13px; color: var(--text-secondary); }
.search-result-item .meta { font-size: 12px; color: var(--text-muted); margin-top: 8px; display: flex; gap: 16px; }
