/* ================================
   Design tokens / base
   ================================ */
:root {
  --text: #111827;
  --muted: #6b7280;
  --bg: #ffffff;
  --card: #ffffff;
  --line: rgba(17, 24, 39, 0.1);
  --stanford-cardinal: #8c1515;
  --stanford-cardinal-dark: #6f0f0f;
  --max: 1500px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.55;
}

body.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
}

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

a:hover {
  text-decoration: underline;
}

.main,
.page,
.page-content {
  width: 88vw;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 24px;
}

.muted {
  color: var(--muted);
}

.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;
}

/* ================================
   Stanford identity bar / top banner
   ================================ */
.stanford-banner,
.stanford-identitybar {
  width: 100%;
  background: var(--stanford-cardinal);
}

.stanford-banner {
  height: 24px;
}

.stanford-banner-inner,
.nav-inner {
  max-width: 1500px;
  width: 88vw;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.stanford-identitybar {
  padding: 10px 20px;
}

.stanford-banner a,
.stanford-logo {
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
}

.stanford-banner a {
  font-size: 16px;
}

.stanford-logo {
  font-size: 20px;
}

.stanford-banner a:hover,
.stanford-logo:hover {
  color: #fff;
  text-decoration: underline;
}

@media (min-width: 768px) {
  .stanford-identitybar {
    padding-left: 30px;
    padding-right: 30px;
  }
}

/* ================================
   Navigation
   ================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 72px;
  gap: 18px;
  padding: 14px 0 10px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* .brand-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
} */

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-links a {
  border-bottom: 3px solid transparent;
  padding-bottom: 4px;
}

.nav-links a[aria-current="page"] {
  border-bottom-color: var(--stanford-cardinal);
  font-weight: 700;
}

.nav-links a:hover {
  border-bottom-color: rgba(140, 21, 21, 0.35);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 6px;
}

@media (max-width: 860px) {
  .nav-inner {
    align-items: center;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 16px;
    font-size: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 8px 0;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  }
}

/* ================================
   Full-width page banners
   ================================ */
.home-banner-full,
.page-banner {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
}

.home-banner-full img,
.page-banner img {
  width: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.home-banner-full img {
  height: clamp(240px, 32vw, 520px);
}

.page-banner img {
  height: 320px;
}

.page-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.05));
}

.page-banner-overlay .container {
  padding-bottom: 32px;
}

.page-banner-overlay h1 {
  color: #fff;
  font-size: 3rem;
  margin: 0;
}

/* ================================
   Sections / cards
   ================================ */
.section {
  padding: 34px 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.section-link {
  color: var(--stanford-cardinal);
  font-weight: 600;
}

.card,
.person,
.project {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 6px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

/* ================================
   Home intro / highlight cards
   ================================ */
.lab-intro {
  padding-bottom: 18px;
}

.lab-intro-text {
  max-width: none;
  font-size: 18px;
  line-height: 1.65;
  margin-top: 16px;
}

.lab-highlights {
  padding-top: 10px;
}

.lab-highlights .grid-3 {
  align-items: stretch;
}

.highlight-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  overflow: hidden;
  padding: 0;
  transition: transform 0.2s ease;
}

.highlight-card:hover {
  text-decoration: none;
  border-color: var(--stanford-cardinal);
  transform: translateY(-2px);
}

.highlight-card img {
  width: 100%;
  height: clamp(180px, 15vw, 260px);
  object-fit: cover;
  display: block;
}

.highlight-body {
  padding: 20px;
}

.highlight-body h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.highlight-body p {
  white-space: normal;
  overflow: visible;
  display: block;
  line-height: 1.5;
}

/* ================================
   Publications / buttons
   ================================ */
.pub-item {
  padding: 14px 16px;
}

.pub-item + .pub-item {
  border-top: 1px solid var(--line);
}

.pub-title {
  margin: 0 0 6px;
  font-weight: 800;
}

.pub-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  display: inline-block;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  background: #fff;
}

/* Publications page sidebar */
.pub-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: start;
}

.pub-sidebar {
  position: sticky;
  top: 96px;
  border-left: 4px solid var(--stanford-cardinal);
  padding-left: 16px;
}

.pub-sidebar h3 {
  margin: 0.8rem 0 0.4rem;
  font-size: 0.95rem;
  color: var(--stanford-cardinal);
}

.pub-sidebar a {
  display: block;
  padding: 4px 0;
  color: var(--muted);
}

.pub-section {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 120px;
}

