/* =========================
   BASE
   ========================= */

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  background: #ffffff;
  color: #111;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* GLOBAL IMAGE SAFETY — DO NOT REMOVE */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================
   PAGE LAYOUT
   ========================= */

.page {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  gap: 36px;
}

/* =========================
   LEFT SIDEBAR
   ========================= */

.sidebar {
  width: 260px;
  flex-shrink: 0;
  padding-top: 8px;
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 14px;
}

.sidebar-label {
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #888;
  text-transform: uppercase;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.92rem;
  color: #666;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-link:hover {
  color: #111;
}

.sidebar-link .icon {
  width: 1.4em;
  text-align: center;
  opacity: 0.55;
  font-size: 1rem;
}

.sidebar-link:hover .icon {
  opacity: 0.9;
}

/* =========================
   RIGHT CONTENT
   ========================= */

.content {
  flex: 1;
  min-width: 0;
}

/* =========================
   TOP NAV
   ========================= */

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 32px;
}

.topnav a,
.topnav .nav-parent {
  font-size: 0.95rem;
  color: #777;
  font-weight: 500;
}

.topnav a.brand {
  font-weight: 700;
  color: #111;
}

.topnav a:hover,
.topnav .nav-parent:hover,
.topnav .nav-parent:focus {
  color: #111;
}

/* =========================
   MAIN CONTENT
   ========================= */

main {
  max-width: 900px;
}

main h2 {
  margin-top: 38px;
  margin-bottom: 14px;
  font-size: 1.35rem;
  line-height: 1.25;
}

main h1 + .page-intro + h2,
main .page-intro + h2 {
  margin-top: 30px;
}

/* =========================
   HOME BANNER
   ========================= */

.site-banner {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 22px;
}

/* =========================
   AFFILIATIONS (FIXED)
   ========================= */

.affiliations {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 14px 0 22px 0;
}

.affiliations img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

/* =========================
   PUBLICATIONS – BASE
   ========================= */

.pub-list {
  margin-top: 28px;
}

/* =========================
   PUBLICATIONS – EXTERNAL CARDS
   ========================= */

.pub-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 16px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.pub-card:hover {
  background: #f7f7f7;
  transform: translateY(-1px);
}

.pub-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.pub-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.pub-desc {
  font-size: 0.9rem;
  color: #666;
  margin-top: 4px;
}

/* =========================
   PUBLICATIONS – DYNAMIC (ORCID)
   ========================= */

.pub-dynamic {
  margin-top: 28px;
}

.pub-dynamic-item {
  margin-bottom: 22px;
  padding-left: 14px;
  border-left: 3px solid #eee;
}

.pub-dynamic-item:hover {
  border-left-color: #111;
}

.pub-dynamic-item .pub-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.pub-dynamic-item .pub-title a {
  color: #111;
}

.pub-dynamic-item .pub-desc {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.45;
  margin-top: 4px;
}

/* =========================
   RESOURCE CARDS
   ========================= */

