.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* put this in static/assets/css/custom.css and load it AFTER main.css */
#header a.logo,
#header a.logo:hover,
#header a.logo:focus {
  border: 0 !important;
  border-bottom: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
  background-image: none !important; /* just in case */
}

/* make image fill the link cleanly so no baseline shows */
#header .logo img {
  display: block;
  height: 9rem;        /* adjust to your logo */
}

/* Uniform 16:9 thumbnails on lists and single posts */
.image.fit, .image.main { 
  display:block; 
  aspect-ratio: 16 / 9;   /* pick 4/3 or 1/1 if you prefer */
  overflow:hidden;
}
.image.fit img, .image.main img {
  width:100%;
  height:100% !important;   /* override Massively’s height:auto */
  object-fit:cover;          /* crop to fill consistently */
}

/* make each post full-width despite theme's 50% rule */
#main > .posts.wide-grid > * { flex-basis:100% !important; width:100% !important; max-width:100% !important; }




/* layout */
.pub-body { display:flex; align-items:center; gap:1rem;}
.pub-block.left  .pub-body { flex-direction: row; }
.pub-block.right .pub-body { flex-direction: row-reverse;  }

/* image */
.pub-image { flex: 0 0 28%; max-width:360px; min-width:220px; }
.pub-image img { width:100%; height:auto; display:block; }

/* text */
.pub-content { flex:1; min-width:0;line-height: 1.8;}

/* reset old float-based styles */
.pub-block { text-align:left; padding: 2rem 4rem !important; }
.pub-image { float:none; margin:0; }

/* prevent overlap with float and keep content readable */
.pub-content { overflow:hidden; }

/* headings not centered by parent .posts */
#main > .posts.wide-grid .major { text-align:left; }

/* responsive stack - IMAGE ALWAYS ON TOP */
@media (max-width: 900px) {
  .pub-body { flex-direction: column !important; align-items:center; }
  .pub-image { width:100%; max-width:none; min-width:0; }
}

@media (max-width: 980px) {
  .pub-image { float:none; width:50%; max-width:none; margin:0 0 1rem 0; }
  .pub-content { overflow:visible; }
}


/* Two cards per row (1 on small screens) */
.members-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 2rem;                 /* space between cards */
}
@media (max-width: 736px){
  .members-grid{ grid-template-columns: 1fr; }
}
/* Remove Massively's article widths/margins inside grid */
.members-grid > article{ width:auto; margin:0; }

/* grid is already 2 per row */
.members-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2rem}
@media (max-width:736px){.members-grid{grid-template-columns:1fr}}
.members-grid>article{width:auto;margin:0}

/* side-by-side inside each card */
.person-card{display:flex;gap:1.5rem;align-items:flex-start}
.pc-media{flex:0 0 225px;max-width:225px}
@media (max-width:980px){.pc-media{flex-basis:160px;max-width:160px}}
@media (max-width:736px){.person-card{flex-direction:column}.pc-media{flex-basis:auto;max-width:100%}}

/* square, cover-cropped image */
.pc-image{display:block;aspect-ratio:1/1;overflow:hidden;border-radius:4px}
.pc-image img{display:block;width:100%;height:100%;object-fit:cover}

.members-hero{display:block; overflow:hidden; aspect-ratio: 21/9;}
.members-hero img{width:100%; height:100%; object-fit:cover;}
.caption{opacity:.7; margin-top:-0.75rem; margin-bottom:2rem;}

/* --- tighten members spacing --- */
.posts.members-grid { gap: 0.75rem; }
.posts.members-grid > article { margin-bottom: 0.75rem; }

/* --- person card compact layout --- */
.person-card { padding: 0.75rem; }
.person-card .pc-media { margin-bottom: 0.5rem; }

.person-card .pc-body header.minor { margin: 0 0 0.2rem; }
.person-card .pc-body h4 { margin: 0 0 0.2rem; line-height: 1.2; }
.person-card .pc-section { margin: 0 0 0.2rem; color:dimgrey }
.person-card .pc-role { margin: 0 0 0rem; }

.person-card .pc-info p { margin: 0 0 0rem; }
.person-card .pc-info p:last-child { margin-bottom: 0; }

