:root {
  --paper: #ffffff;
  --ink: #202020;
  --muted: #66645f;
  --line: #d8d6cf;
  --link: #16676e;
  --warm: #fffbe8;
  --warm-line: #d9ce77;
  --measure: 58rem;
  --page-pad: clamp(1.1rem, 4vw, 2rem);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 400; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .55rem .8rem;
  background: var(--ink);
  color: white;
  font: .8rem var(--sans);
}
.skip-link:focus { top: 1rem; }

.site-header {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem var(--page-pad) .85rem;
  border-bottom: 1px solid var(--line);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
}
.site-nav a {
  color: #444;
  font: .72rem/1.5 var(--sans);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a.active { color: var(--link); text-decoration: underline; text-underline-offset: .18em; }

main { margin: 0; }
.section {
  position: relative;
  max-width: var(--measure);
  min-height: 0;
  margin: 0 auto;
  padding: 2.5rem var(--page-pad);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 1rem;
}
.section-number { display: none; }
.section-heading { margin-bottom: 1.3rem; }

h1 {
  margin: .05rem 0 .6rem;
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1;
  letter-spacing: -.035em;
}
h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.55rem, 3.3vw, 2rem);
  line-height: 1.15;
}
h3 {
  margin-bottom: .3rem;
  font-size: 1.08rem;
  line-height: 1.25;
}
.section-heading > p {
  max-width: 43rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}