.resource-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.resource-card {
  display: block;
  min-height: 132px;
  padding: 18px 20px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.resource-card:hover {
  border-color: #d8d8d8;
  background: #fafafa;
  transform: translateY(-1px);
  text-decoration: none;
}

.resource-card-title {
  color: #111;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
}

.resource-card-desc {
  margin-top: 8px;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.45;
}

/* =========================
   PEOPLE PAGE
   ========================= */

.people-section {
  margin-top: 40px;
}

.people-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 18px 16px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.person-card img {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto 12px auto;
}

.person-info {
  width: 100%;
}

.person-name {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
}

.person-role {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.35;
  margin-top: 5px;
}

.person-bio {
  font-size: 0.92rem;
  color: #444;
  line-height: 1.45;
  margin-top: 10px;
}

.person-dates {
  font-size: 0.86rem;
  color: #777;
  line-height: 1.35;
  margin-top: 5px;
}

/* =========================
   NAV SEARCH
   ========================= */

.nav-search {
  margin-left: auto;
}

.nav-search input {
  width: 160px;
  padding: 6px 10px;
  font-size: 0.85rem;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.nav-search input:focus {
  outline: none;
  border-color: #999;
}

.nav-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.nav-search-item a {
  display: block;
  padding: 10px 12px;
  border: 1px solid #ececec;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

.nav-search-item a:hover {
  border-color: #d8d8d8;
  background: #fafafa;
}

.nav-search-title {
  margin-bottom: 4px;
  color: #222;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.nav-search-snippet {
  color: #666;
  font-size: 0.82rem;
  line-height: 1.45;
}

/* =========================
   LAB NEWS – CARDS (LOW-KEY ELEVATION)
   ========================= */

.news-list {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-item {
  position: relative;
  padding: 12px 16px 12px 22px;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  transition: background 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.news-item:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f6f6f6 100%);
  border-color: #e1e1e1;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.news-item::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #111 0%, #bdbdbd 100%);
  opacity: 0.25;
}

.news-date {
  font-size: 0.76rem;
  color: #6b6b6b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.news-body {
  font-size: 0.92rem;
  color: #3f3f3f;
  line-height: 1.4;
}

.news-link {
  display: inline-block;
  margin-top: 7px;
  font-size: 0.85rem;
  color: #4a4a4a;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.news-link:hover {
  color: #111;
  border-color: rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.news-show-more {
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.news-show-more:hover {
  border-color: #c4c4c4;
  background: #fafafa;
}

/* =========================
   FOOTER
   ========================= */
.site-footer{
  margin-top: 48px;
  padding: 22px 0;
  border-top: 1px solid #eee;
}

.footer-inner{
  max-width: 900px;
  margin: 0 auto;              /* centers the 900px container */
  font-size: 0.85rem;
  color: #888;

  display: flex;
  justify-content: center;     /* centers the footer items */
  gap: 10px;
  align-items: center;
  text-align: center;
}
.footer-inner{ flex-wrap: wrap; }
.footer-sep{ opacity: 0.5; }
.footer-muted{ color: inherit; text-decoration: none; }
.footer-muted:hover{ text-decoration: underline; }

/* =========================
   RESEARCH – VERTICAL CARDS
   ========================= */

.research-list{
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 22px;
}

.research-card.research-card-vertical{
  display: block;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  overflow: hidden; /* keeps the card rounded */
  background: #fff;
  transition: background 0.15s ease, transform 0.1s ease;
}

.research-card.research-card-vertical:hover{
  background: #f7f7f7;
  transform: translateY(-1px);
}

/* Narrower + taller image (desktop) */
.research-card.research-card-vertical img{
  width: 75%;            /* ~25% narrower */
  height: 390px;         /* 260px → +50% taller */
  object-fit: cover;
  display: block;
  margin: 0 auto;        /* center the narrower image */
  border-radius: 14px;   /* optional: nice rounding on the centered image */
}

.research-card-body{
  padding: 16px 20px;
}

.research-card-body h3{
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.research-card-body p{
  margin: 0;
  font-size: 0.92rem;
  color: #555;
  line-height: 1.45;
}

.research-link{
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #555;
}

.research-card.research-card-vertical:hover .research-link{
  color: #111;
}

/* Mobile: full-width image, still taller */
@media (max-width: 900px){
  .research-card.research-card-vertical img{
    width: 100%;
    height: 300px;
    margin: 0;
    border-radius: 0; /* lets the card's overflow:hidden handle edges */
  }
}

/* =========================
   TOP NAV – DROPDOWN
   ========================= */

.nav-dropdown{
  position: relative;
  display: inline-block; /* critical */
}

.nav-parent{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
}

.nav-caret{
  font-size: 0.75em;
  opacity: 0.6;
  transform: translateY(-1px);
}

/* Menu is hidden by default */
.nav-menu{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;

  min-width: 220px;
  padding: 10px 8px;

  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);

  display: none;          /* critical */
  z-index: 1000;
}

/* hover bridge */
.nav-dropdown::after{
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 12px;
}

/* show on hover/focus */
.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu{
  display: block;
}

.nav-menu a{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  color: #444;
  text-decoration: none;
  white-space: nowrap;
}

.nav-menu a:hover{
  background: #f7f7f7;
  color: #111;
  text-decoration: none;
}

/* MOBILE: keep simple (no dropdown behavior) */
@media (max-width: 900px){
  .nav-dropdown{ display: block; }
  .nav-dropdown::after{ display: none; }

  .nav-menu{
    position: static;
    display: block;     /* mobile shows items below */
    box-shadow: none;
    border: none;
    padding: 0;
    margin-top: 6px;
    background: transparent;
  }

  .nav-menu a{ padding: 8px 0; }
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 900px) {
  .page {
    flex-direction: column;
    padding: 22px 18px;
  }

  .sidebar {
    width: 100%;
    margin-bottom: 18px;
  }

  .affiliations img {
    height: 56px;
  }

  .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px){
  .research-card.research-card-vertical img{
    height: 200px;
  }
}

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