:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #1c2333;
  --border: #30363d;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --green: #3fb950;
  --orange: #d29922;
  --red: #f85149;
  --purple: #bc8cff;
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.site-title:hover { color: var(--accent); }

.header-links { display: flex; gap: 16px; }

.header-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
}

.header-links a:hover { color: var(--accent); }

/* Hero */
.hero { padding: 40px 0 24px; text-align: center; }

.hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p { color: var(--text-secondary); font-size: 15px; max-width: 560px; margin: 0 auto; }

/* Sections */
.section { padding: 24px 0 0; }

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cards */
.cards { display: grid; gap: 10px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover { border-color: var(--accent); background: var(--bg-hover); }

.card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  flex: 1;
  min-width: 0;
}

.card:hover .card-title { color: var(--accent-hover); }

.card-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.badge-tech { background: rgba(88, 166, 255, 0.15); color: var(--accent); }
.badge-security { background: rgba(248, 81, 73, 0.15); color: var(--red); }
.badge-industry { background: rgba(188, 140, 255, 0.15); color: var(--purple); }
.badge-guide { background: rgba(63, 185, 80, 0.15); color: var(--green); }
.badge-internal { background: rgba(210, 153, 34, 0.15); color: var(--orange); }

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.btn:hover { background: rgba(88, 166, 255, 0.1); border-color: var(--accent); }

.card-online { opacity: 0.65; }
.card-online:hover { opacity: 1; }

/* Report Viewer */
.viewer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.btn-back {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.btn-back:hover { background: rgba(88, 166, 255, 0.1); border-color: var(--accent); }

.viewer-info { flex: 1; font-size: 13px; color: var(--text-secondary); }

.viewer-link { font-size: 13px; color: var(--accent); text-decoration: none; }
.viewer-link:hover { text-decoration: underline; }

/* Markdown */
.markdown-body { padding-bottom: 80px; }
.markdown-body h1 { font-size: 26px; font-weight: 700; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.markdown-body h2 { font-size: 21px; font-weight: 600; margin: 28px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.markdown-body h3 { font-size: 17px; font-weight: 600; margin: 22px 0 10px; }
.markdown-body h4 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; }
.markdown-body p { margin: 0 0 14px; font-size: 15px; }
.markdown-body a { color: var(--accent); text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }
.markdown-body ul, .markdown-body ol { margin: 0 0 14px; padding-left: 2em; }
.markdown-body li { margin: 3px 0; font-size: 15px; }
.markdown-body code { background: rgba(110,118,129,0.2); padding: 2px 5px; border-radius: 4px; font-size: 84%; font-family: 'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace; }
.markdown-body pre { background: #0d1117; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; overflow-x: auto; margin: 0 0 14px; }
.markdown-body pre code { background: none; padding: 0; font-size: 13px; line-height: 1.5; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 14px; }
.markdown-body th, .markdown-body td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; }
.markdown-body th { background: var(--bg-card); font-weight: 600; }
.markdown-body blockquote { border-left: 3px solid var(--accent); padding: 4px 14px; margin: 0 0 14px; color: var(--text-secondary); }
.markdown-body hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.markdown-body strong { font-weight: 600; }

/* Video */
.video-thumb {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
  background: #000;
}

.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-thumb .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: background 0.2s;
}

.video-thumb:hover .play-overlay { background: rgba(0,0,0,0.15); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 40px;
}

/* Hidden */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 640px) {
  .hero h1 { font-size: 24px; }
  .card { padding: 14px; }
  .card-row { flex-wrap: wrap; }
  .site-header .container { flex-direction: column; gap: 8px; }
}