.person-card ul.icons { 
  margin: 0.3rem 0 0; 
  padding: 0; 
  list-style: none; 
  display: flex; 
  gap: 0.5rem;
}
.person-card ul.icons li { margin: 0; }

/* optional: shrink hr spacing in members sections */
#members header.major hr { margin: 0.5rem 0; }

/* small space after contact icons */
.person-card .pc-info a.icon,
.person-card .pc-info .icon .fa {
  margin-right: 0.5rem;
}


/* underline the whole card */
.person-card{
  border-bottom: 1px solid rgba(0,0,0,.15);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

/* tighter contact-card block */
.contact-card{
  margin: 0.5rem 0;
  padding: 1rem 4rem !important; 
}

/* optional: shrink contact-card inner spacing */
.contact-card p{
  margin: 0.25rem 0;
}



:root { --funder-h: 72px; }                 /* default */
@media (min-width: 1200px){ :root{ --funder-h: 160px; } }  /* larger on wide */
@media (max-width: 480px){ :root{ --funder-h: 52px; } }   /* smaller on mobile */


.funders{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  align-items: center;
  padding: 0;
}
.funders li{
  list-style:none;
  margin:0; padding:.25rem .5rem;
  display:flex; align-items:center; justify-content:center;
  min-height: calc(var(--funder-h) + .5rem);
}
.funders a{ display:block; line-height:0; }
.funders img{
  height: var(--funder-h);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.pub-selected{ margin-top: .5rem; }

/* left-align Selected Publications */
.pub-selected,
.pub-selected * {
  text-align: left !important;
}
/* tighter spacing in Selected Publications */
.pub-selected h3 { margin: .25rem 0 .35rem; }
.pub-selected .pub-list { margin: .2rem 0 .5rem; padding-left: 1.1rem; }
.pub-selected .pub-list li { line-height: 1.5; margin: .15rem 0; }
.pub-selected .pub-list li * { line-height: inherit; }
/* optional: tighter list spacing */
.pub-list { margin:.25rem 0 .75rem; padding-left:1.1rem; }
.pub-list li { margin:.25rem 0; }




:root { --footer-logo-h: 84px; }                    /* default */
@media (min-width: 1200px){ :root{ --footer-logo-h: 96px; } }  /* larger on wide */
@media (max-width: 480px){ :root{ --footer-logo-h: 40px; } }    /* smaller on mobile */

#footer .footer-logos {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 0 0 1rem;
}

#footer .footer-logos img {
  height: var(--footer-logo-h);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

#footer .footer-logos a {
  line-height: 0;
}

/* text badges for entities without logos */
#footer .footer-logos .text-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--footer-logo-h);  /* matches logo height */
  padding: .5rem .8rem;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: .4rem;
  font-size: .9rem;
  line-height: 1.2;
  text-align: center;
  background: rgba(0,0,0,.03);
  color: inherit;
  text-decoration: none;
}

#footer .footer-logos .text-badge:hover {
  background: rgba(0,0,0,.06);
}


/* Center the action buttons */
ul.actions {
    justify-content: center;
    text-align: center;
}

/* Left align the publications list */
ol.publications {
    text-align: left;
}

ol.publications li {
    text-align: left;
}

ol.publications a {
    text-align: left;
    display: block;
}

/* Teaching page - make articles look like clickable boxes/buttons */
section.posts.teaching-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2  em;
}

section.posts.teaching-boxes > a {
    flex: 1 1 calc(50% - 0.75em);
    min-width: 250px;
    display: flex;
    text-decoration: none;
}

section.posts.teaching-boxes article {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1em !important;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

section.posts.teaching-boxes article:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

section.posts.teaching-boxes article header.major {
    margin: 0;
    padding: 0;
}

section.posts.teaching-boxes article header.major h2 {
    margin: 0 0 0.5em 0;
    font-size: 1.5em;
    line-height: 1.2;
}

/* Target p tags both inside and outside header */
section.posts.teaching-boxes article header.major p,
section.posts.teaching-boxes article > p {
    margin: 0;
    opacity: 0.8;
    line-height: 1.4;
}

/* Single column on mobile */
@media screen and (max-width: 760px) {
    section.posts.teaching-boxes > a {
        flex: 1 1 100%;
        min-width: 100%;
    }
}