/* ─── Work dropdown: a parts index that unfolds from the nav ───────────────
   Two skins: the blueprint nav (nav.top, dark + on-light) and the
   System 1 menubar on values.html. Built by assets/nav-menu.js.        */

/* ══ Shared ══ */
.wm { display: inline-flex; align-items: center; }

.wm-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 560px;
  max-width: calc(100vw - 64px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 200;
  text-align: left;
  cursor: none;
}
.wm-panel::before {            /* invisible bridge so the pointer can travel */
  content: '';
  position: absolute;
  left: 0; right: 0; top: -18px;
  height: 18px;
}
.wm.open .wm-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.wm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(6, auto);
  grid-auto-flow: column;
}
.wm-item { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; }
.wm-n { font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.12em; }
.wm-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══ Skin A · blueprint nav (index / work / about / contact) ══ */
nav.top .links { position: relative; }
nav.top .links .wm-panel a {
  text-transform: none;
  letter-spacing: normal;
}
nav.top .links .wm-panel a::after { content: none; }

nav.top .links .wm-panel {
  margin-top: 12px;
  background: rgba(10,10,10,0.94);
  backdrop-filter: blur(10px);
  border: 0.5px solid var(--rule, #333);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
nav.top .links .wm-head {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 0.5px solid var(--rule, #333);
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted, #888884);
}
nav.top .links .wm-head .wm-x { color: var(--accent, #f5c518); }
nav.top .links .wm-grid { padding: 6px 0; }
nav.top .links .wm-item {
  padding: 7px 16px;
  color: #f0ede6;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.3;
  border-left: 1px solid transparent;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
nav.top .links .wm-item + .wm-item { box-shadow: none; }
nav.top .links .wm-item .wm-n { color: #6b6b66; transition: color .16s ease; }
nav.top .links .wm-item:hover,
nav.top .links .wm-item:focus-visible {
  background: rgba(245,197,24,0.07);
  border-left-color: var(--accent, #f5c518);
  outline: none;
}
nav.top .links .wm-item:hover .wm-n,
nav.top .links .wm-item:focus-visible .wm-n { color: var(--accent, #f5c518); }
nav.top .links .wm-item[aria-current="page"] { color: var(--accent, #f5c518); }
nav.top .links .wm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  border-top: 0.5px solid var(--rule, #333);
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted, #888884);
  transition: color .16s ease, background .16s ease;
}
nav.top .links .wm-foot:hover, nav.top .links .wm-foot:focus-visible {
  color: var(--accent, #f5c518);
  background: rgba(245,197,24,0.05);
  outline: none;
}
nav.top .links .wm-foot .wm-arr { transition: transform .2s ease; }
nav.top .links .wm-foot:hover .wm-arr { transform: translateX(4px); }

/* light sections on the index page */
nav.top.on-light .links .wm-panel {
  background: rgba(240,237,230,0.96);
  border-color: #d8d4c8;
  box-shadow: 0 24px 60px rgba(0,0,0,0.16);
}
nav.top.on-light .links .wm-head,
nav.top.on-light .links .wm-foot { border-color: #d8d4c8; color: #7a766c; }
nav.top.on-light .links .wm-item { color: #0a0a0a; }
nav.top.on-light .links .wm-item .wm-n { color: #a09b90; }

/* ══ Skin B · System 1 menubar (values.html) ══ */
@media (min-width: 760px) {
  .menubar { overflow: visible; }
}
.menubar .wm { position: relative; }
.menubar .wm-panel {
  left: 0;
  right: auto;
  top: 100%;
  width: 460px;
  background: var(--pure, #f4eecf);
  border: 2px solid var(--ink, #1a1815);
  border-top: none;
  box-shadow: 4px 4px 0 var(--shadow, #8d836a);
  transform: none;
  transition: opacity .09s steps(2, end), visibility .09s;
}
.menubar .wm.open .wm-panel { transform: none; }
.menubar .wm-panel::before { display: none; }
.menubar .wm-head {
  padding: 4px 12px;
  border-bottom: 1px solid var(--ink, #1a1815);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim, #6a6048);
  display: flex;
  justify-content: space-between;
}
.menubar .wm-item {
  padding: 3px 12px;
  color: var(--ink, #1a1815);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
.menubar .wm-item:hover,
.menubar .wm-item:focus-visible {
  background: var(--ink, #1a1815);
  color: var(--pure, #f4eecf);
  outline: none;
}
.menubar .wm-item .wm-n { color: var(--dim, #6a6048); }
.menubar .wm-item:hover .wm-n,
.menubar .wm-item:focus-visible .wm-n { color: var(--pure, #f4eecf); }
.menubar .wm-item[aria-current="page"] { text-decoration: underline; }
.menubar .wm-foot {
  display: flex;
  justify-content: space-between;
  padding: 4px 12px;
  border-top: 1px solid var(--ink, #1a1815);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink, #1a1815);
}
.menubar .wm-foot:hover, .menubar .wm-foot:focus-visible {
  background: var(--ink, #1a1815);
  color: var(--pure, #f4eecf);
  outline: none;
}

/* ══ Small screens: the nav links collapse, so the panel goes with them ══ */
@media (max-width: 980px) {
  nav.top .links .wm-panel { display: none; }
}
@media (max-width: 759px) {
  .menubar .wm-panel { display: none; }
}