.pub-section:first-child {
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 800px) {
  .pub-layout {
    grid-template-columns: 1fr;
  }

  .pub-sidebar {
    position: static;
    border-left: 0;
    border-top: 4px solid var(--stanford-cardinal);
    padding-left: 0;
    padding-top: 12px;
  }

  .pub-sidebar a {
    display: inline-block;
    margin-right: 12px;
  }
}

/* ================================
   Projects
   ================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #f3f4f6;
}

.project-body {
  padding: 12px 12px 14px;
}

.project-title {
  margin: 0 0 6px;
  font-weight: 800;
}

.project-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

/* ================================
   Home photo carousel
   ================================ */
.section-carousel {
  padding-top: 46px;
  padding-bottom: 60px;
}

.lab-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.lab-carousel-viewport {
  overflow: hidden;
}

.lab-carousel-track {
  display: flex;
  width: 100%;
  transform: translateX(0);
  transition: transform 600ms ease;
  will-change: transform;
}

.lab-carousel-slide {
  flex: 0 0 100%;
}

.lab-carousel-slide img {
  width: 100%;
  height: min(clamp(340px, 36vw, 540px), 65vh);
  object-fit: cover;
  object-position: center center;
  display: block;
  background: #f3f4f6;
  pointer-events: none;
}

.lab-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(17, 24, 39, 0.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
}

.lab-carousel-btn:hover {
  background: rgba(17, 24, 39, 0.5);
}

.lab-carousel-btn.prev {
  left: 14px;
}

.lab-carousel-btn.next {
  right: 14px;
}

.lab-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.lab-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
}

.lab-carousel-dot.is-active {
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .lab-carousel-track {
    transition: none;
  }
}

@media (max-width: 860px) {
  .lab-carousel-slide img {
    height: min(clamp(240px, 56vw, 380px), 60vh);
  }

  .lab-carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 26px;
  }
}

/* ================================
   People page
   ================================ */
.people-layout {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 28px;
  align-items: start;
}

.people-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  border-left: 4px solid var(--stanford-cardinal);
  padding-left: 18px;
  font-size: 15px;
}

.people-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.people-sidebar a {
  color: var(--text);
  text-decoration: none;
}

.people-sidebar a:hover {
  color: var(--stanford-cardinal);
  text-decoration: underline;
}

.people-sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.people-sidebar-group span {
  font-weight: 700;
  color: var(--stanford-cardinal);
  margin-bottom: 2px;
}

.people-sidebar-group a {
  padding-left: 10px;
  color: var(--muted);
}

.people-section {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 120px;
}

.people-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.person-list-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.person-photo {
  width: 112px;
}

.person-photo img {
  width: 112px;
  height: 150px;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 6px;
}

.person-info h3 {
  margin: 0 0 4px;
}

.person-role {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 600;
}

.person-info p {
  margin: 0 0 8px;
}

.person-education ul {
  margin: 4px 0 8px 1.2rem;
  padding: 0;
}

.person-education li {
  margin-bottom: 2px;
}

.person-links {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.person-links a {
  color: var(--stanford-cardinal);
  font-weight: 600;
}

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

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

  .people-sidebar {
    position: static;
    border-left: 0;
    border-top: 4px solid var(--stanford-cardinal);
    padding-left: 0;
    padding-top: 12px;
    margin-bottom: 20px;
  }

  .people-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .people-sidebar-group {
    margin-top: 0;
  }

  .people-sidebar-group a {
    padding-left: 0;
  }

  .person-list-card {
    grid-template-columns: 92px 1fr;
    gap: 14px;
    padding: 14px;
  }

  .person-photo,
  .person-photo img {
    width: 92px;
  }

  .person-photo img {
    height: 122px;
  }
}

