@font-face { font-family: 'Baskervville'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/baskervville-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Baskervville'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/baskervville-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Baskervville'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/baskervville-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/alegreya-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/alegreya-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); }
:root {
  --bg-light-base: #f7f3ea;
  --fg-light-base-body: #2a2220;
  --fg-light-base-heading: #2a2220;
  --fg-light-base-muted: #5c514c;
  --fg-light-base-link: #9b4744;
  --fg-light-base-inverse: #2a2220;
  --bg-light-card: #fdfbf6;
  --fg-light-card-body: #2a2220;
  --fg-light-card-heading: #2a2220;
  --fg-light-card-muted: #5c514c;
  --fg-light-card-link: #9b4744;
  --fg-light-card-inverse: #2a2220;
  --bg-light-elevated: #efe7dc;
  --fg-light-elevated-body: #2a2220;
  --fg-light-elevated-heading: #2a2220;
  --fg-light-elevated-muted: #5c514c;
  --fg-light-elevated-link: #9b4744;
  --fg-light-elevated-inverse: #2a2220;
  --brand-light-accent: #9b4744;
  --brand-light-accent-hover: #7a3533;
  --brand-light-on-accent: #fffaf3;
  --focus-light-ring: #9b4744;
  --border-light-default: #85766b;
  --border-light-subtle: #d9cfc2;
}
.bg-surface-base { background: var(--bg-light-base); --fg-body: var(--fg-light-base-body); --fg-heading: var(--fg-light-base-heading); --fg-muted: var(--fg-light-base-muted); --fg-link: var(--fg-light-base-link); --fg-inverse: var(--fg-light-base-inverse); }
.bg-surface-card { background: var(--bg-light-card); --fg-body: var(--fg-light-card-body); --fg-heading: var(--fg-light-card-heading); --fg-muted: var(--fg-light-card-muted); --fg-link: var(--fg-light-card-link); --fg-inverse: var(--fg-light-card-inverse); }
.bg-surface-elevated { background: var(--bg-light-elevated); --fg-body: var(--fg-light-elevated-body); --fg-heading: var(--fg-light-elevated-heading); --fg-muted: var(--fg-light-elevated-muted); --fg-link: var(--fg-light-elevated-link); --fg-inverse: var(--fg-light-elevated-inverse); }
.text-role-body { color: var(--fg-body); overflow-wrap: anywhere; }
.text-role-heading { color: var(--fg-heading); overflow-wrap: anywhere; }
.text-role-muted { color: var(--fg-muted); }
.text-role-link { color: var(--fg-link); }
.text-role-inverse { color: var(--fg-inverse); }
.text-role-link { text-decoration: underline; }
.text-role-link:hover { color: var(--brand-light-accent-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus-light-ring); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.site-logo { max-width: 100%; height: auto; }
.site-menu > summary { list-style: none; cursor: pointer; }
.site-menu > summary::-webkit-details-marker { display: none; }
:where(section[data-section][style]) { background-size: cover; background-position: center; padding: clamp(1.5rem, 4vw, 3rem); }
:where(section[data-section][style] > .bg-surface-card) { padding: clamp(1rem, 3vw, 2rem); }
:where(section[data-section][style] > .bg-surface-card > :first-child) { margin-top: 0; }
:where(section[data-section][style] > .bg-surface-card > :last-child) { margin-bottom: 0; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: static; padding: 0.25rem 0.5rem; outline: 2px solid var(--focus-light-ring); }

/* Quiet clinical notebook: ivory charting paper, rose-clay ink, hairline rules. */
:root {
  --font-serif: 'Baskervville', Georgia, 'Times New Roman', serif;
  --font-sans: 'Alegreya Sans', 'Gill Sans', 'Segoe UI', sans-serif;
  --rule: var(--border-light-default);
  --rule-soft: var(--border-light-subtle);
  --clay: var(--brand-light-accent);
  --clay-deep: var(--brand-light-accent-hover);
  --on-clay: var(--brand-light-on-accent);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 36rem;
  --frame: min(100% - 2 * var(--gutter), 74rem - 2 * var(--gutter));
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.1875rem;
  line-height: 1.62;
  font-kerning: normal;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-frame { flex: 1 0 auto; width: 100%; max-width: 74rem; margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--fg-heading);
  line-height: 1.15;
  letter-spacing: 0;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.25rem); margin: 0; text-wrap: balance; }

a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

/* ---------- Header: thin top rule, small-caps inline bar ---------- */

.site-header { border-top: 3px solid var(--clay); }

