/* css/navbar.css - the floating navigation bar (navbar.php, scripts/navbar.js).
   A rounded, frosted card held off the top of the page. Three columns: logo, links,
   account. The outer columns share the spare width equally, so the links sit at the
   exact centre whatever the account area holds. Menus open inside the same card. */

.nc {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100;
  width: min(1180px, calc(100% - 28px));
  font-family: "Courier New", Courier, "Liberation Mono", ui-monospace, monospace;
  color: #e8e6e1;
}
.nc a { color: inherit; text-decoration: none; }
.nc-card {
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(232, 230, 225, .12);
  background: rgba(10, 12, 17, .55);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  transition: background .3s, border-color .3s;
}
.nc.is-scrolled .nc-card, .nc.is-open .nc-card { background: rgba(10, 12, 17, .88); border-color: rgba(232, 230, 225, .16); }

.nc-bar { height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 0 16px; }
.nc-logo { justify-self: start; display: block; }
.nc-logo video { height: 20px; display: block; }

.nc-links { justify-self: center; display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nc-links a, .nc-links button {
  display: block; padding: 8px calc(14px - .2em) 8px 14px; border-radius: 8px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: rgba(232, 230, 225, .78);
  transition: color .2s, background .2s;
}
.nc-links a:hover, .nc-links button:hover, .nc-links [aria-expanded="true"] { color: #fff; background: rgba(255, 255, 255, .06); }
.nc-links .is-current { color: #fcd34d; }

.nc-right { justify-self: end; min-width: 0; display: flex; align-items: center; gap: 6px; }
.nc-login { padding: 8px 12px; border-radius: 8px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: rgba(232, 230, 225, .78); transition: color .2s, background .2s; }
.nc-login:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nc-user {
  display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; padding: 5px 6px 5px 12px; border-radius: 9px;
  border: 0; background: none; cursor: pointer; font: inherit; font-size: 12px; letter-spacing: .08em; color: rgba(232, 230, 225, .85);
  transition: background .2s, color .2s;
}
.nc-user:hover, .nc-user[aria-expanded="true"] { background: rgba(255, 255, 255, .06); color: #fff; }
.nc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.nc-user img { width: 28px; height: 28px; max-width: none; border-radius: 50%; object-fit: cover; flex: none; }
.nc-burger { display: none; }
.nc button:focus-visible, .nc a:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }

/* Menu panel: grows the card downward. */
.nc-panel { height: 0; overflow: hidden; transition: height .34s cubic-bezier(.4, 0, .2, 1); }
.nc-panel-in {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 26px 22px 30px;
  border-top: 1px solid rgba(232, 230, 225, .1);
  opacity: 0; transform: translateY(-6px); transition: opacity .25s .06s, transform .3s .06s;
}
.nc-panel-in[hidden] { display: none; }
.nc.is-open .nc-panel-in { opacity: 1; transform: none; }
.nc-panel h4 { margin: 0 0 14px; color: rgba(232, 230, 225, .4); font-size: 11px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; }
.nc-panel .big a { display: grid; grid-template-columns: 34px 1fr; padding: 7px 0; color: #f2f1ee; }
.nc-panel .big a b { font-size: 21px; font-weight: 700; letter-spacing: -.01em; transition: color .2s; }
.nc-panel .big a i { font-style: normal; color: rgba(232, 230, 225, .3); font-size: 12px; padding-top: 6px; }
.nc-panel .big a span { grid-column: 2; margin-top: 2px; color: rgba(232, 230, 225, .5); font-size: 12.5px; }
.nc-panel .big a:hover b { color: #fcd34d; }
.nc-panel .small a { display: block; padding: 5px 0; font-size: 13.5px; color: rgba(232, 230, 225, .8); transition: color .2s; }
.nc-panel .small a:hover { color: #fcd34d; }
.nc-panel .small p { margin: 0 0 6px; color: rgba(232, 230, 225, .55); font-size: 13px; line-height: 1.6; }
.nc-panel .nc-who { color: #f2f1ee; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nc-veil {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.nc-veil.is-on { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .nc { top: 10px; width: calc(100% - 20px); }
  .nc-bar { height: 52px; grid-template-columns: auto minmax(0, 1fr); padding: 0 8px 0 16px; }
  .nc-logo video { height: 16px; }
  .nc-links, .nc-login, .nc-user { display: none; }
  .nc-burger {
    display: block; padding: 8px 10px; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(232, 230, 225, .85);
  }
  .nc-panel-in { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 18px 16px 22px; }
  .nc-panel .big a b { font-size: 19px; }
  .nc.is-open .nc-panel { max-height: calc(100vh - 80px); overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .nc-panel, .nc-panel-in, .nc-card, .nc-veil { transition: none; }
}
