/* Spacing: --space-n is approximately n * 4px (0.25rem base). */
:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --card-border: #d9dde3;
  --text: #24303c;
  --muted: #5f6e7f;
  --link: #0056b3;
  --link-hover: #003d80;
  --nav-bg-top: #ffffff;
  --nav-bg-bottom: #f1f3f5;
  --accent: #1b5fa7;
  --accent-soft: #e8f1fb;
  --recent-bg: #dceefe;
  --recent-text: #0f518d;
  --shadow: 0 8px 24px rgba(20, 32, 45, 0.08);
  --radius: 12px;
  --content-width: 940px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --focus-ring: 0 0 0 3px rgba(27, 95, 167, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.62;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  margin: var(--space-2);
  background: var(--card);
  color: var(--link);
  border-radius: 6px;
  box-shadow: var(--shadow);
  z-index: 100;
}

.skip-link:focus-visible {
  outline: 2px solid var(--accent);
  box-shadow: var(--shadow);
}

a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.site-nav a:focus-visible {
  border-radius: 10px 10px 0 0;
}

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

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

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

.page-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

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

.tabbed-view {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card);
  overflow: hidden;
}

.tabbed-view .content-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.site-nav {
  margin: 0;
  background: linear-gradient(to bottom, var(--nav-bg-top), var(--nav-bg-bottom));
  border: none;
  border-bottom: 1px solid var(--card-border);
  border-radius: 0;
  box-shadow: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: flex-end;
}

.site-nav a {
  display: block;
  padding: 0.55rem 1rem 0.65rem;
  border-radius: 10px 10px 0 0;
  margin-bottom: -1px;
  border: 1px solid transparent;
  border-bottom: none;
  color: #4e5b68;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus {
  background: rgba(27, 95, 167, 0.1);
  text-decoration: none;
}

.site-nav a.active {
  background: var(--card);
  color: var(--accent);
  font-weight: 700;
  border-color: var(--card-border);
  border-bottom: 1px solid var(--card);
  box-shadow: none;
}

.site-footer-nav {
  margin-top: var(--space-3);
  text-align: center;
  font-size: 0.92rem;
}

.site-footer-nav a {
  font-weight: 500;
}

.about-me-section .about-heading,
.about-me-section .contact-heading {
  font-size: 1.35rem;
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid #e8edf2;
}

.about-me-section .about-heading {
  margin-top: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
  gap: var(--space-6);
  align-items: start;
}

.about-text {
  min-width: 0;
}

.about-photo {
  min-width: 0;
}

.about-photo img {
  width: 100%;
  max-width: 280px;
  height: auto;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.4rem;
  background: #fafbfc;
}

.contact-block {
  font-style: normal;
  line-height: 1.7;
}

.research-tab-panels {
  padding-top: var(--space-4);
}

.content-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-6);
  overflow-wrap: break-word;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.site-header h1 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
  line-height: 1.2;
}

.site-header .subtitle {
  color: var(--muted);
  margin: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: var(--space-6);
  align-items: start;
  margin-bottom: var(--space-6);
}

.hero-copy {
  min-width: 0;
}

.hero-copy p:first-child {
  margin-top: 0;
}

.hero-image {
  min-width: 0;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.4rem;
  background: #fafbfc;
}

.hero-image img {
  width: 100%;
  max-width: 230px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.fact-box {
  background: #fafbfd;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1rem;
}

.fact-box .fact-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.fact-box .fact-value {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.section {
  margin-top: var(--space-6);
}

.section:first-child {
  margin-top: 0;
}

.section h2 {
  margin: 0 0 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #e8edf2;
  font-size: 1.35rem;
}

.section h3 {
  margin: 1.4rem 0 0.6rem;
  font-size: 1.05rem;
}

.lede {
  color: var(--muted);
  margin-top: 0;
}

.plain-list,
.entry-list,
.pub-list {
  padding-left: 1.2rem;
}

.entry-list li,
.plain-list li,
.pub-list li {
  margin-bottom: 0.7rem;
}

.pub-title,
.item-title {
  font-weight: 600;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.pub-links {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.pub-links .pub-link {
  white-space: nowrap;
}

.recent {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--recent-bg);
  color: var(--recent-text);
  vertical-align: middle;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.65rem;
}

th,
td {
  border: 1px solid #dde3e8;
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f4f7fa;
  font-weight: 700;
}

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

.two-column > div {
  min-width: 0;
}

.site-footer {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--card-border);
}

.site-footer-note {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-note {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.small-note {
  color: var(--muted);
  font-size: 0.9rem;
}

code {
  background: #f4f7fa;
  padding: 0.08rem 0.3rem;
  border-radius: 4px;
}

@media (max-width: 800px) {
  .content-card {
    padding: 1.4rem;
  }

  .hero,
  .site-header,
  .two-column,
  .quick-facts,
  .about-grid {
    grid-template-columns: 1fr;
  }
}

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