/* ================================
   News
   ================================ */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.news-list-item {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.news-list-item:first-child {
  border-top: 1px solid var(--line);
}

.news-list-image img {
  width: 320px;
  height: 220px;
  object-fit: contain;
  object-position: center top;
  display: block;
  border-radius: 4px;
  background: #f7f7f7;
}

.news-description {
  margin: 8px 0 0;
  color: var(--muted);
}

.news-list .pub-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.news-list .pub-title a {
  color: var(--text);
  text-decoration: none;
}

.news-list .pub-title a:hover {
  color: var(--stanford-cardinal);
}

.news-article {
  max-width: 1100px;
  margin: 0 auto;
}

.news-date {
  color: var(--muted);
  font-weight: 600;
  margin-top: 8px;
}

.news-hero-image {
  margin: 30px auto 40px;
  text-align: center;
}

.news-hero-image img {
  width: 100%;
  max-width: 1000px;
  height: 500px;
  object-fit: cover;
  object-position: center center;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}

.news-body {
  font-size: 1.05rem;
  line-height: 1.7;
}

@media (max-width: 700px) {
  .news-list-item {
    grid-template-columns: 1fr;
  }

  .news-list-image img {
    width: 100%;
    height: auto;
    max-height: 240px;
  }
}

/* ================================
   Page titles
   ================================ */
.page-header,
.page-title {
  margin-top: 32px;
}

.page-title,
.news-title,
main h1:first-of-type {
  font-size: 3rem;
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ================================
   Footer
   ================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  background: #fff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

@media (max-width: 860px) {
  .footer-inner {
    flex-direction: column;
  }
}

.stanford-footer {
  background: var(--stanford-cardinal);
  color: #fff;
  width: 100%;
  padding: 22px 0 26px;
  margin-top: 60px;
}

.stanford-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stanford-footer-brand {
  text-align: center;
  padding-top: 10px;
  padding-bottom: 10px;
}

.stanford-footer-logo {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 600;
}

.stanford-footer-logo:hover {
  color: #fff;
  text-decoration: underline;
}

.stanford-footer-links {
  flex: 1;
}

.stanford-footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.stanford-footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: center;
}

.stanford-footer-list-primary a {
  font-size: 15px;
  font-weight: 500;
}

.stanford-footer-list-secondary a {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.95;
}

.stanford-footer a {
  color: #fff;
  text-decoration: none;
}

.stanford-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.stanford-footer-copy {
  font-size: 13px;
  opacity: 0.95;
  text-align: center;
}

@media (min-width: 1024px) {
  .stanford-footer-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 36px;
    padding: 0 30px;
  }

  .stanford-footer-brand {
    text-align: left;
    min-width: 190px;
  }

  .stanford-footer-nav {
    align-items: flex-start;
  }

  .stanford-footer-list {
    justify-content: flex-start;
  }

  .stanford-footer-copy {
    text-align: left;
  }
}

.resource-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 32px;
  align-items: start;
}

.resource-sidebar {
  position: sticky;
  top: 96px;
  border-left: 4px solid var(--stanford-cardinal);
  padding-left: 18px;
}

.resource-sidebar h3 {
  margin-top: 0;
  color: var(--stanford-cardinal);
  font-size: 16px;
}

.resource-sidebar a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
}

.resource-section {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 120px;
}

.resource-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
}

.resource-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.resource-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.resource-body {
  padding: 18px;
}

.resource-body h3 {
  margin-top: 0;
}

@media (max-width: 800px) {
  .resource-layout {
    grid-template-columns: 1fr;
  }

  .resource-sidebar {
    position: static;
    border-left: 0;
    border-top: 4px solid var(--stanford-cardinal);
    padding-left: 0;
    padding-top: 12px;
  }

  .resource-sidebar a {
    display: inline-block;
    margin-right: 14px;
  }
}

.resource-sidebar {
  position: sticky;
  top: 96px;
  border-left: 4px solid var(--stanford-cardinal);
  padding-left: 18px;
}

.resource-sidebar h3 {
  margin-top: 0;
  color: var(--stanford-cardinal);
  font-size: 16px;
}

