:root {
  --bg: #0f1115;
  --bg-alt: #171a20;
  --card: #1b1f27;
  --text: #e8e6e1;
  --text-dim: #9aa1ab;
  --accent: #ff7a1a;
  --accent-2: #ffb703;
  --border: #2a2f38;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

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

img { max-width: 100%; display: block; }

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

/* Header */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  color: var(--text);
}
.brand .dot { color: var(--accent); }
.tagline {
  color: var(--text-dim);
  font-size: 0.85rem;
}
.site-nav a {
  color: var(--text-dim);
  margin-left: 18px;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--accent-2); }

.lang-switch {
  margin-left: 18px;
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.lang-switch button.active { background: var(--accent); color: #1a0f00; }

/* Section strip (thanh chuyên mục lớn) */
.section-strip {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  padding-left: max(20px, calc((100vw - 1080px) / 2));
}
.section-strip a {
  display: inline-block;
  padding: 12px 18px;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}
.section-strip a:hover { color: var(--text); text-decoration: none; }
.section-strip a.active { color: var(--accent-2); border-bottom-color: var(--accent); }

/* Section cards (trang chủ) */
.section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin: 32px 0 8px;
}
.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.section-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.section-card h3 { margin: 0 0 8px; color: var(--text); font-size: 1.05rem; }
.section-card p { margin: 0; color: var(--text-dim); font-size: 0.85rem; }

.grid-heading {
  margin: 8px 0 4px;
  font-size: 1.2rem;
}

.breadcrumb {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--accent-2); }

/* Hero */
.hero {
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 15% 20%, rgba(255,122,26,0.12), transparent 45%);
}
.hero h1 {
  font-size: 2.1rem;
  margin: 0 0 10px;
}
.hero p {
  color: var(--text-dim);
  max-width: 640px;
  margin: 0;
}

/* Filters */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
}
.filter-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}
.filter-btn:hover { color: var(--text); border-color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  color: #1a0f00;
  border-color: var(--accent);
  font-weight: 600;
}

.search-box {
  margin: 18px 0 24px;
}
.search-box input {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.95rem;
}

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  padding: 24px 0 60px;
}
.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.post-card .thumb {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: #10131a;
}
.post-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.post-card .cat {
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.post-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.post-card h3 a { color: var(--text); }
.post-card p { color: var(--text-dim); font-size: 0.9rem; margin: 0; flex: 1; }
.post-card .meta { color: var(--text-dim); font-size: 0.78rem; margin-top: 12px; }

.empty-state {
  color: var(--text-dim);
  padding: 40px 0;
  text-align: center;
}

/* Article page */
.article-header { padding: 40px 0 20px; border-bottom: 1px solid var(--border); }
.article-header .cat {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.article-header h1 { font-size: 2rem; margin: 10px 0 8px; }
.article-header .meta { color: var(--text-dim); font-size: 0.85rem; }

.article-cover {
  width: 100%;
  border-radius: var(--radius);
  margin: 26px 0;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.article-body { padding-bottom: 60px; }
.block-text { margin: 18px 0; font-size: 1.05rem; }
.block-text h2 { margin-top: 32px; }
.block-text h3 { margin-top: 26px; }
.block-image { margin: 26px 0; }
.block-image img { border-radius: var(--radius); border: 1px solid var(--border); }
.block-image figcaption {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

.back-link { display: inline-block; margin: 24px 0 0; color: var(--text-dim); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 28px 0;
  text-align: center;
}
.site-footer a { color: var(--text-dim); }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .article-header h1 { font-size: 1.5rem; }
}