.header-inner {
  width: var(--frame);
  margin: 0 auto;
  padding: 1.1rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.brand-mark { display: block; flex: 0 0 auto; width: 2.5rem; }
.brand-mark .site-logo { display: block; width: 2.5rem; height: 2.5rem; }
.brand-words { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-serif); font-size: 1.3rem; color: var(--fg-heading); }
.brand-strap { font-size: 0.95rem; font-style: italic; }
.brand:hover .brand-name { color: var(--clay-deep); }

.nav-bar .site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; }
.nav-bar .site-nav a {
  font-variant-caps: all-small-caps;
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}
.nav-bar .site-nav a:hover { border-bottom-color: var(--clay); }

.nav-toggle { display: none; position: relative; }
.site-menu > summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid var(--rule);
  font-variant-caps: all-small-caps;
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow-wrap: normal;
}
.menu-label { overflow-wrap: normal; }
.menu-icon {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}
.site-menu[open] .menu-icon { box-shadow: none; }
.site-menu > ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 10;
  min-width: 15rem;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: var(--bg-light-card);
  border: 1px solid var(--rule);
}
.site-menu > ul a { display: block; padding: 0.7rem 1.1rem; text-decoration: none; }
.site-menu > ul ul { list-style: none; padding-left: 1rem; }

@media (max-width: 52rem) {
  .nav-bar { display: none; }
  .nav-toggle { display: block; }
  .brand-strap { display: none; }
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs ol {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
  font-size: 0.98rem;
}
.breadcrumbs li + li::before { content: "/"; margin-right: 0.6rem; color: var(--fg-muted); }

/* ---------- Shared reading prose ---------- */

.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose h2 { font-size: 1.65rem; margin: 2.2rem 0 0.7rem; }
.prose h3 { font-size: 1.3rem; margin: 1.8rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--clay); }
.prose blockquote {
  margin: 1.8rem 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 1px solid var(--clay);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.45;
}
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; margin: 1.5rem 0; }
.prose th, .prose td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose figure { margin: 0 0 2rem; }
.prose img { display: block; }

/* ---------- Home: opening spread ---------- */

.home-spread {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem);
}
.home-body { display: contents; }
.home-statement { grid-column: 1; grid-row: 1; align-self: center; padding-bottom: 2.5rem; }
.home-statement h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; max-width: 14ch; }
.home-lines { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); max-width: 32rem; }
.home-lines .display-line { margin: 0 0 0.55rem; font-size: 1.15rem; }
.home-spread .photo-hero {
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 2.5rem;
  align-self: stretch;
}
.home-spread .photo-hero img {
  width: 100%;
  height: 100%;
  min-height: 22rem;
  max-height: 36rem;
  object-fit: cover;
  filter: saturate(0.82) contrast(0.96);
  border: 1px solid var(--rule);
}
.home-spread:not(:has(.photo-hero)) .home-statement { grid-column: 1 / -1; }
.home-body > :not(.photo-hero) { grid-column: 1; max-width: var(--measure); }
.home-body > p { margin: 0 0 1.05em; }
.home-body > :not(.photo-hero):nth-child(2) { margin-top: 0; padding-top: 2rem; border-top: 1px solid var(--rule); }
.home-body > h2 {
  font-size: 1.55rem;
  margin: 2.6rem 0 0.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule-soft);
}
.home-body > ul, .home-body > ol { padding-left: 1.25rem; margin: 0 0 1.05em; }

/* ---------- Article: one reading column ---------- */

