:root {
  --font-sans: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --background: #fff;
  --foreground: #111;
  --primary: #000;
  --accent: #a03123;
  --n100: #f4f4f4;
  --n200: #e6e6e6;
  --n300: #d0d0d0;
  --n400: #a0a0a0;
  --n500: #888;
  --n600: #636363;
  --n700: #424242;
  --rule: #111;
}
html.dark {
  --background: #101010;
  --foreground: #ececec;
  --primary: #fff;
  --accent: #cf5940;
  --n100: #1d1d1d;
  --n200: #2b2b2b;
  --n300: #3d3d3d;
  --n400: #6e6e6e;
  --n500: #8e8e8e;
  --n600: #ababab;
  --n700: #cbcbcb;
  --rule: #ececec;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--foreground);
  background: var(--background);
}
a { color: inherit; text-decoration: none; transition: color .2s; }
h1, h2, h3, p { margin: 0; }

.eyebrow {
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .6875rem;
  font-weight: 600;
}
.serif { font-family: var(--font-serif); }
.container { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

nav.top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--background); }
nav.top .bar { display: flex; justify-content: space-between; align-items: center; height: 4rem; }
.brand { font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem; letter-spacing: .025em; color: var(--primary); }
.brand:hover { color: var(--accent); }
.links { display: flex; align-items: center; gap: 2rem; }
.links a.eyebrow { position: relative; padding: .5rem 0; color: var(--n500); }
.links a.eyebrow:hover, .links a.eyebrow.active { color: var(--primary); }
.links a.eyebrow.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--primary); }
.theme-btn { background: none; border: 0; color: var(--n500); cursor: pointer; width: 2.25rem; height: 2.25rem; font-size: 1rem; }
.theme-btn:hover { color: var(--primary); }
@media (max-width: 640px) {
  .links { gap: 1rem; }
  .brand { font-size: 1rem; }
}
@media (min-width: 1024px) {
  nav.top .bar { height: 5rem; }
  .brand { font-size: 1.5rem; }
}

main { min-height: 100vh; padding-top: 4rem; }
@media (min-width: 1024px) { main { padding-top: 5rem; } }
.page { padding: 2.5rem 0; }
@media (min-width: 1024px) { .page { padding: 3.5rem 0; } }

.grid { display: grid; grid-template-columns: 1fr; gap: 3.5rem 2.5rem; }
@media (min-width: 1024px) {
  .grid { grid-template-columns: 1fr 2fr; }
  .side { position: sticky; top: 7rem; align-self: start; }
  .content { border-left: 1px solid var(--n200); padding-left: 3.5rem; }
}
.content > section + section { margin-top: 4rem; }

.avatar {
  width: 16rem; height: 16rem; margin: 0 auto 2rem; border-radius: .375rem; overflow: hidden;
  background: var(--n100); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 4rem; color: var(--n400); position: relative;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 32% center; filter: grayscale(1); transition: filter .7s; }
.avatar img:hover { filter: grayscale(0); }
.profile { text-align: center; margin-bottom: 2rem; }
.profile h1 { font-family: var(--font-serif); font-size: 2rem; line-height: 1.25; letter-spacing: -.025em; font-weight: 700; color: var(--primary); margin-bottom: .75rem; }
.profile .role { color: var(--n600); margin-bottom: .5rem; }
.profile .affil { font-family: var(--font-serif); font-style: italic; font-size: .9375rem; color: var(--n500); }
.icons { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-bottom: 1.5rem; }
.icons a { padding: .5rem; color: var(--n500); display: inline-flex; }
.icons a:hover { color: var(--accent); }
.icons svg { width: 1.25rem; height: 1.25rem; }
.interests { border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-bottom: 2rem; }
.interests h3 { text-align: center; color: var(--primary); margin-bottom: 1rem; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.tag {
  font-size: .6875rem; letter-spacing: .025em; text-transform: uppercase; padding: .25rem .625rem;
  border: 1px solid var(--n300); border-radius: .375rem; color: var(--n600); text-align: center;
}

.sec-head { margin-bottom: .75rem; }
.sec-head .row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .75rem; }
h2.title { font-family: var(--font-serif); font-size: 1.75rem; line-height: 1.25; letter-spacing: -.025em; font-weight: 700; color: var(--primary); }
.rule-double { border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); height: 6px; }
.view-all { color: var(--n500); }
.view-all:hover { color: var(--accent); }
.about p { margin-top: 1rem; color: var(--foreground); }
.about p:first-of-type { margin-top: 1.25rem; }
.about a { text-decoration: underline; }

