:root {
  --bg: #f6f8f7;
  --paper: #fbfcfb;
  --paper-strong: #ffffff;
  --ink: #172033;
  --muted: #66717c;
  --line: #dce3e1;
  --yale: #00356b;
  --yale-soft: #e9f1f7;
  --sage: #5d7467;
  --sage-soft: #edf4ef;
  --copper: #b45f24;
  --cream: #fbf7ef;
  --shadow: 0 18px 45px rgba(16, 35, 54, 0.09);
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(0, 53, 107, 0.08) 0, rgba(0, 53, 107, 0.08) 29%, transparent 29%),
    linear-gradient(180deg, #fbfaf5 0%, #f6f8f7 48%, #eef4f2 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(0, 53, 107, 0.35);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(0, 53, 107, 0.12);
  background: rgba(255, 255, 255, 0.9);
  padding: 0 clamp(18px, 4vw, 56px);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 18px rgba(16, 35, 54, 0.06);
}

.site-title {
  color: var(--yale);
  font-size: 1.16rem;
  font-weight: 800;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.6vw, 24px);
  color: #1f2b3a;
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: var(--yale);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--ink);
}

.nav-toggle svg {
  width: 21px;
  height: 21px;
}

.page-shell {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(54px, 9vw, 120px) 0 clamp(64px, 9vw, 110px);
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 82px);
}

.profile-panel {
  position: sticky;
  top: calc(var(--header-height) + 46px);
  align-self: start;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  border-left: 4px solid var(--yale);
  padding-left: clamp(20px, 3vw, 30px);
  text-align: left;
}

.photo-frame {
  display: inline-flex;
  border-radius: 50%;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, var(--yale), var(--sage) 58%, var(--copper)) border-box;
  border: 6px solid transparent;
  box-shadow: var(--shadow);
  padding: 5px;
}

.profile-photo {
  width: min(210px, 54vw);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  object-fit: cover;
  object-position: center 22%;
}

.profile-panel h1 {
  max-width: 100%;
  margin: 0 0 2px;
  color: #172033;
  font-size: 3rem;
  line-height: 1.02;
  overflow-wrap: break-word;
}

.pronouns {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 600;
}

.role {
  margin: 0;
  color: var(--yale);
  font-size: 1.35rem;
  font-weight: 800;
}

.affiliation {
  max-width: 310px;
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 1.04rem;
}

.profile-facts {
  display: grid;
  gap: 8px;
  width: min(100%, 310px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0 0 24px;
  padding: 14px 0;
}

.profile-facts span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-facts span::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--copper);
  content: "";
  flex: 0 0 auto;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 14px;
}

.social-links a,
.section-icon,
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(41, 35, 30, 0.08);
}

.social-links a {
  width: 48px;
  height: 48px;
  color: var(--yale);
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.social-links a:hover {
  background: var(--yale);
  color: #fff;
  transform: translateY(-2px);
}

.social-links svg {
  width: 22px;
  height: 22px;
}

.content-flow {
  display: grid;
  min-width: 0;
  gap: clamp(42px, 7vw, 72px);
}

.section-block {
  scroll-margin-top: calc(var(--header-height) + 28px);
}

.section-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  color: #172033;
  font-size: 2rem;
  line-height: 1.13;
  overflow-wrap: break-word;
}

.section-kicker {
  margin: 0 0 4px;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.section-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  color: var(--yale);
}

.section-icon svg {
  width: 24px;
  height: 24px;
}

.lead {
  max-width: 800px;
  margin: 0 0 30px;
  color: #56585a;
  font-size: 1.12rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 8px;
  font-size: 1.08rem;
  font-weight: 800;
  padding: 0 24px;
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.primary-action {
  background: linear-gradient(135deg, var(--yale), #0a5a91);
  box-shadow: 0 13px 30px rgba(0, 53, 107, 0.2);
  color: #fff;
}

.secondary-action {
  border: 1px solid rgba(0, 53, 107, 0.22);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 13px 30px rgba(49, 43, 37, 0.08);
  color: var(--yale);
}

.primary-action:hover,
.secondary-action:hover {
  box-shadow: 0 16px 36px rgba(0, 53, 107, 0.24);
  transform: translateY(-2px);
}

.secondary-action:hover {
  border-color: rgba(0, 53, 107, 0.36);
  background: #fff;
}

.primary-action svg,
.secondary-action svg {
  width: 21px;
  height: 21px;
}

.research-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 860px;
}

.research-snapshot article {
  border-left: 3px solid var(--yale);
  background: rgba(255, 255, 255, 0.72);
  min-height: 94px;
  padding: 16px 18px;
}

.research-snapshot strong,
.research-snapshot span {
  display: block;
}

.research-snapshot strong {
  color: var(--yale);
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.research-snapshot span {
  color: var(--muted);
  line-height: 1.4;
}

.news-list {
  display: grid;
  gap: 16px;
}

.news-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(0, 53, 107, 0.12);
  border-left: 4px solid var(--copper);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(16, 35, 54, 0.06);
}

.news-date {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--yale-soft);
  padding: 24px 20px;
}

.news-date time {
  color: var(--yale);
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.35;
}

.news-date span,
.news-topic {
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: uppercase;
}

.news-body {
  min-width: 0;
  padding: 24px;
}

.news-topic {
  margin: 0 0 8px;
}

.news-body h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.news-body > p:not(.news-topic) {
  margin: 12px 0 0;
  color: var(--muted);
}

.news-body code {
  color: var(--yale);
  font-weight: 750;
}

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

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

