/* Public site shell (_LayoutSite): colors, type, navigation and footer. Page sections live in their own files. */

:root {
    --ink: #14171F;
    --blue: #1E3A73;
    --blue-deep: #12244A;
    --blue-bright: #2455D6;
    --paper: #FAFAF8;
    --line: #DADCE3;
    --rust: #D9631E;
    --rust-deep: #B84E14;
    --mint: #3FA66B;
    --muted: #5A5F70;
    --nav-height: 70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'IBM Plex Sans', sans-serif; color: var(--ink); background: var(--paper); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .disp { font-family: 'Archivo', sans-serif; }
.mono { font-family: 'IBM Plex Mono', monospace; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* Navigation */
.site-nav { position: sticky; top: 0; z-index: 50; background: rgba(250, 250, 248, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--nav-height); }
.site-nav .wrap > * { flex-shrink: 0; }
.logo { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.logo .tag { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; background: var(--blue); color: #fff; padding: 2px 6px; border-radius: 3px; letter-spacing: 0.03em; }
.navmenu { display: flex; align-items: center; gap: 30px; }
.navlinks { display: flex; gap: 30px; font-size: 14px; font-weight: 500; }
.navlinks a, .nav-account a, .nav-account button { text-decoration: none; color: var(--muted); white-space: nowrap; }
.navlinks a:hover, .nav-account a:hover, .nav-account button:hover { color: var(--ink); }
.nav-account { display: flex; align-items: center; gap: 16px; font-size: 13px; padding-left: 20px; border-left: 1px solid var(--line); }
.nav-account form { display: contents; }
.nav-account button { background: none; border: 0; cursor: pointer; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.navcta { background: var(--rust); color: #fff; padding: 9px 18px; border-radius: 6px; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.navcta:hover { background: var(--rust-deep); }
.navcta-menu { display: none; }

.lang-switch { display: flex; border: 1.5px solid var(--line); border-radius: 6px; overflow: hidden; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 600; }
.lang-switch a { padding: 5px 9px; text-decoration: none; color: var(--muted); }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active { background: var(--ink); color: #fff; }

.nav-toggle { display: none; width: 38px; height: 38px; border: 1.5px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nav-toggle span { display: block; width: 16px; height: 2px; background: var(--ink); border-radius: 1px; transition: transform .2s, opacity .2s; }
.site-nav.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Footer */
.site-footer { padding: 40px 28px 50px; text-align: center; color: var(--muted); font-size: 12.5px; font-family: 'IBM Plex Mono', monospace; }
html[lang="vi"] .site-footer { font-size: 12px; }

/* site.js adds .compact whenever the links do not fit on one line (phones, and narrow screens once the
   language switch and the account links are there): they move into the ☰ menu. */
.site-nav.compact .nav-toggle { display: inline-flex; }
.site-nav.compact .nav-actions .navcta { display: none; }
.site-nav.compact .navmenu { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 28px 20px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(20, 23, 31, 0.08); }
.site-nav.compact.open .navmenu { display: flex; }
.site-nav.compact .navlinks { flex-direction: column; gap: 0; font-size: 15px; }
.site-nav.compact .navlinks a { padding: 13px 0; border-bottom: 1px solid var(--line); }
.site-nav.compact .nav-account { padding: 13px 0; border-left: 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.site-nav.compact .navcta-menu { display: block; margin-top: 16px; text-align: center; padding: 12px 18px; }

/* Phones: the logo tag would push the language switch off the screen. */
@media (max-width: 480px) {
    .logo .tag { display: none; }
}
