:root {
  --ink: #17202a;
  --muted: #56616f;
  --line: #d8e0e7;
  --soft: #f3f7fa;
  --brand: #285f8f;
  --brand-dark: #173f64;
  --accent: #6f8f3f;
  --paper: #ffffff;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background: var(--paper);
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

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

.topbar {
  background: var(--brand-dark);
  color: white;
  font-size: 0.88rem;
  padding: 0.45rem max(1rem, calc((100vw - var(--max)) / 2));
}

.topbar a {
  color: white;
  text-decoration: none;
}

.topbar span {
  color: #c9d7e3;
  margin: 0 0.5rem;
}

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink);
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 0.86rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1rem;
  font-size: 0.95rem;
}

.nav a,
.text-link {
  color: var(--ink);
  text-decoration: none;
}

.nav a:hover,
.text-link:hover {
  color: var(--brand);
  text-decoration: underline;
}

.site-search {
  position: relative;
  flex: 0 0 auto;
}

.search-toggle {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: white;
  cursor: pointer;
}

.search-toggle:hover,
.search-toggle:focus {
  color: var(--brand);
  border-color: var(--brand);
}

.search-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.search-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.5rem);
  right: 0;
  width: min(28rem, calc(100vw - 2rem));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 18px 45px rgba(23, 32, 42, 0.18);
}

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

.search-form input {
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  font: inherit;
}

.search-form input:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(40, 95, 143, 0.18);
}

.search-results {
  max-height: 24rem;
  overflow: auto;
  padding: 0.35rem;
}

.search-result {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.7rem;
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
}

.search-result:hover,
.search-result:focus {
  background: var(--soft);
  text-decoration: none;
}

.search-result-section {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-result strong {
  line-height: 1.3;
}

.search-result span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.search-empty {
  margin: 0;
  padding: 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero,
.section,
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1rem;
}

.page-wide {
  max-width: calc(100vw - 1rem);
}

.hero {
  display: grid;
  gap: 1.25rem;
}

.hero h1,
.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
}

.hero-header {
  max-width: none;
}

.hero-header h1 {
  white-space: nowrap;
  font-size: clamp(2.2rem, 5vw, 3.35rem);
}

.hero-byline {
  margin: 0.55rem 0 0;
  max-width: 820px;
  font-weight: 700;
  color: var(--ink);
}

.hero p {
  font-size: 1.12rem;
  color: var(--muted);
}

.hero-image {
  width: 100%;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.hero-copy {
  max-width: 940px;
}

.eyebrow,
.meta {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 1rem;
}

.section h2,
.subsection h2 {
  margin: 0 0 1rem;
  font-size: 1.55rem;
}

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

.group-card,
.person-card,
.item-list article {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.group-card {
  padding: 1.1rem;
  border-top: 5px solid var(--brand);
}

.group-card:nth-child(2) {
  border-top-color: var(--accent);
}

.group-card:nth-child(3) {
  border-top-color: #8a5b35;
}

.group-card h2,
.group-card h3,
.item-list h2,
.item-list h3 {
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.group-card p:last-child {
  margin-bottom: 0;
}

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

.collaborator-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.collaborator-card a {
  min-height: 104px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  color: var(--ink);
  text-decoration: none;
}

.collaborator-card strong,
.collaborator-card small {
  display: block;
}

.collaborator-card small {
  margin-top: 0.2rem;
  color: var(--muted);
}

.collaborator-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--soft);
  overflow: hidden;
  color: white;
  font-weight: 700;
}

.collaborator-icon > span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--brand);
  font-size: 0.9rem;
}

.collaborator-icon img {
  max-width: 74px;
  max-height: 70px;
  object-fit: contain;
}

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

.item-list {
  display: grid;
  gap: 0.75rem;
}

