:root{
  --ink:#14171c;--muted:#454c56;--faint:#575f6a;--rule:#e8eaed;--bg:#fff;--wash:#f6f7f9;
  --blue:#003262;--blue-soft:#eaf0f7;--gold:#e7a500;--gold-ink:#8a6200;
  --focus:#2f6fd6;
  --font:"Avenir Next","Avenir","Nunito Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
}
:root{color-scheme:light}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--ink:#eceef1;--muted:#bcc2ca;--faint:#a2aab4;--rule:#232a34;--bg:#0e1217;--wash:#151a21;--blue:#a9c6f2;--blue-soft:#1a2432;--gold:#f5b81c;--gold-ink:#f5c64a;--focus:#8db8ff;color-scheme:dark}}
:root[data-theme="dark"]{--ink:#eceef1;--muted:#bcc2ca;--faint:#a2aab4;--rule:#232a34;--bg:#0e1217;--wash:#151a21;--blue:#a9c6f2;--blue-soft:#1a2432;--gold:#f5b81c;--gold-ink:#f5c64a;--focus:#8db8ff;color-scheme:dark}
.theme{flex:none;display:grid;place-items:center;width:2.1rem;height:2.1rem;border:0;border-radius:50%;background:var(--wash);color:var(--muted);cursor:pointer;transition:color .15s}
.theme:hover{color:var(--ink)}
.theme svg{width:1rem;height:1rem}
.theme .sun{display:none}
.is-dark .theme .sun{display:block}.is-dark .theme .moon{display:none}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:4.5rem;scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font:400 1.0625rem/1.6 var(--font)}
a{color:var(--blue);text-decoration:none;background:linear-gradient(currentColor,currentColor) 0 100%/100% 1px no-repeat;background-size:100% 1px;transition:background-size .2s}
a:hover{background-size:0 1px;background-position:100% 100%}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:3px}
ul,ol{margin:0;padding:0;list-style:none}
p{margin:0 0 1em}
.wrap{max-width:66rem;margin:0 auto;padding:0 1.5rem}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* ---------- top bar ---------- */
.bar{position:sticky;top:0;z-index:10;background:color-mix(in srgb,var(--bg) 85%,transparent);backdrop-filter:saturate(1.6) blur(14px);-webkit-backdrop-filter:saturate(1.6) blur(14px);border-bottom:1px solid transparent;transition:border-color .2s}
.bar.scrolled{border-bottom-color:var(--rule)}
.bar .wrap{display:flex;align-items:center;gap:2rem;height:3.75rem}
.mark{font-weight:600;font-size:1rem;color:var(--ink);background:none;letter-spacing:.01em;white-space:nowrap}
.bar nav{display:flex;gap:1.6rem;font-size:.9rem}
.bar nav a{color:var(--muted);background:none}
.bar nav a:hover{color:var(--ink)}
.lec-pick{margin-left:auto;display:flex;background:var(--wash);border-radius:999px;padding:3px;font-size:.86rem}
.lec-pick button{font:inherit;font-weight:500;border:0;background:none;color:var(--muted);padding:.35rem .85rem;border-radius:999px;cursor:pointer;transition:background .15s,color .15s}
.lec-pick button:hover{color:var(--ink)}
.lec-pick button[aria-pressed="true"]{background:var(--bg);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08),0 0 0 1px var(--rule)}
@media (max-width:700px){.bar nav{display:none}.bar .wrap{gap:.75rem}}

