/* Roe Lab Custom Overrides */
/* Roe Lab customization */

/* ---------------------------------------------------------
   Header: navy waves on all pages (except home = seamless)
   --------------------------------------------------------- */

.site-header,
.site-header * {
  transition: none !important;
}

/* Default: waves header everywhere */
.site-header,
html[data-scroll-status="top"] .site-header,
html[data-scroll-status="up"] .site-header,
html[data-scroll-status="down"] .site-header {
  background: url(/assets/images/banners/navywaves.png) center/cover no-repeat !important;
  background-color: #052049 !important; /* fallback */
  border-bottom: none !important;
  box-shadow: none !important;
}

/* YAT puts some background on the inner wrapper; force it to match the header
   so the nav never flashes white at the top of the page. */
.site-header .wrapper,
html[data-scroll-status="top"] .site-header .wrapper,
html[data-scroll-status="up"] .site-header .wrapper,
html[data-scroll-status="down"] .site-header .wrapper {
  background: transparent !important;
}

/* HOME ONLY: make header transparent so banner + header are one seamless image */
.roe-home-header,
html[data-scroll-status="top"] .roe-home-header,
html[data-scroll-status="up"] .roe-home-header,
html[data-scroll-status="down"] .roe-home-header {
  /* Take header out of normal flow so the banner starts at the very top */
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 999 !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* ---------------------------------------------------------
   Header typography & branding
   --------------------------------------------------------- */

.site-brand-inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.55rem !important;   /* bigger brand */
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ucsf-logo {
  height: 26px;
  width: auto;
  display: inline-block;
}

/* Brand size override (ensure larger than nav) */
.site-brand a,
.site-title {
  font-size: 1.55rem !important;
}

/* Nav links: lowercase and slightly smaller */
.site-nav .page-link,
.site-nav a {
  text-transform: lowercase !important;
  font-size: 1.05rem !important;
  letter-spacing: 0.04em;
}

/* Ensure header text is readable on navy */
.site-header a,
.site-header .site-title,
.site-header .site-brand,
.site-header .site-brand a,
.site-header .site-nav a {
  color: #ffffff !important;
}

/* ---------------------------------------------------------
   Permanent light mode (disable dark appearance)
   --------------------------------------------------------- */

/* Hint browsers to render form controls in light mode */
:root { color-scheme: light; }
html[data-theme="dark"] { color-scheme: light; }

/* =========================================================
   Roe Lab homepage sections
   ========================================================= */
.roe-home-sections {
  padding: 2.5rem 0 1.5rem 0;
}

/* Home section typography (Schepartz-lab-ish: bigger headings + body) */
.roe-home-sections h2 {
  font-size: 1.85rem;
  margin: 0 0 0.85rem 0;
}

.roe-home-sections p,
.roe-home-sections li {
  font-size: 1.0rem;
  line-height: 1.7;
}

/* =========================================================
   Site-wide typography (match home body size)
   ========================================================= */
.post p,
.post li,
.post-content p,
.post-content li,
.page-content p,
.page-content li {
  font-size: 1rem;
  line-height: 1.7;
}


/* =========================================================
   Contact page layout (map left, info right)
   ========================================================= */
.roe-contact-grid {
  display: flex;
  gap: 2rem;
  align-items: stretch;
  margin-top: 1.75rem;
}

.roe-contact-map {
  flex: 1.35;
  display: flex;
}

.roe-contact-info {
  flex: 0.9;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.roe-contact-info h2 {
  margin-top: 0;
}

.roe-contact-info p {
  margin: 0.6rem 0;
}



/* Push the DIRECTIONS row to the bottom so the text column matches the map height */
.roe-contact-info p:last-child {
  margin-top: auto;
}

.roe-contact-info p,
.roe-contact-info a {
  font-size: 1rem;
  line-height: 1.7;
}

.roe-contact-info strong {
  font-weight: 700;
}

.roe-directions {
  margin-top: 0.9rem;
}

@media (max-width: 900px) {
  .roe-contact-grid {
    flex-direction: column;
  }
}
.roe-latest-news a {
  color: inherit;
  text-decoration: none;
}

.roe-latest-news a:hover {
  text-decoration: underline;
}

.roe-two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.25rem;
}

@media (max-width: 900px) {
  .roe-two-col {
    grid-template-columns: 1fr;
  }
}

.roe-news-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.roe-news-link {
  text-decoration: underline;
  font-size: 0.95em;
}

.roe-news-list {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 0 0;
}

.roe-news-item {
  margin: 0.6rem 0;
}

.roe-news-date {
  display: inline-block;
  min-width: 7.5rem;
  opacity: 0.75;
  font-size: 1em;
}

/* Footer: centered copyright */
.site-footer-inner {
  display: flex;
  justify-content: center;
}

.site-footer .copyright {
  width: 100%;
  text-align: center;
}

/* Hide sidebar everywhere */
.framework .sidebar { display: none !important; }
.framework .main { width: 100% !important; }

/* Prevent banner text from sitting under header */
.page-banner .wrapper { padding-top: 70px; }

/* ---------------------------------------------------------
   Roe Lab global typography: keep body text consistent site-wide
   --------------------------------------------------------- */
.post p,
.post li,
.page-content p,
.page-content li {
  font-size: 1rem;
  line-height: 1.7;
}


/* =========================================================
   Contact: Join us section (modeled after "open positions")
   ========================================================= */
.roe-join-section {
  margin-top: 3rem;
}

.roe-join-section h2 {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
}

.roe-join-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.roe-join-card {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 1.25rem 1.25rem;
  background: #fff;
}

.roe-join-card h3 {
  margin: 0 0 0.6rem 0;
  font-size: 1.15rem;
}

.roe-join-card p {
  margin: 0;
}

@media (max-width: 900px) {
  .roe-join-grid {
    grid-template-columns: 1fr;
  }
}


/* ---------------------------------------------------------
   Global layout: reduce side margins (~1/3 less padding)
   --------------------------------------------------------- */
.wrapper {
  padding-left: 20px !important;
  padding-right: 20px !important;
  max-width: 1040px; /* slightly wider to reduce side margins */
}

.roe-contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- News page (card grid) --- */
.roe-news-grid {
  display: grid;
  /* Keep cards from stretching full-width when there's only 1 post */
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  gap: 28px;
  justify-content: start;
  margin-top: 22px;
}

@media (max-width: 640px) {
  .roe-news-grid { grid-template-columns: 1fr; }
}

.roe-news-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  /* Flat box styling (match Publications section) */
  box-shadow: none !important;
  transition: none;
  color: inherit;
}

