/* TRiNOV WEBLOG top bar = trinov.dev primary navigation (2026-10-14).
   Sean: sub-sites are sub-pages of the main site — GAMES and WEBLOG are top-bar items
   next to the other menus, and mobile shows a three-line menu button (석삼자).
   Same item grid, active state, breakpoints and drop-down as games.trinov.dev and trinov.dev. */
:root { --mobile-nav: rgba(22, 27, 27, 0.985); }
html[data-theme="light"] { --mobile-nav: rgba(235, 238, 235, 0.985); }

.site-header nav { height: 100%; display: flex; align-items: stretch; }
.site-header nav > a {
  min-width: 92px; display: grid; place-items: center; color: var(--muted);
  font-size: 10px; font-weight: 500; letter-spacing: .09em; white-space: nowrap;
  border-inline: 1px solid transparent; transition: color .25s, background .25s, border-color .25s;
}
.site-header nav > a:hover, .site-header nav > a.active { color: var(--ink); background: var(--nav-hover); border-color: var(--nav-hover); }
.mobile-language-switcher { display: none; }
.menu-button { display: none; padding: 0; color: var(--ink); background: none; border: 0; cursor: pointer; }
body.menu-open { overflow: hidden; }

@media (max-width: 1100px) {
  .site-header nav > a { min-width: 0; padding-inline: 12px; }
}

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  .site-header nav, .header-controls .language-switcher { display: none; }
  .header-controls { gap: 0; }
  .menu-button { display: flex; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: flex-end; gap: 6px; padding: 10px 11px; }
  .menu-button span { display: block; width: 22px; height: 1px; background: currentColor; }
  .site-header.open nav {
    position: absolute; top: 73px; right: 0; left: 0; display: flex; flex-direction: column; height: auto;
    max-height: calc(100dvh - 86px - var(--footer-bar-height)); overflow-y: auto;
    background: var(--mobile-nav); border: 1px solid var(--line);
  }
  .site-header.open nav > a { height: 55px; flex-shrink: 0; border-inline: 0; border-bottom: 1px solid var(--line); }
  .site-header.open .mobile-language-switcher { display: block; flex-shrink: 0; padding: 18px; }
  .mobile-language-switcher > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
  .mobile-language-switcher > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .mobile-language-switcher a { position: relative; display: flex; min-width: 0; height: 46px; align-items: center; justify-content: center; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0; }
  .mobile-language-switcher a:last-child { border-right: 0; }
  .mobile-language-switcher a[aria-current="page"] { color: var(--ink); font-weight: 700; }
  .mobile-language-switcher a[aria-current="page"]::after { content: ""; position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; background: var(--accent); }
}

/* the TRiNOV wordmark stays visible on phones, as on trinov.dev */
@media (max-width: 600px) {
  .site-header .brand-wordmark { display: inline; }
}
