/* nghiathanhvo.com: đọc là chính, chữ to, không màu mè. Màu cam gạch khớp với PDF. */
/* Màu nằm hết ở đây. Chọn bộ màu bằng THEME trong build_site.py (gắn vô <html data-theme="...">). */
:root {
  --bg: #fbfaf7; --ink: #1d1d1b; --soft: #5b5b57; --line: #e4e1da;
  --accent: #b4532a; --accent-ink: #ffffff; --link: var(--accent); --title: var(--ink);
  --code: #f2efe8; --box: #f4efe6; --head-bg: var(--bg); --head-ink: var(--ink); --head-soft: var(--soft); --logo-2: var(--accent);
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, Consolas, "Courier New", monospace;
  --body-font: var(--serif);
}

/* A. Giống scottdelong.com: nền đen, chữ trắng, link xanh da trời, tựa bài cam. Luôn tối. */
html[data-theme="scott"] {
  --bg: #000000; --ink: #ffffff; --soft: #c4c4c4; --line: #2e2d2a;
  --accent: #f25822; --accent-ink: #111111; --link: #22bcf2; --title: #f25822;
  --code: #1a1918; --box: #201f1d; --head-bg: #000000; --head-ink: #ffffff; --head-soft: #ffffff; --logo-2: #d63bd9;
  --body-font: var(--sans);
  color-scheme: dark;
}
html[data-theme="scott"] .site-head nav a { text-transform: uppercase; font-weight: 700; font-size: 14px; letter-spacing: .03em; }
html[data-theme="scott"] .site-head nav a.nav-cta { color: var(--link); }
html[data-theme="scott"] .site-head nav a[aria-current] { color: var(--link); }
html[data-theme="scott"] .post-list li { background: var(--box); padding: 18px 20px; border-radius: 4px; }

/* B. Xanh lá #699676. Chữ và nút dùng tông đậm hơn (#4a7056) cho dễ đọc. */
html[data-theme="green"] {
  --bg: #f7f9f6; --ink: #1c2420; --soft: #56605a; --line: #dde5df;
  --accent: #699676; --accent-ink: #ffffff; --link: #4a7056; --title: #1c2420;
  --code: #eef2ee; --box: #edf3ee; --head-bg: #699676; --head-ink: #ffffff; --head-soft: #ffffff; --logo-2: #e4f5b8;
}
html[data-theme="green"] .optin-form button, html[data-theme="green"] .big-button { background: #4a7056; }
@media (prefers-color-scheme: dark) {
  html[data-theme="green"] {
    --bg: #131915; --ink: #e7ece8; --soft: #a3aea6; --line: #2b352f;
    --accent: #86b393; --accent-ink: #0f1511; --link: #93c4a0; --title: #e7ece8;
    --code: #1c241f; --box: #1a221d; --head-bg: #3f5f48; --head-ink: #ffffff; --head-soft: #e7ece8; --logo-2: #e4f5b8;
  }
  html[data-theme="green"] .optin-form button, html[data-theme="green"] .big-button { background: #86b393; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body-font); font-size: 19px; line-height: 1.65;
}
.wrap { max-width: 700px; margin: 0 auto; padding: 0 16px; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* đầu trang */
.site-head { background: var(--head-bg); border-bottom: 1px solid var(--line); margin-bottom: 44px; }
.site-head .wrap { max-width: 1000px; }
.head-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 28px; padding-top: 22px; padding-bottom: 22px; }
.brand-row { display: flex; align-items: center; gap: 14px; }
.brand { color: var(--head-ink); text-decoration: none; line-height: 1; }
.site-head nav { display: flex; flex-wrap: wrap; gap: 6px 26px; font-family: var(--sans); font-size: 18px; align-items: center; }
.site-head nav a { color: var(--head-soft); text-decoration: none; opacity: .92; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--head-ink); opacity: 1; text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 2px; }
.site-head nav a.nav-cta { color: var(--head-bg); background: var(--head-ink); font-weight: 700; opacity: 1; padding: 8px 16px; border-radius: 999px; }
.site-head nav a.nav-cta:hover { text-decoration: none; filter: brightness(.95); }

/* logo 1: góc ngoặc kiểu Scott, NGHIA trắng + VO màu mạ */
.logo-brackets { position: relative; display: inline-block; padding: 7px 12px 6px; font-family: var(--sans); font-weight: 800; font-size: 30px; letter-spacing: .02em; }
.logo-brackets::before, .logo-brackets::after { content: ""; position: absolute; width: 12px; height: 12px; border-color: var(--logo-2); border-style: solid; }
.logo-brackets::before { left: 0; top: 0; border-width: 3px 0 0 3px; }
.logo-brackets::after { right: 0; bottom: 0; border-width: 0 3px 3px 0; }
.logo-brackets b { color: var(--logo-2); font-weight: 800; margin-left: 6px; }
/* logo 2: kiểu dòng lệnh, con trỏ nhấp nháy (người không biết code mà logo như code) */
.logo-cursor { font-family: var(--mono); font-weight: 700; font-size: 29px; letter-spacing: -.02em; }
.logo-cursor b { color: var(--logo-2); }
.logo-cursor i { font-style: normal; color: var(--logo-2); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .logo-cursor i { animation: none; } }
.day-pill { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--head-ink); border: 1.5px solid var(--logo-2); border-radius: 999px; padding: 4px 10px; text-decoration: none; white-space: nowrap; }
.day-pill:hover { background: rgba(255,255,255,.12); }

