:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #202124;
  --muted: #656b70;
  --line: #d9d3c7;
  --accent: #2c6b5a;
  --accent-strong: #1f4f42;
  --warm: #8a4b3c;
  --code: #f1eee8;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

body {
  margin: 0;
}

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

a:hover {
  color: var(--warm);
}

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

h1,
h2,
h3 {
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.18;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: var(--surface);
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.94);
}

.site-header__inner,
.page-shell,
.site-footer {
  width: min(100% - 2rem, 980px);
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4rem;
}

.site-title {
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent-strong);
}

.home {
  padding: 3rem 0 4rem;
}

.home-intro {
  margin-bottom: 3rem;
}

.intro-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
}

.intro-stacked {
  display: grid;
  justify-items: center;
  gap: 1.75rem;
}

.portrait {
  overflow: hidden;
}

.portrait-large {
  width: min(100%, 460px);
}

.kicker,
.eyebrow,
.meta,
.site-footer {
  color: var(--muted);
  font-size: 0.92rem;
}

.kicker,
.eyebrow {
  margin-bottom: 0.45rem;
  color: var(--warm);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-intro h1 {
  font-size: clamp(2.2rem, 8vw, 4rem);
  margin-bottom: 1rem;
}

.intro-copy {
  max-width: 42rem;
  font-size: 1.08rem;
}

.intro-stacked .intro-copy {
  max-width: 760px;
}

.section-block {
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: 1.7rem;
}

.entry-list {
  display: grid;
  gap: 1rem;
}

.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.entry:first-child {
  border-top: 0;
}

.entry h2,
.entry h3 {
  margin-bottom: 0.25rem;
  font-size: 1.22rem;
}

.entry h2 a,
.entry h3 a {
  color: var(--ink);
  text-decoration: none;
}

.entry h2 a:hover,
.entry h3 a:hover {
  color: var(--accent-strong);
}

.entry p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.entry time {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.page {
  padding: 3rem 0 4rem;
}

.page-header {
  max-width: 760px;
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 7vw, 3.4rem);
}

.prose {
  max-width: 760px;
}

.prose h1 {
  font-size: 1.75rem;
}

.prose h2 {
  margin: 2rem 0 0.7rem;
  font-size: 1.55rem;
}

.prose h3 {
  margin: 1.5rem 0 0.55rem;
  font-size: 1.25rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin: 0.45rem 0;
}

.prose pre {
  overflow-x: auto;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--code);
  font-size: 0.9rem;
  line-height: 1.45;
}

.prose code {
  border-radius: 4px;
  background: var(--code);
  padding: 0.05rem 0.22rem;
  font-size: 0.9em;
}

.prose pre code {
  background: transparent;
  padding: 0;
}

.legacy-figure {
  margin: 1.5rem 0;
}

.prose img {
  margin: 1.5rem auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legacy-figure img,
.prose p[align="center"] img {
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.publication-list {
  padding-left: 1.2rem;
}

.publication-list li {
  margin-bottom: 0.9rem;
}

.timeline-list {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

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

.timeline-date {
  margin: 0;
  color: var(--warm);
  font-size: 0.92rem;
  font-weight: 700;
}

.timeline-item h3 {
  margin-top: 0;
}

.timeline-item p:last-child {
  margin-bottom: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li,
.tag-list a {
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.tag-list li {
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.tag-list.compact {
  margin-top: 0.55rem;
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 700px) {
  html {
    font-size: 17px;
  }

  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.9rem 0;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .intro-grid,
  .entry,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .portrait:not(.portrait-large) {
    width: min(100%, 260px);
  }

  .entry time {
    white-space: normal;
  }
}
