@font-face {
  font-family: "Iowan Old Style Local";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("Iowan Old Style"), local("IowanOldStyle-Roman"), local("Iowan Old Style BT");
}

@font-face {
  font-family: "Iowan Old Style Local";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local("Iowan Old Style Bold"), local("IowanOldStyle-Bold");
}

:root {
  color-scheme: light dark;
  --surface: oklch(1 0 0);
  --ink: oklch(.25 .015 270);
  --muted: oklch(.48 .015 270);
  --accent: oklch(.47 .2 270);
  --line: oklch(.90 .008 270);
  --selection: oklch(.86 0 0);
  --page-pad: clamp(20px, 3.4vw, 52px);
  --serif: Charter, "Bitstream Charter", "Sitka Text", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--surface);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: oklch(.2 0 0);
    --ink: oklch(.92 .005 270);
    --muted: oklch(.72 .015 270);
    --accent: oklch(.76 .11 270);
    --line: oklch(.34 .008 270);
    --selection: oklch(.40 0 0);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; }
body.rs-site { margin: 0; padding: 0; color: var(--ink); background: var(--surface); font-family: var(--serif); }
.rs-site [hidden] { display: none !important; }
::selection { background: var(--selection); color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--accent); }
a, button, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
button { font: inherit; }

.skip-link { position: absolute; top: 14px; left: 20px; padding: 10px 14px; background: var(--surface); transform: translateY(-180%); font: 14px/1.5 var(--sans); }
.skip-link:focus { transform: none; }
.rs-page { width: min(100% - 80px, 940px); margin: 0 auto; padding-top: clamp(56px, 8.5vw, 110px); padding-bottom: var(--page-pad); }
.home-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: clamp(40px, 5vw, 72px); align-items: start; }
.home-copy { display: contents; }
h1, h2, p { margin: 0; }
h1, h2 { text-wrap: balance; font-weight: 500; }
h1 { font-family: "Iowan Old Style Local", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-size: clamp(2.2rem, 3.5vw, 2.65rem); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.site-header h1 a { text-decoration: none; }
.site-title-at { display: inline-block; position: relative; top: .015em; margin-right: .015em; font-size: 1.1em; line-height: 0; }
h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.015em; margin-bottom: 15px; }
p { font-size: 18px; line-height: 1.62; text-wrap: pretty; }
p + p { margin-top: 18px; }
.site-header { grid-column: 1; grid-row: 1; margin-bottom: 40px; }
.introduction { grid-column: 1; grid-row: 2; max-width: 48ch; }
.bio-toolbar { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.bio-toolbar h2 { margin: 0; color: var(--muted); font: 400 14px/1.5 var(--sans); letter-spacing: 0; }
.bio-switch { display: flex; gap: 8px; }
.bio-switch button { padding: 0 7px 11px; margin-bottom: -1px; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: none; color: var(--muted); font: 14px/1.5 var(--sans); cursor: pointer; }
.bio-switch button:last-child { padding-right: 0; padding-left: 10px; }
.bio-switch button:hover { color: var(--ink); }
.bio-switch button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
/* WordPress galleries keep their native, editable figure/image structure. */
.bio-content .rs-bio-gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; gap: clamp(12px, 2vw, 16px); width: 100%; margin: 38px 0 48px; }
.bio-content .rs-photo { display: block; min-width: 0; margin: 38px 0 48px; }
.bio-content .rs-bio-gallery > .rs-photo { grid-column: span 7; display: block; width: auto !important; min-width: 0; margin: 0 !important; }
.bio-content .rs-bio-gallery > .rs-photo:nth-child(2n) { grid-column: span 5; margin-top: 32px !important; }
.bio-content .rs-bio-gallery > .rs-photo:only-of-type { grid-column: 1 / -1; }
.bio-content .rs-bio-gallery > figcaption { display: none; }
.bio-photo { display: block; width: 100%; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); cursor: zoom-in; transition: transform 240ms cubic-bezier(.2, .85, .35, 1.4), opacity 160ms ease-out; }
.bio-content .bio-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.bio-photo:focus-visible { outline-offset: 5px; }
@media (hover: hover) and (pointer: fine) {
  .bio-photo:hover { transform: translateY(-3px); opacity: .9; }
}
.bio-footnote { margin-top: 18px; }
.bio-footnote summary { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: flex-start; color: var(--muted); cursor: pointer; font-size: 20px; }
.bio-footnote p { color: var(--muted); font: 14px/1.6 var(--sans); }

