/* Fixed "archived copy" banner injected into every page by scripts/postprocess.py.
   Notice-only: no outbound link. Kept self-contained so it layers cleanly on top
   of the original site's stylesheets. */

#archive-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483647; /* above any original site chrome */
  box-sizing: border-box;
  padding: 8px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  color: #1a1a1a;
  background: #ffd24d;
  border-bottom: 1px solid #c99a00;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Working replacement for the original builder navigation, injected just under
   the banner. Styled to match the look of the site's original black menu bar
   (Karla, 18px, letter-spacing, grey-on-black, right-aligned). */
#archive-nav {
  position: fixed;
  top: var(--archive-banner-height);
  left: 0;
  right: 0;
  z-index: 2147483646;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: flex-end;
  align-items: center;
  padding: 6px 24px;
  background: #000;
  font-family: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.54px;
}

#archive-nav a {
  color: #a0a0a0;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 20px;
  transition: color 0.2s ease-out;
}

#archive-nav a:hover,
#archive-nav a:focus {
  color: #fff;
  text-decoration: none;
}

/* TRANSECT logo at the left of the nav; margin-right:auto pushes the links right. */
#archive-nav .archive-logo {
  margin-right: auto;
  padding: 0 8px 0 0;
  display: inline-flex;
  align-items: center;
}
#archive-nav .archive-logo img {
  height: 30px;
  width: auto;
  display: block;
}

/* The builder reveals many elements with a scroll-triggered entrance animation
   (data-anim-*), leaving them opacity:0 until its JS fires. That JS is unreliable
   in the static archive (e.g. it hid the rebuilt Team column), so force animated
   elements to their final, visible state. */
#dm [data-anim-desktop],
#dm [data-anim-mobile],
#dm [data-anim] {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* ---- Rebuilt project-team section (mirrors the External Advisors layout) ---- */
#archive-team {
  max-width: 1000px;
  margin: 8px auto 0;
  text-align: left;
  display: grid;
  gap: 18px;
}
#archive-team .team-member {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 18px 20px;
}
#archive-team .team-photo {
  flex: none;
  width: 150px;
  height: auto;
  border-radius: 2px;
  object-fit: cover;
}
#archive-team .team-member.no-photo {
  padding-top: 12px;
  padding-bottom: 12px;
}
#archive-team .team-info {
  flex: 1;
  min-width: 0;
}
/* Two ids (#dm #archive-team) so these beat the builder's own #dm h3 rules,
   which otherwise render the names large and faded grey. */
#dm #archive-team .team-name,
#archive-team .team-name {
  margin: 0 !important;
  font-size: 1.3rem !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  opacity: 1 !important;
  text-shadow: none !important;
  letter-spacing: normal !important;
}
#dm #archive-team .team-role,
#archive-team .team-role {
  margin: 2px 0 10px !important;
  font-style: italic !important;
  color: #cfcfcf !important;
  font-size: 1rem !important;
}
#archive-team .team-desc {
  margin: 0 0 10px;
  color: #ececec;
  line-height: 1.55;
}
#archive-team .team-interests-label {
  margin: 0 0 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9fbfa7;
}
#archive-team .team-interests {
  margin: 0;
  padding-left: 18px;
  color: #cfcfcf;
  font-size: 0.95rem;
  columns: 2;
}
@media (max-width: 640px) {
  #archive-team .team-member {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  #archive-team .team-photo {
    width: 180px;
  }
  #archive-team .team-interests {
    columns: 1;
    text-align: left;
  }
}

/* The site's full-page background photo (a Central-Asian landscape) was never
   captured by the Wayback Machine, so pages fell back to flat black and the
   translucent text panels had nothing to read against. Substitute a captured
   landscape so sections that relied on the page background (Institutional
   Affiliations, Partners, External Advisors, Partner Projects, ...) look like the
   original. NB: editorial -- this is a stand-in, not the exact original photo. */
html {
  background: #1a1a1a
    url("/assets/le-cdn.website-editor.net/s/95ee33f6d4e04c8bae6d20897b80f304/dms3rep/multi/opt/DSC_0453-1-1920w.jpg")
    center top / cover fixed no-repeat !important;
}
/* Let the builder's full-width page wrappers show the root photo instead of
   painting over it (u_allWrapper carried the missing bg-white overlay). Real
   per-section colours (e.g. the black team/contact bands) are left intact. */
#dm,
#dm .dmInner,
#dm .u_allWrapper,
#dm #site_content,
#dm #dm_content {
  background-color: transparent !important;
}
#dm .u_allWrapper {
  background-image: none !important;
}
/* Advisor/partner names were computing to a near-black grey; lift them so they
   read against the photo, as in the original. */
#dm .dmBody div[id="PartnersA"] font,
#dm .dmBody div[id="PartnersA"] span {
  color: #ececec !important;
}

/* Re-create the semi-opaque panel behind section text. In the live site the builder
   drew a translucent block between each text block and the background photo via a
   JS-generated element the static capture lacks, so text otherwise sits bare on the
   photo. Apply it to the text paragraphs across content sections. */
#dm .dmNewParagraph {
  background-color: rgba(0, 0, 0, 0.4) !important;
  padding: 14px 18px !important;
  border-radius: 2px;
}

/* The archive nav replaces the site's original header menu, so hide the now-empty
   original header chrome (it only held the removed menu and an empty logo) and its
   sticky spacer, letting page content sit directly under the archive nav.
   #dm-prefixed + !important to match the builder's own rule specificity; this
   file is loaded last so it wins. */
#dm .dmHeaderContainer,
#dm .stickyHeaderSpacer,
.dmHeaderContainer,
.stickyHeaderSpacer {
  display: none !important;
}

/* Push the page down so the fixed banner + nav never cover original content.
   Heights can be overridden per-site if wrapping changes them. */
:root {
  --archive-banner-height: 40px;
  --archive-nav-height: 47px;
}

body {
  margin-top: calc(var(--archive-banner-height) + var(--archive-nav-height)) !important;
}

@media (max-width: 600px) {
  #archive-banner {
    font-size: 12px;
    padding: 6px 10px;
  }
  #archive-nav {
    font-size: 15px;
    justify-content: center;
    padding: 6px 10px;
  }
  #archive-nav a {
    padding: 6px 12px;
  }
  :root {
    --archive-banner-height: 56px;
    --archive-nav-height: 72px;
  }
}

/* Publications list. The builder's own rule (#dm .dmNewParagraph a) paints links
   in a mid-blue with no underline, which against this section's dark parallax
   photo reads as body text rather than as something to click. Restore a plain
   link affordance, and let long DOI URLs wrap instead of running past the
   960px column. Two IDs so it outranks the builder rule regardless of order. */
#dm #Publications a,
#dm #Publications a:visited {
  color: #9fd0ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
  cursor: pointer;
}

#dm #Publications a:hover,
#dm #Publications a:focus {
  color: #ffffff;
  text-decoration: underline;
}

#dm #Publications a:focus-visible {
  outline: 2px solid #ffd24d;
  outline-offset: 2px;
}
