:root {
  color-scheme: light;
  --text: #111;
  --muted: #555;
  --subtle: #777;
  --line: #e5e5e5;
  --paper: #fff;
  --panel: #fafafa;
  --panel-strong: #f4f4f4;
  --accent: #111;
  --accent-cool: #111;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body-serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --text: #f2f2f2;
  --muted: #b7b7b7;
  --subtle: #929292;
  --line: #303030;
  --paper: #0d0d0d;
  --panel: #151515;
  --panel-strong: #1d1d1d;
  --accent: #fff;
  --accent-cool: #fff;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 21px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: var(--body-serif);
  font-size: 1rem;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-cool);
  text-decoration: none;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration: underline;
}

p,
ul,
ol,
figure {
  margin: 0;
}

b,
strong {
  font-weight: 650;
}

.page-shell {
  width: min(100% - 48px, 980px);
  margin: 0 auto;
  padding: 70px 0 46px;
}

.theme-toggle {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  font: 1rem/1 var(--sans);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--text);
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px 70px;
  align-items: start;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.profile-main {
  align-self: center;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3.25rem, 6vw, 5.1rem);
}

h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 1.62rem;
}

h2::after {
  width: 44px;
  height: 1px;
  background: var(--line);
  content: "";
}

h3 {
  font-size: 1.16rem;
}

.name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}

.name-line span {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.34rem;
}

.profile-tagline {
  margin-top: 22px;
  margin-bottom: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.22rem;
}

.profile-intro {
  grid-column: 1 / -1;
}

.lead {
  max-width: none;
  color: var(--text);
  font-size: 1.06rem;
}

.connect-note {
  max-width: none;
  margin-top: 22px;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.55;
}

.connect-note strong {
  font-weight: 700;
}

.portrait {
  width: 320px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 34% 56%;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--subtle);
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.4;
}

.link-row a {
  color: var(--muted);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 38%, transparent);
  text-decoration: none;
}

.link-row a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
  text-decoration: none;
}

.section {
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}

.section.compact p + p {
  margin-top: 12px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 0;
}

.section-head > a {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
}

.news-panel {
  max-height: 320px;
  overflow-y: auto;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  scrollbar-color: var(--subtle) transparent;
  scrollbar-width: thin;
}

.news-panel:focus {
  outline: 2px solid color-mix(in srgb, var(--text) 18%, transparent);
  outline-offset: 2px;
}

.news-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.news-list li,
.plain-list li {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 24px;
}

.news-list time,
.when {
  color: var(--subtle);
  font-family: var(--serif);
  font-size: 0.96rem;
  white-space: nowrap;
}

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

.publication {
  position: relative;
  padding-left: 18px;
}

.publication::before {
  position: absolute;
  top: 0.5rem;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #c8b9aa;
  content: "";
}

.publication.selected::before {
  background: var(--accent);
}

.publication h3 {
  margin-bottom: 7px;
  color: var(--text);
}

.publication p {
  margin: 0;
}

.authors {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.58;
}

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

.note-strong {
  color: var(--text);
  font-weight: 650;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 7px;
  font-family: var(--sans);
  font-size: 0.92rem;
}

.pub-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--accent-cool);
}

.plain-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.experience-list {
  display: grid;
  gap: 14px;
}

.experience-item {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 30px;
  padding: 19px 0;
  border-top: 1px solid var(--line);
}

.experience-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.experience-item time {
  color: var(--subtle);
  font-family: var(--serif);
  font-size: 0.96rem;
  white-space: nowrap;
}

.experience-item h3 {
  margin-bottom: 3px;
  font-family: var(--sans);
  font-size: 1.04rem;
  font-weight: 650;
  line-height: 1.35;
}

.experience-place {
  color: var(--text);
}

.experience-meta {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 24px;
  color: var(--subtle);
  font-family: var(--sans);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  html {
    font-size: 18px;
  }

  .page-shell {
    width: min(100% - 30px, 980px);
    padding-top: 34px;
  }

  .theme-toggle {
    top: 14px;
    right: 14px;
  }

  .profile {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 34px;
  }

  .portrait {
    order: -1;
    width: min(230px, 66vw);
  }

  .profile-intro {
    grid-column: auto;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 3.5rem);
  }

  .section {
    padding: 30px 0;
  }

  .section-head {
    display: block;
  }

  .section-head > a {
    display: inline-block;
    margin-top: 4px;
  }

  .news-list li,
  .plain-list li {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
