:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #555555;
  --subtle: #777777;
  --line: #e5e5e5;
  --soft: #f7f7f7;
  --accent: #2698ba;
  --accent-dark: #16657d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.page-shell {
  width: min(930px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.site-title,
.site-brand {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 500;
}

.site-brand {
  display: grid;
  gap: 0;
}

.brand-name {
  font-weight: 500;
}

.brand-subtitle {
  color: var(--subtle);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.site-nav a {
  color: #444444;
  font-size: 0.93rem;
  text-transform: lowercase;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--accent-dark);
  text-decoration: none;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.25;
}

h1 {
  margin: 0 0 4px;
  font-size: 2.35rem;
  font-weight: 400;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.48rem;
  font-weight: 400;
  text-transform: lowercase;
}

h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 600;
}

p {
  margin: 0 0 16px;
}

.about {
  padding: 42px 0 18px;
}

.affiliation {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 1.04rem;
}

.profile {
  float: right;
  width: 235px;
  margin: 0 0 18px 32px;
  text-align: center;
}

.profile img {
  width: 100%;
  display: block;
  border-radius: 3px;
}

.profile-meta {
  margin-top: 10px;
  color: var(--subtle);
  font-size: 0.9rem;
  line-height: 1.45;
}

.profile-meta p {
  margin: 0 0 5px;
}

.compact-section {
  clear: both;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.section-title-row > a {
  font-size: 0.92rem;
}

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

.news-list article {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
}

.news-list time {
  color: var(--subtle);
  font-size: 0.92rem;
  white-space: nowrap;
}

.news-list p {
  margin: 0;
}

.pub-list {
  display: grid;
  gap: 18px;
}

.pub-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 2px 0 16px;
  border-bottom: 1px solid var(--line);
}

.pub-item:last-child {
  border-bottom: 0;
}

.pub-item img {
  width: 112px;
  height: 82px;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.pub-rank {
  width: 112px;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.25;
}

.authors {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.95rem;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 5px;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
}

.venue {
  margin: 0 0 4px;
  color: var(--subtle);
  font-size: 0.92rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  font-size: 0.88rem;
}

.links a,
.paper-links a,
.hero-actions a,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  line-height: 1.3;
}

.links a:hover,
.paper-links a:hover,
.hero-actions a:hover,
.text-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.page-heading {
  padding: 42px 0 24px;
}

.page-heading h1 {
  font-size: 2.15rem;
}

.page-description {
  max-width: 760px;
  color: var(--muted);
}

.content-page {
  padding: 18px 0 44px;
}

.content-page h2 {
  margin-top: 26px;
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.content-page h2:first-child {
  margin-top: 0;
}

.content-page p,
.content-page li {
  color: var(--muted);
}

.project-grid,
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.project-grid article,
.pillar-grid article,
.content-page .timeline article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
}

.project-grid p,
.pillar-grid p {
  margin: 0;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline span {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--subtle);
  font-size: 0.9rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

/* Backward compatibility for pages that still use the first static layout. */
.hero,
.trust-strip,
.lab-band,
.split-section {
  display: block;
}

.hero {
  padding: 42px 0 28px;
}

.hero h1 {
  font-size: 2.35rem;
}

.hero-card,
.publication-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  background: var(--soft);
}

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

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

.publication-card img {
  width: 112px;
  height: 82px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 3px;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 28px, 930px);
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    padding: 14px 0;
  }

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

  .profile {
    float: none;
    width: min(235px, 100%);
    margin: 0 0 20px;
    text-align: left;
  }

  .news-list article,
  .pub-item,
  .publication-card,
  .project-grid,
  .pillar-grid {
    grid-template-columns: 1fr;
  }

  .pub-item img,
  .publication-card img {
    width: min(220px, 100%);
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .pub-rank {
    width: min(220px, 100%);
    min-height: 58px;
  }
}