.resource-filter {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 5px 0;
  color: var(--muted);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.resource-filter:hover,
.resource-filter.is-active {
  color: var(--stanford-cardinal);
  font-weight: 700;
}

.pub-filter {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 5px 0;
  color: var(--muted);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.pub-filter:hover,
.pub-filter.is-active {
  color: var(--stanford-cardinal);
  font-weight: 700;
}

.pub-list .pub-item[hidden] {
  display: none;
}

/* People page banner: align to page content, not viewport */
.people-page-banner {
  width: 100%;
  margin: 0 0 36px;
  overflow: hidden;
}

.people-page-banner img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: 0;
}

.pub-year-heading {
  margin-top: 48px;
  margin-bottom: 18px;

  font-size: 2rem;
  font-weight: 700;

  color: var(--stanford-cardinal);

  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
}

.pub-year-heading:first-child {
  margin-top: 0;
}

.pub-year-heading {
  margin: 36px 16px 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
  color: var(--stanford-cardinal);
  font-size: 2rem;
  font-weight: 700;
}

.pub-year-heading:first-child {
  margin-top: 18px;
}

.pub-list {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.pub-year-heading {
  margin: 36px 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
  color: var(--stanford-cardinal);
  font-size: 2rem;
  font-weight: 700;
}

.pub-year-heading.is-first-visible {
  margin-top: 0;
}

.pub-year-heading + .pub-item {
  border-top: none;
  padding-top: 0;
}

.pub-item.is-first-visible-in-year {
  border-top: none;
  padding-top: 14px;
}

.pub-authors {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}

.pub-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
}

.pub-title a {
  color: var(--stanford-cardinal);
  text-decoration: none;
}

.pub-title a:hover {
  text-decoration: underline;
}

.pub-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.pub-awards {
  margin-top: 4px;
  color: var(--stanford-cardinal);
  font-size: 0.92rem;
  font-weight: 600;
}

.pub-awards strong {
  font-weight: 700;
}

.pub-award {
  color: #000;
  font-weight: 700;
}

/* ========================================
   Individual News Pages
   ======================================== */

.news-page-image {
  max-width: 1100px;
  margin: 36px auto 42px;
  text-align: center;
}

.news-page-image img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

/* ================================
   Alumni lists
   ================================ */

.alumni-list {
  list-style: none;
  padding-left: 0;
  margin-top: 16px;
}

.alumni-list li {
  margin-bottom: 8px;
  break-inside: avoid;
}

.alumni-list a {
  color: var(--stanford-cardinal);
  font-weight: 600;
}

.alumni-list-phd {
  columns: auto;
  column-gap: normal;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 40px;
}

.alumni-list-phd li {
  margin-bottom: 0;
}

.small-alumni-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 2.5rem;

  /* Remove the separator */
  margin-top: 32px;
  padding-top: 0;
  align-items: start;
}

.small-alumni-section {
  border-top: 0;
  padding-top: 0;
}

.small-alumni-section h2 {
  margin-top: 0;
}

.alumni-list-small {
  columns: 1;
}

@media (max-width: 900px) {
  .alumni-list-phd {
    grid-template-columns: repeat(2, 1fr);
  }

  .small-alumni-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .alumni-list-phd {
    columns: 1;
  }
}

/* ========================================
   Multiple images on news pages
   ======================================== */

.news-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;

  max-width: 1200px;
  margin: 36px auto 42px;
}

.news-image-item img {
  width: 100%;
  height: 520px;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #f7f7f7;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

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

  .news-image-item img {
    height: auto;
  }
}

/* Research pages */
.research-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 36px;
  align-items: start;
}

.research-sidebar {
  position: sticky;
  top: 96px;
  border-left: 4px solid var(--stanford-cardinal);
  padding-left: 18px;
  font-size: 0.95rem;
}

.research-menu-group,
.research-menu-subgroup {
  margin-bottom: 12px;
}

.research-menu-group > summary {
  color: var(--stanford-cardinal);
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}

.research-menu-subgroup > summary {
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
  margin: 8px 0 6px;
}

.research-sidebar a {
  display: block;
  color: var(--muted);
  padding: 4px 0 4px 12px;
  line-height: 1.3;
}

.research-menu-subgroup a {
  padding-left: 24px;
}

.research-sidebar a:hover {
  color: var(--stanford-cardinal);
}

.research-content h1 {
  margin-top: 0;
}

.research-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.research-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
}

.research-card:hover {
  border-color: var(--stanford-cardinal);
  text-decoration: none;
}

.research-card h2 {
  margin-top: 0;
  color: var(--stanford-cardinal);
}

.research-note {
  margin-top: 28px;
  color: var(--muted);
  font-style: italic;
}

.research-page-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 1.75rem;
  border-radius: 6px;
}

.research-content-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 6px;
}

.research-caption {
  margin: 0.5rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

.research-subheading {
  color: var(--stanford-cardinal);
}

.research-link-list {
  margin: 1.25rem 0 0;
  padding-left: 1.3rem;
  line-height: 1.8;
}

.research-link-list li {
  margin-bottom: 0.35rem;
}

.research-link-list a {
  color: var(--stanford-cardinal);
  font-weight: 600;
}

.research-intro {
  font-size: 1.15rem;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.research-thumbnail {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 6px;
}

.research-content p,
.research-content li {
  font-size: 1.15rem;
  line-height: 1.7;
}

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

  .research-sidebar {
    position: static;
    border-left: 0;
    border-top: 4px solid var(--stanford-cardinal);
    padding-left: 0;
    padding-top: 14px;
  }

  .research-card-grid {
    grid-template-columns: 1fr;
  }
}

.pub-sidebar-group {
  margin: 6px 0;
}

.pub-sidebar-group summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  padding: 5px 0;
}