.info-card,
.publication-card,
.research-list article,
.contact-grid a {
  border: 1px solid rgba(0, 53, 107, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 34px rgba(16, 35, 54, 0.06);
}

.info-card {
  min-height: 190px;
  padding: 28px 24px 24px;
  position: relative;
}

.info-card::before {
  position: absolute;
  top: 0;
  right: 20px;
  left: 20px;
  height: 4px;
  background: var(--yale);
  content: "";
}

.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  color: var(--yale);
}

.card-icon svg {
  width: 23px;
  height: 23px;
}

.info-card h3,
.research-list h3,
.publication-card h3 {
  margin: 0;
  color: #172033;
  font-size: 1.18rem;
  line-height: 1.25;
}

.info-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.38;
}

.software-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
}

.software-featured {
  grid-column: 1 / -1;
  min-height: 280px;
}

.software-featured::before {
  background: var(--copper);
}

.software-card:nth-child(2)::before {
  background: var(--yale);
}

.software-card:nth-child(3)::before {
  background: var(--sage);
}

.software-card .software-type {
  margin: 0 0 6px;
  color: var(--copper);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.software-card .software-title {
  color: var(--ink);
  font-weight: 800;
}

.package-install {
  display: block;
  max-width: 100%;
  margin-top: 18px;
  border: 1px solid rgba(0, 53, 107, 0.12);
  border-radius: 6px;
  background: var(--mist);
  color: var(--yale);
  overflow-wrap: anywhere;
  padding: 9px 11px;
}

.software-card .pub-links {
  margin-top: auto;
  padding-top: 18px;
}

.research-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.research-list article {
  min-height: 220px;
  position: relative;
  padding: 24px;
}

.research-list article:nth-child(1) {
  border-left: 4px solid var(--yale);
  background: linear-gradient(180deg, rgba(233, 241, 247, 0.8), rgba(255, 255, 255, 0.86));
}

.research-list article:nth-child(2) {
  border-left: 4px solid var(--sage);
}

.research-list article:nth-child(3) {
  border-left: 4px solid var(--copper);
}

.research-list article:nth-child(4) {
  border-left: 4px solid #7b7a44;
}

.research-number {
  display: block;
  color: rgba(0, 53, 107, 0.24);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 18px;
}

.research-list p {
  margin: 12px 0 0;
  color: var(--muted);
}

.publication-list {
  display: grid;
  gap: 0;
  position: relative;
}

.publication-list::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 34px;
  width: 2px;
  background: rgba(0, 53, 107, 0.16);
  content: "";
}

.publication-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 18px 24px;
  border-width: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 0 28px;
  position: relative;
}

.pub-year {
  position: relative;
  z-index: 1;
  width: 70px;
  height: 42px;
  margin: 0;
  border-radius: 8px;
  background: var(--yale);
  color: #fff;
  font-weight: 900;
  line-height: 42px;
  text-align: center;
}

.pub-body {
  border: 1px solid rgba(0, 53, 107, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(16, 35, 54, 0.06);
  padding: 22px 24px;
}

.publication-card p:not(.pub-year):not(.pub-type) {
  margin: 8px 0 0;
  color: var(--muted);
}

.pub-type {
  margin: 0 0 8px;
  color: var(--copper);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: uppercase;
}

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

.pub-links a {
  border: 1px solid rgba(0, 53, 107, 0.2);
  border-radius: 999px;
  color: var(--yale);
  font-size: 0.92rem;
  font-weight: 800;
  padding: 5px 12px;
}

.pub-links a:hover {
  border-color: var(--yale);
  background: var(--yale);
  color: #fff;
}

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

.contact-grid a {
  display: flex;
  min-width: 0;
  min-height: 78px;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  color: var(--ink);
  font-weight: 750;
}

.contact-grid a:hover {
  border-color: rgba(0, 53, 107, 0.28);
  background: rgba(233, 241, 247, 0.7);
}

.contact-grid svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--yale);
}

.contact-grid span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 52px;
    padding-top: 54px;
  }

  .profile-panel {
    position: static;
  }

  .profile-panel h1 {
    font-size: 2.65rem;
  }

  .card-grid,
  .research-list,
  .research-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-list article:nth-child(1) {
    grid-row: auto;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 68px;
  }

  body {
    background: linear-gradient(180deg, #fbfaf5 0%, #f6f8f7 56%, #eef4f2 100%);
  }

  .site-header {
    padding: 0 18px;
  }

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

  .site-nav {
    position: fixed;
    top: var(--header-height);
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 8px;
  }

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

  .site-nav a {
    border-radius: 6px;
    padding: 12px 14px;
  }

  .site-nav a:hover,
  .site-nav a.active {
    background: var(--sage-soft);
  }

  .site-nav a::after {
    display: none;
  }

  .page-shell {
    width: min(100% - 28px, 640px);
    padding-top: 42px;
  }

  .site-title {
    font-size: 1.02rem;
  }

  .section-heading h2 {
    font-size: 1.62rem;
  }

  .lead {
    font-size: 1.04rem;
  }

  .profile-panel {
    align-items: center;
    border-left: 0;
    padding-left: 0;
    text-align: center;
  }

  .profile-facts span {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }

  .section-heading {
    align-items: flex-start;
    gap: 14px;
  }

  .section-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .card-grid,
  .research-list,
  .research-snapshot,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .software-grid .package-install {
    font-size: 0.82rem;
  }

  .news-item {
    grid-template-columns: 1fr;
  }

  .news-date {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 53, 107, 0.1);
    padding: 14px 18px;
  }

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

  .publication-list::before {
    display: none;
  }

  .pub-year {
    width: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
