/* Complete layouts, with a shared content model. */
body { --page:#fff; --ink:#333; --accent:#060771; --muted:#637080; --line:#d7dce3; --surface:#ffffffdf; }
body:not([data-theme="classic"]) { background:var(--page); color:var(--ink); font:16px/1.7 Georgia,"Times New Roman",serif; }
body:not([data-theme="classic"]) h1, body:not([data-theme="classic"]) h2, body:not([data-theme="classic"]) h3, body:not([data-theme="classic"]) strong, body:not([data-theme="classic"]) .pub-body .title { color:var(--ink); }
body:not([data-theme="classic"]) a, body:not([data-theme="classic"]) .profile-links a { color:var(--accent); }
body:not([data-theme="classic"]) .topnav { background:var(--page); border-bottom:1px solid var(--line); }
body:not([data-theme="classic"]) .topnav a.normal { color:var(--ink); font-family:Arial,sans-serif; font-size:12px; letter-spacing:.025em; }
body:not([data-theme="classic"]) .topnav a.normal:hover { background:var(--surface); color:var(--accent); }
body:not([data-theme="classic"]) .menu-toggle { color:var(--ink); }
body:not([data-theme="classic"]) .dates, body:not([data-theme="classic"]) .degree { color:var(--muted); }
body:not([data-theme="classic"]) .publications .badge { background:var(--accent); color:var(--page)!important; box-shadow:none; }
body:not([data-theme="classic"]) .publications ol.bibliography li .links a.btn { color:var(--ink); border-color:var(--line); }
body:not([data-theme="classic"]) .publications ol.bibliography li .teaser { box-shadow:none; }
body:not([data-theme="classic"]) .entry { border-bottom:1px solid var(--line); padding-bottom:15px; }
body:not([data-theme="classic"]) .entry:last-child { border-bottom:0; }
/* Paper & Ink: a journal masthead, generous reading column. */
body[data-theme="editorial"] { --page:#f5f0e7; --ink:#302b26; --accent:#9b4c32; --muted:#7b7064; --line:#cfc5b5; --surface:#fbf8f0; }
[data-theme="editorial"] .wrapper { width:min(1020px,calc(100% - 80px)); }
[data-theme="editorial"] header { position:static; width:100%; max-height:none; float:none; text-align:left; padding:110px 0 40px; border-bottom:3px double var(--ink); }
[data-theme="editorial"] header h1 { font-size:clamp(40px,6vw,76px); font-weight:400; letter-spacing:-.045em; margin:0 0 20px; }
[data-theme="editorial"] .image.avatar { float:right; margin-top:0; }
[data-theme="editorial"] .image.avatar img { border-radius:0; padding:0; width:112px; height:140px; filter:grayscale(1); }
[data-theme="editorial"] .profile-links { justify-content:flex-start; font-size:13px; }
[data-theme="editorial"] main { float:none; width:100%; padding-top:40px; }
[data-theme="editorial"] article { display:grid; grid-template-columns:190px 1fr; column-gap:42px; padding:10px 0 26px; border-bottom:1px solid var(--line); }
[data-theme="editorial"] article > h2 { grid-column:1; grid-row:1 / span 30; font-size:19px; font-style:italic; padding-top:3px; }
[data-theme="editorial"] article > :not(h2) { grid-column:2; }
[data-theme="editorial"] .publications { margin-top:0; }
/* Swiss Grid: asymmetric profile and numbered index. */
body[data-theme="swiss"] { --page:#f7f7f3; --ink:#1c1c1c; --accent:#cf3e1e; --muted:#686861; --line:#bdbdb3; --surface:#fff; font-family:Arial,Helvetica,sans-serif; }
[data-theme="swiss"] .wrapper { width:min(1280px,calc(100% - 88px)); }
[data-theme="swiss"] header { width:290px; text-align:left; top:20px; }
[data-theme="swiss"] header h1 { font-size:54px; font-weight:700; line-height:.96; letter-spacing:-.06em; }
[data-theme="swiss"] .image.avatar { margin-bottom:20px; }
[data-theme="swiss"] .image.avatar img { border-radius:0; padding:0; width:92px; height:92px; }
[data-theme="swiss"] .profile-links { justify-content:flex-start; }
[data-theme="swiss"] main { width:calc(100% - 365px); counter-reset:sections; }
[data-theme="swiss"] article { padding:24px 0; border-top:2px solid var(--ink); }
[data-theme="swiss"] article h2 { font-size:27px; font-weight:700; letter-spacing:-.04em; }
[data-theme="swiss"] article h2:before { counter-increment:sections; content:counter(sections,decimal-leading-zero) " / "; color:var(--accent); font:12px monospace; vertical-align:middle; margin-right:16px; }
[data-theme="swiss"] .pub-row { display:block; }
[data-theme="swiss"] .publications ol.bibliography { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
[data-theme="swiss"] .publications .abbr { margin-bottom:15px!important; }
[data-theme="swiss"] .publications ol.bibliography li .teaser { width:100%; height:160px; border-radius:0; }
/* Terminal Notes: monospace document, left index-like profile. */
body[data-theme="terminal"] { --page:#0d1412; --ink:#c9dfd1; --accent:#7adea1; --muted:#8daa99; --line:#294137; --surface:#14231c; font-family:"Courier New",monospace; font-size:14px; }
[data-theme="terminal"] .wrapper { width:min(1060px,calc(100% - 64px)); }
[data-theme="terminal"] header { text-align:left; width:240px; border-left:2px solid var(--accent); padding:22px 0 0 24px; top:115px; }
[data-theme="terminal"] header h1 { font:700 28px/1.2 "Courier New",monospace; }
[data-theme="terminal"] header h1:before { content:"> "; color:var(--accent); }
[data-theme="terminal"] .image.avatar { display:none; }
[data-theme="terminal"] .profile-links { justify-content:flex-start; font-size:12px; }
[data-theme="terminal"] main { width:calc(100% - 315px); padding-top:105px; }
[data-theme="terminal"] h2 { font:700 18px/1.3 "Courier New",monospace; }
[data-theme="terminal"] h2:before { content:"~/ "; color:var(--accent); }
[data-theme="terminal"] h3 { font:400 14px "Courier New",monospace; color:var(--accent)!important; }
[data-theme="terminal"] article { background:#0d1412df; padding:24px; border:1px solid var(--line); }
[data-theme="terminal"] .publications .abbr { display:none; }
[data-theme="terminal"] .pub-body .title { color:var(--accent)!important; }
/* Field Notes: quiet profile with rounded portrait and spacious reading. */
body[data-theme="botanical"] { --page:#f2f5ed; --ink:#294c3a; --accent:#416c50; --muted:#637b66; --line:#c5d3bf; --surface:#fcfdf8; }
[data-theme="botanical"] .wrapper { width:min(1080px,calc(100% - 72px)); }
[data-theme="botanical"] header { width:260px; text-align:left; top:40px; }
[data-theme="botanical"] header h1 { font-size:40px; line-height:1.1; letter-spacing:-.03em; }
[data-theme="botanical"] .image.avatar img { border-radius:90px 90px 8px 8px; width:180px; height:205px; padding:0; margin-bottom:25px; }
[data-theme="botanical"] .profile-links { justify-content:flex-start; }
[data-theme="botanical"] main { width:calc(100% - 340px); }
[data-theme="botanical"] article { background:#f9fcf3dd; border:1px solid var(--line); border-radius:4px; padding:28px; }
[data-theme="botanical"] h2 { font-size:27px; font-weight:400; }
[data-theme="botanical"] .publications .abbr { flex-basis:150px; }
[data-theme="botanical"] .publications ol.bibliography li .teaser { width:150px; }
/* Research Blueprint: header specification block and full-width sections. */
body[data-theme="blueprint"] { --page:#102a43; --ink:#deecf7; --accent:#87c9ef; --muted:#a3c0d5; --line:#456179; --surface:#16364f; font-family:Arial,sans-serif; }
[data-theme="blueprint"] .wrapper { width:min(1100px,calc(100% - 80px)); }
[data-theme="blueprint"] header { position:static; float:none; width:100%; max-height:none; margin:100px 0 35px; padding:30px; text-align:left; border:1px solid var(--line); background:#102a43dd; }
[data-theme="blueprint"] header h1 { font-size:44px; letter-spacing:-.025em; }
[data-theme="blueprint"] .image.avatar { float:right; }
[data-theme="blueprint"] .image.avatar img { border-radius:0; padding:0; width:130px; height:130px; }
[data-theme="blueprint"] .profile-links { justify-content:flex-start; }
[data-theme="blueprint"] main { float:none; width:100%; padding-top:0; }
[data-theme="blueprint"] article { border:1px solid var(--line); background:#102a43e8; padding:28px 32px; }
[data-theme="blueprint"] h2 { font:14px monospace; letter-spacing:.1em; text-transform:uppercase; border-bottom:1px solid var(--line); padding-bottom:16px; }
[data-theme="blueprint"] .publications ol.bibliography { display:grid; grid-template-columns:1fr 1fr; gap:30px; }
[data-theme="blueprint"] .publications .pub-row { display:block; }
[data-theme="blueprint"] .publications .abbr { float:left; margin-right:20px; }
[data-theme="blueprint"] .publications ol.bibliography li .teaser { width:130px; height:110px; border-radius:0; }
/* Aurora Glass: wide hero, translucent panels. */
body[data-theme="aurora"] { --page:#101125; --ink:#e7e8fa; --accent:#c6b9ff; --muted:#acafcf; --line:#51506a; --surface:#27273fe0; font-family:Arial,sans-serif; }
[data-theme="aurora"] .wrapper { width:min(1100px,calc(100% - 80px)); }
[data-theme="aurora"] header { position:static; float:none; width:100%; max-height:none; padding:100px 0 50px; }
[data-theme="aurora"] header h1 { font-size:clamp(34px,5vw,62px); font-weight:600; letter-spacing:-.05em; }
[data-theme="aurora"] .image.avatar img { width:120px; height:120px; padding:8px; background:#ffffff0d; margin-bottom:15px; }
[data-theme="aurora"] main { float:none; width:100%; padding-top:0; display:grid; grid-template-columns:1fr 1fr; gap:22px; }
[data-theme="aurora"] article { padding:30px; border:1px solid #ffffff26; border-radius:18px; background:#202139c9; backdrop-filter:blur(18px); margin:0; }
[data-theme="aurora"] .section-about, [data-theme="aurora"] .section-publications { grid-column:1 / -1; }
[data-theme="aurora"] .publications ol.bibliography { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:0; }
[data-theme="aurora"] .pub-row { display:block; }
[data-theme="aurora"] .publications .abbr { margin-bottom:16px!important; }
[data-theme="aurora"] .publications ol.bibliography li .teaser { width:100%; height:160px; }
/* Studio Folio: a large typographic hero and project-led columns. */
body[data-theme="folio"] { --page:#f8f5f0; --ink:#2d2925; --accent:#93502e; --muted:#796f66; --line:#d5cabd; --surface:#fffaf4; font-family:Arial,sans-serif; }
[data-theme="folio"] .wrapper { width:min(1180px,calc(100% - 88px)); }
[data-theme="folio"] header { position:static; float:none; width:100%; max-height:none; text-align:left; padding:120px 0 55px; border-bottom:1px solid var(--line); }
[data-theme="folio"] header h1 { font-size:clamp(48px,7vw,100px); line-height:.98; letter-spacing:-.065em; font-weight:500; max-width:800px; }
[data-theme="folio"] .image.avatar { float:right; }
[data-theme="folio"] .image.avatar img { width:160px; height:190px; border-radius:80px 80px 0 0; padding:0; }
[data-theme="folio"] .profile-links { justify-content:flex-start; }
[data-theme="folio"] main { float:none; width:100%; padding-top:40px; display:grid; grid-template-columns:1fr 1fr; gap:35px; }
[data-theme="folio"] .section-about, [data-theme="folio"] .section-publications { grid-column:1 / -1; }
[data-theme="folio"] .section-about { font-size:23px; max-width:820px; }
[data-theme="folio"] h2 { font:12px Arial,sans-serif; text-transform:uppercase; letter-spacing:.15em; margin-bottom:22px; }
[data-theme="folio"] .publications ol.bibliography { display:grid; grid-template-columns:1fr 1fr; gap:30px; }
[data-theme="folio"] .pub-row { display:block; }
[data-theme="folio"] .publications ol.bibliography li .teaser { width:100%; height:225px; border-radius:0; margin-bottom:18px; }
/* Bauhaus: primary-color poster, geometric masthead, strong modular divisions. */
body[data-theme="bauhaus"]{--page:#eee9df;--ink:#222322;--accent:#ba2e22;--muted:#63625c;--line:#aaa79d;--surface:#f7f2e8;font-family:Arial,Helvetica,sans-serif}
[data-theme="bauhaus"] .wrapper{width:min(1160px,calc(100% - 88px))}
[data-theme="bauhaus"] header{position:relative;float:none;width:100%;max-height:none;text-align:left;padding:105px 245px 48px 0;border-bottom:8px solid var(--ink);isolation:isolate}
[data-theme="bauhaus"] header:after{content:"";position:absolute;right:0;top:110px;width:210px;height:220px;z-index:-1;background:radial-gradient(circle at 50% 25%,#d63828 0 51px,transparent 52px),linear-gradient(90deg,transparent 50%,#dfb334 50%) 0 120px/105px 100px no-repeat,linear-gradient(#2459a6,#2459a6) 110px 120px/100px 100px no-repeat;border-bottom:3px solid #222}
[data-theme="bauhaus"] header h1{font-size:clamp(48px,7vw,88px);line-height:.95;letter-spacing:-.07em;font-weight:800;max-width:760px;margin:0 0 30px}
[data-theme="bauhaus"] .image.avatar{float:none;display:block;margin-bottom:22px}
[data-theme="bauhaus"] .image.avatar img{width:78px;height:78px;border-radius:50%;padding:0;filter:grayscale(1)}
[data-theme="bauhaus"] .profile-links{justify-content:flex-start}
[data-theme="bauhaus"] main{float:none;width:100%;padding-top:0;counter-reset:bauhaus-sections}
[data-theme="bauhaus"] article{position:relative;display:grid;grid-template-columns:240px 1fr;gap:0 35px;padding:36px 0;border-bottom:2px solid var(--ink)}
[data-theme="bauhaus"] article>h2{grid-column:1;grid-row:1 / span 30;font-size:27px;line-height:1.1;font-weight:800;letter-spacing:-.045em}
[data-theme="bauhaus"] article>h2:before{counter-increment:bauhaus-sections;content:counter(bauhaus-sections,decimal-leading-zero);display:block;font:700 13px/1.2 Arial,sans-serif;color:var(--accent);margin-bottom:17px}
[data-theme="bauhaus"] article>:not(h2){grid-column:2}
[data-theme="bauhaus"] .publications{margin-top:0}
[data-theme="bauhaus"] .publications .teaser{border-radius:0!important}
[data-theme="bauhaus"] .publications .badge{border-radius:0}
/* Sketchbook: irregular ink borders, tape portrait, marginal pencil marks. */
body[data-theme="sketch"]{--page:#faf7ef;--ink:#3f4540;--accent:#396d85;--muted:#7c7d71;--line:#c8c6b9;--surface:#fffdf5;font-family:Georgia,"Times New Roman",serif}
[data-theme="sketch"] .wrapper{width:min(1100px,calc(100% - 88px))}
[data-theme="sketch"] header{width:270px;text-align:left;top:65px;overflow:visible}
[data-theme="sketch"] header h1,[data-theme="sketch"] h2,[data-theme="sketch"] h3{font-family:"Chalkboard SE","Comic Sans MS","Segoe Print",cursive}
[data-theme="sketch"] header h1{font-size:40px;line-height:1.12;letter-spacing:-.035em;transform:rotate(-2deg);margin:24px 0}
[data-theme="sketch"] .image.avatar{position:relative;display:inline-block;border-radius:2px;overflow:visible;transform:rotate(-4deg);padding:10px 10px 24px;background:#fffdf8;border:1px solid #d5d0c4;box-shadow:3px 4px 0 #c9c4b334;margin:12px 0 15px 12px}
[data-theme="sketch"] .image.avatar:before{display:block;opacity:1;border-radius:1px;content:"";position:absolute;left:36%;top:-11px;width:58px;height:24px;background:#dccb93b3;transform:rotate(8deg);z-index:1}
[data-theme="sketch"] .image.avatar img{padding:0;border-radius:0;width:135px;height:150px;filter:sepia(.12)}
[data-theme="sketch"] .profile-links{justify-content:flex-start}
[data-theme="sketch"] main{width:calc(100% - 350px)}
[data-theme="sketch"] article{position:relative;padding:25px 29px;border:1.5px solid #90988c;border-radius:2px 9px 4px 11px / 9px 3px 12px 4px;background:#fffdf6df;box-shadow:3px 4px 0 #ddd8c933}
[data-theme="sketch"] article:after{content:"";position:absolute;inset:4px -4px -3px 4px;border:1px solid #939b822b;border-radius:9px 3px 11px 5px;pointer-events:none}
[data-theme="sketch"] h2{display:table;font-size:27px;font-weight:400;border-bottom:3px solid #e3c577;border-radius:0 0 48% 8%;padding:0 4px 3px}
[data-theme="sketch"] .publications .abbr{flex-basis:140px}
[data-theme="sketch"] .publications .teaser{width:140px!important;border:1px solid #b9c0b3;border-radius:3px 9px 2px 6px!important;transform:rotate(-1deg)}
[data-theme="sketch"] .publications .badge{border-radius:3px 1px 5px 2px;transform:rotate(-2deg)}
[data-theme="sketch"] .entry{border-bottom-style:dashed!important}
@media(max-width:960px){[data-theme="bauhaus"] header{padding-right:220px!important}[data-theme="sketch"] .image.avatar{float:right;margin-left:25px}[data-theme="sketch"] header h1{transform:none}}
@media(max-width:600px){[data-theme="bauhaus"] header{padding-right:0!important}[data-theme="bauhaus"] header:after{top:95px;width:100px;height:115px;background:radial-gradient(circle at 50% 24%,#d63828 0 25px,transparent 26px),linear-gradient(90deg,transparent 50%,#dfb334 50%) 0 60px/48px 50px no-repeat,linear-gradient(#2459a6,#2459a6) 55px 60px/45px 50px no-repeat}[data-theme="bauhaus"] header h1{margin-top:25px}[data-theme="bauhaus"] article{padding-left:0!important;padding-right:0!important}[data-theme="bauhaus"] article>h2:before{display:inline;margin-right:16px}[data-theme="sketch"] .image.avatar{margin-left:12px!important}[data-theme="sketch"] .publications .teaser{width:100%!important}}

@media(prefers-color-scheme:dark) { body[data-theme="classic"] { --page:#20212b; --ink:#dadbdf; --accent:#3eb7f0; --muted:#a1b0bc; --line:#4b5361; } }
@media(max-width:960px) {
 body:not([data-theme="classic"]) .wrapper { width:auto; margin:0 24px!important; }
 body:not([data-theme="classic"]) header { position:static; float:none; width:100%; top:auto; max-height:none; padding:90px 0 30px; margin:0; border-left:0; }
 body:not([data-theme="classic"]) main { float:none; width:100%; padding-top:28px; border:0; }
 [data-theme="editorial"] article { grid-template-columns:150px 1fr; gap:20px; }
 [data-theme="swiss"] header h1 { font-size:48px; }
 [data-theme="botanical"] .image.avatar { float:right; margin-left:20px; }
 [data-theme="botanical"] .image.avatar img { width:100px; height:125px; }
}
@media(max-width:600px) {
 body:not([data-theme="classic"]) .wrapper { margin:0 20px!important; }
 body:not([data-theme="classic"]) header h1 { font-size:36px; line-height:1.12; }
 body:not([data-theme="classic"]) header .image.avatar { float:none; margin:0 0 22px; }
 body:not([data-theme="classic"]) header .image.avatar img { width:95px; height:100px; }
 body:not([data-theme="classic"]) main { display:block; }
 body:not([data-theme="classic"]) article { display:block; margin-bottom:24px; padding:22px 18px; }
 [data-theme="editorial"] article, [data-theme="swiss"] article, [data-theme="folio"] article { padding-left:0!important; padding-right:0!important; }
 body:not([data-theme="classic"]) .publications ol.bibliography { display:block; }
 body:not([data-theme="classic"]) .publications .pub-row { display:block; }
 body:not([data-theme="classic"]) .publications .abbr { float:none; margin-right:0; }
 body:not([data-theme="classic"]) .publications ol.bibliography li .teaser { width:100%; height:175px; }
 [data-theme="folio"] .section-about { font-size:19px; }
}
@media print { body:not([data-theme="classic"]) { --page:white; --ink:black; --muted:#444; --accent:#222; --line:#aaa; } body:not([data-theme="classic"]) header { padding-top:0; } body:not([data-theme="classic"]) main { display:block; } }

@media(max-width:960px){body[data-theme="bauhaus"] header{position:relative}}
/* Let the grid motion remain visible through technical-style panels. */
body[data-theme="blueprint"][data-background="grid"] article,body[data-theme="blueprint"][data-background="grid"] header{background:#102a43ba}
body[data-theme="terminal"][data-background="grid"] article{background:#0d1412bf}