/* chữ */
h1, h2, h3 { color: var(--title); font-family: var(--sans); line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: 36px; margin: 0 0 14px; }
h2 { font-size: 25px; margin: 44px 0 12px; }
h3 { font-size: 20px; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 18px; }
li { margin-bottom: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
strong { font-weight: 700; }
code { font-family: var(--mono); font-size: .82em; background: var(--code); padding: 2px 5px; border-radius: 4px; }
pre { background: var(--code); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; font-size: 15px; line-height: 1.5; }
pre code { background: none; padding: 0; font-size: 1em; white-space: pre-wrap; word-break: break-word; }
blockquote { margin: 0 0 18px; padding-left: 16px; border-left: 3px solid var(--accent); color: var(--soft); }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 16px; margin-bottom: 18px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }

figure { margin: 22px 0 28px; }
figure img { display: block; border: 1px solid var(--line); border-radius: 8px; }
figcaption { font-family: var(--sans); font-size: 15px; color: var(--soft); margin-top: 8px; line-height: 1.45; }

.kicker { font-family: var(--sans); font-size: 14px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: 8px; }
.kicker a { text-decoration: none; }
.dek { font-size: 22px; color: var(--soft); line-height: 1.45; margin-bottom: 14px; }
.meta { font-family: var(--sans); font-size: 15px; color: var(--soft); }
.disclosure { font-family: var(--sans); font-size: 15px; background: var(--box); border-radius: 8px; padding: 12px 14px; }
.post h2 { padding-top: 8px; }
.empty { color: var(--soft); font-style: italic; }

/* trang chủ */
.hero h1 { font-size: 40px; }
.hero p:first-of-type { font-size: 21px; }
.status { font-family: var(--sans); font-size: 16px; display: inline-block; background: var(--box); border-radius: 14px; padding: 6px 14px; }
.block h2 { font-size: 21px; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); border-bottom: 1px solid var(--line); padding-bottom: 8px; }

.post-list { list-style: none; padding: 0; }
.post-list li { margin-bottom: 22px; }
.post-list a { color: var(--title); font-family: var(--sans); font-weight: 700; font-size: 21px; text-decoration: none; }
.post-list a:hover { text-decoration: underline; }
.post-list .meta { display: block; margin-top: 2px; }
.post-list p { margin: 6px 0 0; color: var(--soft); font-size: 17px; }

/* ô lấy email */
.optin { background: var(--box); border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px 16px; margin: 40px 0; }
.optin h2 { margin-top: 0; font-size: 23px; }
.optin-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.optin-form input {
  flex: 1 1 220px; min-width: 0; font: inherit; font-family: var(--sans); font-size: 17px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink);
}
.optin-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.optin-form button {
  flex: 0 0 auto; font-family: var(--sans); font-size: 17px; font-weight: 600; cursor: pointer;
  padding: 12px 20px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
}
.optin-form button:hover { filter: brightness(1.08); }
.fine { font-family: var(--sans); font-size: 13.5px; color: var(--soft); }

.big-button { display: inline-block; font-family: var(--sans); font-weight: 600; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 12px 20px; border-radius: 8px; }

/* chân trang */
.site-foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 24px 0 40px; font-family: var(--sans); font-size: 15px; color: var(--soft); }
.site-foot p { margin: 0 0 6px; }
.site-foot a { color: var(--soft); }
.kicker a { color: var(--accent); }

@media (max-width: 560px) {
  body { font-size: 18px; }
  h1, .hero h1 { font-size: 30px; }
  .dek { font-size: 19px; }
  .site-head { margin-bottom: 28px; }
  .head-row { padding-top: 16px; padding-bottom: 14px; }
  .logo-brackets { font-size: 24px; }
  .logo-cursor { font-size: 23px; }
  .site-head nav { font-size: 16px; gap: 6px 18px; }
  .site-head nav a.nav-cta { padding: 6px 12px; }
  .optin { padding: 18px 16px 12px; }
  .optin-form button { width: 100%; }
}

.author { float: right; width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 4px 0 12px 20px; border: 1px solid var(--line); }
@media (max-width: 560px) { .author { width: 88px; height: 88px; margin-left: 14px; } }
