:root {
  --text: #1a1a1a;
  --muted: #666;
  --link: #2c3e50;
  --link-hover: #1c2a38;
  --border: #ddd;
  --bg: #fff;
}

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

html {
  font-size: 17px;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

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

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

/* Navigation */

nav {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 52px;
}

.site-name {
  font-size: 1rem;
  color: var(--text);
  font-family: inherit;
  margin-right: auto;
  text-decoration: none;
}

.site-name:hover {
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  font-family: inherit;
}

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

/* Main */

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 5rem;
}

/* Home */

.home-layout {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 3.5rem;
  align-items: start;
}

.home-bio h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.home-bio .position {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.home-bio p {
  margin-bottom: 1rem;
}

.home-sidebar {
  font-size: 0.875rem;
  line-height: 1.65;
  padding-top: 0.15rem;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section p {
  margin: 0 0 0.2rem;
}

.headshot {
  width: 100%;
  max-width: 200px;
  display: block;
  border-radius: 3px;
  margin-bottom: 0.25rem;
}

.label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

/* News */

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

.news-item {
  padding: 0.55rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 3.4rem;
  font-variant-numeric: tabular-nums;
}

/* Section headings */

.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin: 2.75rem 0 1.25rem;
}

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

.subsection-title {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
  margin: 1.75rem 0 0.75rem;
  font-weight: normal;
}

/* Papers */

.paper {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

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

.paper-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
  font-size: 0.975rem;
}

.paper-meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.paper-note {
  font-size: 0.85rem;
  color: #555;
  font-style: italic;
  margin-bottom: 0.3rem;
}

.paper-links {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.paper-links a {
  margin-right: 0.75rem;
}

/* Discussions */

.discussion-year-heading {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--muted);
  margin: 2rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.discussion-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
}

.discussion-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.discussion-item:last-child {
  border-bottom: none;
}

.disc-title {
  font-style: italic;
}

.disc-authors {
  color: var(--muted);
}

.disc-main {
  min-width: 0;
}

.disc-venue {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.disc-link {
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Teaching */

.course {
  margin-bottom: 2.25rem;
}

.course-code {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.course-name {
  font-size: 1rem;
  font-weight: bold;
  margin: 0.15rem 0 0.5rem;
}

.course p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* CV page */

.cv-wrapper {
  max-width: 620px;
}

.cv-wrapper p {
  margin-bottom: 1rem;
}

.cv-download {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--link);
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  border-radius: 3px;
  text-decoration: none;
}

.cv-download:hover {
  background: var(--link-hover);
  text-decoration: none;
  color: #fff;
}

/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
}

/* Responsive */

@media (max-width: 640px) {
  .home-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .site-name {
    display: none;
  }

  .discussion-item {
    flex-direction: column;
    gap: 0.2rem;
  }
}
