body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
}
.rail {
  --navy: #0a1b2e;
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem 1.2rem;
  min-height: 4.15rem;
  padding: 0.45rem max(1.35rem, env(safe-area-inset-right)) 0.45rem max(1.35rem, env(safe-area-inset-left));
  background: var(--navy);
  color: var(--ink);
}
.word {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.45rem; text-decoration: none; line-height: 1.1;
}
.word em { display: block; font-style: italic; }
.word-logo {
  display: block;
  justify-self: start;
  line-height: 0;
  min-width: 0;
}
.word-logo img {
  display: block;
  height: 36px;
  width: auto;
  max-width: min(42vw, 18rem);
}
.rail nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 1.7rem;
}
.rail nav > a,
.nav-drop-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.rail nav > a:hover,
.nav-drop-btn:hover { color: var(--gold-hi); }
.rail nav a[aria-current="page"],
.nav-drop-btn[aria-current="page"] { color: var(--gold); }
.nav-drop { position: relative; }
.nav-drop-list {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 12.5rem;
  padding: 0.35rem 0 0.45rem;
  background: var(--navy);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 21;
  transition: opacity 0.14s ease, visibility 0.14s ease;
}
.nav-drop-list::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 0.55rem;
}
.nav-drop-list a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 1.05rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.92rem;
}
.nav-drop-list a:hover { color: var(--gold-hi); }
.nav-drop.is-open .nav-drop-list {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
@media (hover: hover) and (pointer: fine) {
  .nav-drop:hover .nav-drop-list,
  .nav-drop:focus-within .nav-drop-list {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}
.rail-end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.rail-cta { display: none; }
.rail-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  background: transparent;
  transition: box-shadow 160ms ease, border-color 160ms ease, color 160ms ease;
}
.in-mark {
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  transform: translateY(-0.5px);
}
.rail-linkedin:hover,
.rail-linkedin:focus-visible {
  color: var(--gold-hi);
  border-color: var(--gold-hi);
  box-shadow:
    0 0 0 1px rgb(244 226 180 / 0.16),
    0 0 10px 3px rgb(201 164 95 / 0.42),
    0 0 22px 8px rgb(201 164 95 / 0.2);
}
.rail-linkedin:active {
  box-shadow: 0 0 8px 2px rgb(201 164 95 / 0.28);
}
.menu-toggle,
.menu-veil,
.site-menu { display: none; }
@media (prefers-reduced-motion: reduce) {
  .rail-linkedin,
  .nav-drop-list { transition: none; }
}
.bed {
  width: min(1080px, calc(100% - 2 * var(--pad)));
  margin: 1.15rem auto 2rem;
}
@media (max-width: 860px) {
  body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100dvh;
    align-items: stretch;
  }
  .skip,
  .menu-veil,
  .site-menu,
  .rail { grid-row: 1; }
  .bed { grid-row: 2; }
  body.menu-open { overflow: hidden; }
  .rail {
    grid-template-columns: 1fr auto;
    min-height: 3.6rem;
    padding: calc(0.35rem + env(safe-area-inset-top)) max(var(--pad), env(safe-area-inset-right)) 0.35rem max(var(--pad), env(safe-area-inset-left));
  }
  .word { font-size: 1.28rem; }
  .word em { display: inline; margin-left: 0.12em; }
  .word-logo img {
    height: 30px;
    max-width: min(52vw, 13.5rem);
  }
  .rail nav { display: none; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--gold-hi);
    cursor: pointer;
    -webkit-tap-highlight-color: rgb(201 164 95 / 0.18);
  }
  .menu-toggle:hover { color: var(--gold); }
  .burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 13px;
  }
  .burger span {
    display: block;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
  }
  .menu-veil {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgb(5 15 22 / 0.84);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
  }
  body.menu-open .menu-veil {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .site-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: max(0.65rem, env(safe-area-inset-top));
    right: max(0.65rem, env(safe-area-inset-right));
    left: max(0.65rem, env(safe-area-inset-left));
    bottom: auto;
    z-index: 50;
    max-height: calc(100dvh - 1.3rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 0.35rem 1.15rem 1.15rem;
    background: rgb(8 18 24 / 0.55);
    isolation: isolate;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    overflow: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }
  body.menu-open .site-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .menu-top {
    display: flex;
    justify-content: flex-end;
    margin: 0.1rem -0.35rem 0.15rem auto;
  }
  .menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--gold-hi);
    cursor: pointer;
    -webkit-tap-highlight-color: rgb(201 164 95 / 0.18);
  }
  .menu-close:hover {
    color: var(--gold);
  }
  .menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
  }
  .menu-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 0.4rem;
    color: var(--ink);
    text-decoration: none;
    border-left: 0;
  }
  .menu-nav > a {
    font-family: "EB Garamond", Georgia, serif;
    font-size: 1.85rem;
    line-height: 1.1;
  }
  .menu-nav .nav-drop { display: contents; }
  .menu-nav .nav-drop-btn {
    display: block;
    width: 100%;
    margin: 0.7rem 0 0.15rem;
    padding: 0 0.4rem;
    min-height: 0;
    pointer-events: none;
    text-align: left;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-hi);
    background: none;
    border: 0;
  }
  .menu-nav .nav-drop-list {
    position: static;
    transform: none;
    min-width: 0;
    padding: 0;
    background: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .menu-nav .nav-drop-list::before { display: none; }
  .menu-nav .nested,
  .menu-nav .nav-drop-list a {
    font-family: Figtree, system-ui, sans-serif;
    font-size: 1.08rem;
    padding-left: 0.95rem;
    color: var(--ink);
    white-space: normal;
  }
  .menu-nav a:hover { color: var(--gold-hi); }
  .menu-nav a[aria-current="page"] { border-left: 0; }
  .menu-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 0;
  }
  .site-menu .rail-linkedin { display: none; }
  .site-menu .rail-cta {
    display: inline-flex;
    width: 100%;
    margin: 0;
    font-size: 0.8rem;
  }
  .bed {
    display: flex;
    flex-direction: column;
    width: min(1080px, calc(100% - 2 * var(--pad)));
    margin: 0.8rem auto 0;
    border-radius: 0;
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
  }
  body:has(#stage > .pills) {
    height: 100dvh;
    overflow: hidden;
  }
  body:has(#stage > .pills) .bed {
    height: 100%;
    min-height: 0;
    margin-top: 0;
    overflow: hidden;
  }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .menu-veil,
  .site-menu { transition: none; }
  .site-menu { transform: none; }
}