.photo-viewer { width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 64px clamp(40px, 5vw, 76px) 20px; border: 0; background: oklch(.12 0 0 / .96); color: oklch(.96 0 0); }
.photo-viewer::backdrop { background: oklch(.1 0 0 / .85); }
.photo-viewer[open] { display: grid; grid-template-rows: minmax(0, 1fr); }
html:has(.photo-viewer[open]) { overflow: hidden; }
.viewer-toolbar { position: absolute; inset: 10px 16px auto; display: flex; align-items: center; gap: 12px; font: 13px/1.5 var(--sans); }
.viewer-counter { margin-right: auto; }
.photo-viewer button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px; border: 0; border-radius: 3px; color: inherit; background: transparent; cursor: pointer; }
.photo-viewer button:hover { background: oklch(1 0 0 / .12); }
.photo-viewer button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.photo-viewer button:disabled { opacity: .25; cursor: default; }
.viewer-close { font: 32px/1 var(--sans); }
.viewer-zoom { font: 13px/1.5 var(--sans); }
.viewer-prev, .viewer-next { position: absolute; top: calc(50% - 22px); font: 36px/1 var(--sans); }
.viewer-prev { left: 4px; }
.viewer-next { right: 4px; }
.viewer-figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; min-width: 0; min-height: 0; margin: 0; }
.viewer-image-wrap { display: flex; align-items: center; justify-content: center; overflow: auto; min-height: 0; overscroll-behavior: contain; }
.viewer-image { display: block; flex: none; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; }
.viewer-figure figcaption { text-align: center; font-size: 16px; line-height: 1.5; }
.photo-viewer.is-zoomed .viewer-image-wrap { display: block; }
.photo-viewer.is-zoomed .viewer-image { max-width: none; max-height: none; margin: auto; }
.notes { grid-column: 1; grid-row: 3; margin-top: 38px; }
.notes-list { margin: 0; padding: 0; list-style: none; }
.notes-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 10px 0; font-size: 18px; line-height: 1.5; text-decoration: none; }
.note-title { min-width: 0; text-wrap: pretty; }
.note-status { flex-shrink: 0; color: var(--muted); font: 13px/1.5 var(--sans); }
.notes-list a:hover .note-title { text-decoration: underline; text-underline-offset: .22em; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent); }

.post-page { width: min(calc(100% - 48px), 600px); margin-inline: auto; padding-block: clamp(56px, 7.2vw, 92px) 48px; }
.post-header { margin-bottom: 38px; }
.post-header h1 { font-size: clamp(26px, 3vw, 30px); line-height: 1.15; }
.post-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 14px; color: var(--muted); font: 13px/1.6 var(--sans); }
.post-meta a { text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }
.post-body h2 { margin-top: 40px; font-family: "Iowan Old Style Local", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-size: 1.45rem; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; }
.post-body p { line-height: 1.65; }
.post-body img { display: block; max-width: 100%; height: auto; }
.post-body ul { margin-block: 18px 24px; padding-left: 24px; font-size: 18px; line-height: 1.65; list-style-type: square; }
.post-body ul > li::marker { color: oklch(.58 0 0); }
.post-body li + li { margin-top: 8px; }
.post-figure { margin: 32px 0 40px; }
.post-image { display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); cursor: zoom-in; }
.post-image img { width: 100%; }
.post-figure figcaption { margin-top: 12px; color: var(--muted); font: 13px/1.6 var(--sans); text-wrap: pretty; }

.home-visual { grid-column: 2; grid-row: 2 / span 3; min-width: 0; margin: 0; }
.portrait-stage { position: relative; width: 100%; aspect-ratio: 4 / 5; margin-inline: auto; }
.portrait-image { display: block; width: 100%; height: auto; }

