:root {
  color-scheme: light;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #fbfbf9;
  color: #181816;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 3px solid #181816;
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  background: #181816;
  color: #fbfbf9;
  transform: translateY(-180%);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  width: min(calc(100% - 3rem), 1440px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.site-header,
.site-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header {
  min-height: 5.5rem;
}

.wordmark {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  list-style: none;
}

.site-nav a,
.search-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #74746e;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.search-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
  color: #181816;
}

.site-nav a[aria-current="page"]::before {
  content: "■";
  font-size: 0.42rem;
}

.search-control {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.site-search-panel {
  position: relative;
  z-index: 20;
  width: 0;
  background: #fbfbf9;
  transition: width 160ms ease;
}

.search-control.is-open .site-search-panel {
  width: min(340px, 32vw);
}

.site-search-form {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  border-bottom: 1px solid #181816;
}

.site-search-form[hidden],
.search-results[hidden] {
  display: none;
}

.site-search-input {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: #181816;
  font: inherit;
}

.site-search-input::placeholder {
  color: #74746e;
}

.search-close {
  width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #74746e;
  cursor: pointer;
  font: 400 1.3rem/1 inherit;
}

.site-search-input:focus,
.search-close:focus,
.search-toggle:focus {
  outline: 0;
}

.search-close:focus-visible,
.search-toggle:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.search-results {
  position: absolute;
  top: 44px;
  right: 0;
  left: 0;
  max-height: min(420px, calc(100vh - 7rem));
  overflow-y: auto;
  border-bottom: 1px solid #181816;
  background: #fbfbf9;
}

.search-status {
  margin: 0;
  padding: 0.8rem;
  color: #74746e;
  font-size: 0.75rem;
}

.search-results-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-result-link {
  padding: 0.8rem;
  display: grid;
  gap: 0.2rem;
  border-top: 1px solid #d7d7d1;
  text-decoration: none;
}

.search-result-link:hover .search-result-title {
  text-decoration: underline;
}

.search-result-title {
  color: #181816;
  font-size: 0.9rem;
}

.search-result-summary {
  color: #74746e;
  font-size: 0.74rem;
  line-height: 1.45;
}

.site-main {
  min-width: 0;
  padding: clamp(4.5rem, 8vw, 8rem) 0 clamp(5rem, 10vw, 9rem);
}

.eyebrow,
.section-label {
  margin: 0 0 1.25rem;
  color: #74746e;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 1060px;
  margin-bottom: 0;
  font-size: clamp(4rem, 10vw, 9.25rem);
  font-weight: 400;
  letter-spacing: -0.068em;
  line-height: 0.86;
}

.home-stage {
  min-height: clamp(360px, 38vw, 520px);
  display: grid;
  grid-template-columns: 1.5fr 0.5fr;
  align-items: end;
  gap: 2rem;
}

.title-descender {
  position: relative;
  z-index: 1;
}

.home-intro {
  max-width: 390px;
  margin-bottom: 0.4rem;
  color: #5f5f59;
}

.home-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
  gap: clamp(3rem, 9vw, 9rem);
}

.route-index,
.contact-block,
.thought-index {
  border-top: 1px solid #d7d7d1;
}

.route-index .section-label,
.contact-block .section-label,
.thought-index .section-label {
  padding-top: 1rem;
}

.index-row {
  min-height: 94px;
  display: grid;
  grid-template-columns: 54px minmax(90px, 0.5fr) minmax(0, 1fr) 20px;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #d7d7d1;
  text-decoration: none;
}

.index-row:hover .index-title {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.index-number,
.index-note,
.empty-row span {
  color: #74746e;
  font-size: 0.78rem;
}

.index-title {
  font-size: 1.15rem;
}

.contact-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-block li {
  border-bottom: 1px solid #d7d7d1;
}

.contact-block li a {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
}

.contact-block li a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.email-address {
  margin-top: 1rem;
  display: inline-block;
  color: #74746e;
  font-size: 0.78rem;
}

.page-heading {
  max-width: 1120px;
}

.about-page,
.thoughts-page {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: clamp(4rem, 9vw, 9rem);
}

.thoughts-page {
  padding-top: clamp(3.5rem, 5vw, 5rem);
  align-content: start;
  row-gap: clamp(2rem, 4vw, 4rem);
}

.essay-page {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1.65fr);
  gap: clamp(3rem, 9vw, 9rem);
}

.essay-heading {
  grid-column: 1 / -1;
}

.essay-heading h1 {
  max-width: 1220px;
  font-size: clamp(3.8rem, 8vw, 8rem);
}

.essay-meta,
.back-link {
  grid-column: 1;
  color: #74746e;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.essay-body {
  grid-column: 2;
  grid-row: 2 / span 2;
  max-width: 860px;
  font-size: clamp(1.12rem, 1.8vw, 1.36rem);
  line-height: 1.7;
}

.essay-body p {
  margin-bottom: 0;
}

.back-link {
  align-self: end;
  width: fit-content;
  margin-top: 5rem;
  color: #181816;
  text-underline-offset: 0.25em;
}

.about-page .page-heading,
.thoughts-page .page-heading {
  grid-column: 1 / -1;
}

.reading-column {
  grid-column: 2;
  max-width: 650px;
  font-size: clamp(1.12rem, 1.8vw, 1.36rem);
  line-height: 1.7;
}

.about-page .reading-column {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 860px;
  justify-self: end;
}

.reading-column p {
  margin-bottom: 1.55em;
}

.thoughts-intro {
  grid-column: 2;
  max-width: 450px;
  color: #5f5f59;
  font-size: 1rem;
}

.thought-index {
  grid-column: 1 / -1;
  margin-top: clamp(3rem, 8vw, 8rem);
}

.thoughts-page .thought-index {
  margin-top: clamp(1rem, 2vw, 2rem);
}

.essay-body h2,
.essay-body h3,
.essay-body h4,
.essay-body h5,
.essay-body h6 {
  margin: 2.35em 0 0.65em;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.essay-body h2 {
  font-size: 1.5em;
}

.essay-body h3 {
  font-size: 1.2em;
}

.essay-body ul,
.essay-body ol {
  margin: 1.25em 0 0;
  padding-left: 1.25em;
}

.essay-body li + li {
  margin-top: 0.35em;
}

.essay-body blockquote {
  margin: 1.75em 0 0;
  padding-left: 1em;
  border-left: 2px solid #d7d7d1;
  color: #5f5f59;
}

.essay-body pre {
  margin: 1.75em 0 0;
  padding: 1rem;
  overflow-x: auto;
  background: #f0f0ec;
  font-size: 0.82em;
  line-height: 1.55;
}

.essay-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82em;
}

.essay-body :not(pre) > code {
  padding: 0.12em 0.3em;
  background: #f0f0ec;
}

.essay-body hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid #d7d7d1;
}

