/* ==========================================================================
   LỘC ĐẶNG — Theme P2 v2.1
   Palette P2 (10 màu, 60/30/10): Đỏ #C22620 ≤10% · Vàng #D4A017 (rule only)
   Đen Than #1F1F1F body · light mode mặc định · dark map chính thức của brand
   Font: Oswald heading (VIỆT HOA) · Inter body
   ========================================================================== */

/* --- Fonts (self-host, subset latin + vietnamese) --- */
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/oswald-400-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-01EF, U+02C6, U+0300-0301, U+0303-0304; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/oswald-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/oswald-500-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-01EF; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/oswald-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/oswald-600-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-01EF; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/oswald-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/oswald-700-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-01EF; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/oswald-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-400-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-01EF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-600-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-01EF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/inter-700-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-01EF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/inter-700-latin.woff2") format("woff2"); }

/* --- Token P2: light (mặc định) --- */
:root, [data-theme="light"] {
  --red: #C22620;
  --red-dark: #9E1B16;
  --red-light: #E04A38;      /* chỉ dark mode */
  --black: #1F1F1F;
  --ink: #1A1A1A;
  --gray: #5F6368;
  --panel: #F1F3F4;
  --rule: #DADCE0;
  --gold: #D4A017;
  --bg: #FFFFFF;
  --text: #1F1F1F;
  --muted: #5F6368;
  --accent: #C22620;
  --kicker: #C22620;
  --link-underline: rgba(194, 38, 32, 0.25);
}

/* --- Dark map chính thức brand v2.1 --- */
[data-theme="dark"] {
  --bg: #1A1A1A;
  --text: #F1F3F4;
  --muted: #BCC1C6;
  --accent: #E04A38;
  --kicker: #D4A017;          /* vàng contrast nền tối tốt hơn đỏ */
  --panel: #242424;
  --rule: #3A3A3A;
  --link-underline: rgba(224, 74, 56, 0.35);
}

/* --- Base --- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--link-underline); text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--red-dark); }
[data-theme="dark"] a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* --- Kicker: uppercase, đỏ (vàng ở dark) --- */
.kicker {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kicker);
  margin: 0 0 12px;
}
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }

/* --- Wordmark: LỘC ĐẶNG — Oswald, đỏ, VIẾT HOA --- */
.wordmark {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
}
[data-theme="dark"] .wordmark { color: var(--red-light); }
.wordmark:hover { color: var(--red-dark); text-decoration: none; }
[data-theme="dark"] .wordmark:hover { color: var(--red-light); }
.wordmark-sm { font-size: 17px; }

/* --- Header --- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.header-inner {
  max-width: 1080px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.site-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; flex: 1; }
.site-nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 14px; }

/* Nút */
.btn {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-solid { background: var(--red); color: #fff; }
.btn-solid:hover { background: var(--red-dark); color: #fff; }
[data-theme="dark"] .btn-solid { background: var(--red-light); }
[data-theme="dark"] .btn-solid:hover { background: var(--red); }
.btn-ghost { border-color: var(--rule); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 50%;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: none; }
[data-theme="dark"] .ico-moon { display: block; }

/* --- Hero (trang chủ) --- */
.hero { padding: 72px 0 56px; }
.hero-title {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: clamp(36px, 6vw, 52px);
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text);
}
.hero-rule, .gold-rule {
  width: 56px;
  height: 3px;
  background: var(--gold);
  border: none;
  margin: 20px 0;
}
.hero-desc { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0; }

/* --- Danh sách bài --- */
.post-list { padding-bottom: 64px; }
.post-row {
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.post-row-meta {
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot { color: var(--rule); }
.badge-featured {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 2px;
  padding: 1px 7px;
}
[data-theme="dark"] .badge-featured { color: var(--red-light); border-color: var(--red-light); }
.post-row-title {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  margin: 10px 0 8px;
}
.post-row-title a { color: var(--text); text-decoration: none; }
.post-row-title a:hover { color: var(--accent); }
.post-row-excerpt { color: var(--muted); font-size: 16px; margin: 0 0 12px; }
.post-row-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel);
  border-radius: 2px;
  padding: 3px 10px;
  text-decoration: none;
}
.tag:hover { color: var(--text); }
.empty-note { color: var(--muted); padding: 40px 0; }

/* --- Phân trang --- */
.pagination { display: flex; gap: 12px; padding: 28px 0; }
.pagination a, .pagination span {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 6px 14px;
}
.pagination a:hover { color: var(--text); }

/* --- Bài viết --- */
.post-single { padding: 56px 24px 72px; max-width: 720px; margin: 0 auto; }
.post-header { margin-bottom: 36px; }
.post-title {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: clamp(28px, 4.5vw, 38px);
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  margin: 0;
  color: var(--text);
}
.post-meta {
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.post-excerpt { font-size: 18px; color: var(--muted); margin: 16px 0 0; }
.post-featured { margin: 0 0 36px; }
.post-featured img { width: 100%; border-radius: 4px; border: 1px solid var(--rule); }
.post-featured figcaption {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 10px;
}

/* --- Nội dung bài: heading Oswald VIẾT HOA + kẻ vàng mảnh --- */
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--text);
  margin: 44px 0 14px;
}
.post-content h1 { font-size: 28px; }
.post-content h2 { font-size: 24px; }
.post-content h3 { font-size: 19px; }
.post-content h4 { font-size: 16px; }
.post-content h2::after, .post-content h1::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  background: var(--gold);
  margin-top: 8px;
}
.post-content p { margin: 0 0 22px; }
.post-content blockquote {
  margin: 28px 0;
  padding: 16px 22px;
  background: var(--panel);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
  color: var(--muted);
  font-style: italic;
}
.post-content blockquote p { margin: 0; }
.post-content code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--panel);
  border-radius: 3px;
  padding: 2px 6px;
  color: var(--text);
}
.post-content pre {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.post-content pre code { background: none; padding: 0; }
.post-content img { border-radius: 4px; border: 1px solid var(--rule); }
.post-content hr { border: none; border-top: 1px solid var(--rule); margin: 40px 0; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 28px 0; }
.post-content th, .post-content td { border-bottom: 1px solid var(--rule); padding: 10px 12px; text-align: left; }
.post-content th { font-weight: 600; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.post-content ul, .post-content ol { padding-left: 26px; margin: 0 0 22px; }
.post-content li { margin-bottom: 8px; }
.post-content figcaption { text-align: center; font-size: 13.5px; color: var(--muted); }

/* --- Footer bài --- */
.post-footer { margin-top: 48px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.subscribe-card {
  background: var(--panel);
  border-radius: 4px;
  padding: 28px;
  text-align: center;
}
.subscribe-title {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 8px;
}
.subscribe-desc { color: var(--muted); font-size: 15px; margin: 0 0 18px; }

/* --- Footer site: wordmark + watermark locdang.com --- */
.site-footer { border-top: 1px solid var(--rule); padding: 26px 0; }
.footer-inner {
  max-width: 1080px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: baseline; gap: 14px; }
.footer-desc { font-size: 13.5px; color: var(--muted); }
.watermark {
  font-size: 13.5px;
  color: var(--muted);
}

/* --- Responsive --- */
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 14px; }
  .site-nav ul { flex-wrap: wrap; gap: 14px; }
  .hero { padding: 48px 0 40px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* --- In ấn: chỉ nội dung, bỏ chrome --- */
@media print {
  .site-header, .site-footer, .subscribe-card, .theme-toggle { display: none; }
  body { font-size: 12pt; }
}
