:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-card: #17223b;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #a855f7;
  --accent-hover: #c084fc;
  --accent-bg: rgba(168, 85, 247, 0.1);
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #1e293b;
  --border-highlight: #334155;
  --code-bg: #070a12;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, Monaco, "Courier New", monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  border-bottom: 1px solid var(--border);
  background-color: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
}

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

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 6px;
}

.site-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary) !important;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px !important;
  transition: all 0.2s ease;
}

.lang-switch:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  text-decoration: none !important;
}

/* Hero / Banner */
.hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  background: linear-gradient(to right, #f8fafc, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 650px;
}

.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Post Cards */
.posts-section {
  padding: 40px 0;
}

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 24px;
}

.post-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

.tag {
  background-color: var(--accent-bg);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.tag-lang {
  background-color: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.post-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

.post-card h2 a {
  color: var(--text-primary);
}

.post-card h2 a:hover {
  color: var(--accent);
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 18px;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.read-more {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}

.read-lang-alt {
  font-size: 13px;
  color: var(--text-muted);
}

.read-lang-alt:hover {
  color: var(--text-primary);
}

/* Article Page */
article {
  padding: 48px 0 80px;
}

.article-header {
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.article-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 16px;
}

.incident-box {
  background-color: rgba(239, 68, 68, 0.08);
  border-left: 4px solid var(--danger);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #fca5a5;
}

.incident-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.incident-box li {
  margin-bottom: 6px;
}

.article-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: #f1f5f9;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.article-content h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 28px 0 12px;
  color: #e2e8f0;
}

.article-content p {
  margin-bottom: 20px;
  color: #cbd5e1;
}

.article-content blockquote {
  border-left: 4px solid var(--accent);
  background-color: var(--bg-secondary);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-content pre {
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin: 20px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: #e2e8f0;
}

.article-content code {
  font-family: var(--font-mono);
  background-color: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #f472b6;
}

.article-content pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

/* Table styling */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.article-content th,
.article-content td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.article-content th {
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.article-content td {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.article-content tr:last-child td {
  border-bottom: none;
}

.article-content ul {
  padding-left: 24px;
  margin-bottom: 20px;
  color: #cbd5e1;
}

.article-content li {
  margin-bottom: 8px;
}

.callout-warning {
  background-color: rgba(245, 158, 11, 0.08);
  border-left: 4px solid var(--warning);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  color: #fde68a;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}
