:root {
  --paper: #fff;
  --ink: #0d0d0d;
  --muted: #5e5e5e;
  --faint: #888;
  --line: #d9d9d9;
  --gutter: clamp(20px, 6vw, 96px);
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(14px, 0.3vw + 11px, 16px);
  line-height: 1.5;
}

body {
  min-height: 100vh;
}

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

.citation:hover .c-title,
.essay-row:hover .essay-title,
.footer a:hover,
.home .hero p:not(.home-contact) a,
.home li a:hover .essay-title,
.home-all:hover,
.home-contact a:hover,
.link-list a:hover,
.nav-link:hover,
.page-intro a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-main {
  flex: 1 1 auto;
}

.home h1 {
  font-size: 1.7em;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
}

.home h2 {
  font-size: 1em;
  font-weight: 600;
  margin: 0 0 0.75em;
}

.home {
  display: grid;
  align-content: start;
  column-gap: clamp(32px, 4vw, 80px);
  grid-template-columns: minmax(0, 46ch) minmax(0, 56ch) minmax(0, 42ch);
  justify-content: space-between;
  min-height: 100dvh;
  padding: clamp(28px, 12vh, 120px) var(--gutter) clamp(20px, 5vh, 56px);
  row-gap: clamp(24px, 3.4vw, 56px);
}

.home > * {
  border-top: 1px solid var(--ink);
  min-width: 0;
  padding-top: 0.9em;
}

.home p,
.home ul {
  margin: 0;
  padding: 0;
}

.home-talks + h2 {
  margin-top: 1.7em;
}

.home .hero {
  display: flex;
  flex-direction: column;
  gap: 0.9em;
}

.home-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 1.1em;
}

.home-contact a {
  color: var(--muted);
}

.home ul {
  display: grid;
  gap: 0.62em;
  list-style: none;
}

.home li a,
.home-item {
  display: block;
  line-height: 1.3;
}

.home-last ul + h2 {
  margin-top: 1.7em;
}

.home-all {
  display: inline-block;
  font-style: italic;
  margin-top: 0.9em;
}

.home-last li a .essay-title::after,
.home-all::after {
  background-color: var(--faint);
  content: "";
  display: inline-block;
  height: 0.78em;
  margin-left: 0.22em;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='square' stroke-linejoin='miter' d='M4.2 11.8 11.8 4.2M7 4.2h4.8V9'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='square' stroke-linejoin='miter' d='M4.2 11.8 11.8 4.2M7 4.2h4.8V9'/%3E%3C/svg%3E")
    center / contain no-repeat;
  vertical-align: -0.08em;
  width: 0.78em;
}

.essay-title {
  font-weight: 500;
}

.home-note {
  color: var(--muted);
  display: block;
  font-size: 0.9em;
  line-height: 1.35;
  margin-top: 0.1em;
}

.page-head {
  border-bottom: 1px solid var(--ink);
  margin-bottom: 1.4em;
  max-width: calc(72ch + var(--gutter) * 2);
  padding: 2.2em var(--gutter) 1.8em;
}

.page-title {
  font-size: 1.7em;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

.page-intro {
  color: var(--muted);
  margin: 0;
  max-width: 58ch;
}

.page-intro + .page-intro {
  margin-top: 0.6em;
}

.page-head .home-contact {
  margin-top: 0.9em;
}

.tag-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.6em;
}

.tag-chip {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9em;
  padding: 4px 10px;
}

.tag-chip:hover {
  color: var(--ink);
}

.tag-chip.active,
.tag-chip:hover {
  border-color: var(--ink);
}

.tag-chip.active {
  background: var(--ink);
  color: var(--paper);
}

.books-grid {
  display: grid;
  gap: 1.2em 2em;
  grid-template-columns: 1fr 1fr;
}

a.book-tile {
  display: block;
}