/* ---------- heading ---------- */
.head{padding:4rem 0 2.5rem}
.crumb{font-size:.9rem;color:var(--faint);margin:0 0 1.5rem;display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.crumb a{color:var(--faint);background:none}.crumb a:hover{color:var(--ink)}
h1{font-weight:400;font-size:clamp(2.6rem,7vw,4.25rem);line-height:1;letter-spacing:-.025em;margin:0 0 1.25rem;color:var(--ink)}
.facts{display:flex;flex-wrap:wrap;gap:.4rem 2.25rem;color:var(--muted);font-size:.92rem;margin:0}
.facts b{color:var(--ink);font-weight:600}
.hint{font-size:.9rem;color:var(--faint);margin:1rem 0 0}
body[data-lec] .hint{display:none}
body[data-lec="001"] [data-lec="002"],body[data-lec="002"] [data-lec="001"]{display:none!important}

/* ---------- semester line ---------- */
.line-scroll{overflow-x:auto;margin:0 -1.5rem;padding:0 1.5rem;scrollbar-width:none}
.line-scroll::-webkit-scrollbar{display:none}
.line{position:relative;min-width:680px;height:6.6rem;margin:0}
.lbl{position:absolute;top:0;font-size:.8rem;color:var(--faint);white-space:nowrap;line-height:1;letter-spacing:.02em}
.lbl.mo{padding-left:.35rem;border-left:1px solid var(--rule);height:1.6rem}
.lbl.tdy{transform:translateX(-50%);color:var(--gold-ink);font-weight:600}
.track{position:absolute;left:0;right:0;top:1.75rem;height:4px;display:grid;grid-template-columns:repeat(var(--n),1fr);gap:4px}
.seg{position:relative;background:var(--rule);border-radius:2px;overflow:hidden}
.seg i{position:absolute;inset:0 auto 0 0;background:var(--blue);transform-origin:left;animation:fill .32s cubic-bezier(.3,.6,.3,1) both;animation-delay:calc(var(--i) * 40ms + 120ms)}
@keyframes fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes rise{from{opacity:0;transform:translate(-1px,4px)}to{opacity:1;transform:translateX(-1px)}}
@keyframes fade{from{opacity:0}to{opacity:1}}
.seg.off{background:none;border-top:1px dashed var(--rule);border-radius:0;top:1.5px;height:1px}
.pin{position:absolute;top:1.25rem;width:2px;height:1.3rem;background:var(--gold);transform:translateX(-1px);border-radius:1px;animation:rise .35s ease-out both;animation-delay:var(--d)}
.lbl.tdy{animation:fade .35s ease-out both;animation-delay:var(--d)}
.ex{position:absolute;top:1.6rem;width:.55rem;height:.55rem;background:var(--bg);border:1.5px solid var(--blue);transform:translateX(-50%) rotate(45deg)}
.nums{position:absolute;left:0;right:0;top:2.6rem;display:grid;grid-template-columns:repeat(var(--n),1fr);gap:4px}
.nums a{text-align:center;font-size:.84rem;color:var(--faint);background:none;padding:.2rem 0;border-radius:6px;line-height:1.25;transition:background .15s,color .15s}
.nums a:hover{color:var(--ink);background:var(--wash)}
.nums a.past{color:var(--muted)}
.nums a.cur{color:var(--ink);font-weight:600}
.nums small{display:block;font-size:.76rem;color:var(--faint);font-weight:400}
.exl{position:absolute;top:4.8rem;padding:.3rem .45rem;min-height:1.6rem;line-height:1.15;border-radius:6px;transform:translateX(-50%);font-size:.8rem;font-weight:500;color:var(--blue);white-space:nowrap;background:none}

/* ---------- this week ---------- */
.now{background:var(--wash);border-radius:20px;padding:2.25rem 2.5rem;margin:2rem 0 5rem;display:grid;grid-template-columns:1.3fr 1fr;gap:2rem 4rem}
.now h2{grid-column:1/-1;font-weight:400;font-size:1.9rem;letter-spacing:-.015em;margin:0;line-height:1.15}
.now h2 small{display:block;font-size:.88rem;font-weight:400;letter-spacing:0;color:var(--muted);margin-top:.45rem}
.now h3{font-size:.84rem;font-weight:600;letter-spacing:.04em;margin:0 0 .9rem;color:var(--faint)}
.quick{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.5rem;padding-top:.5rem}
.quick a{font-size:.9rem;font-weight:500;color:var(--ink);background:var(--bg);padding:.45rem .95rem;border-radius:999px;box-shadow:0 0 0 1px var(--rule);transition:box-shadow .15s}
.quick a:hover{box-shadow:0 0 0 1px var(--faint)}
@media (max-width:760px){.now{grid-template-columns:1fr;padding:1.5rem;border-radius:16px}}

/* lecture rows */
.lec{display:grid;grid-template-columns:2.25rem 1fr;gap:0 .9rem;padding:.6rem 0}
.lec .n{font-size:.9rem;font-weight:500;color:var(--faint);line-height:1.6;font-variant-numeric:tabular-nums}
.lec .t{font-weight:500;line-height:1.4;font-size:1.02rem}
.lec .sec{font-weight:400;color:var(--faint);font-size:.88rem;margin-left:.55rem;white-space:nowrap}
.lec .mat{grid-column:2;display:flex;flex-wrap:wrap;gap:.15rem 1.15rem;font-size:.9rem;margin-top:.3rem}
.lec .mat a{color:var(--muted);background:none}
.lec .mat a:hover{color:var(--blue)}
.lec .note{grid-column:2;font-size:.9rem;color:var(--muted)}
.later .mat{color:var(--faint);font-size:.88rem}

/* due rows */
.due li{display:grid;grid-template-columns:4.75rem 1fr auto;gap:.9rem;padding:.7rem 0;border-top:1px solid var(--rule);align-items:baseline}
.due li:first-child{border-top:0;padding-top:.25rem}
.due .d{font-size:.88rem;color:var(--faint);font-variant-numeric:tabular-nums;white-space:nowrap}
.due .w{font-weight:500}
.due .w a{color:var(--ink)}
.due .w small{display:block;font-weight:400;color:var(--muted);font-size:.88rem;margin-top:.1rem}
.due .rel{font-size:.84rem;color:var(--faint);white-space:nowrap}
.due .soon .rel{color:var(--gold-ink);font-weight:600}
.due .gone .w,.due .gone .w a,.due .gone .d,.due .gone .rel{color:var(--faint)}
.due .exam .w,.due .exam .w a{color:var(--blue)}
.empty{color:var(--faint);font-size:.9rem}

/* ---------- schedule ---------- */
.sh{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin:0 0 1.5rem}
h2.big{font-weight:400;font-size:2.25rem;letter-spacing:-.02em;margin:0;color:var(--ink)}
.sh button{font:inherit;font-size:.9rem;font-weight:500;background:none;border:0;color:var(--muted);cursor:pointer;padding:0}
.sh button:hover{color:var(--ink)}
.weeks{position:relative}
.week{position:relative;display:grid;grid-template-columns:8.5rem 1fr 1fr;gap:0 3rem;padding:1.4rem 0;border-top:1px solid var(--rule)}
.week:first-child{border-top:0}
.week.cur{background:var(--wash);border-radius:14px;border-top-color:transparent;padding:1.4rem 1.25rem;margin:0 -1.25rem}
.week.cur+.week{border-top-color:transparent}
.wl b{display:block;font-weight:600;font-size:.95rem}
.week.past .wl b{color:var(--muted);font-weight:500}
.wl span{font-size:.88rem;color:var(--faint)}
.wl em{display:block;font-style:normal;font-size:.84rem;color:var(--gold-ink);margin-top:.2rem}
.week.cur .wl b::after{content:"";display:inline-block;width:.45rem;height:.45rem;border-radius:50%;background:var(--gold);margin-left:.5rem;vertical-align:.12em}
.week .pause{grid-column:2/-1;color:var(--faint);align-self:center;margin:0;font-size:.92rem}
.week.past:not(.open) .body{display:none}
.week.past:not(.open) .peek{display:block}
.peek{display:none;grid-column:2/-1;margin:0}
.peek button{font:inherit;font-size:.9rem;white-space:pre-wrap;line-height:1.7;background:none;border:0;padding:0;color:var(--faint);cursor:pointer;text-align:left}
.peek button:hover{color:var(--ink)}
.body{display:contents}
@media (max-width:860px){.week{grid-template-columns:1fr;gap:.6rem 0}.week .pause,.peek{grid-column:1}}

/* ---------- guide ---------- */
.guide{display:grid;grid-template-columns:12rem 1fr;gap:4rem;margin:6rem 0 6rem;padding-top:4rem;border-top:1px solid var(--rule)}
.toc{position:sticky;top:5.5rem;align-self:start;font-size:.9rem}
.toc h2{font-weight:400;font-size:1.6rem;letter-spacing:-.015em;margin:0 0 1.1rem}
.toc a{display:block;padding:.3rem 0;color:var(--faint);background:none;transition:color .15s,transform .15s}
.toc a:hover{color:var(--ink)}
.toc a.on{color:var(--ink);font-weight:500;transform:translateX(.35rem)}
.prose{font-size:1.0625rem;line-height:1.75;color:var(--ink)}
.prose section{margin-bottom:4rem;max-width:38rem}
.letter>div{max-width:38rem}
.prose h3{font-weight:400;font-size:1.65rem;letter-spacing:-.015em;line-height:1.2;margin:0 0 1.1rem}
.prose h4{font-size:.95rem;font-weight:600;margin:2rem 0 .5rem}
.prose ul{margin:0 0 1.4em}
.prose li{position:relative;padding-left:1.25rem;margin-bottom:.75em}
.prose li::before{content:"";position:absolute;left:.1rem;top:.72em;width:.3rem;height:.3rem;background:var(--blue);border-radius:50%}
.prose li b,.prose p b{font-weight:600}
.prose blockquote{margin:2rem 0;padding:0;font-size:1.2rem;font-weight:400;line-height:1.5;letter-spacing:-.005em;color:var(--muted)}
.prose blockquote::before{content:"\201C";display:block;font-size:2.5rem;line-height:.6;color:var(--faint);margin-bottom:.4rem}
.prose blockquote cite{display:block;font-style:normal;font-size:.86rem;font-weight:400;color:var(--faint);margin-top:.6rem;letter-spacing:0}
.prose .box{font-size:.98rem;background:var(--wash);border-radius:14px;padding:1.1rem 1.35rem;margin:1.5rem 0}
.prose .box p:last-child{margin:0}
.prose table{width:100%;border-collapse:collapse;font-size:.92rem;margin:.5rem 0 1.75rem;line-height:1.5}
.prose th,.prose td{text-align:left;padding:.7rem .75rem .7rem 0;border-bottom:1px solid var(--rule);vertical-align:top}
.prose th{font-weight:600;color:var(--faint);font-size:.84rem;letter-spacing:.03em}
.prose td.pct{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}
.tag{font-size:.76rem;font-weight:600;letter-spacing:.03em;color:var(--blue);background:var(--blue-soft);border-radius:999px;padding:.12rem .5rem;vertical-align:.12em;margin-right:.4rem;white-space:nowrap}
@media (max-width:860px){.guide{grid-template-columns:1fr;gap:2rem;margin-top:4rem}.toc{position:static}.toc nav{display:flex;flex-wrap:wrap;gap:.4rem}.toc a{background:var(--wash);border-radius:999px;padding:.35rem .8rem}.toc a.on{transform:none}}
/* ---------- instructor portrait ---------- */
.head{display:grid;grid-template-columns:1fr auto;gap:2.5rem;align-items:center}
.portrait{margin:0}
.portrait img{display:block;width:11rem;height:auto;aspect-ratio:410/512;object-fit:cover;border-radius:14px}
.portrait figcaption{font-size:.88rem;color:var(--faint);line-height:1.5;margin-top:.85rem}
.portrait figcaption b{display:block;color:var(--ink);font-weight:600;font-size:.9rem}
.portrait figcaption a{color:var(--muted)}
@media (max-width:760px){.head{grid-template-columns:1fr;gap:1.75rem;padding-top:2.5rem}
 .portrait{order:-1;display:grid;grid-template-columns:4.25rem 1fr;gap:1.1rem;align-items:end}
 .portrait img{width:100%;border-radius:10px}.portrait figcaption{margin:0}}

.who{display:inline-flex;align-items:center;gap:.6rem;color:var(--muted);background:none}
.who img{width:2rem;height:2rem;border-radius:50%;object-fit:cover;object-position:49% 28%}
.who:hover{color:var(--ink)}
.letter{display:grid;grid-template-columns:1fr 11rem;gap:2.5rem;align-items:start}
.letter figure{margin:.4rem 0 0}
.letter figure img{width:100%;aspect-ratio:4/5;object-fit:cover;object-position:49% 30%;border-radius:14px;display:block}
.letter figcaption{font-size:.86rem;color:var(--faint);margin-top:.6rem;line-height:1.4}
.sign{display:flex;align-items:center;gap:.75rem;margin-top:1.5rem}
@media (max-width:640px){.letter{grid-template-columns:1fr}.letter figure{order:-1;width:8rem}}
/* ---------- add to calendar ---------- */
.cal{font:inherit;font-size:.9rem;font-weight:600;display:inline-flex;align-items:center;gap:.45rem;color:var(--bg);background:var(--blue);border:0;padding:.5rem 1rem;border-radius:999px;cursor:pointer;min-height:2.25rem}
.cal:hover{filter:brightness(1.15)}
.cal svg{width:1rem;height:1rem;flex:none}
.cal-note{font-size:.84rem;color:var(--muted);align-self:center}
.sh-actions{display:flex;align-items:center;gap:1.5rem}

/* ---------- copy-link anchors on guide headings ---------- */
.prose h3{position:relative}
.anchor{display:inline-grid;place-items:center;width:1.75rem;height:1.75rem;margin-left:.35rem;vertical-align:.1em;border:0;border-radius:6px;background:none;color:var(--faint);cursor:pointer;opacity:0;transition:opacity .15s,color .15s,background .15s}
.anchor svg{width:1rem;height:1rem}
.prose h3:hover .anchor,.anchor:focus-visible{opacity:1}
.anchor:hover{color:var(--ink);background:var(--wash)}
@media (hover:none){.anchor{opacity:.6}}
.toast{position:fixed;left:50%;bottom:1.5rem;transform:translate(-50%,1rem);background:var(--ink);color:var(--bg);font-size:.9rem;font-weight:500;padding:.6rem 1.1rem;border-radius:999px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:20}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- footer ---------- */
footer .wrap{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem 2rem}

/* ---------- print: clean black text, everything expanded ---------- */
@media print{
  :root{--ink:#000;--muted:#333;--faint:#555;--rule:#bbb;--bg:#fff;--wash:#fff;--blue:#000;--blue-soft:#fff;--gold:#000;--gold-ink:#000}
  @page{margin:1.6cm}
  body{font-size:10.5pt;background:#fff}
  .bar,.line-scroll,.hint,.quick,.toc,.sh button,.sh-actions,.anchor,.toast,.peek,.portrait img,.lec .mat,.due .rel{display:none!important}
  .sh,h2.big{break-after:avoid}
  .week:first-child{break-before:avoid}
  .lec{padding:.15rem 0}
  .wrap{max-width:none;padding:0}
  .head{display:block;padding:0 0 1rem}
  h1{font-size:26pt}
  .now{display:block;padding:0;margin:1rem 0 2rem;border-radius:0}
  .now>div{margin-top:1rem}
  .week,.week.cur{display:grid;grid-template-columns:7rem 1fr 1fr;margin:0;padding:.6rem 0;border-radius:0;background:none;break-inside:avoid}
  .week.past .body{display:contents!important}
  .guide{display:block;margin:2rem 0 0;padding-top:1rem;break-before:page}
  .prose{font-size:10.5pt;line-height:1.5}
  .prose section{max-width:none;margin-bottom:1.5rem;break-inside:avoid-page}
  .prose h3{break-after:avoid}
  .prose blockquote{font-size:11pt}
  a{background:none;color:#000}
  .prose a[href^="http"]::after{content:" (" attr(href) ")";font-size:8pt;color:#555;word-break:break-all}
  footer{border:0;padding-top:1rem}
}
footer{border-top:1px solid var(--rule);padding:2rem 0 3.5rem;color:var(--faint);font-size:.88rem}
footer a{color:var(--faint);background:none}footer a:hover{color:var(--ink)}

/* ===================== Glo-inspired layer ===================== */
:root{--ink:#1d1e28;--muted:#474852;--faint:#5b5c66;--rule:#e7e1d8;--bg:#faf9f7;--wash:#f3eee6;--blue:#003262;--blue-soft:#e6ebf2;--gold:#d99a00;--gold-ink:#6f5000;
  --serif:"Fraunces",Georgia,"Times New Roman",serif}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--ink:#f2eee7;--muted:#c9c3b9;--faint:#aaa49a;--rule:#2d2c31;--bg:#151519;--wash:#201f24;--blue:#aac6f0;--blue-soft:#232c3a;--gold:#f2b83a;--gold-ink:#f4c75e}}
:root[data-theme="dark"]{--ink:#f2eee7;--muted:#c9c3b9;--faint:#aaa49a;--rule:#2d2c31;--bg:#151519;--wash:#201f24;--blue:#aac6f0;--blue-soft:#232c3a;--gold:#f2b83a;--gold-ink:#f4c75e}
h1,.now h2,h2.big,.toc h2,.prose h3{font-family:var(--serif);font-weight:400;letter-spacing:-.012em}
.now h2 small{font-family:var(--font);letter-spacing:0}
h1{font-size:clamp(2.8rem,7vw,4.5rem);line-height:1.02}
.now h2{font-size:2.1rem}
h2.big{font-size:2.6rem}
.prose h3{font-size:1.85rem}
.prose blockquote{font-family:var(--serif);font-style:italic;font-size:1.125rem;line-height:1.55;color:var(--muted);margin:1.75rem 0;padding:.1rem 0 .1rem 1.1rem;border-left:2px solid var(--gold)}
.prose blockquote::before{content:none}
.prose blockquote cite{font-family:var(--font);font-style:normal;font-size:.82rem;margin-top:.45rem}
/* soft gradient hero, like Glo's text panel */
.head{position:relative;isolation:isolate}
html,body{overflow-x:clip}
.head::before{content:"";position:absolute;inset:0 -100vmax;z-index:-1;background:linear-gradient(180deg,var(--wash),var(--bg))}
/* circular portrait */
.portrait img{width:11rem;aspect-ratio:1;border-radius:50%;object-position:50% 50%;box-shadow:0 0 0 6px var(--bg),0 0 0 7px var(--rule)}
.portrait figcaption{text-align:center}
.portrait figcaption b{font-family:var(--serif);font-weight:500;font-size:1.05rem}
@media (max-width:760px){.portrait img{width:100%;border-radius:50%;box-shadow:0 0 0 4px var(--bg),0 0 0 5px var(--rule)}.portrait figcaption{text-align:left}}
/* navy pills, Glo's main button */
.cal{background:var(--ink);color:var(--bg)}
.cal:hover{filter:none;background:#000}
:root[data-theme="dark"] .cal:hover{background:#fff}
.lec-pick{background:var(--wash)}
.lec-pick button[aria-pressed="true"]{background:var(--ink);color:var(--bg);box-shadow:none}
.quick a{border-radius:999px}
/* beige band with a calculus sunburst: tangent lines whose envelope is a parabola */
.now{position:relative;overflow:hidden;isolation:isolate;border-radius:14px}
.now>*{position:relative}
.envelope{position:absolute!important;right:-3%;bottom:-6%;width:44%;height:70%;color:var(--ink);opacity:.10;z-index:-1;pointer-events:none}
@media (max-width:760px){.envelope{width:110%;right:-40%;height:45%;opacity:.07}}
.tag{background:var(--blue-soft)}
.prose li::before{background:var(--gold)}
.week.cur{border-radius:12px}
.prose .box{border-radius:10px}
@media (max-width:760px){.now{border-radius:12px}}
@media print{.envelope,.head::before{display:none!important}}

.lec .mat{row-gap:.2rem}
.lec .mat a{display:inline-block;padding:.15rem 0;min-height:24px}

/* ===================== site pages: home, research, teaching ===================== */
.site-nav{display:flex;gap:1.6rem;font-size:.92rem}
.site-nav a{color:var(--muted);background:none;padding:.35rem 0;border-bottom:2px solid transparent}
.site-nav a:hover{color:var(--ink)}
.site-nav a[aria-current]{color:var(--ink);border-bottom-color:var(--gold)}
.bar .theme{margin-left:auto}
.site-nav a{white-space:nowrap}
@media (max-width:480px){.site-nav .nv-x{display:none}}
@media (max-width:700px){.bar .site-nav{display:flex!important;gap:1.1rem}.has-site-nav .mark{display:none}}
.site-head{position:relative;isolation:isolate;padding:4rem 0 3rem;display:grid;grid-template-columns:1fr auto;gap:3rem;align-items:center}
.site-head::before{content:"";position:absolute;inset:0 -100vmax;z-index:-1;background:linear-gradient(180deg,var(--wash),var(--bg))}
.site-head h1{margin-bottom:.8rem}
.lede{font-size:1.15rem;color:var(--muted);max-width:34rem;margin:0}
.halo{position:relative;width:15rem;aspect-ratio:1;display:grid;place-items:center}
.halo .ring{position:absolute;inset:-20%;color:var(--ink);opacity:.28;pointer-events:none}
.halo .ring svg{width:100%;height:100%}
.halo img{position:relative;width:62%;height:auto;aspect-ratio:1;border-radius:50%;object-fit:cover;box-shadow:0 0 0 6px var(--bg),0 0 0 7px var(--rule)}
@media (max-width:760px){.site-head{grid-template-columns:1fr;gap:2.25rem;padding-top:3rem}.halo{width:10rem;order:-1;margin:0 auto 0 2rem}}
.page{display:grid;grid-template-columns:12rem 1fr;gap:4rem;margin:3.5rem 0 5rem}
.page .side{font-size:.9rem;color:var(--muted);line-height:1.55;align-self:start;position:sticky;top:5.5rem}
.page .side b{display:block;color:var(--ink);font-weight:600;margin-bottom:.25rem}
.page .side p{margin:0 0 1.1rem}
.page .side a{color:var(--muted)}
.page .prose section{max-width:40rem}
.page .prose h2{font-family:var(--serif);font-weight:400;font-size:1.85rem;letter-spacing:-.012em;line-height:1.2;margin:0 0 1rem}
@media (max-width:860px){.page{grid-template-columns:1fr;gap:1.5rem;margin-top:2rem}.page .side{position:static;display:flex;flex-wrap:wrap;gap:0 2rem}}
.prose .cards li{padding:0;margin:0}.prose .cards li::before{content:none}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,19rem),1fr));gap:1rem;margin:0 0 1.5rem;padding:0;list-style:none}
.card{position:relative;overflow:hidden;isolation:isolate;display:flex;flex-direction:column;gap:.15rem;min-height:9.5rem;padding:1.25rem 1.35rem;border-radius:14px;background:var(--wash);color:var(--ink);text-decoration:none;transition:box-shadow .15s}
a.card{background-image:none}
.card:hover{box-shadow:0 0 0 1px var(--faint)}
.card .art{position:absolute;right:-4%;bottom:-8%;width:62%;height:90%;color:var(--ink);opacity:.10;z-index:-1;pointer-events:none}
.card .art svg{width:100%;height:100%}
.card .code{font-family:var(--serif);font-size:1.6rem;line-height:1.1}
.card .name{font-weight:500}
.card .term{font-size:.88rem;color:var(--muted);margin-top:auto}
.prose .past li{display:grid;grid-template-columns:6.5rem 1fr auto;gap:1rem;padding:.65rem 0;margin:0;border-top:1px solid var(--rule)}
.prose .past li::before{content:none}
.prose .past .code{font-weight:600}
.prose .past .term{color:var(--muted);font-size:.9rem;white-space:nowrap}
@media (max-width:560px){.prose .past li{grid-template-columns:1fr auto}.prose .past .code{grid-column:1/-1;margin-bottom:-.6rem}}
.prose .pubs li{padding:0 0 1.1rem;margin:0}
.prose .pubs li::before{content:none}
.prose .pubs a{font-weight:500}
.prose .pubs .venue{display:block;color:var(--muted);font-size:.92rem;font-style:italic}
.prose h3.group{font-family:var(--font);font-size:.95rem;font-weight:600;color:var(--muted);margin:2rem 0 .8rem;letter-spacing:0}
.tree-band{position:relative;margin:1rem 0 2rem;height:0}

[hidden]{display:none!important}
.archived [data-cal]{display:none}
.now.ended{display:block}
.now.ended h2 small{max-width:40rem}

/* ---------- number theory motif along the bottom of the header band ---------- */
.nt-art{position:absolute;left:calc(50% - 50vw);width:100vw;bottom:0;height:6rem;color:var(--ink);opacity:.1;z-index:-1;pointer-events:none;-webkit-mask-image:linear-gradient(to top,#000 35%,transparent);mask-image:linear-gradient(to top,#000 35%,transparent)}
.site-head{padding-bottom:5.5rem}
.nt-art svg{width:100%;height:100%;display:block}
@media (max-width:760px){.nt-art{height:4rem;opacity:.09}.site-head{padding-bottom:4rem}}
@media print{.nt-art{display:none}}

/* ---------- portrait: a plain photo with soft corners ---------- */
.headshot{margin:0}
.headshot img{display:block;width:12rem;height:auto;aspect-ratio:1;object-fit:cover;border-radius:50%;box-shadow:0 0 0 6px var(--bg),0 0 0 7px var(--rule)}
@media (max-width:760px){.site-head .headshot{order:-1}.headshot img{width:8rem;box-shadow:0 0 0 4px var(--bg),0 0 0 5px var(--rule)}}

/* ---------- CV ---------- */
.prose .cv{margin:0 0 .5rem}
.prose .cv li{display:grid;grid-template-columns:1fr auto;gap:.1rem 1.5rem;padding:.85rem 0;margin:0;border-top:1px solid var(--rule)}
.prose .cv li:first-child{border-top:0;padding-top:.2rem}
.prose .cv li::before{content:none}
.prose .cv .what{font-weight:600;line-height:1.4}
.prose .cv .where{grid-column:1;color:var(--muted);font-size:.95rem;line-height:1.45}
.prose .cv .when{grid-column:2;grid-row:1;color:var(--muted);font-size:.9rem;font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right}
.prose .cv.courses li{grid-template-columns:1fr auto}
.prose .cv.courses .what{font-weight:500}
@media (max-width:560px){.prose .cv li{grid-template-columns:1fr}.prose .cv .when{grid-column:1;grid-row:auto;text-align:left}}
.prose .cv-note{color:var(--muted);font-size:.98rem}
.pdf-link{display:inline-flex;align-items:center;gap:.45rem;margin-top:1.25rem;font-size:.92rem;font-weight:600;color:var(--bg);background:var(--ink);padding:.5rem 1rem;border-radius:999px}
.pdf-link:hover{color:var(--bg);filter:brightness(1.25)}
.pdf-link svg{width:1rem;height:1rem}

/* ---------- course pages: second navigation row under Teaching ---------- */
.has-sub{--barh:6.6rem}
html:has(.has-sub){scroll-padding-top:7.5rem}
.has-sub .toc{top:8.5rem}
.subbar{border-top:1px solid var(--rule);background:var(--wash)}
.subbar .wrap{display:flex;align-items:center;gap:1.75rem;height:2.9rem}
.sub-code{font-family:var(--serif);font-size:1.05rem;color:var(--ink);background:none;white-space:nowrap}
.sub-nav{display:flex;gap:1.4rem;font-size:.88rem}
.sub-nav a{color:var(--muted);background:none;white-space:nowrap;padding:.3rem 0;border-bottom:2px solid transparent}
.sub-nav a:hover{color:var(--ink)}
.sub-nav a[aria-current]{color:var(--ink);border-bottom-color:var(--gold)}
.subbar .lec-pick{margin-left:auto;background:var(--bg)}
.subbar .lec-pick button{padding:.25rem .75rem}
.sh .cal{background:var(--ink);color:var(--bg);padding:.5rem 1rem}
.sh .cal:hover{color:var(--bg);background:var(--ink);filter:brightness(1.25)}
@media (max-width:700px){
  .bar .sub-nav{display:flex!important}
  .subbar .wrap{gap:1rem;overflow-x:auto;scrollbar-width:none}
  .subbar .wrap::-webkit-scrollbar{display:none}
  .sub-nav{gap:1rem}
  .subbar .lec-pick{flex:none}
  .subbar .sub-code{display:none}
  .sub-nav{gap:1.1rem}
  .subbar .lec-pick{display:none}
  .lec-inline{display:flex!important}
}
.lec-inline{display:none;align-items:center;gap:.75rem;margin-top:1rem;font-size:.9rem;color:var(--muted)}
.lec-inline .lec-pick{margin:0;background:var(--wash)}
