/* Shared visual system. Source of truth for every generated page. */
:root { --paper:#f7f6f2; --ink:#233b36; --muted:#61706a; --line:#d9dfd6; --accent:#a77b49; --white:#fffefa; }
html { scroll-behavior:smooth; scroll-padding-top:110px; }
body { background:var(--paper); color:var(--ink); font-family:Arial,Helvetica,sans-serif; font-size:16px; line-height:1.8; padding-top:104px !important; -webkit-font-smoothing:antialiased; }
a { color:#316858; text-decoration:underline; text-underline-offset:4px; overflow-wrap:anywhere; }
a:hover { color:#815b2f; }
a:focus-visible,button:focus-visible { outline:3px solid var(--accent); outline-offset:5px; }
h1,h2,h3 { color:var(--ink); font-family:Georgia,'Times New Roman',serif; font-weight:400; line-height:1.2; }
h1 { font-size:36px; } h2 { font-size:29px; } h3 { font-size:24px; }
h1.title { font-size:clamp(42px,5vw,64px); letter-spacing:-2px; margin:24px 0 54px; padding-bottom:28px; border-bottom:1px solid var(--line); }
p { margin-bottom:20px; } strong { font-weight:600; }
.main-container,div.main-container { max-width:1180px; padding-left:36px; padding-right:36px; }
.navbar-default { background:rgba(247,246,242,.97); border:0; border-bottom:1px solid var(--line); box-shadow:none; min-height:78px; }
.navbar .container { width:auto; max-width:1180px; padding:0 36px; }
.navbar-brand { font-family:Georgia,serif; font-size:23px; letter-spacing:-.6px; padding:27px 15px; height:78px; color:var(--ink) !important; }
.navbar-default .navbar-nav>li>a { color:var(--muted); padding:28px 12px 24px; font-size:13px; font-weight:600; text-decoration:none; border-bottom:3px solid transparent; }
.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>li>a:hover { color:var(--ink); background:transparent; border-bottom-color:var(--accent); }
.navbar-toggle { margin-top:22px; border-color:var(--line) !important; }
.navbar-default .navbar-toggle .icon-bar { background:var(--ink); }
.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus { background:#e9ece4; }
hr { border-top:1px solid var(--line); margin:32px 0; }
.section.level1 { margin-bottom:64px; }
.section.level1>h1 { margin:32px 0 24px; }
.section.level1>hr:first-of-type { display:none; }
.toc-content { padding-left:40px; }
div.tocify { width:210px; max-width:100%; border:0; border-left:1px solid var(--line); border-radius:0; background:transparent; font-size:13px; }
.tocify ul,.tocify li { line-height:1.55; }
.tocify .tocify-item { padding:8px 12px; color:var(--muted); }
.tocify .tocify-item.active { background:#e6ebe1; color:var(--ink); border-left:2px solid var(--accent); }
.tocify .tocify-item:hover { background:#e6ebe1; }
ul { padding-left:22px; } li { padding-left:5px; margin-bottom:14px; }
.section>ul { padding-left:0; list-style:none; }
.section>ul>li { padding:0 0 0 18px; border-left:2px solid var(--line); margin:24px 0; }
.section>ul>li strong { color:var(--ink); }
iframe { max-width:100%; border:0; border-radius:8px; }
iframe[src*="youtube"] { width:100%; height:auto; aspect-ratio:16/9; }
img { height:auto; }
.profile-hero { display:grid; grid-template-columns:330px minmax(0,1fr); gap:70px; align-items:center; padding:28px 0 60px; }
.profile-photo { position:relative; }
.profile-photo:after { content:''; position:absolute; z-index:-1; inset:20px -18px -18px 20px; border:1px solid #b7c1ae; border-radius:160px 160px 8px 8px; }
.profile-photo img { display:block; width:100%; border-radius:160px 160px 8px 8px; }
.profile-photo p { margin:0; }
.profile-intro h1 { font-size:clamp(42px,4.5vw,62px); letter-spacing:-2px; margin:18px 0 26px; }
.profile-intro p { font-size:17px; line-height:1.85; }
.profile-intro .eyebrow { font:600 11px/1.7 Arial,sans-serif; text-transform:uppercase; letter-spacing:2px; color:#657457; }
body:has(.profile-hero) #header { display:none; }
body:has(.profile-hero) .main-container>div.section { margin-top:40px; }
body:has(.profile-hero) h2 { margin:38px 0 30px; }
body:has(.profile-hero) .section>ul { display:grid; grid-template-columns:1fr 1fr; gap:0 40px; }
.social-links { margin:20px 0 32px; }
.social-links p { display:flex; flex-wrap:wrap; gap:10px; }
.social-links a { border:1px solid var(--line); border-radius:4px; padding:9px 18px; font-size:13px; text-decoration:none; background:var(--white); }
.social-links a:hover { border-color:var(--ink); }
.contact-details { border-left:3px solid var(--accent); padding:4px 24px; margin-bottom:64px; }
.contact-details p { margin:2px 0; font-size:14px; color:var(--muted); }
.site-footer { border-top:1px solid var(--line); margin:60px 0 24px; padding:24px 0; display:flex; justify-content:space-between; gap:20px; font-size:12px; color:var(--muted); }
.skip-link { position:fixed; top:-100px; left:16px; z-index:2000; padding:10px 20px; background:var(--ink); color:white; }
.skip-link:focus { top:10px; color:white; }
@media(min-width:768px) and (max-width:1000px) { .navbar-brand { font-size:19px; } .navbar-default .navbar-nav>li>a { padding-left:8px; padding-right:8px; font-size:12px; } .profile-hero { grid-template-columns:260px 1fr; gap:40px; } div.tocify { width:175px; } }
@media(max-width:767px) {
 body { padding-top:92px !important; font-size:15px; }
 .main-container,div.main-container { padding:0 22px; }
 .navbar .container { padding:0 22px; }
 .navbar-default .navbar-nav>li>a { padding:12px 20px; }
 .navbar-collapse { max-height:75vh; }
 .profile-hero { grid-template-columns:1fr; gap:38px; padding-top:12px; padding-bottom:16px; }
 .profile-photo { width:230px; margin:0 auto; }
 .profile-intro h1 { font-size:44px; }
 .profile-intro p { font-size:16px; }
 .toc-content { padding-left:15px; }
 div.tocify { position:relative !important; width:100% !important; margin-bottom:28px; max-height:180px; }
 h1.title { font-size:42px; margin-top:20px; margin-bottom:30px; }
 body:has(.profile-hero) .section>ul { grid-template-columns:1fr; }
 .site-footer { flex-direction:column; gap:8px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
@media print { .navbar,#TOC,.skip-link,.site-footer { display:none; } body { padding-top:0 !important; background:white; } .toc-content { width:100%; } }
/* R Markdown injects legacy anchor offsets; native scroll padding handles these. */
.section h1,.section h2,.section h3,.section h4,.section h5,.section h6 { padding-top:0 !important; margin-top:32px !important; }
.profile-intro .section { margin-bottom:0; }
.profile-intro .section>h1 { margin-top:18px !important; }
.profile-photo .caption { display:none; }
.navbar-brand { text-decoration:none; }
.profile-photo .figcaption { display:none; }

/* Career entries: distinguish dates and roles without changing the page rhythm. */
#education-and-experience li { line-height:1.65; }
#education-and-experience li strong { display:block; font-size:17px; }
.career-date { display:block; color:var(--muted); font-size:13px; letter-spacing:.04em; margin:5px 0 9px; }
.career-date + br { display:none; }
