:root {
  --paper: #fffcf0;
  --ink: #100f0f;
  --muted: #6f6e69;
  --line: #e6e4d9;
  --blue: #205ea6;

  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 28px;
}

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

a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

::selection {
  color: var(--paper);
  background: var(--ink);
}

.site-header,
main {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: flex-end;
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}

.site-header nav {
  display: flex;
  gap: 18px;
  font-weight: 400;
}

.site-header nav a {
  color: var(--ink);
  text-decoration: none;
}

.intro {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 64px 0;
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 38%;
  filter: saturate(0.8) contrast(1.04);
}

.copy p {
  margin: 0 0 1em;
  font-size: 1.125rem;
  line-height: 1.55;
}

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

.bookshelf h1 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
}

.bookshelf {
  padding: 56px 0;
}

ol {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: books;
}

li {
  counter-increment: books;
  border-top: 1px solid var(--line);
}

li:last-child { border-bottom: 1px solid var(--line); }

li a {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 20px 0;
  color: var(--ink);
  text-decoration: none;
}

li a::before {
  content: "0" counter(books);
  font-size: 0.75rem;
}

li a span:first-child {
  font-size: 1rem;
  line-height: 1.4;
}

li a span:last-child {
  font-size: 0.875rem;
  color: var(--muted);
}

@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 3px; }

  .site-header nav a:hover { opacity: 0.6; }

  li a:hover span:first-child {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 0.14em;
  }
}

@media (max-width: 760px) {
  body { padding: 0 16px; }

  .intro {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 0;
  }

  .portrait { width: min(200px, 100%); }

  li a { grid-template-columns: 2rem 1fr; }

  li a span:last-child { grid-column: 2; }
}
