/* ===== sdvn.vn — shared tokens & chrome (dark mặc định + toggle light) ===== */
:root {
  --bg: radial-gradient(1100px 620px at 85% -8%, rgba(109, 91, 232, .18), transparent 60%),
        radial-gradient(900px 560px at -10% 25%, rgba(109, 91, 232, .10), transparent 55%),
        linear-gradient(165deg, #141426 0%, #0E0E1C 55%, #111022 100%);
  --surface: #17172B;
  --ink: #F1F1F7;
  --muted: #A9AAC0;
  --faint: #7C7D95;
  --border: rgba(255, 255, 255, .10);
  --border2: rgba(255, 255, 255, .22);
  --chip: #242440;
  --accent: #8577F0;
  --accent-strong: #A093F5;
  --accent-soft: rgba(133, 119, 240, .14);
  --accent-line: rgba(133, 119, 240, .36);
  --on-accent: #FFFFFF;
}
:root[data-theme="light"] {
  --bg: radial-gradient(1000px 560px at 85% -5%, rgba(109, 91, 232, .10), transparent 60%),
        radial-gradient(900px 560px at -10% 30%, rgba(109, 91, 232, .07), transparent 55%),
        linear-gradient(165deg, #FBFBFE 0%, #F4F3FB 100%);
  --surface: #FFFFFF;
  --ink: #14142B;
  --muted: #55566B;
  --faint: #8A8B9C;
  --border: rgba(20, 20, 43, .10);
  --border2: rgba(20, 20, 43, .22);
  --chip: #F1F0FB;
  --accent: #6D5BE8;
  --accent-strong: #5A48D6;
  --accent-soft: rgba(109, 91, 232, .10);
  --accent-line: rgba(109, 91, 232, .30);
  --on-accent: #FFFFFF;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
.mono { font-family: 'IBM Plex Mono', monospace; }

@keyframes tlUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tlIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== Nav ===== */
.nav {
  animation: tlIn .5s ease 0s both;
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.nav-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.nav-brand:hover { color: var(--ink); }
.nav-brand img { width: 26px; height: 31px; }
.nav-brand span { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.nav-brand .tld { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: clamp(18px, 3vw, 32px); margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 3vw, 32px); font-size: 14.5px; font-weight: 500; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--ink); }

/* theme toggle (kiểu hungdiffusion) */
.theme-toggle {
  position: relative;
  width: 54px;
  height: 28px;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--border2);
  cursor: pointer;
  user-select: none;
  flex: none;
  padding: 0;
  transition: border-color .2s ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .knob {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: left .3s cubic-bezier(.22, 1, .36, 1);
}
:root[data-theme="light"] .theme-toggle .knob { left: 29px; }
.theme-toggle .knob svg { width: 11px; height: 11px; }
.theme-toggle .knob .sun-ic { display: none; }
.theme-toggle .knob .moon-ic { display: block; }
:root[data-theme="light"] .theme-toggle .knob .sun-ic { display: block; }
:root[data-theme="light"] .theme-toggle .knob .moon-ic { display: none; }

/* hamburger + menu mobile (kiểu hungdiffusion) */
.nav-menu-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex: none;
}
.nav-menu-btn span {
  display: block;
  width: 24px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav.open .nav-menu-btn span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav.open .nav-menu-btn span:nth-child(2) { opacity: 0; }
.nav.open .nav-menu-btn span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav { padding: 10px 20px; min-height: 60px; }
  .nav-right { gap: 14px; }
  .nav-menu-btn { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .28);
    padding: 8px 0;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 14px 24px; font-size: 15.5px; }
  .nav-links a.active { background: var(--accent-soft); color: var(--accent); }
}

/* ===== Footer ===== */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer .f-brand { display: flex; align-items: center; gap: 10px; }
.footer .f-brand img { width: 18px; height: 22px; opacity: .75; }
.footer .f-brand a, .footer .f-brand span { font-size: 13.5px; color: var(--faint); }
.footer .f-brand a:hover { color: var(--accent); }
.footer .f-links { display: flex; gap: 24px; font-size: 13.5px; }
.footer .f-links a { color: var(--muted); }
.footer .f-links a:hover { color: var(--accent); }

/* ===== Page header (contact/gopy/donate) ===== */
.page-header { padding: clamp(48px, 8vh, 76px) clamp(16px, 4vw, 48px) 44px; text-align: center; }
.page-header .eyebrow {
  animation: tlUp .7s cubic-bezier(.22, 1, .36, 1) .05s both;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; font-weight: 500; letter-spacing: .08em;
  color: var(--accent); margin-bottom: 16px;
}
.page-header h1 {
  animation: tlUp .7s cubic-bezier(.22, 1, .36, 1) .12s both;
  margin: 0 auto; max-width: 820px;
  font-size: clamp(30px, 6vw, 46px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em;
}
.page-header .lead {
  animation: tlUp .7s cubic-bezier(.22, 1, .36, 1) .2s both;
  margin: 16px auto 0; max-width: 680px;
  font-size: 16.5px; line-height: 1.65; color: var(--muted);
}

/* ===== Reusable pills / buttons ===== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: var(--on-accent);
  font-size: 13.5px; font-weight: 600; padding: 10px 16px; border-radius: 999px;
  white-space: nowrap; transition: background .15s ease;
}
.pill:hover { background: var(--accent-strong); color: var(--on-accent); }
.pill-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); color: var(--ink);
  font-size: 13.5px; font-weight: 600; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--border2); white-space: nowrap;
  transition: border-color .15s ease, color .15s ease;
}
.pill-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--accent); color: var(--on-accent);
  font-size: 15px; font-weight: 600; padding: 13px 24px; border-radius: 10px;
  cursor: pointer; user-select: none; border: none; transition: background .15s ease;
}
.btn-accent:hover { background: var(--accent-strong); color: var(--on-accent); }