.roe-news-card:hover {
  transform: none;
  box-shadow: none;
}

.roe-news-image {
  width: 100%;
  flex: 0 0 auto;
  /* Keep the card compact */
  height: 200px;
  background: #f3f4f6;
}

.roe-news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roe-news-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
}

.roe-news-body {
  flex: 0 0 auto;
  background: #fff;
  padding: 18px 18px 16px;
  position: static;
  margin: 0;
}

.roe-news-date {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  margin-bottom: 10px;
}

.roe-news-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

/* Page subheaders (e.g., News intro line) */
.roe-page-subheader {
  margin: 6px 0 26px;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(0,0,0,0.70);
}

.roe-news-excerpt {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(0,0,0,0.74);
  margin-bottom: 14px;
}

.roe-news-read {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* =========================================================
   Split layout for individual news posts
   ========================================================= */

.roe-post-split {
  display: flex;
  gap: 34px;
  align-items: flex-start;
  margin-top: 10px;
}

.roe-post-split-media {
  flex: 0 0 44%;
  max-width: 520px;
}

.roe-post-split-media img {
  width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 10px;
  object-fit: contain;
}

/* Ensure portrait photos never appear stretched by upstream/theme rules */
.roe-post-split-media img.roe-post-photo {
  height: auto !important;
  max-height: none !important;
  width: 100% !important;
  object-fit: contain !important;
}

.roe-post-split-text {
  flex: 1;
}

@media (max-width: 900px) {
  .roe-post-split {
    flex-direction: column;
    gap: 18px;
  }
  .roe-post-split-media {
    flex-basis: auto;
    max-width: 100%;
  }
}

/* =========================================================
   Publications page typography (match site-wide body size)
   ========================================================= */
.papers-list,
.papers-list .paper-card {
  font-size: 1rem !important;
  line-height: 1.7 !important;
}

/* Publications cards use lots of <div>/<span> instead of <p>, so force all
   card text to inherit the same base size as the rest of the site (e.g. the
   Contact page cards). */
.papers-list .paper-card * {
  font-size: inherit !important;
  line-height: inherit !important;
}

.papers-list .paper-title {
  font-size: 1.25rem !important;
  line-height: 1.35 !important;
}


/* Tighten Publications typography */
.papers-list .paper-card {
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
}

.papers-list .paper-card * {
  font-size: inherit !important;
  line-height: inherit !important;
}

.papers-list .paper-title {
  font-size: 1.1rem !important;
}

/* Ensure the publication type pill sits on the same line as the end of the title
   (so it follows the last word of a wrapped title, instead of dropping to its own line). */
.papers-list .paper-title .paper-type {
  display: inline-block !important;
  margin-left: 0.5rem !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}


/* Match publication type pill to author font size */
.papers-list .paper-type {
  font-size: inherit !important;
  line-height: inherit !important;
}


/* =========================================================
   People page: square cards + Scholar button
   ========================================================= */

.roe-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  gap: 20px;
  margin-top: 22px;
  justify-content: start;
}

