/* HAN v4 — Quiet interaction layer.
   Strictly desktop. No font, content, figure source or layout redesign.
   All interaction affordances are additive and accessible. */
@media screen and (min-width: 1024px) {
  /* Focus responds to the reader; never mute surrounding scholarship. */
  .pub-item,
  .current-project-outputs-list li,
  .rt-block {
    transition: background-color 170ms ease, box-shadow 170ms ease;
  }
  .pub-item:hover,
  .pub-item:focus-within {
    background-color: rgba(48, 79, 110, 0.035);
    box-shadow: inset 2px 0 0 rgba(38, 70, 101, 0.40);
  }
  .current-project-outputs-list li:has(a):hover,
  .current-project-outputs-list li:focus-within,
  .rt-block:focus-within {
    background-color: rgba(48, 79, 110, 0.04);
  }
  .pub-item a:focus-visible,
  .current-project-outputs-list a:focus-visible,
  .v4-figure-trigger:focus-visible,
  .v4-figure-viewer button:focus-visible,
  .v4-figure-viewer a:focus-visible {
    outline: 2px solid #385e7c;
    outline-offset: 3px;
  }
  .research-side-nav a[aria-current="location"],
  .publication-side-nav a[aria-current="location"] {
    color: #203b57;
    font-weight: 600;
  }

  /* Academic profile links: muted at rest, precise on intent. */
  .icons a {
    color: #667684;
    transition: color 180ms ease;
  }
  .icons a:hover,
  .icons a:focus-visible { color: #193b57; }
  .icons a:not(.copy-email) .profile-link-indicator { display: none; }
  .icons a .profile-external-link-icon {
    display: block;
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .62;
    transition: opacity 180ms ease, transform 180ms ease;
  }
  .icons a:hover .profile-external-link-icon,
  .icons a:focus-visible .profile-external-link-icon {
    opacity: 1;
    transform: translate(1px, -1px);
  }
  /* Figure inspection is a deliberate action, not a scroll animation. */
  .v4-figure-trigger {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    margin: 10px 0 0;
    padding: 4px 0 5px;
    border: none;
    border-bottom: 1px solid rgba(40, 70, 100, .24);
    background: none;
    color: #526b7e;
    font: 12px/1.4 Georgia, 'Times New Roman', serif;
    letter-spacing: .012em;
    cursor: pointer;
    text-align: left;
    transition: color 180ms ease, border-color 180ms ease;
  }
  .v4-figure-trigger svg {
    width: 12px; height: 12px;
    fill: none; stroke: currentColor; stroke-width: 1.15;
    stroke-linecap: round; stroke-linejoin: round;
    opacity: .68;
    transition: opacity 180ms ease, transform 180ms ease;
  }
  .v4-figure-trigger:hover, .v4-figure-trigger:focus-visible {
    color: #183b56;
    border-bottom-color: currentColor;
  }
  .v4-figure-trigger:hover svg, .v4-figure-trigger:focus-visible svg {
    opacity: 1;
  }
  .v4-figure-viewer {
    box-sizing: border-box;
    position: fixed;
    width: min(1120px, calc(100vw - 80px));
    height: min(840px, calc(100vh - 80px));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 1px solid rgba(39, 65, 88, .16);
    border-radius: 3px;
    background: #f9fafb;
    color: #152d45;
    box-shadow: 0 22px 72px rgba(16, 34, 53, .16);
    overflow: hidden;
  }
  .v4-figure-viewer::backdrop { background: rgba(17, 32, 48, .50); }
  .v4-viewer-shell { display: flex; flex-direction: column; height: 100%; }
  .v4-viewer-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    padding: 14px 22px;
    border-bottom: 1px solid rgba(37, 66, 94, .16);
    background: #f9fafb;
    font: 13px/1.4 Georgia, 'Times New Roman', serif;
  }
  .v4-viewer-title {
    min-width: 0; flex: 1 1 220px; font-size: 13px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .v4-viewer-controls { display: flex; align-items: center; gap: 6px; }
  .v4-viewer-close {
    display: inline-grid;
    place-items: center;
    width: 30px; height: 30px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    font: 23px/1 Georgia, 'Times New Roman', serif;
    color: #647789;
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease;
  }
  .v4-viewer-close:hover { color: #173550; border-color: rgba(39, 65, 88, .16); }
  .v4-viewer-stage {
    flex: 1 1 auto; min-height: 0;
    padding: 25px;
    overflow: auto;
    background: #eef1f4;
    text-align: center;
  }
  .v4-viewer-stage img {
    display: block; width: 100%; max-width: none; height: auto;
    margin: auto;
    background: white;
    cursor: zoom-out;
  }
  .v4-viewer-caption {
    flex: 0 0 auto;
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 20px 15px;
    border-top: 1px solid rgba(37, 66, 94, .16);
    font: 13px/1.5 Georgia, 'Times New Roman', serif;
  }
  .v4-viewer-caption .v4-caption-text { max-width: 940px; }
  .v4-viewer-caption .v4-source-links { display: flex; flex-wrap: wrap; gap: 17px; font-size: 12px; }
  .v4-viewer-caption .v4-source-links:empty { display: none; }
  .v4-viewer-caption .v4-citation-link {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    width: fit-content;
    padding-bottom: 2px;
    color: #48677b;
    letter-spacing: .015em;
    text-decoration: none;
    border-bottom: 1px solid rgba(72, 103, 123, .32);
    transition: color 180ms ease, border-color 180ms ease;
  }
  .v4-viewer-caption .v4-citation-link:is(:hover, :focus-visible) {
    color: #193b57;
    border-bottom-color: currentColor;
  }
}
@media screen and (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .pub-item,.current-project-outputs-list li,.rt-block,.v4-figure-trigger,.profile-external-link-icon { transition: none !important; }
}

/* v4.4 — deliberate inset figure affordance and restrained section rail. */
@media screen and (min-width: 1024px) {
  .current-project-figure--published .v4-figure-media {
    position: relative;
    width: 100%;
    isolation: isolate;
  }
  .current-project-figure--published .v4-figure-media > img {
    display: block;
    width: 100%;
    height: auto;
  }
  .current-project-figure--published .v4-figure-media > .v4-figure-trigger {
    position: absolute;
    z-index: 2;
    left: 57px;
    right: auto;
    bottom: 12px;
    margin: 0;
    padding: 9px 13px 9px 13px;
    border: 1px solid rgba(52, 76, 97, .14);
    border-radius: 2px;
    background: rgba(248, 250, 251, .985);
    color: #546a7d;
    box-shadow: 0 1px 5px rgba(11, 31, 58, .04);
    font-size: var(--type-caption);
    line-height: 1.25;
    letter-spacing: .005em;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  .current-project-figure--published .v4-figure-media > .v4-figure-trigger:hover,
  .current-project-figure--published .v4-figure-media > .v4-figure-trigger:focus-visible {
    color: #1d3b54;
    border-color: rgba(31, 60, 83, .38);
    background: rgba(252, 253, 254, .97);
  }
}
/* Navigation hierarchy: location comes from the small rail mark, not bold type. */
@media screen and (min-width: 1024px) {
  .research-side-nav a,
  .publication-side-nav a,
  .profile-side-nav a { font-weight: 400; }
  .research-side-nav a.active,
  .publication-side-nav a.active,
  .profile-side-nav a.active,
  .research-side-nav a[aria-current="location"],
  .publication-side-nav a[aria-current="location"],
  .profile-side-nav a[aria-current="location"] {
    font-weight: 400;
    color: rgba(28, 48, 71, .79);
    letter-spacing: .045em;
  }
  .research-side-nav a.active::before,
  .publication-side-nav a.active::before,
  .profile-side-nav a.active::before { width: 8px; background: rgba(28, 48, 71, .56); }
  .research-side-nav-years a.active,
  .publication-side-nav-subitems a.active {
    font-weight: 400;
    transform: none;
    color: rgba(28, 48, 71, .75);
  }
  .research-side-nav-parent.active,
  .publication-side-nav-parent.active { font-weight: 400; }
}

/* v4.5 — position the image action at its actual lower-left corner;
   indicate active reading section through opacity, not bold typography. */
@media screen and (min-width: 1024px) {
  .current-project-figure--published .v4-figure-media > .v4-figure-trigger {
    left: 7px;
    bottom: 7px;
  }
  .research-side-nav a,
  .publication-side-nav a,
  .profile-side-nav a,
  .connection-side-nav a {
    color: #293e55;
    font-weight: 400;
    opacity: .62;
    transition: opacity .18s ease, color .18s ease;
  }
  .research-side-nav a.active,
  .publication-side-nav a.active,
  .profile-side-nav a.active,
  .connection-side-nav a.active,
  .research-side-nav a[aria-current="location"],
  .publication-side-nav a[aria-current="location"],
  .profile-side-nav a[aria-current="location"],
  .connection-side-nav a[aria-current="location"],
  .research-side-nav-parent.active,
  .publication-side-nav-parent.active,
  .research-side-nav-years a.active,
  .publication-side-nav-subitems a.active {
    color: #293e55;
    font-weight: 400;
    opacity: 1;
  }
  .research-side-nav a:hover,
  .publication-side-nav a:hover,
  .profile-side-nav a:hover,
  .connection-side-nav a:hover,
  .research-side-nav a:focus-visible,
  .publication-side-nav a:focus-visible,
  .profile-side-nav a:focus-visible,
  .connection-side-nav a:focus-visible {
    opacity: .95;
  }
  .research-side-nav a.active::before,
  .publication-side-nav a.active::before,
  .profile-side-nav a.active::before,
  .connection-side-nav a.active::before {
    background: rgba(28, 48, 71, .78);
  }
}
