/* ===== Reset & Base ===== */
*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}
:root{
  --primary-dark:#0a1628;
  --primary-blue:#1e40af;
  --accent-blue:#3b82f6;
  --accent-gold:#f59e0b;
  --text-dark:#1f2937;
  --text-gray:#6b7280;
  --bg-light:#f9fafb;
  --white:#ffffff;
  --transition:all .3s ease;
}
html{scroll-behavior:smooth;font-size:16px}
body{font-family:'Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--text-dark);line-height:1.6;background:var(--white);-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none;transition:var(--transition)}
ul,ol{list-style:none}
button{cursor:pointer;border:none;background:none;font-family:inherit}
.container{max-width:1200px;margin:0 auto;padding:0 1.5rem}

/* ===== Header ===== */
.header{position:relative;z-index:100;background:#fffffffa;box-shadow:0 1px 3px #0000001a}
.header .container{display:flex;align-items:center;justify-content:space-between;height:72px}
.logo{display:flex;align-items:center;gap:.75rem;font-weight:700;color:var(--primary-dark)}

/* ===== Navigation (article pages use ul.nav-menu) ===== */
#nav{display:flex;align-items:center;gap:2rem}
.nav-menu{display:flex;align-items:center;gap:2rem;list-style:none}
.nav-link{font-weight:500;color:var(--text-dark);position:relative;white-space:nowrap}
.nav-link:after{content:"";position:absolute;bottom:-4px;left:0;width:0;height:2px;background:var(--accent-blue);transition:var(--transition)}
.nav-link:hover:after,.nav-link.active:after{width:100%}
.nav-link:hover,.nav-link.active{color:var(--primary-blue)}

/* Mobile toggle - hidden on desktop by default */
.mobile-toggle{display:none;flex-direction:column;gap:5px;padding:5px}
.mobile-toggle span{width:24px;height:2px;background:var(--text-dark);display:block;transition:var(--transition)}

/* ===== Article Page Layout ===== */
.article-page{padding:2rem 0 4rem}
.article-layout{max-width:800px;margin:0 auto}
.article-section{width:100%}

/* Article Header */
.article-header{margin-bottom:2rem}
.article-meta{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}
.article-category{display:inline-block;padding:.25rem .75rem;border-radius:20px;font-size:.8125rem;font-weight:500}
.article-date{font-size:.875rem;color:var(--text-gray)}
.article-author{font-size:.875rem;color:var(--text-gray)}
.article-title{font-size:2rem;font-weight:700;line-height:1.3;color:var(--primary-dark);margin-bottom:1rem}
.article-excerpt{font-size:1.05rem;color:var(--text-gray);line-height:1.7;border-left:3px solid var(--accent-blue);padding-left:1rem}

/* Article Cover */
.article-cover{margin-bottom:2.5rem;border-radius:12px;overflow:hidden}
.article-cover img{width:100%;height:auto;display:block}
.cover-detail-image{width:100%;border-radius:12px}

/* Article Content */
.article-content{font-size:1.05rem;line-height:1.85;color:var(--text-dark)}
.article-content p{margin-bottom:1.25rem}
.article-content h2{font-size:1.5rem;font-weight:700;color:var(--primary-dark);margin:2.5rem 0 1rem;padding-bottom:.5rem;border-bottom:2px solid #e5e7eb}
.article-content h3{font-size:1.2rem;font-weight:600;color:var(--primary-dark);margin:2rem 0 .75rem}
.article-content strong{color:var(--primary-dark);font-weight:600}
.article-content ul,.article-content ol{margin:1rem 0 1.25rem;padding-left:1.5rem}
.article-content ul{list-style:disc}
.article-content ol{list-style:decimal}
.article-content li{margin-bottom:.5rem;line-height:1.7}
.article-content blockquote{border-left:4px solid var(--accent-blue);padding:1rem 1.25rem;margin:1.5rem 0;background:#f0f7ff;border-radius:0 8px 8px 0;color:var(--text-dark);font-style:italic}

/* Tables */
.article-content table{width:100%;border-collapse:collapse;margin:1.5rem 0;overflow-x:auto;display:block;font-size:.95rem}
.article-content thead{background:var(--primary-dark);color:var(--white)}
.article-content th{padding:.75rem 1rem;text-align:left;font-weight:600;white-space:nowrap}
.article-content td{padding:.75rem 1rem;border-bottom:1px solid #e5e7eb}
.article-content tbody tr:nth-child(even){background:var(--bg-light)}
.article-content tbody tr:hover{background:#eef2ff}

/* Tags at bottom */
.article-tags{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid #e5e7eb}
.article-tags .tag{display:inline-block;padding:.3rem .75rem;background:#f3f4f6;border-radius:20px;font-size:.8125rem;color:var(--text-gray)}
.article-tags .tag:hover{background:var(--accent-blue);color:var(--white)}

/* ===== Footer ===== */
.footer{background:var(--primary-dark);color:var(--white);padding:4rem 0 2rem}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:3rem;margin-bottom:3rem}
.footer-brand p{color:#ffffffb3;font-size:.9375rem;line-height:1.8;margin-top:.75rem}
.footer-title{font-size:1.125rem;font-weight:600;margin-bottom:1.25rem}
.footer-links{display:flex;flex-direction:column;gap:.75rem}
.footer-links a{color:#ffffffb3;font-size:.9375rem}
.footer-links a:hover{color:var(--accent-blue)}
.footer-bottom{border-top:1px solid rgba(255,255,255,.1);padding-top:2rem;text-align:center;color:#ffffff80;font-size:.875rem}

/* ===== Related Articles ===== */
.related-card{display:flex;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;margin-bottom:1rem;transition:var(--transition)}
.related-card:hover{box-shadow:0 4px 15px #0000001a;transform:translateY(-2px)}
.related-image{width:120px;min-width:120px;background:linear-gradient(135deg,#e5e7eb,#f3f4f6);display:flex;align-items:center;justify-content:center}
.related-placeholder{font-size:.75rem;color:var(--text-gray);text-align:center;padding:.5rem}
.related-content{padding:1rem;flex:1;display:flex;flex-direction:column;justify-content:center;gap:.35rem}
.related-category{font-size:.75rem;font-weight:500}
.related-content h3{font-size:.95rem;font-weight:600;line-height:1.4;color:var(--primary-dark)}
.related-content h3 a:hover{color:var(--accent-blue)}
.related-date{font-size:.8rem;color:var(--text-gray)}

/* ===== Responsive ===== */
@media(max-width:1024px){
  .footer-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:768px){
  /* Mobile nav - toggle visible in header, menu as dropdown */
  #nav{position:relative;gap:0}
  .mobile-toggle{display:flex}
  .nav-menu{display:none;position:absolute;top:100%;left:-1.5rem;right:-1.5rem;background:var(--white);flex-direction:column;gap:0;box-shadow:0 4px 12px #0000001a;z-index:200;padding:.5rem 0}
  #nav.active .nav-menu{display:flex}
  .nav-menu li{width:100%}
  .nav-menu .nav-link{display:block;padding:.85rem 1.5rem;border-bottom:1px solid #f3f4f6}
  .nav-menu .nav-link:after{display:none}
  
  /* Article responsive */
  .article-title{font-size:1.5rem}
  .article-excerpt{font-size:.95rem}
  .article-content{font-size:1rem}
  .article-content h2{font-size:1.3rem}
  .article-content h3{font-size:1.1rem}
  .article-content table{font-size:.85rem}
  .article-content th,.article-content td{padding:.5rem .65rem}
  
  /* Footer responsive */
  .footer-grid{grid-template-columns:1fr;gap:2rem}
  .footer{padding:3rem 0 1.5rem}
  
  /* Related cards responsive */
  .related-card{flex-direction:column}
  .related-image{width:100%;min-width:auto;height:80px}
  
  /* Article page spacing */
  .article-page{padding:1.5rem 0 3rem}
  .article-layout{margin:0 .5rem}
}