@media (min-width: 1100px) {
  .rs-page { width: min(calc(100% - 2 * var(--page-pad)), 1500px); padding-top: var(--page-pad); }
  .home-layout { grid-template-columns: minmax(0, 1.75fr) minmax(380px, 1fr); column-gap: clamp(32px, 3.6vw, 60px); }
  .home-copy > :not(.home-visual) { width: 100%; max-width: 600px; }
  .home-visual { padding: 0; }
}

@media (min-width: 760px) {
  .home-visual { position: sticky; top: var(--page-pad); }
  .portrait-stage { width: min(100%, calc((100svh - 270px) * .8)); }
}

@media (max-width: 759px) {
  html { scroll-padding-top: 24px; }
  .rs-page { width: min(100% - 48px, 520px); padding-top: 48px; }
  .home-layout { grid-template-columns: minmax(0, 1fr); gap: 38px; }
  .site-header { grid-row: 1; margin: 0; }
  .introduction { grid-row: 2; }
  .home-visual { display: none; }
  .notes { grid-row: 3; margin: 6px 0 0; }
  h2 { font-size: 25px; }
  .bio-content .rs-bio-gallery, .bio-content .rs-photo { margin-block: 30px 36px; }
  .bio-content .rs-bio-gallery > .rs-photo:nth-child(2n) { margin-top: 24px !important; }
  .photo-viewer { padding: 64px 40px 16px; }
  .viewer-figure figcaption { font-size: 14px; }
}

@media (max-width: 380px) {
  .rs-page { width: calc(100% - 40px); padding-top: 36px; }
  p { font-size: 17px; }
  .post-body ul { font-size: 17px; }
  .post-page { width: calc(100% - 40px); padding-top: 36px; }
}

@media (max-width: 479px) {
  .notes-list a { flex-direction: column; gap: 4px; padding-block: 12px; }
}

@media (pointer: coarse) {
  .bio-switch button { min-height: 44px; padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bio-photo { transition: none; }
  .bio-photo:hover { transform: none; }
}

/* Normal block content: typography is shared, captions stay visible in notes. */
.rs-site .post-body > :first-child { margin-top: 0; }
.rs-site .post-body > :last-child { margin-bottom: 0; }
.rs-site .post-body h3, .rs-site .bio-content h3 { margin: 32px 0 14px; font-family: "Iowan Old Style Local", "Iowan Old Style", Georgia, serif; font-size: 1.25rem; line-height: 1.4; font-weight: 600; }
.rs-site .bio-content h2 { margin-top: 32px; font-family: "Iowan Old Style Local", "Iowan Old Style", Georgia, serif; font-size: 1.45rem; line-height: 1.4; font-weight: 600; }
.rs-site .post-body ol, .rs-site .bio-content ul, .rs-site .bio-content ol { margin-block: 18px 24px; padding-left: 24px; font-size: 18px; line-height: 1.65; }
.rs-site .bio-content ul { list-style-type: square; }
.rs-site .bio-content ul > li::marker { color: oklch(.58 0 0); }
.rs-site .bio-content li + li { margin-top: 8px; }
.rs-site .post-body .wp-block-image { margin-inline: 0; }
.rs-site .rs-note-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; margin: 32px 0 40px; }
.rs-site .rs-note-gallery > .rs-note-image { display: block; min-width: 0; width: auto !important; margin: 0 !important; }
.rs-site .rs-note-gallery > .rs-note-image:only-of-type, .rs-site .rs-note-gallery > figcaption { grid-column: 1 / -1; }
.rs-site .rs-note-gallery figcaption { position: static !important; width: auto !important; max-height: none !important; padding: 0 !important; background: none !important; color: var(--muted) !important; text-align: left; }
.rs-site .wp-block-details { margin-top: 18px; }
.rs-site .wp-block-details > summary { cursor: pointer; }
.rs-site .wp-block-details > :not(summary) { margin-top: 12px; }
.rs-site .post-password-form label { display: block; margin-top: 18px; font-size: 16px; }
.rs-site .post-password-form input { max-width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--ink); font: 16px/1.5 var(--sans); }
.rs-site .post-password-form input[type="submit"] { margin-top: 12px; cursor: pointer; }
@media (max-width: 479px) { .rs-site .rs-note-gallery { grid-template-columns: minmax(0, 1fr); } }
