/* ============================================================
   SỔ TAY KẾ TOÁN — v5
   Hero dạng banner ảnh tràn viền + overlay chữ. Các mục còn lại
   đóng khung dạng thẻ (card) đồng nhất. Bảng màu vàng-kim (Thổ
   sinh Kim) + trung tính trắng/xám/be, tránh tông đỏ-cam-tím.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #FFFFFF;
  --surface: #FAFAFA;
  --ink: #1C1E22;
  --ink-soft: #454A52;
  --line: #E7E7E7;

  --accent: #A6802B;
  --accent-dark: #7E5F1E;
  --accent-tint: #F5EEDA;

  --teal: #10847A;
  --amber: #8C6A2F;
  --coral: #4B5A73;

  --tan: #C9A876;
  --tan-tint: #F6EEDF;
  --tan-line: #E9DCC0;

  --font-display: 'Archivo', 'Inter', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --max-w: 900px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---------- Sticky header ---------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}
.brand-mark:hover { text-decoration: none; }
.brand-mark .logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: block;
}
.brand-mark .brand-text { line-height: 1.25; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--accent-dark);
}
.brand-mark:hover .brand-name { color: var(--accent); }
.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

nav.top-nav { display: flex; align-items: center; gap: 24px; }
nav.top-nav a {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
nav.top-nav a:hover { color: var(--accent); text-decoration: none; border-bottom-color: var(--accent); }
nav.top-nav a.cta { color: var(--accent); }

/* ---------- Language toggle ---------- */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 4px;
}
.lang-toggle button {
  border: none;
  background: #fff;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.lang-toggle button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Hero: full-bleed photo banner ---------- */
.hero {
  position: relative;
  margin: 20px 0 48px;
  border-radius: 24px;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  align-items: center;
  background: #1c1e22 url('images/hero-banner.jpg') center right / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12,13,16,0.86) 0%, rgba(12,13,16,0.64) 40%, rgba(12,13,16,0.2) 70%, rgba(12,13,16,0.05) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 54ch;
  padding: 48px 40px;
  color: #fff;
}
.hero-inner h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.4;
  font-weight: 800;
  margin: 0 0 26px;
}
.credentials-row { display: flex; flex-wrap: nowrap; gap: 10px; }
.credentials-row + .credentials-row { margin-top: 10px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(4px);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .hero { background-position: 78% center; min-height: 0; }
  .hero-inner { padding: 32px 24px; max-width: none; }
  .credentials-row { flex-wrap: wrap; }
}

/* ---------- Section card wrapper ---------- */
.section-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin: 0 0 32px;
}
@media (max-width: 560px) { .section-card { padding: 24px; } }

/* ---------- Section heading ---------- */
.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

/* ---------- About ---------- */
.about > p.intro { max-width: 68ch; color: var(--ink-soft); margin: 0 0 24px; font-size: 1.02rem; }
.about .greeting {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
}
.about .about-block { margin-bottom: 24px; }
.about .about-block:last-child { margin-bottom: 0; }
.about h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}
.about .about-block p { max-width: 70ch; color: var(--ink-soft); margin: 0 0 12px; text-align: justify; text-justify: inter-word; hyphens: none; }
.about .about-block ul { max-width: 70ch; padding-left: 20px; margin: 0 0 12px; color: var(--ink-soft); }
.about .about-block ul li { margin-bottom: 8px; line-height: 1.6; }
.about .about-block ul li strong { color: var(--ink); }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.stat-card {
  background: var(--tan-tint);
  border: 1px solid var(--tan-line);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.stat-card .icon-circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  background: #EDE0C4;
  color: var(--accent-dark);
}
.stat-card .icon-circle svg { width: 22px; height: 22px; }
.stat-card strong { display: block; font-family: var(--font-display); font-size: 1rem; margin-bottom: 4px; }
.stat-card span { font-size: 0.85rem; color: var(--ink-soft); }
@media (max-width: 560px) { .stat-strip { grid-template-columns: 1fr; } }

/* ---------- Certificates: Tier 1 (3 per row) ---------- */
.cert-gallery > p.hint { color: var(--ink-soft); margin: 0 0 22px; font-size: 0.94rem; }
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .cert-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cert-grid { grid-template-columns: 1fr; } }

.cert-card {
  background: #fff;
  border: 1px solid var(--tan-line);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}
