.primary-nav a:hover, .nav-button:hover, .text-link:hover, .site-footer a:hover, .text-button:hover { color: #b6eeea; }
.nav-button:hover, .nav-button:focus-visible { color: #f1d398; }
.featured .text-link:hover, .featured .text-link:focus-visible { color: #115a68; }
.nav-outline:hover { background: #e6f6ef; color: var(--ink) !important; }
.work-menu { position: absolute; top: calc(100% + 12px); right: 0; width: min(760px, 100%); padding: 2rem; display: grid; grid-template-columns: .85fr 1fr 1.1fr; gap: 2rem; background: #f0f5ed; color: var(--ink); border-radius: 5px; box-shadow: 0 20px 50px #001c2d30; }
/* Bridge the space from the nav button's bottom through the header and panel gap. */
.work-menu::before { content: ''; position: absolute; inset: auto 0 100%; height: var(--work-menu-bridge, 42px); }
.work-menu a:hover { color: #206978; }
.menu-intro p { font: 1.8rem/1.1 var(--serif); margin: .65rem 0 1.5rem; }
.menu-intro a { font-size: .8125rem; }
.menu-feature { text-decoration: none; }
.menu-feature img { height: 105px; width: 100%; object-fit: cover; border-radius: 3px; margin-bottom: .65rem; }
.menu-feature strong { display: block; font-weight: 600; }
.menu-feature span { display: block; font-size: .8125rem; margin-top: .1rem; }
.menu-links { display: flex; flex-direction: column; justify-content: center; }
.menu-links a { font-size: .875rem; text-decoration: none; padding-block: .75rem; border-bottom: 1px solid #173d4b25; }
.card-button:hover img { filter: brightness(1.08); }
.card-button img { transition: filter .2s ease; user-select: none; -webkit-user-drag: none; }
.card-button:active { filter: brightness(.95); }
.project-rows.is-dragging, .project-rows.is-dragging * { cursor: grabbing !important; user-select: none; }
.project-rows.is-dragging .project-row { scroll-snap-type: none; }
html.dialog-open { overflow: hidden; }
.project-dialog { width: min(660px, calc(100% - 2rem)); max-height: calc(100dvh - 3rem); padding: 0; border: none; border-radius: 10px; background: #f0f4ef; color: var(--ink); overflow: hidden; }
.project-dialog::backdrop { background: #001d2ee0; }
/* Only content scrolls; the close control stays anchored to the dialog. */
.dialog-content { max-height: calc(100dvh - 3rem - 2px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #9fe4e1 #073541; }
.dialog-content:focus-visible { outline-offset: -4px; }
.dialog-content::-webkit-scrollbar { width: 10px; }
.dialog-content::-webkit-scrollbar-track { background: #073541; border-radius: 10px; }
.dialog-content::-webkit-scrollbar-thumb { background: #9fe4e1; border: 2px solid #073541; border-radius: 10px; }
.dialog-content::-webkit-scrollbar-thumb:hover { background: #d4faf4; }
.dialog-content::-webkit-scrollbar-button { display: none; }
.dialog-figure { margin: 0; }
.dialog-media { position: relative; height: 265px; background: #093b48; overflow: hidden; }
.dialog-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dialog-media.is-artwork { height: auto; }
.dialog-media.is-artwork img { position: absolute; inset: 0; object-fit: contain; }
.dialog-image-status:not(.sr-only) { position: absolute; inset: 0; display: grid; place-items: center; color: #c5dcdf; font-size: .875rem; }
.dialog-figure figcaption { display: grid; align-content: start; min-block-size: calc(1lh + 2.9rem); padding: .45rem 2rem 1rem; background: transparent; color: #95b1b7; font-size: .6875rem; line-height: 1.4; }
.dialog-figure figcaption[hidden] { display: none; }
.credit-text, .credit-measure { grid-area: 1 / 1; min-width: 0; overflow-wrap: anywhere; }
.credit-measure { visibility: hidden; pointer-events: none; }
.credit-text { align-self: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog-figure figcaption:hover .credit-text, .dialog-figure figcaption:focus-within .credit-text { white-space: normal; }
/* The credit owns the existing gap, so revealing it never pushes the copy. */
.dialog-figure:has(figcaption:not([hidden])) + .dialog-copy { padding-top: 0; }
.dialog-figure figcaption:focus-visible { outline-offset: -3px; }
.dialog-figure figcaption a { text-decoration-color: #a5bfc566; text-underline-offset: .15em; }
.dialog-figure figcaption a:hover { color: #fff; }
.dialog-close { position: absolute; z-index: 1; top: 1rem; right: 1rem; display: flex; align-items: center; justify-content: center; padding: 0; width: 44px; height: 44px; line-height: 1; border-radius: 50%; background: #f0f4ef; color: var(--ink); }
.dialog-close svg { width: 1rem; height: 1rem; flex: none; }
.dialog-close:hover { background: #c3e8e5; }
.dialog-copy { padding: 2rem; }
.dialog-copy h2 { font-size: 2.4rem; line-height: 1.1; margin-block: .7rem 1.2rem; white-space: nowrap; }
.dialog-copy p { line-height: 1.6; }
#dialog-category { text-transform: none; letter-spacing: .04em; }
.dialog-metadata { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1rem 1.5rem; margin: 0 0 1.5rem; padding-top: 1rem; border-top: 1px solid #c5dcdf40; color: #d1e7e7; font-size: .875rem; line-height: 1.5; }
.dialog-metadata > div { min-width: 0; padding: 0; }
.dialog-metadata > div:last-child:not(:first-child) { text-align: right; }
.dialog-metadata dd { margin: 0; display: flex; align-items: flex-start; gap: .5rem; }
.metadata-icon { width: 1.15em; height: 1.15em; flex: none; margin-top: calc((1lh - 1.15em) / 2); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.dialog-metadata dd span { display: block; }
.dialog-metadata dd span + span { color: #bdd2d7; }
.dialog-copy .dialog-note { margin-top: 1.5rem; color: #d1e7e7; font-size: .9375rem; }
.dialog-links { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .8rem; font-size: .9375rem; }
.dialog-links li > span { display: block; margin-top: .25rem; color: #bdd2d7; font-size: .8125rem; }
@media (max-width: 520px) { .dialog-metadata { grid-template-columns: 1fr; gap: .65rem; } .dialog-metadata > div:last-child:not(:first-child) { text-align: left; } }
@media (max-width: 900px) {
  .menu-toggle { display: flex; align-items: center; gap: .7rem; padding: .7rem 0 .7rem .7rem; background: none; font-size: .9375rem; }
  .primary-nav { display: none; position: absolute; top: calc(100% + 12px); left: 0; right: 0; background: #062f3e; padding: 1rem 1.4rem; border: 1px solid #94c7cd66; border-radius: 5px; align-items: stretch; gap: .2rem; }
  .primary-nav.is-open { display: flex; flex-direction: column; }
  .primary-nav > a, .nav-button { width: 100%; padding-block: .8rem; }
  .primary-nav .nav-outline { margin-block: .7rem .3rem; text-align: center; }
  .work-menu { position: static; width: 100%; padding: 1rem; grid-template-columns: 1fr; gap: .5rem; margin-block: .4rem; }
  .work-menu::before, .menu-feature, .menu-intro p, .menu-intro .eyebrow { display: none; }
  .menu-links a { padding-block: .7rem; }
  .dialog-media:not(.is-artwork) { height: 210px; }
  .dialog-figure figcaption { padding-inline: 1.5rem; min-block-size: calc(1lh + 2.4rem); }
  .dialog-copy { padding: 1.5rem; }
  .dialog-copy h2 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