.essay-body img {
  max-width: 100%;
  height: auto;
  margin-top: 1.5em;
}

.site-footer {
  min-height: 5.5rem;
  border-top: 1px solid #d7d7d1;
  color: #74746e;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer p {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .site-shell {
    width: min(calc(100% - 1.5rem), 1440px);
  }

  .site-header {
    padding: 0.65rem 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .site-nav,
  .site-nav ul {
    width: 100%;
  }

  .site-nav ul {
    position: relative;
    justify-content: space-between;
  }

  .site-nav a {
    padding-right: 0;
    padding-left: 0;
  }

  .search-toggle {
    padding-right: 0;
    padding-left: 0;
  }

  .site-search-panel {
    position: absolute;
    top: 100%;
    right: 0;
  }

  .search-control {
    position: static;
  }

  .search-control.is-open .site-search-panel {
    width: calc(100vw - 1.5rem);
  }

  .site-main {
    padding-top: 5.5rem;
  }

  h1 {
    font-size: clamp(3.35rem, 17vw, 5.4rem);
    overflow-wrap: anywhere;
  }

  .essay-heading h1 {
    font-size: clamp(2.65rem, 12vw, 4rem);
    overflow-wrap: normal;
  }

  .home-stage,
  .home-lower,
  .about-page,
  .thoughts-page,
  .essay-page {
    grid-template-columns: 1fr;
  }

  .home-stage {
    min-height: 480px;
    align-content: space-between;
    align-items: start;
  }

  .home-lower {
    margin-top: 6rem;
  }

  .index-row {
    min-height: 112px;
    grid-template-columns: 40px minmax(0, 1fr) 20px;
  }

  .index-note {
    grid-column: 2;
  }

  .reading-column,
  .thoughts-intro,
  .thought-index,
  .essay-meta,
  .essay-body,
  .back-link {
    grid-column: 1;
    grid-row: auto;
  }

  .essay-body {
    margin-top: 0;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
