/* Self-contained site stylesheet. No CSS framework. */
:root {
    color-scheme: light;
    --bg: #f8f9fa;
    --surface: #ffffff;
    --surface-alt: #edf2f5;
    --text: #182b3b;
    --muted: #536677;
    --line: #d8e1e8;
    --accent: #166b8f;
    --accent-contrast: #ffffff;
    --hero: #14293c;
    --hero-text: #f6f9fc;
    --hero-muted: #c4d4e1;
    --shadow: 0 12px 35px rgba(16, 40, 60, .06);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0e1822;
        --surface: #172634;
        --surface-alt: #1d3041;
        --text: #edf4f8;
        --muted: #a9becc;
        --line: #304657;
        --accent: #8bd1ed;
        --accent-contrast: #0b2030;
        --hero: #0a1520;
        --hero-text: #f5f9fc;
        --hero-muted: #bfd0dd;
        --shadow: none;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0e1822;
    --surface: #172634;
    --surface-alt: #1d3041;
    --text: #edf4f8;
    --muted: #a9becc;
    --line: #304657;
    --accent: #8bd1ed;
    --accent-contrast: #0b2030;
    --hero: #0a1520;
    --hero-text: #f5f9fc;
    --hero-muted: #bfd0dd;
    --shadow: none;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1,h2,h3 { line-height: 1.2; letter-spacing: -.035em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); margin: .4em 0; }
h2 { font-size: clamp(1.65rem, 3vw, 2.4rem); margin: 0 0 .7em; }
h3 { font-size: 1.18rem; margin: 0 0 .45em; }
a { font-variant: small-caps; }
p { margin: 0 0 1em; }
.container { width: min(1100px, calc(100% - 2.5rem)); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 100; background: var(--surface); padding: 8px 16px; }
.skip-link:focus { top: 12px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.nav-wrap { display: flex; align-items: center; min-height: 78px; gap: 1.5rem; }
.brand { font-weight: 800; font-size: 1.3rem; letter-spacing: -.04em; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand-accent { color: var(--accent); }
.primary-nav { display: flex; gap: 1.35rem; margin-left: auto; align-items: center; }
.primary-nav a { text-decoration: none; font-size: .93rem; color: var(--muted); font-weight: 600; }
.primary-nav a:hover, .primary-nav a[aria-current] { color: var(--accent); }
.nav-actions { display: flex; gap: .5rem; align-items: center; }
.theme-toggle,.menu-toggle { color: var(--text); background: var(--surface-alt); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .65rem; }
.theme-label { font-size: .78rem; }
.menu-toggle { display: none; }
.hero { background: var(--hero); color: var(--hero-text); padding: clamp(4.5rem, 10vw, 8rem) 0; }
.hero-inner { max-width: 920px; }
.hero h1 { max-width: 900px; }
.hero p { color: var(--hero-muted); font-size: 1.12rem; max-width: 750px; }
.eyebrow { color: var(--accent); font-size: .78rem; text-transform: uppercase; letter-spacing: .15em; font-weight: 800; }
.hero .eyebrow { color: #9dd5f1; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.btn { display: inline-flex; justify-content: center; align-items: center; padding: .75rem 1.15rem; border-radius: 8px; text-decoration: none; font-weight: 700; border: 1px solid var(--line); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.hero .btn-primary { background: #f5f9fc; color: #152b3e; border-color: #f5f9fc; }
.btn-secondary { color: var(--text); background: var(--surface); }
.hero .btn-secondary { color: #f5f9fc; background: transparent; border-color: #7891a5; }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--surface-alt); }
.section-heading { max-width: 700px; margin-bottom: 2rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.7rem; box-shadow: var(--shadow); }
.card p { color: var(--muted); }
.card a { font-weight: 700; }
.card .symbol { font-size: 1.8rem; display: block; margin-bottom: .7rem; }
.page-heading { padding: 4.5rem 0 2rem; }
.page-heading h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.page-heading p { max-width: 800px; }
.prose { max-width: 780px; }
.prose h2 { margin-top: 2rem; }
.prose li { margin-bottom: .5rem; }
.tagline { font-size: 1.25rem; color: var(--muted); }
.cta { background: var(--surface); border: 1px solid var(--line); padding: 2rem; border-radius: 14px; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 3rem 0 1.5rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; }
.footer-grid p { color: var(--muted); font-size: .9rem; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; align-content: flex-start; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); }
.muted { color: var(--muted); }
.note { border-left: 3px solid var(--accent); padding: 1rem 1.2rem; background: var(--surface-alt); }
@media (max-width: 800px) {
    .nav-wrap { flex-wrap: wrap; min-height: 70px; }
    .nav-actions { margin-left: auto; }
    .menu-toggle { display: block; }
    .primary-nav { display: none; order: 3; width: 100%; margin: 0; padding: 0 0 1rem; flex-direction: column; align-items: stretch; gap: 0; }
    .primary-nav.is-open { display: flex; }
    .primary-nav a { padding: .65rem 0; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
    .grid-2,.grid-3 { grid-template-columns: 1fr; }
    .footer-grid { flex-direction: column; }
    .hero { padding: 4rem 0; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* Personal homepage hero — portrait extracted from the autobiography cover. */
.hero-personal { padding: clamp(2.5rem, 6vw, 5.5rem) 0; overflow: hidden; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .8fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.hero-copy { min-width: 0; }
.hero-copy h1 { font-size: clamp(3.2rem, 7vw, 6rem); margin: .18em 0 .08em; }
.hero-subtitle { color: var(--hero-text); font-size: clamp(1.4rem, 2.8vw, 2.1rem); font-weight: 550; letter-spacing: -.025em; margin: 0 0 1.3rem; }
.hero-copy p { font-size: 1.06rem; }
.hero-portrait { margin: 0; align-self: stretch; min-height: 470px; max-height: 650px; overflow: hidden; border-radius: 16px; background: #071723; box-shadow: 0 25px 70px rgba(0,0,0,.23); }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
@media (max-width: 750px) {
    .hero-layout { grid-template-columns: 1fr; gap: 2rem; }
    .hero-portrait { grid-row: 1; width: min(100%, 400px); height: 350px; min-height: 0; justify-self: center; }
    .hero-portrait img { object-position: center 21%; }
    .hero-copy h1 { font-size: clamp(2.8rem, 10vw, 4rem); }
}

/* Editorial content — homepage and supporting prose pages. */
.narrative { max-width: 810px; }
.narrative > p, .editorial-copy > p { font-size: 1.085rem; line-height: 1.85; }
.narrative > h2 { max-width: 700px; }
.editorial-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.editorial-split h2 { max-width: 440px; }
.editorial-copy h3 { margin-top: 1.7rem; }
.editorial-copy h3:first-child { margin-top: 0; }
.text-link, .inline-links a { font-weight: 700; }
.inline-links { display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; margin: 1.5rem 0 2rem; }
.book-cover img { width: 100%; height: 100%; object-fit: contain; }
.book-links { margin-top: 1.7rem; border-top: 1px solid var(--line); }
.book-links a { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 650; }
.book-links a:hover { color: var(--text); }
.closing-thought { font-size: clamp(1.25rem, 2.5vw, 1.65rem) !important; line-height: 1.5 !important; font-weight: 600; margin-top: 2.8rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
@media (max-width: 750px) {
    .editorial-split { grid-template-columns: 1fr; gap: 1rem; }
    .hero-copy p { font-size: 1rem; }
}