.pub { display: flex; gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--n200); }
.pub:last-child { border-bottom: 0; }
.pub .num { font-family: var(--font-serif); font-size: 1rem; color: var(--n300); width: 1.75rem; flex-shrink: 0; padding-top: .15rem; }
.pub .body { min-width: 0; flex: 1; }
.pub .venue { color: var(--n400); margin-bottom: .375rem; }
.pub h3 { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; line-height: 1.375; color: var(--primary); margin-bottom: .375rem; letter-spacing: .01em; }
.pub:hover h3 { color: var(--accent); }
.pub .authors { font-size: .875rem; color: var(--n500); margin-bottom: .25rem; }
.pub .authors b { color: var(--primary); font-weight: 600; }
.pub .summary { font-size: .875rem; color: var(--n500); font-style: italic; }
.pub .actions { display: flex; gap: .5rem; margin-top: .75rem; }
.pub .actions a, .pub .actions button {
  font-family: var(--font-sans); background: none; cursor: pointer; color: var(--n600);
  border: 1px solid var(--n300); border-radius: .375rem; padding: .25rem .625rem;
}
.pub .actions a:hover, .pub .actions button:hover { color: var(--accent); border-color: var(--accent); }
.pub pre { display: none; margin: .75rem 0 0; padding: .75rem; background: var(--n100); font-size: .75rem; overflow-x: auto; border-radius: .375rem; color: var(--n700); white-space: pre-wrap; }
.pub pre.open { display: block; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1.5rem 0 .5rem; }
.filters .eyebrow { color: var(--n500); margin-right: .5rem; }
.chip { background: none; cursor: pointer; font-family: var(--font-sans); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .75rem; border: 1px solid var(--n300); border-radius: .375rem; color: var(--n600); }
.chip:hover { color: var(--accent); border-color: var(--accent); }
.chip.on { background: var(--primary); color: var(--background); border-color: var(--primary); }
.page-intro { margin-top: .5rem; color: var(--n500); }
.narrow { max-width: 56rem; margin: 0 auto; }

.news-item { display: flex; align-items: baseline; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--n200); }
.news-item:last-child { border-bottom: 0; }
.news-date { color: var(--n400); width: 5rem; flex-shrink: 0; }
.news-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; min-width: 0; }
.news-cat { color: var(--accent); flex-shrink: 0; }
.news-text { font-size: .875rem; color: var(--n700); }

.svc-group { margin-top: 2.5rem; }
.svc-group h3 { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; color: var(--primary); margin-bottom: .75rem; }
.svc-item { display: flex; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--n200); }
.svc-item:last-child { border-bottom: 0; }
.svc-year { color: var(--n400); width: 5rem; flex-shrink: 0; }
.svc-role { font-size: .9375rem; color: var(--primary); font-weight: 500; }
.svc-detail { font-size: .875rem; color: var(--n500); }

footer { border-top: 1px solid var(--n200); padding: 2rem 0; text-align: center; color: var(--n500); font-size: .8125rem; }

.svc-year { width: 9rem; }
.svc-year:empty { display: none; }
.svc-main { min-width: 0; flex: 1; }
.svc-points { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .875rem; color: var(--n600); }
.svc-points li { margin-bottom: .25rem; }
.svc-link { display: inline-block; margin-top: .375rem; color: var(--n500); }
.svc-link:hover { color: var(--accent); }
@media (max-width: 640px) { .svc-item { flex-direction: column; gap: .25rem; } .svc-year { width: auto; } }

.personal { margin: 1.25rem 0 0; padding-left: 1.1rem; }
.personal li { margin-bottom: .75rem; color: var(--foreground); }