.entry { max-width: 46rem; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
.entry-head { padding-bottom: 1.4rem; margin-bottom: 2.2rem; border-bottom: 1px solid var(--rule); }
.entry-byline { margin: 0.9rem 0 0; font-style: italic; font-size: 1.02rem; }
.entry-body { max-width: 38rem; }
.entry-body > p:first-of-type { font-size: 1.3rem; line-height: 1.55; }

/* ---------- Topic hub: index-card wall ---------- */

.hub { padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
.hub-head { max-width: 46rem; padding-bottom: 1.4rem; margin-bottom: 2rem; border-bottom: 1px solid var(--rule); }
.hub-intro { margin-bottom: 3rem; }
.hub-cards { padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.hub-cards-label { margin: 0 0 1.2rem; font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; }
.hub-cards ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
}
.hub-cards li {
  position: relative;
  min-height: 9rem;
  padding: 2.9rem 1.2rem 1.2rem;
  background: var(--bg-light-card);
  border: 1px solid var(--rule);
  background-image: linear-gradient(var(--rule-soft), var(--rule-soft));
  background-size: 100% 1px;
  background-position: 0 2.2rem;
  background-repeat: no-repeat;
}
.hub-cards li::before {
  content: "";
  position: absolute;
  top: 0.7rem;
  left: 1.2rem;
  width: 0.8rem;
  height: 1.05rem;
  border: 1px solid var(--clay);
  border-radius: 50% 50% 46% 46% / 42% 42% 58% 58%;
}
.hub-cards li::after {
  content: "";
  position: absolute;
  top: 1.05rem;
  left: 1.36rem;
  width: 0.48rem;
  height: 0.3rem;
  border-bottom: 1px solid var(--clay);
  border-radius: 0 0 50% 50%;
}
.hub-cards li a {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.3;
  text-decoration: none;
}
.hub-cards li a::after { content: ""; position: absolute; inset: 0; }
.hub-cards li:hover { border-color: var(--clay); }
.hub-cards li:hover a { text-decoration: underline; }
.hub-cards li:has(a:focus-visible) { outline: 2px solid var(--clay); outline-offset: 2px; }

/* ---------- About: desk, two columns ---------- */

.desk {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
  align-items: start;
}
.desk-side { padding-top: 0.4rem; border-top: 1px solid var(--rule); }
.desk-side h1 { margin-top: 1rem; }
.desk-signature {
  margin: 1.6rem 0 0;
  padding-top: 0.6rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  border-top: 1px solid var(--rule-soft);
  max-width: 16rem;
}
.desk-body { padding-top: 0.4rem; }

/* ---------- Contact: letter on paper ---------- */

.letter { max-width: 40rem; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
.letter-head { padding-bottom: 1.2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--rule); }
.letter-body { margin-bottom: 2.4rem; }
.letter-form {
  padding: clamp(1.4rem, 4vw, 2.4rem);
  border: 1px solid var(--rule);
  display: grid;
  gap: 1.3rem;
}
.field { display: grid; gap: 0.35rem; }
.field label { font-variant-caps: all-small-caps; font-weight: 500; font-size: 1.15rem; letter-spacing: 0.05em; }
.field-note { font-variant-caps: normal; letter-spacing: 0; font-weight: 400; font-size: 0.95rem; }
.field input, .field textarea {
  font: inherit;
  color: var(--fg-body);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.45rem 0.1rem;
  border-radius: 0;
}
.field textarea {
  border: 1px solid var(--rule);
  padding: 0.6rem 0.7rem;
  resize: vertical;
  background-image: repeating-linear-gradient(transparent 0 calc(1.62em - 1px), var(--rule-soft) calc(1.62em - 1px) 1.62em);
  background-position: 0 0.6rem;
}
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.letter-button {
  justify-self: start;
  min-height: 44px;
  padding: 0.6rem 1.8rem;
  font: inherit;
  font-weight: 500;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  font-size: 1.2rem;
  color: var(--on-clay);
  background: var(--clay);
  border: 1px solid var(--clay);
  border-radius: 2px;
  cursor: pointer;
}
.letter-button:hover { background: var(--clay-deep); border-color: var(--clay-deep); }

/* ---------- Thank you: folded note card ---------- */

.note-page { padding: clamp(3rem, 8vw, 6rem) 0; display: flex; justify-content: center; }
.note-card {
  position: relative;
  max-width: 34rem;
  width: 100%;
  padding: clamp(1.8rem, 5vw, 3rem);
  border: 1px solid var(--rule);
  text-align: left;
  background-image: linear-gradient(225deg, var(--bg-light-base) 0 1.6rem, var(--rule) 1.6rem calc(1.6rem + 1px), var(--bg-light-elevated) calc(1.6rem + 1px) 2.3rem, transparent 2.3rem);
}
.note-head { padding-bottom: 1rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--rule-soft); }
.note-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.note-back { margin: 1.8rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule-soft); font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; }

/* ---------- Footer ---------- */

.site-footer { margin-top: auto; }
.footer-inner {
  width: var(--frame);
  margin: 0 auto;
  padding: 1.6rem 0 2.2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  font-size: 1rem;
}
.footer-inner p { margin: 0; }
.footer-line { font-style: italic; }
.footer-name a { font-family: var(--font-serif); }

/* ---------- Narrow screens ---------- */

@media (max-width: 52rem) {
  .home-spread { grid-template-columns: minmax(0, 1fr); }
  .home-statement, .home-spread .photo-hero, .home-body > :not(.photo-hero) { grid-column: 1; }
  .home-statement { grid-row: 1; padding-bottom: 2rem; }
  .home-spread .photo-hero { grid-row: 2; }
  .home-spread .photo-hero img { min-height: 0; max-height: 24rem; height: auto; aspect-ratio: 4 / 3; }
  .desk { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
