*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0f0f14;
  --surface: #1a1a24;
  --surface-hover: #22222e;
  --text: #e8e8ed;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;
  --border: #2a2a3a;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-bg: rgba(124, 58, 237, 0.1);
  --gradient-1: #7c3aed;
  --gradient-2: #2563eb;
  --tag-llm-bg: rgba(139, 92, 246, 0.15); --tag-llm: #a78bfa;
  --tag-vision-bg: rgba(6, 182, 212, 0.15); --tag-vision: #67e8f9;
  --tag-robotics-bg: rgba(245, 158, 11, 0.15); --tag-robotics: #fbbf24;
  --tag-policy-bg: rgba(239, 68, 68, 0.15); --tag-policy: #fca5a5;
  --tag-chip-bg: rgba(16, 185, 129, 0.15); --tag-chip: #6ee7b7;
  --tag-startup-bg: rgba(236, 72, 153, 0.15); --tag-startup: #f9a8d4;
  --tag-research-bg: rgba(59, 130, 246, 0.15); --tag-research: #93c5fd;
  --tag-product-bg: rgba(251, 146, 60, 0.15); --tag-product: #fdba74;
}
body {
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 15, 20, 0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.nav-brand-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-brand-name { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 0.5px; }
.nav-brand-sub { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link { padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--text-secondary); text-decoration: none; border-radius: 20px; white-space: nowrap; transition: all 0.2s; cursor: pointer; }
.nav-link:hover { background: var(--accent-bg); color: var(--accent-light); }
.nav-link.active { background: var(--accent); color: #fff; }
.nav-search { display: flex; align-items: center; gap: 8px; margin-left: 12px; }
.search-input { width: 180px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 13px; font-family: inherit; outline: none; transition: border-color 0.2s, width 0.3s; background: var(--surface); color: var(--text); }
.search-input:focus { border-color: var(--accent); width: 240px; }
.search-input::placeholder { color: var(--text-muted); }

/* HERO */
.hero { max-width: 1200px; margin: 0 auto; padding: 32px 24px 0; }
.hero-card {
  position: relative;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #7c3aed 100%);
  border-radius: 16px; padding: 56px 48px; color: #fff; overflow: hidden;
  cursor: pointer; transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(124, 58, 237, 0.3);
}
.hero-card::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
  pointer-events: none;
}
.hero-card:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2); }
.hero-badge { display: inline-block; background: rgba(255,255,255,.15); padding: 4px 14px; border-radius: 16px; font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; backdrop-filter: blur(4px); }
.hero-date { font-size: 13px; opacity: 0.7; margin-bottom: 12px; }
.hero-title { font-family: 'Noto Sans TC', sans-serif; font-size: 28px; font-weight: 700; line-height: 1.4; max-width: 700px; position: relative; }
.hero-excerpt { font-size: 15px; opacity: 0.85; margin-top: 14px; max-width: 600px; line-height: 1.8; position: relative; }
.hero-tags { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.hero-tag { padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,0.15); color: #fff; }

/* SECTION & GRID */
.section-header { max-width: 1200px; margin: 0 auto; padding: 40px 24px 16px; display: flex; align-items: baseline; justify-content: space-between; }
.section-title { font-family: 'Noto Sans TC', sans-serif; font-size: 22px; font-weight: 700; color: var(--text); }
.section-count { font-size: 13px; color: var(--text-muted); }
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; cursor: pointer; display: flex; flex-direction: column; }
.article-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(124, 58, 237, 0.1); border-color: var(--accent); }
.card-color-bar { height: 3px; width: 100%; }
.card-body { padding: 20px 22px 18px; flex: 1; display: flex; flex-direction: column; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.card-date { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.card-priority { font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 700; }
.card-priority.high { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.card-priority.medium { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.card-priority.normal { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card-tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.tag-LLM { background: var(--tag-llm-bg); color: var(--tag-llm); }
.tag-視覺 { background: var(--tag-vision-bg); color: var(--tag-vision); }
.tag-機器人 { background: var(--tag-robotics-bg); color: var(--tag-robotics); }
.tag-政策 { background: var(--tag-policy-bg); color: var(--tag-policy); }
.tag-晶片 { background: var(--tag-chip-bg); color: var(--tag-chip); }
.tag-新創 { background: var(--tag-startup-bg); color: var(--tag-startup); }
.tag-研究 { background: var(--tag-research-bg); color: var(--tag-research); }
.tag-產品 { background: var(--tag-product-bg); color: var(--tag-product); }
.card-title { font-family: 'Noto Sans TC', sans-serif; font-size: 16px; font-weight: 700; line-height: 1.55; color: var(--text); margin-bottom: 10px; flex: 1; }
.card-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-read-more { font-size: 12px; font-weight: 600; color: var(--accent-light); text-decoration: none; letter-spacing: 0.5px; }
.card-source { font-size: 11px; color: var(--text-muted); }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 200; overflow-y: auto; padding: 40px 20px; backdrop-filter: blur(4px); }
.modal-overlay.open { display: flex; justify-content: center; align-items: flex-start; }
.modal-content { background: var(--surface); border-radius: 16px; max-width: 740px; width: 100%; overflow: hidden; animation: modalIn 0.3s ease; border: 1px solid var(--border); }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { padding: 32px 36px 24px; border-bottom: 1px solid var(--border); }
.modal-close { float: right; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); padding: 4px 8px; border-radius: 8px; transition: background 0.2s; }
.modal-close:hover { background: var(--surface-hover); }
.modal-title { font-family: 'Noto Sans TC', sans-serif; font-size: 22px; font-weight: 700; line-height: 1.5; margin-top: 8px; color: var(--text); }
.modal-body { padding: 24px 36px 36px; }
.modal-body .summary { font-size: 15px; color: var(--text-secondary); line-height: 1.85; margin-bottom: 20px; }
.modal-body .insight { background: rgba(124, 58, 237, 0.08); border: 1px solid rgba(124, 58, 237, 0.2); padding: 18px 22px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; line-height: 1.8; color: var(--text-secondary); }
.modal-body .insight strong { color: var(--accent-light); }
.modal-body .takeaway { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.2); padding: 18px 22px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; line-height: 1.8; color: var(--text-secondary); }
.modal-body .takeaway strong { color: #6ee7b7; }
.modal-body .source { font-size: 13px; color: var(--text-muted); margin-top: 16px; }
.modal-body .source a { color: var(--accent-light); text-decoration: none; }
.modal-body .source a:hover { text-decoration: underline; }

/* LAYOUT & SIDEBAR */
.layout-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.sidebar-wrap { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; }
.sidebar-title { font-family: 'Noto Sans TC', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.sidebar-item { padding: 10px 0; font-size: 13px; color: var(--text-secondary); border-bottom: 1px solid var(--border); line-height: 1.6; }
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item strong { color: var(--accent-light); display: inline-block; min-width: 50px; }
.sidebar-stat { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.sidebar-stat:last-child { border-bottom: none; }
.sidebar-stat-label { font-size: 13px; color: var(--text-secondary); }
.sidebar-stat-value { font-size: 14px; font-weight: 700; color: var(--text); }
.sidebar-stat-change { font-size: 11px; margin-left: 6px; }
.sidebar-stat-change.up { color: #6ee7b7; }
.sidebar-stat-change.down { color: #fca5a5; }

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 20px 0 40px; }
.page-btn { padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 13px; cursor: pointer; transition: all 0.2s; font-family: inherit; color: var(--text-secondary); }
.page-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: default; }

/* FOOTER */
.site-footer { text-align: center; padding: 32px 24px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); line-height: 1.8; }

/* MISC */
.no-results { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 15px; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-secondary); padding: 4px; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .layout-wrap { grid-template-columns: 1fr; }
  .sidebar-wrap { position: static; }
}
@media (max-width: 640px) {
  .articles-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 24px; gap: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
  .nav-toggle { display: block; }
  .hero-card { padding: 36px 24px; }
  .hero-title { font-size: 22px; }
  .search-input { width: 140px; }
  .search-input:focus { width: 180px; }
  .modal-header, .modal-body { padding-left: 20px; padding-right: 20px; }
}