.item-list article {
  padding: 1rem;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.filter-tab {
  appearance: none;
  margin: 0 0 -1px;
  padding: 0.65rem 0.85rem;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.filter-tab span {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.78rem;
}

.filter-tab.is-active {
  border-color: var(--line);
  border-bottom-color: white;
  background: white;
  color: var(--brand-dark);
}

.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 4px;
  background: var(--brand);
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.button-outline {
  border: 1px solid var(--brand);
  background: transparent;
  color: var(--brand);
}

.workshop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 1.75rem;
}

.workshop-actions .button {
  margin-top: 0;
}

.people-strip,
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.people-grid {
  --person-card-max-size: 260px;
}

.people-filter-item {
  display: flex;
}

.prose table {
  display: block;
  width: 100%;
  min-width: 1320px;
  margin: 1.25rem 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.4;
}

.prose img {
  display: block;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
}

.prose th,
.prose td {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.dataset-table-wrap {
  margin: 1.25rem 0;
  overflow: visible;
}

.dataset-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.72rem;
  line-height: 1.28;
}

.dataset-table th,
.dataset-table td {
  padding: 0.38rem 0.42rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
}

.dataset-table th {
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.metadata-list {
  display: grid;
  grid-template-columns: minmax(180px, 0.32fr) 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.metadata-list dt,
.metadata-list dd {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metadata-list dt {
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
}

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

.software-rotator-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.software-rotator-status {
  display: inline-flex;
  align-items: center;
}

.software-rotator-clock {
  --progress: 1;
  display: inline-block;
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle, white 0 43%, transparent 45%),
    conic-gradient(from -90deg, var(--brand) calc(var(--progress) * 1turn), var(--soft) 0);
  box-shadow: inset 0 0 0 2px white;
  transform: scaleX(-1);
}

.software-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.home-software-item,
.software-filter-item,
.software-grid .software-card {
  display: flex;
  flex-direction: column;
}

.home-software-item {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 320ms ease,
    transform 420ms ease;
}

.home-software-item.is-exiting {
  opacity: 0;
  transform: translateX(-1.25rem);
}

.home-software-item.is-entering {
  opacity: 0;
  transform: translateX(1.25rem);
}

.software-grid .software-card {
  height: 100%;
}

.software-card h3 {
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.software-card p {
  margin: 0.5rem 0;
}

.people-strip a,
.person-card {
  text-align: center;
}

.people-strip a {
  display: grid;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
}

.people-strip img,
.person-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto;
  background: var(--soft);
}

.person-card {
  padding: 1rem;
}

.people-grid .person-card {
  width: 100%;
  min-height: var(--person-card-max-size);
}

.person-card a {
  display: grid;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.person-card p,
.person-card small {
  display: block;
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.page-header {
  max-width: 820px;
  margin-bottom: 1.5rem;
}

.page-header p {
  color: var(--muted);
  font-size: 1.12rem;
}

.prose {
  max-width: 820px;
}

.prose h2,
.prose h3 {
  line-height: 1.25;
}

.prose li + li {
  margin-top: 0.3rem;
}

.subsection {
  margin-top: 2rem;
}

.publication-sections > section {
  margin-top: 1.25rem;
}

.workshop-speakers {
  max-width: 1180px;
}

.speaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.speaker-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.speaker-card-no-image {
  grid-template-columns: 1fr;
}

.speaker-card img {
  width: 96px;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: contain;
  background: white;
}

.speaker-photo-link {
  display: block;
  line-height: 0;
}

.speaker-card h3 {
  margin: 0;
  font-size: 1rem;
}

.speaker-card h3 a {
  color: var(--brand-dark);
  text-decoration: none;
}

.speaker-affiliation,
.speaker-title {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.speaker-affiliation {
  color: var(--ink);
  font-weight: 600;
}

.speaker-title {
  font-size: 0.84rem;
}

.speaker-description {
  margin-top: 0.55rem;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.45;
}

.publication-sections h3 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.25rem;
}

.publication-sections h4 {
  margin: 1rem 0 0.5rem;
  color: var(--brand-dark);
  font-size: 1.05rem;
}

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

.publication-row {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.publication-row h5 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  line-height: 1.35;
}

.publication-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.year-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}

.year-jump a {
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  background: var(--soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.publication-index-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1rem;
}

.publication-year {
  grid-column: 1 / -1;
  margin: 1rem 0 0;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
  font-size: 1.3rem;
}

.publication-card {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.publication-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.3;
}

.publication-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.person-profile {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2rem;
}

.profile-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
}

.role {
  margin-bottom: 0;
  font-weight: 700;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.link-list a {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  background: var(--soft);
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 1rem;
  background: var(--soft);
}

.site-footer,
.site-footer nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem 1.25rem;
  flex-wrap: wrap;
}

.site-footer nav a {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .site-header,
  .two-column,
  .person-profile {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
  }

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

  .site-search {
    justify-self: start;
  }

  .search-panel {
    left: 0;
    right: auto;
  }

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

  .hero-header h1 {
    white-space: normal;
  }

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

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

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

  .metadata-list {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .page-header h1 {
    font-size: 2.1rem;
  }
}
