:root {
    color-scheme: light;
    --paper: #edf3f4;
    --surface: #fff;
    --ink: #162d3a;
    --muted: #48616f;
    --line: #c5d5db;
    --accent: #17617a;
    --dark: #142d3a;
    --serif: Georgia, "Times New Roman", serif;
    --sans: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; display: flex; flex-direction: column; min-height: 100vh; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--sans); }
main { flex: 1; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 3px solid #d19b29; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, .entry-list h3 { font-family: var(--serif); font-weight: 400; }
.shell { width: min(100% - 3rem, 73rem); margin-inline: auto; }
.skip { position: absolute; z-index: 5; top: .5rem; left: .5rem; background: white; padding: .65rem; transform: translateY(-180%); }
.skip:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--line); }
.site-bar { min-height: 4.75rem; display: flex; align-items: center; justify-content: space-between; gap: .65rem 1.5rem; }
.wordmark { color: var(--ink); font-weight: 700; text-decoration: none; }
.site-bar nav { display: flex; align-items: center; gap: clamp(1rem, 4vw, 2.8rem); }
.site-bar nav a { color: var(--ink); }
.site-bar nav a[aria-current] { text-decoration-thickness: 2px; }
.site-bar #site-navigation { gap: .45rem clamp(.75rem, 1.5vw, 1.5rem); flex-wrap: wrap; }
.site-bar [hidden] { display: none; }
.site-menu-toggle {
    min-height: 2.75rem;
    padding: .35rem .85rem;
    border: 1px solid var(--line);
    border-radius: .15rem;
    background: var(--surface);
    color: var(--ink);
}

