:root {
  color-scheme: light;
  --background: #f7f6f2;
  --text: #171715;
  --muted: #686760;
  --line: #d8d6ce;
  --link: #171715;
  --measure: 48rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  padding: 0.5rem 0.75rem;
  background: var(--text);
  color: var(--background);
  transform: translateY(-150%);
}

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

.site-header,
.site-footer,
main {
  width: min(calc(100% - 2.5rem), var(--measure));
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.site-name {
  font-weight: 650;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.site-header nav a,
.site-footer a {
  color: var(--muted);
}

main {
  min-height: 70vh;
}

.publications,
.about,
.post {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 13ch;
  margin-bottom: clamp(2.5rem, 6vw, 4.75rem);
  font-size: clamp(2.75rem, 9vw, 5.75rem);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

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

.post-item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.post-item time,
.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.post-item h2 {
  margin-bottom: 0.5rem;
}

.post-item h2 a {
  text-decoration: none;
}

.post-item h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.post-item p {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--muted);
}

.about {
  border-top: 1px solid var(--line);
}

.about h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 6vw, 3.75rem);
}

.about-summary {
  max-width: 39rem;
  margin-bottom: 0;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  line-height: 1.45;
}

.about-details {
  max-width: 42rem;
  margin-top: 2.5rem;
}

.about-details p:last-child {
  margin-bottom: 0;
}

.about-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(12rem, 0.9fr);
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.about-columns h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.3;
}

.plain-list {
  margin: 0;
  padding-left: 1.1rem;
}

.plain-list li + li {
  margin-top: 0.45rem;
}

.post-header {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.post-header h1 {
  margin-bottom: 1.5rem;
}

.post-description {
  max-width: 40rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  line-height: 1.45;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0;
}

.post-body {
  max-width: 42rem;
  padding-top: 2.5rem;
}

.post-body h2 {
  margin-top: 2.75rem;
}

.post-body p,
.post-body ol,
.post-body ul {
  margin-bottom: 1.35rem;
}

.post-body li + li {
  margin-top: 0.4rem;
}

.post-back {
  padding-block: 0 4rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 38rem) {
  body {
    font-size: 1rem;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .post-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .about-columns {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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