a.book-tile:hover .t {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.music-facts {
  grid-template-columns: 1fr 1fr 1fr;
  margin-bottom: 2.2em;
}

.songs-title {
  border-top: 1px solid var(--ink);
  padding-top: 0.9em;
}

.art-page {
  --paper: #fff;
  background: #fff;
}

.sketch-columns {
  align-items: start;
  display: grid;
  gap: 1.2em;
  grid-template-columns: 1fr 1fr;
}

.sketch-col {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  min-width: 0;
}

.sketch {
  background: none;
  border: 0;
  cursor: zoom-in;
  display: block;
  padding: 0;
  width: 100%;
}

.sketch img {
  border: 1px solid #000;
  box-sizing: border-box;
  display: block;
  height: auto;
  width: 100%;
}

.lightbox {
  align-items: center;
  background: rgba(13, 13, 13, 0.92);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 20;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}


.book-tile .t {
  font-weight: 500;
}

.song-title {
  align-items: baseline;
  display: flex;
  gap: 0.8em;
  justify-content: space-between;
}

.play {
  align-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  flex: none;
  height: 1.45em;
  justify-content: center;
  line-height: 0;
  padding: 0;
  width: 1.45em;
}

.play svg {
  display: block;
  height: 0.62em;
  width: 0.62em;
}

.play:hover {
  border-color: var(--ink);
}

.book-tile .a,
.book-tile .tag {
  color: var(--muted);
  font-size: 0.9em;
  margin-top: 0.1em;
}

.book-tile .tag {
  color: var(--faint);
}

.book-tile[hidden] {
  display: none;
}

@media (max-width: 540px) {
  .books-grid,
  .music-facts {
    grid-template-columns: 1fr;
  }
}

.subpage {
  max-width: calc(72ch + var(--gutter) * 2);
  padding: 0 var(--gutter) 3em;
}

.back-link {
  color: var(--muted);
  display: inline-block;
  font-size: 0.9em;
  margin-bottom: 1.5em;
}

.back-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.col {
  max-width: calc(72ch + var(--gutter) * 2);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.col .page-head {
  max-width: none;
  padding: 2.2em 0 1.8em;
}

.nav-inner {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 1.1em;
  padding-top: clamp(20px, 5vh, 56px);
}

.brand {
  font-weight: 600;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 1.1em;
}

.nav-link {
  color: var(--muted);
}

.nav-link.active {
  color: var(--ink);
}

h2.section-title {
  font-size: 1em;
  font-weight: 600;
  margin: 2.2em 0 0.75em;
}

h2.section-title.section-title-first {
  margin-top: 0;
}

.essay-row {
  border-bottom: 1px solid var(--line);
  column-gap: 2ch;
  display: grid;
  grid-template-columns: 15ch 1fr;
  line-height: 1.3;
  padding: 0.55em 0;
}

.work-list .essay-row {
  grid-template-columns: 22ch 1fr;
}

.essay-row .essay-date {
  font-variant-numeric: tabular-nums;
  grid-column: 1;
  grid-row: 1 / span 2;
}

.essay-row .essay-excerpt,
.essay-row .essay-title {
  grid-column: 2;
}

.essay-date,
.essay-excerpt,
.c-venue {
  color: var(--muted);
  display: block;
  font-size: 0.9em;
  line-height: 1.35;
  margin-top: 0.1em;
}

.essay-row .essay-date {
  margin-top: 0;
}

.c-title,
.essay-title {
  font-weight: 500;
}

.citation {
  border-bottom: 1px solid var(--line);
  display: block;
  line-height: 1.3;
  padding: 0.55em 0;
}

.link-list,
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li,
.plain-list li {
  padding: 0.31em 0;
}

.footer {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9em;
  gap: 0.2em 1.6em;
  margin-top: 4em;
  padding-bottom: 2.5em;
}

.footer a {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 1.1em;
}

@media (max-width: 620px) {
  .essay-row,
  .work-list .essay-row {
    display: block;
  }

  .essay-row .essay-date {
    margin-bottom: 0.15em;
  }
}

@media (max-width: 1000px) {
  .home {
    align-content: start;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    row-gap: 1.6em;
  }

  .home .hero {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .home {
    grid-template-columns: 1fr;
    padding-block: 18px;
    row-gap: 1.2em;
  }

  .home .home-note,
  .home-talks {
    display: none;
  }

  .home-talks + h2 {
    margin-top: 0;
  }

  .home ul {
    gap: 0.42em;
  }

  .home h2 {
    margin-bottom: 0.45em;
  }

  .home-all {
    margin-top: 0.5em;
  }
}