.introduction {
    margin-top: 2rem;
    padding: clamp(1.5rem, 7vw, 5.5rem);
    min-height: 28rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, .59fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
    background: var(--dark);
    color: #f4f8fa;
}
.role { color: #bcdae7; margin-bottom: 1rem; }
.introduction h1 { font-size: clamp(3rem, 8.8vw, 7.8rem); line-height: .98; letter-spacing: -.045em; }
.introduction-topics { max-width: 29rem; margin-top: 1rem; color: #d9e9ef; }
.home-bio-link { display: inline-block; margin-top: 1.25rem; color: #f4f8fa; }
.introduction .editorial-photo {
    width: 100%;
    max-width: 21rem;
    justify-self: end;
    color: #e3f0f6;
    border-color: #68838e;
    background: #213f4c;
}

.editorial-photo {
    position: relative;
    display: grid;
    place-items: center;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #e0eaed;
    color: var(--muted);
}
.editorial-photo--portrait { aspect-ratio: 4 / 5; }
.editorial-photo--landscape { aspect-ratio: 4 / 3; }
.editorial-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-label { position: relative; display: grid; place-items: center; min-height: 5rem; padding: .85rem; text-align: center; }
.photo-label::before {
    content: "";
    position: absolute;
    left: calc(50% - .65rem);
    top: -.15rem;
    width: 1.3rem;
    height: 1.3rem;
    background: linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat,
        linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
    opacity: .65;
}
.editorial-photo:has(.photo-label)::before { content: ""; position: absolute; inset: .8rem; border: 1px dashed currentColor; opacity: .29; }

.expertise-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; padding: 0; margin: .9rem 0 0; list-style: none; }
.expertise-list li { border-top: 1px solid var(--line); padding: 1.1rem 0 0; }
.expertise-list h3 { font: 400 clamp(1.25rem, 3vw, 1.7rem)/1.15 var(--serif); }
.expertise-list p { margin-top: .55rem; color: var(--muted); }
.expertise-list span { font: 1rem var(--sans); }
.council-result {
    margin-top: clamp(2.5rem, 7vw, 5rem);
    padding: clamp(1.25rem, 5vw, 3rem);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(1rem, 5vw, 3.5rem);
    align-items: center;
    border-top: 2px solid var(--accent);
    background: var(--surface);
}
.council-result h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.15; }
.council-result p { margin: .5rem 0; max-width: 37rem; }
.result-number { font: 400 clamp(2.8rem, 10vw, 6rem)/1 var(--serif); color: var(--accent); }

.profile-heading {
    padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(1.6rem, 4vw, 3rem);
    border-bottom: 1px solid var(--line);
}
.profile-heading.has-photo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(15rem, .56fr);
    align-items: center;
    gap: clamp(1.4rem, 5vw, 3.5rem);
}
.profile-heading h1 { font-size: clamp(2.45rem, 6.25vw, 5rem); line-height: 1.03; letter-spacing: -.035em; overflow-wrap: anywhere; }
.profile-heading .summary { margin-top: 1rem; }
.profile-heading .editorial-photo--portrait { width: min(100%, 16rem); justify-self: end; }
.profile-heading .editorial-photo--landscape { width: 100%; }
.profile-body { max-width: 47rem; }
.profile-section { padding: clamp(1.5rem, 4vw, 2.6rem) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 1.25rem; }
.profile-section h2, .profile-related h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); line-height: 1.15; }
.profile-section .entry-meta { margin-bottom: .55rem; }
.profile-section h2 ~ p { margin-top: .75rem; }
.profile-points { margin: .6rem 0; padding-left: 1.25rem; }
.profile-points li + li { margin-top: .25rem; }
.source-links, .profile-related ul { display: flex; flex-wrap: wrap; gap: .5rem 1.15rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.source-links { font-size: .91rem; }
.profile-related { margin-top: clamp(2rem, 5vw, 3.5rem); }
.profile-related a { display: block; padding: .55rem 0; border-top: 1px solid var(--line); }
.profile-related a span { margin-left: .25rem; }
.page-heading { max-width: 62rem; padding: clamp(2rem, 7vw, 5rem) 0 1.6rem; }
.page-heading h1 { font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: 1.03; letter-spacing: -.035em; overflow-wrap: anywhere; }
.page-heading > p { margin-top: .85rem; }
.back-link { display: inline-block; margin-bottom: .75rem; }
.summary { max-width: 42rem; font-size: 1.16rem; }
.entry-meta { color: var(--muted); font-size: .92rem; }
.empty { border-top: 1px solid var(--line); color: var(--muted); padding: 1.5rem 0; }
.empty a { display: inline-block; margin-top: .45rem; }
.latest { margin-top: clamp(2.4rem, 6vw, 4.8rem); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .7rem; }
.section-heading h2 { font-size: clamp(1.65rem, 4vw, 2.7rem); line-height: 1.15; }
.entry-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.entry-list li { display: grid; grid-template-columns: clamp(7rem, 17vw, 12rem) minmax(0, 1fr) 2rem; gap: 1rem; align-items: baseline; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.entry-list h2, .entry-list h3 { font-size: clamp(1.35rem, 3vw, 1.95rem); line-height: 1.2; overflow-wrap: anywhere; }
.entry-list a { color: var(--ink); }
.entry-list p { margin-top: .35rem; max-width: 48rem; }
.open-entry { text-align: center; text-decoration: none; }
.prose { max-width: 45rem; margin: 1rem 0 2.5rem; font-size: 1.08rem; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1em; }
.prose img { display: block; max-width: 100%; height: auto; }
.prose pre { border: 1px solid var(--line); padding: .75rem; overflow: auto; }
.prose blockquote { margin-inline: 0; border-left: 3px solid var(--accent); padding-left: 1rem; }
.preview-note { border: 1px solid var(--line); background: var(--surface); margin-top: 1.2rem; padding: .7rem 1rem; }
.preview-note a { margin-left: .5rem; }
.site-footer { margin-top: clamp(3rem, 8vw, 7rem); border-top: 1px solid var(--line); }
.footer-content { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); }

.slide-viewer { background: var(--dark); color: #f4f8fa; }
.slide-stage { min-height: 12rem; aspect-ratio: 16 / 9; display: grid; place-items: center; padding: .6rem; overflow: hidden; }
.slide-stage canvas { max-width: 100%; max-height: 100%; background: white; }
.viewer-message { padding: 1rem; text-align: center; }
.viewer-toolbar, .viewer-controls, .viewer-actions { display: flex; align-items: center; gap: .45rem; }
.viewer-toolbar { justify-content: space-between; flex-wrap: wrap; padding: .65rem .85rem; border-top: 1px solid #496778; }
.viewer-actions { flex-wrap: wrap; }
.viewer-toolbar a, .viewer-toolbar button, .qr-header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.7rem;
    min-width: 2.7rem;
    gap: .35rem;
    padding: .35rem .65rem;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    text-decoration: none;
}
.viewer-toolbar button:hover:not(:disabled), .viewer-toolbar a:hover { border-color: #92b1c1; }
.viewer-controls span { font-variant-numeric: tabular-nums; min-width: 3rem; text-align: center; }
.viewer-note { padding: .5rem .85rem; }
.slide-viewer:fullscreen, .slide-viewer[data-expanded] { display: flex; flex-direction: column; height: 100%; width: 100%; }
.slide-viewer[data-expanded] { position: fixed; inset: 0; z-index: 10; height: 100dvh; }
.slide-viewer:fullscreen .slide-stage, .slide-viewer[data-expanded] .slide-stage { flex: 1; aspect-ratio: auto; min-height: 0; }
body.viewer-expanded { overflow: hidden; }
.qr-dialog {
    width: min(34rem, 93vw, 88dvh);
    max-height: 93dvh;
    border: 0;
    padding: clamp(.9rem, 3vw, 1.6rem);
    color: var(--ink);
    background: var(--surface);
}
.qr-dialog::backdrop { background: rgb(13 31 41 / .83); }
.qr-header { display: flex; align-items: start; justify-content: space-between; gap: .55rem; }
.qr-header h2 { line-height: 1.12; font-size: clamp(1.2rem, 4vw, 2rem); }
.qr-header button { border-color: var(--line); font-size: 1.35rem; }
.qr-image { width: min(100%, 58dvh); margin: .5rem auto; }
.qr-image svg { display: block; width: 100%; height: auto; }
.qr-url { text-align: center; overflow-wrap: anywhere; font-weight: 600; }
.qr-download { display: block; margin-top: .6rem; text-align: center; }

@media (max-width: 66rem) {
    .site-header .site-bar { flex-wrap: wrap; min-height: 4.2rem; padding-block: .6rem; }
    .site-bar #site-navigation { width: 100%; border-top: 1px solid var(--line); padding-top: .4rem; }
    .site-bar #site-navigation a { padding-block: .3rem; }
}

@media (max-width: 40rem) {
    .shell { width: calc(100% - 2rem); }
    .site-bar { min-height: 4.2rem; flex-wrap: wrap; padding: .65rem 0; }
    .site-bar nav { flex-wrap: wrap; gap: .35rem .9rem; }
    .site-bar #site-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-bar #site-navigation[hidden] { display: none; }
    .introduction { min-height: 22rem; margin-top: 1rem; grid-template-columns: 1fr; }
    .introduction .editorial-photo { width: min(100%, 14rem); justify-self: start; }
    .profile-heading.has-photo { grid-template-columns: 1fr; }
    .profile-heading .editorial-photo--portrait { justify-self: start; }
    .profile-heading .editorial-photo--landscape { max-width: 25rem; }
    .expertise-list { grid-template-columns: 1fr; }
    .council-result { grid-template-columns: 1fr; }
    .entry-list li { grid-template-columns: minmax(0, 1fr) 1.5rem; gap: .4rem .7rem; }
    .entry-list .entry-meta { grid-column: 1 / -1; }
    .section-heading { align-items: flex-start; }
    .viewer-toolbar { padding: .4rem; }
    .viewer-actions { gap: .2rem; }
    .viewer-toolbar a, .viewer-toolbar button { padding: .3rem .45rem; }
}