.eyebrow,
.book-type {
  margin-bottom: .55rem;
  color: #7b3430;
  font: 600 .67rem/1.4 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.text-link {
  display: inline;
  border-bottom: 1px solid currentColor;
  color: var(--link);
  font: .82rem/1.5 var(--sans);
  text-decoration: none;
}
.text-link:hover { color: #93413a; }
.text-link.compact { font-size: .78rem; }
.book-link {
  border-bottom: 1px solid currentColor;
  color: var(--link);
  text-decoration: none;
  white-space: nowrap;
}
.book-link:hover { color: #93413a; }
.byline,
.appearance-meta {
  margin-bottom: .4rem;
  color: var(--muted);
  font: .76rem/1.5 var(--sans);
}

.profile-section { padding-top: 2rem; }
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem;
  gap: 2rem;
  align-items: start;
}
.profile-contact {
  margin-bottom: 1.45rem;
  color: var(--muted);
  font: .78rem/1.5 var(--sans);
}
.profile-contact a { text-underline-offset: .18em; }
.lead-prose {
  max-width: 43rem;
  font-size: 1.02rem;
  line-height: 1.56;
}
.lead-prose p { margin-bottom: 1rem; }
.lead-prose a { text-decoration-color: var(--link); text-underline-offset: .15em; }
.profile-portrait { margin: 2.2rem 0 0; }
.profile-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.philosophy-block {
  margin: 1.6rem 0 1.3rem;
  padding: 1.15rem 0 1.25rem;
  border-block: 1px solid var(--line);
}
.philosophy-block h2 { margin-bottom: .7rem; font-size: 1.35rem; }
.philosophy-block p { margin-bottom: .7rem; font-size: .94rem; }
.philosophy-block .counseling-contact {
  margin-bottom: 0;
  color: var(--muted);
  font: .78rem/1.55 var(--sans);
}
.counseling-contact a { color: var(--link); text-underline-offset: .16em; }

.substack-section {
  margin-block: 2rem;
  padding: 0 var(--page-pad);
  border-bottom: 0;
}
.substack-lockup {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--warm-line);
  background: var(--warm);
}
.substack-lockup h2 { margin-bottom: .55rem; font-size: 1.55rem; }
.substack-lockup > p:not(.eyebrow) { max-width: 42rem; margin-bottom: .7rem; }

.entry-list,
.appearance-list,
.resource-list { border-top: 1px solid #8f8d87; }
.entry {
  display: grid;
  grid-template-columns: minmax(11rem, .75fr) minmax(0, 1.25fr) auto;
  gap: 1.2rem;
  align-items: baseline;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.entry h3,
.entry p { margin: 0; }
.entry p { color: var(--muted); font-size: .88rem; }
.entry > span { color: var(--link); }
.entry:hover h3 { color: var(--link); text-decoration: underline; }
.section-end-link { display: inline-block; margin-top: 1rem; }

.book-list,
.medical-book-grid,
.medicine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  border-top: 1px solid #8f8d87;
}
.book,
.medical-book-grid article,
.medicine-grid article {
  min-height: 0;
  padding: 1rem 0 1.15rem;
  border-bottom: 1px solid var(--line);
}
.book h3,
.medicine-grid h3 { max-width: 29rem; }
.book > p:not(.book-type):not(.byline),
.medical-book-grid p,
.medicine-grid p {
  margin-bottom: .55rem;
  color: var(--muted);
  font-size: .88rem;
}
.book-featured { background: transparent; color: var(--ink); }
.medical-books { margin-top: 2rem; }

.appearance {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.appearance h3 { margin-bottom: .35rem; }
.appearance p { max-width: 46rem; margin-bottom: .35rem; color: var(--muted); font-size: .88rem; }
.appearance .appearance-meta { color: var(--muted); }
.link-pending {
  align-self: end;
  color: #8c8981;
  font: .72rem var(--sans);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.photo { margin: 0; }
.photo-wide { grid-column: 1 / -1; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-wide img { aspect-ratio: 16 / 7; }
.photo figcaption { padding-top: .35rem; color: var(--muted); font: .7rem var(--sans); }

.resource {
  display: grid;
  grid-template-columns: minmax(10rem, .65fr) minmax(0, 1.15fr) minmax(9rem, .55fr);
  gap: 1.25rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.resource h3,
.resource p { margin-bottom: 0; }
.resource p { color: var(--muted); font-size: .88rem; }

.site-footer {
  padding-top: 2.5rem;
  border-bottom: 0;
  background: var(--paper);
  color: var(--ink);
}
.site-footer h2 { margin-bottom: .7rem; }
.email-link { display: inline-block; margin-bottom: 1.6rem; font-size: 1.3rem; text-underline-offset: .16em; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.footer-links a { color: var(--link); font: .78rem var(--sans); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  color: var(--muted);
  font: .72rem var(--sans);
}
.footer-bottom a { color: var(--link); text-decoration: none; }

@media (max-width: 700px) {
  .site-header { padding-top: .8rem; }
  .site-nav { gap: .2rem .75rem; }
  .site-nav a { font-size: .68rem; }
  .section { padding-block: 2rem; }
  .profile-grid { grid-template-columns: 1fr; gap: .5rem; }
  .profile-copy { display: contents; }
  .profile-copy .eyebrow { order: 1; }
  .profile-copy h1 { order: 2; }
  .profile-contact { order: 3; }
  .profile-portrait { order: 4; width: min(42vw, 10rem); margin: .4rem 0 1rem; }
  .lead-prose { order: 5; }
  .philosophy-block { order: 6; }
  .profile-copy > .text-link { order: 7; width: max-content; }
  .substack-section { margin-block: 1.25rem; padding-block: 0; }
  .entry { grid-template-columns: 1fr auto; gap: .25rem .8rem; }
  .entry p { grid-column: 1; }
  .entry > span { grid-column: 2; grid-row: 1; }
  .book-list,
  .medical-book-grid,
  .medicine-grid,
  .photo-grid { grid-template-columns: 1fr; }
  .appearance { grid-template-columns: 1fr; gap: .45rem; }
  .photo-wide { grid-column: auto; }
  .photo-wide img,
  .photo img { aspect-ratio: 4 / 3; }
  .resource { grid-template-columns: 1fr; gap: .35rem; }
  .footer-bottom { flex-direction: column; gap: .7rem; }
}

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