:root {
  --paper: #fbf4f5;
  --ink: #161512;
  --muted: #716d66;
  --line: #ded8cc;
  --white: #ffffff;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.36;
}

a {
  color: currentColor;
  text-decoration-color: rgba(22, 21, 18, 0.35);
  text-underline-offset: 0.18em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover,
a:focus-visible {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 3;
  transform: translateY(-200%);
  background: var(--ink);
  color: var(--white);
  padding: 0.45rem 0.7rem;
}

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

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.1rem 1.1rem 2.4rem;
}

.intro {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}

.kicker,
.section-number {
  margin: 0 0 0.38rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(1.85rem, 5vw, 3.3rem);
  line-height: 0.98;
  font-weight: 500;
}

.content-section,
.contact-section {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 1.4rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  position: sticky;
  top: 1rem;
  align-self: start;
}

h2 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.15;
  font-weight: 500;
}

.work-list {
  display: grid;
  gap: 0;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.3fr);
  gap: 0.8rem;
  padding: 0.52rem 0;
  border-top: 1px solid var(--line);
}

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

.books-section .work-item {
  grid-template-columns: 1fr;
  gap: 0.22rem;
}

.books-section .link-list {
  justify-content: flex-start;
  gap: 0;
}

.books-section .link-list li:not(:last-child)::after {
  content: ",";
  color: var(--muted);
  margin-right: 0.35rem;
}

h3 {
  margin: 0 0 0.05rem;
  font-size: 0.92rem;
  line-height: 1.18;
  font-weight: 500;
}

.work-item p,
.contact-section p,
.site-footer p {
  margin: 0;
  color: var(--muted);
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: start;
  gap: 0.22rem 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.7rem;
  line-height: 1.35;
}

.contact-section {
  align-items: start;
}

.contact-content {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.contact-image {
  display: block;
  width: min(100%, 340px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
}

.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.1rem 1.2rem;
  font-size: 0.7rem;
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .intro,
  .content-section,
  .contact-section,
  .work-item {
    grid-template-columns: 1fr;
  }

  .intro {
    padding: 1rem 0;
  }

  h1 {
    font-size: clamp(1.85rem, 12vw, 3rem);
  }

  .section-heading {
    position: static;
  }

  .link-list {
    justify-content: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
