:root {
  color-scheme: light;
  --background: #fbfaf7;
  --text: #1f2428;
  --muted: #687076;
  --line: #d8d3ca;
  --accent: #0f6b5f;
  --accent-dark: #0a4f47;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

html {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  line-height: 1.55;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
}

.site-title {
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

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

nav a:hover {
  color: var(--text);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
}

.icon-link svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

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

.intro,
.about,
.professional-work,
.papers {
  margin-bottom: 4rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 0.4rem;
  font-size: 1.45rem;
  line-height: 1.15;
}

p {
  font-size: 1.08rem;
}

.intro p:not(.eyebrow),
.article-page p {
  max-width: 62ch;
}

.post-list-item {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.paper {
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.work-item {
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.work-item h3 {
  max-width: 30ch;
}

.work-item p {
  margin-bottom: 0.5rem;
}

.work-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.work-metrics li {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.2;
}

.work-metrics strong {
  font-weight: 700;
}

.paper h3 {
  max-width: 30ch;
}

.paper-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.paper-heading h3 {
  margin-bottom: 0.4rem;
}

.paper-link {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.9rem;
  text-align: center;
  text-decoration: none;
}

.paper-link:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.paper p {
  margin-bottom: 0.5rem;
}

.paper-meta,
.work-meta {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

.post-list-item time,
.article-header time {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

.article-page {
  padding-top: 3rem;
}

.article-header {
  margin-bottom: 2rem;
}

.article-header h1 {
  max-width: 14ch;
}

.article-page h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

figure {
  margin: 2rem 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: #ffffff;
}

hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 520px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page {
    padding-top: 3rem;
  }
}