.roe-people-card {
  padding: 0.85rem;
  border: 1px solid rgba(150, 150, 150, 0.25);
  border-radius: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  /* Let the card grow to fit content (name/role/buttons/email) */
  height: auto;
overflow: visible;
}


.roe-people-card.pet-card {
}

.roe-people-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 0.75rem;
  flex: 0 0 auto;
}

.roe-people-meta {
  flex: 0 0 auto;
}

.roe-people-name {
  margin: 0;
}

.roe-people-role {
  opacity: 0.85;
  margin-top: 0.2rem;
}

.roe-people-links {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.roe-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(150, 150, 150, 0.25);
  background: rgba(0, 0, 0, 0.02);
  text-decoration: none;
}

.roe-link-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.roe-link-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.roe-link-text {
  font-size: 0.95em;
}

.roe-people-bio {
  margin-top: 0.75rem;
  overflow: auto;
  padding-right: 0.25rem; /* room for scrollbar */
}


/* Force publication type pill to match author size explicitly */
.papers-list .paper-type {
  font-size: 0.95rem !important;
  line-height: 1.45 !important;
  padding: 2px 8px !important;
}


/* FINAL OVERRIDE: shrink article / research briefing pills */
.papers-list .paper-card span.paper-type,
.papers-list .paper-card .paper-type,
.papers-list .paper-card .tag,
.papers-list .paper-card .badge {
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
  padding: 1px 6px !important;
}

/* shrink publication type pills */
.publication-card .pill,
.publication-card .pub-type,
.publication-card span.article,
.publication-card span.research-briefing {
  font-size: 0.8rem !important;
  padding: 2px 6px !important;
  line-height: 1.2 !important;
}


.roe-people-email {
  margin-top: 0.55rem;
  font-size: 0.92em;
  opacity: 0.85;
}


/* Ensure consistent inner spacing on people cards */
.roe-people-card { box-sizing: border-box; }


/* Equalize vertical padding inside people cards */
.roe-people-card {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}



/* ---------------------------------------------------------
   Mobile nav dropdown: fix invisible links (Safari/Chrome)
   --------------------------------------------------------- */
@media screen and (max-width: 800px) {
  /* The dropdown panel was white, which made our white link override invisible */
  .site-header .site-nav input:checked ~ .trigger {
    background: url(/assets/images/banners/navywaves.png) center/cover no-repeat !important;
    background-color: rgba(5, 32, 73, 0.98) !important;
  }

  /* Ensure links are visible and tappable */
  .site-header .site-nav .trigger .page-link,
  .site-header .site-nav .trigger a {
    color: #ffffff !important;
    font-weight: 500;
  }

  /* Improve spacing on mobile dropdown */
  .site-header .site-nav .trigger .page-link {
    padding: 10px 14px !important;
    margin: 0 16px !important;
  }

  /* Make hamburger icon visible on navy */
  .site-header .site-nav .menu-icon > svg {
    fill: rgba(255, 255, 255, 0.92) !important;
  }
}