.pub-sidebar-group summary:hover {
  color: var(--stanford-cardinal);
}

.pub-sidebar-group .pub-filter {
  padding-left: 16px;
}

/* ========================================
   Homepage announcements
   ======================================== */

.announcement-list {
  border-top: 1px solid var(--line);
}

.announcement-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.announcement-title {
  margin: 6px 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
}

.announcement-description {
  margin: 0;
  color: var(--muted);
}

/* Homepage Announcements */

.announcement-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* .stanford-identitybar {
  padding: 0 20px 0 48px;
  height: 36px;
  display: flex;
  align-items: center;
}

.stanford-logo {
  display: flex;
  align-items: center;
}

.stanford-logo img {
  height: 22px;
  width: auto;
  display: block;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-left: 50px;
}

.brand-logo {
    height: 84px;
    width: auto;
    display: block;
}

.stanford-identitybar {
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
}

.stanford-identitybar-inner,
.nav-inner {
  width: 88vw;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.stanford-identitybar-inner {
  height: 100%;
  display: flex;
  align-items: center;
}

.brand {
  margin-left: 0;
} */

/* ========================================
   Header logo alignment
   ======================================== */

.stanford-identitybar {
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
}

.stanford-identitybar-inner,
.nav-inner {
  width: 88vw;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 48px;
  padding-right: 48px;
}

.stanford-identitybar-inner {
  height: 100%;
  display: flex;
  align-items: center;
}

.stanford-logo {
  display: flex;
  align-items: center;
}

.stanford-logo img {
  height: 22px;
  width: auto;
  display: block;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-left: 0;
}

.brand-logo {
  height: 84px;
  width: auto;
  display: block;
}

.resource-sidebar-group {
  margin: 8px 0;
}

.resource-sidebar-group summary {
  cursor: pointer;
  color: var(--stanford-cardinal);
  font-weight: 700;
  padding: 5px 0;
}

.resource-sidebar-group a {
  display: block;
  padding: 4px 0 4px 16px;
  color: var(--muted);
}

.resource-sidebar a.is-active {
  color: var(--stanford-cardinal);
  font-weight: 700;
}

.resource-intro {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 2.5rem;
  max-width: 900px;
}

.resource-page-title {
  margin-top: 0.2rem;
  margin-bottom: 2rem;

  font-size: 2rem;
  font-weight: 600;

  color: var(--text);

  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.resource-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 36px;
  align-items: start;
}

.resource-content h1 {
  margin-top: 0;
}

.resource-link-list {
  margin: 1.5rem 0 0;
  padding-left: 1.3rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.resource-link-list li {
  margin-bottom: 0.35rem;
}

.resource-link-list a {
  color: var(--stanford-cardinal);
  font-weight: 600;
}

.resource-software-list {
  margin-top: 2rem;
}

.resource-software-item {
  margin-bottom: 2.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e5e5;
}

.resource-software-item:last-child {
  border-bottom: none;
}

.resource-subheading {
  margin-top: 2.2rem;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

.resource-software-item p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.resource-submenu {
  margin-left: 16px;
  margin-top: 2px;
  margin-bottom: 8px;
}

.resource-submenu a {
  font-size: 0.92rem;
  padding: 3px 0 3px 12px;
}

.resource-body-text {
  margin: 1.25rem 0 0.75rem;
  line-height: 1.7;
  color: var(--text);
}

/* ========================================
   Research landing page card sections
   ======================================== */

.research-home-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 120px;
}

.research-home-section:first-of-type {
  padding-top: 1rem;
  border-top: 0;
}

.research-section-title {
  margin: 0 0 0.85rem;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--stanford-cardinal);
}

.research-section-intro {
  max-width: 950px;
  margin: 0 0 2rem;
  font-size: 1.08rem;
  line-height: 1.7;
}

.research-focus-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.research-focus-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.research-focus-card .resource-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

.research-focus-card h3 {
  color: var(--stanford-cardinal);
  line-height: 1.3;
}

.research-focus-card p {
  margin-bottom: 0;
  color: var(--text);
  line-height: 1.6;
}

.research-focus-card:hover {
  border-color: var(--stanford-cardinal);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.research-section-link {
  margin: 1.5rem 0 0;
}

.research-section-link a {
  color: var(--stanford-cardinal);
  font-weight: 700;
}

@media (max-width: 1150px) {
  .research-focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .research-focus-grid {
    grid-template-columns: 1fr;
  }

  .research-focus-card {
    min-height: 0;
  }
}