.cert-card .cert-image {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tan-tint);
  border-bottom: 1px dashed var(--tan-line);
  color: var(--accent-dark);
}
.cert-card .cert-image img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.cert-card .cert-label { padding: 12px 12px 16px; }
.cert-card .cert-label strong { display: block; font-family: var(--font-display); font-size: 0.94rem; font-weight: 700; color: var(--ink); }
.cert-card .cert-label span { display: block; font-size: 0.78rem; color: var(--ink-soft); margin-top: 3px; }

/* ---------- Skills: Tier 2 (4 per row, bigger mini-cards) ---------- */
.skills-tier2 { margin-top: 36px; }
.skills-tier2 .tier2-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 720px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-card {
  background: #fff;
  border: 1px solid var(--tan-line);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}
.skill-card .skill-image { aspect-ratio: 4 / 3; background: var(--tan-tint); border-bottom: 1px dashed var(--tan-line); }
.skill-card .skill-image img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.skill-card .skill-label { padding: 10px 10px 14px; }
.skill-card .skill-label strong { display: block; font-family: var(--font-display); font-size: 0.82rem; font-weight: 700; color: var(--ink); }
.skill-card .skill-label span { display: block; font-size: 0.72rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- Contact: "Cùng kết nối" ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-card {
  border-radius: 12px;
  padding: 26px;
  background: var(--tan-tint);
  border: 1px solid var(--tan-line);
}
.contact-card.connect { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; border-color: var(--accent-dark); }
.contact-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin: 0 0 10px; display:flex; align-items:center; gap:8px; }
.contact-card.connect h3 { color: #fff; }
.contact-card h3 svg { width: 18px; height: 18px; }
.contact-card p { margin: 0 0 14px; font-size: 0.92rem; color: var(--ink-soft); }
.contact-card.connect p { color: #F5EEDA; }
.contact-card .email-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  margin-bottom: 4px;
}
.contact-card .email-value {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 500;
  margin-bottom: 14px;
  word-break: break-all;
}
.copy-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--accent-dark);
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
.copy-email-btn:hover { background: var(--accent-tint); }
.copy-email-btn svg { width: 15px; height: 15px; }
.copy-email-btn.copied { background: #fff; color: var(--teal); }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20,20,20,0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.28); }

/* ---------- Blog listing (bai-viet.html) ---------- */
.post-list { display: grid; gap: 14px; }
.post-card {
  background: #fff;
  border: 1px solid var(--tan-line);
  border-radius: 12px;
  padding: 22px 24px;
}
.post-card .post-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 6px; }
.post-card .post-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.post-card .post-title a { color: var(--ink); }
.post-card .post-title a:hover { color: var(--accent); text-decoration: none; }
.post-card .post-excerpt { font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- Article page (bai-viet-mau.html) ---------- */
article.post { padding: 8px 0 64px; }
article.post .post-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 10px; }
article.post h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; margin: 0 0 24px; font-weight: 800; }
article.post h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin: 40px 0 14px; color: var(--ink); border-left: 4px solid var(--accent); padding-left: 14px; }
article.post p { margin: 0 0 18px; }
article.post table { width: 100%; border-collapse: collapse; margin: 20px 0 28px; font-size: 0.92rem; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
article.post th, article.post td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
article.post th { font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #fff; background: var(--ink); }
article.post td.num { font-family: var(--font-mono); text-align: right; }
.callout { background: var(--accent-tint); border-left: 4px solid var(--accent); padding: 14px 20px; border-radius: 10px; margin: 24px 0; color: var(--ink); font-size: 0.95rem; }
.back-link { display: inline-block; margin-bottom: 24px; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Disclaimer (chưa dùng, giữ sẵn cho lần thêm sau) ---------- */
.disclaimer {
  margin: 0 0 32px;
  padding: 18px 22px;
  background: var(--tan-tint);
  border: 1px solid var(--tan-line);
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.disclaimer strong { color: var(--ink); }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0;
  margin-top: 12px;
}
footer.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; }
.footer-brand strong { font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; color: var(--ink); display: block; }
.footer-brand span { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-dark); font-weight: 700; }
.footer-contact { text-align: right; line-height: 1.5; }
.footer-contact .footer-email { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.footer-contact .footer-email:hover { color: var(--accent); }
.footer-contact .footer-quote { font-size: 0.78rem; color: var(--ink-soft); font-style: italic; margin-top: 2px; }
footer.site-footer img.visitor-badge { display: block; height: 20px; }
@media (max-width: 560px) { .footer-contact { text-align: left; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
