:root {
  --ub-blue: #005bbb;
  --ub-navy: #002f56;
  --ub-light: #e4e4e4;
  --ub-gray: #666666;
  --text: #16212b;
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --max-width: 1040px;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(0, 47, 86, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 14px;
}

a {
  color: var(--ub-blue);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--ub-navy);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 1.35rem 0;
  border-top: 0;
}

.section-alt {
  background: var(--bg-alt);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 47, 86, 0.08);
}

.nav-wrap {
  min-height: 60px;
  display: flex;
  align-items: center;
}

.site-nav {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  gap: 0.75rem 1rem;
}

.site-nav a {
  color: var(--ub-navy);
  text-decoration: none;
  font-size: 0.84rem;
}

.site-nav a:hover {
  color: var(--ub-blue);
}

.hero {
  padding-top: 1.2rem;
  padding-bottom: 0.05rem;
  border-top: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  color: var(--ub-navy);
}

h1 {
  font-size: clamp(0.93rem, 1.41vw, 1.28rem);
}

h2 {
  font-size: clamp(0.93rem, 1.41vw, 1.28rem);
}

h3 {
  font-size: 1.08rem;
}

.hero-bio {
  margin: 0.3rem 0 0;
  max-width: 42rem;
  font-size: 0.84rem;
  line-height: 1.48;
  text-align: justify;
}

.links-row a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(0, 91, 187, 0.18);
  border-radius: 999px;
  text-decoration: none;
  background: #fff;
}

.links-row a:hover,
.footer-links a:hover {
  border-color: rgba(0, 47, 86, 0.3);
  background: rgba(0, 91, 187, 0.04);
}

.hero-aside {
  display: grid;
  justify-items: center;
  align-content: start;
  text-align: center;
  gap: 0.25rem;
}

.profile-image {
  width: 114px;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
  box-shadow: none;
}

.hero-affiliations {
  width: 100%;
  font-size: 0.76rem;
  line-height: 1.25;
  color: var(--ub-gray);
  text-align: center;
}

.hero-affiliations p {
  margin: 0 0 0.12rem;
}

.hero-affiliations p:first-child {
  white-space: nowrap;
}

.hero-affiliations a {
  color: var(--ub-blue);
  text-decoration: none;
}

.hero-affiliations a:hover {
  color: var(--ub-navy);
  text-decoration: underline;
}

.hero-social {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.05rem;
}

.hero-social a {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 47, 86, 0.12);
  border-radius: 999px;
  color: var(--ub-navy);
  text-decoration: none;
}

.hero-social a:hover {
  color: var(--ub-blue);
  border-color: rgba(0, 91, 187, 0.25);
  background: rgba(0, 91, 187, 0.04);
}

.hero-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.card {
  background: #fff;
  border: 1px solid rgba(0, 47, 86, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-heading {
  max-width: 48rem;
  margin-bottom: 0.55rem;
}

#research.section {
  padding-top: 0;
}

#research .container,
#projects .container,
#publications .container,
#news .container,
#teaching .container,
#contact .container {
  border: 1px solid rgba(0, 47, 86, 0.10);
  border-radius: 12px;
  background: #f8fbff;
  padding: 1rem 1.1rem;
}

#projects.section {
  padding-top: 0.8rem;
}

.section-heading p {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
}

.section-heading.compact {
  margin-bottom: 0.55rem;
}

.projects-heading {
  margin-bottom: 0.4rem;
}

.pillars-grid,
.projects-grid {
  display: grid;
  gap: 0.9rem;
}

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

.pillar {
  padding: 1rem;
}

.projects-grid {
  grid-template-columns: 1fr;
}

.project {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  overflow: hidden;
}

.project-media-wrap {
  display: flex;
  flex-direction: column;
  background: #edf3fa;
}

.project-media,
.publication-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(0, 91, 187, 0.14), rgba(47, 159, 208, 0.18));
  color: var(--ub-navy);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

.photo-media {
  padding: 0;
  overflow: hidden;
  background: #edf3fa;
}

.media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-body,
.publication-body {
  padding: 0.9rem;
  font-size: 0.84rem;
}

.funding-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  padding: 0.35rem 0.45rem 0.45rem;
  justify-content: center;
  align-items: center;
  background: #edf3fa;
  border-top: 1px solid rgba(0, 47, 86, 0.08);
  overflow: hidden;
}

.funding-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 31px;
  padding: 0;
  text-decoration: none;
  flex: 0 1 auto;
}

.funding-logo-image {
  display: block;
  height: 24px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.funding-logo-image--moog {
  height: 19px;
}

.funding-logo-image--canal {
  height: 22px;
}

.funding-logo-image--suny {
  height: 22px;
}

.funding-logo:hover {
  transform: translateY(-1px);
}

.project-body p,
.publication-body p,
.pillar p,
.section-heading p,
.inset-card p,
.news-list li,
.people-list li,
.teaching-list li,
.service-list li {
  text-align: justify;
}

.project-bullets {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

.project-bullets li + li {
  margin-top: 0.28rem;
}

.project-bullets a {
  white-space: nowrap;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.publication-list {
  display: grid;
  gap: 0.8rem;
}

.publication {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  overflow: hidden;
}

.meta {
  margin: 0.35rem 0 0.7rem;
  color: var(--ub-gray);
  font-size: 0.84rem;
}

.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.inset-card {
  padding: 0.95rem;
}

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-list li,
.people-list li,
.teaching-list li,
.service-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(0, 47, 86, 0.08);
}

.news-list li:first-child,
.people-list li:first-child,
.teaching-list li:first-child,
.service-list li:first-child {
  padding-top: 0;
}

.news-list span {
  display: inline-block;
  min-width: 3rem;
  color: var(--ub-blue);
  font-weight: 700;
}

.news-list li,
.people-list li,
.teaching-list li,
.service-list li,
.inset-card,
.footer-grid {
  font-size: 0.84rem;
}

.site-footer {
  background: var(--ub-navy);
  color: #fff;
}

.site-footer h2,
.site-footer a,
.site-footer p {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 0.75rem;
}

.footer-links a {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

@media (max-width: 960px) {
  .hero-grid,
  .projects-grid,
  .two-up,
  .footer-grid,
  .pillars-grid,
  .publication,
  .project {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    justify-items: stretch;
  }

  .profile-image {
    width: 114px;
    max-width: 114px;
    height: auto;
  }

  .nav-wrap {
    padding: 0.75rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 1rem 0;
  }

  .hero {
    padding-top: 1.1rem;
    padding-bottom: 0.05rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .hero-aside {
    justify-items: center;
  }

  .profile-image {
    width: 93px;
    max-width: 93px;
    height: auto;
  }

  .links-row,
  .footer-links {
    gap: 0.55rem;
  }

  .links-row a,
  .footer-links a {
    width: 100%;
    justify-content: center;
  }

  .site-nav a {
    font-size: 0.92rem;
  }
}
