:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-hover: #f1f4f8;
  --ink: #18202a;
  --text: #313a45;
  --muted: #5f6b7a;
  --link: #1b569e;
  --link-hover: #133f75;
  --border: #e3e7ee;
  --border-strong: #cfd6e0;
  --chip-bg: #eef3fa;
  --chip-border: #d5e1f0;
  --chip-text: #22446e;
  --preprint-bg: #f3f4f6;
  --preprint-border: #e2e5ea;
  --preprint-text: #525c68;
  --selected-bg: #f5f0e6;
  --selected-border: #e4d6bc;
  --selected-text: #6e5225;
  --note: #943422;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  width: min(92%, 780px);
  margin: 44px auto 56px;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.68;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 8px 12px;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transform: translateY(-220%);
  z-index: 100;
}

.skip-link:focus {
  transform: translateY(0);
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 2px;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid #5c91d4;
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  color: var(--ink);
  margin: 0;
}

h2 {
  margin-bottom: 16px;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin: 0 0 14px;
}

p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 0;
  padding-left: 18px;
}

li {
  margin-bottom: 8px;
}

li:last-child {
  margin-bottom: 0;
}

/* Header */

.site-header {
  padding-bottom: 26px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-photo {
  flex-shrink: 0;
}

.profile-image {
  display: block;
  width: 148px;
  height: 148px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.info-section {
  flex: 1;
  min-width: 0;
}

.info-header h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 14px 0 0 -6px;
  padding: 0;
}

.contact-list li {
  margin: 0;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.contact-list a:hover {
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}

.contact-list svg {
  width: 17px;
  height: 17px;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-divider {
  color: var(--border-strong);
  user-select: none;
}

/* Main Sections */

.main-content > section + section {
  margin-top: 40px;
}

/* Research Pillars */

.pillars-head {
  margin-bottom: 16px;
}

.section-eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pillars-head h2 {
  margin-bottom: 0;
  font-size: 1.32rem;
}

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

.pillar-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 16px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pillar-card:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

.pillar-card[aria-pressed="true"] {
  background: var(--chip-bg);
  border-color: var(--chip-border);
}

.pillar-card h3 {
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.pillar-desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.5;
  flex: 1;
}

.pillar-cta {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--link);
}

/* Timeline Lists (News & Blog) */

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 0 20px;
  align-items: baseline;
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-date {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-text {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.58;
}

.timeline-venue {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Publications */

#publications {
  scroll-margin-top: 24px;
}

.pub-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 18px;
}

.pub-header h2 {
  margin-bottom: 0;
}

.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-btn:hover {
  background: var(--surface);
  color: var(--ink);
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.pub-group + .pub-group {
  margin-top: 28px;
}

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

.pub-subhead {
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.paper-item {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

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

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

.paper-teaser {
  width: 168px;
  height: 121px;
  object-fit: contain;
  display: block;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.paper-content {
  min-width: 0;
}

.paper-title {
  margin: 0 0 5px;
  line-height: 1.38;
}

.paper-title a {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
}

.paper-title a:hover {
  color: var(--link);
}

.paper-authors {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.48;
}

.paper-authors .me {
  color: var(--ink);
  font-weight: 500;
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
}

.venue-chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--chip-border);
  border-radius: 6px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
}

.venue-chip.preprint {
  background: var(--preprint-bg);
  border-color: var(--preprint-border);
  color: var(--preprint-text);
}

.venue-chip.selected {
  background: var(--selected-bg);
  border-color: var(--selected-border);
  color: var(--selected-text);
}

.paper-note {
  color: var(--note);
  font-size: 0.78rem;
  font-weight: 600;
}

.paper-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  font-size: 0.84rem;
}

.paper-links a {
  color: var(--link);
  font-weight: 500;
}

.paper-links a + a::before {
  content: "·";
  color: var(--border-strong);
  margin-right: 8px;
}

/* Simple Lists (Mentoring / Teaching) */

.plain-list {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* Footer */

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
}

footer p {
  margin: 0;
}

/* Responsive */

@media (max-width: 760px) {
  body {
    width: min(92%, 36rem);
    margin: 24px auto 40px;
  }

  .site-header {
    padding-bottom: 22px;
    margin-bottom: 26px;
  }

  .profile-summary {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .profile-image {
    width: 132px;
    height: 132px;
  }

  .info-header h1 {
    font-size: 1.95rem;
  }

  .contact-list {
    justify-content: center;
    margin-left: 0;
  }

  .primary-nav {
    justify-content: center;
  }

  .main-content > section + section {
    margin-top: 32px;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 10px 0;
  }

  .pub-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .paper-item {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 0;
  }

  .paper-teaser {
    width: min(220px, 100%);
    height: auto;
    aspect-ratio: 18 / 13;
  }

  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
