/* Layout: a plain academic site. White ground, Roboto in a light weight for everything, a dark red for links and the current tab. Top bar with the name and five tabs; each tab is a view in the same page. */
:root {
  --bg: #ffffff;
  --bg-2: #f6f6f4;
  --fg: #111111;
  --fg-2: #595959;
  --line: #e6e6e6;
  --accent: #990000;
  --accent-ink: #5c0000;
  --display: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1c1d; --bg-2: #26262a; --fg: #e8e8e8; --fg-2: #a9a9ad; --line: #424246; --accent: #e08585; --accent-ink: #f0b0b0; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1c1d; --bg-2: #26262a; --fg: #e8e8e8; --fg-2: #a9a9ad; --line: #424246; --accent: #e08585; --accent-ink: #f0b0b0; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: 17px; font-weight: 300; line-height: 1.65;
  margin: 0; padding-block: 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
a { color: var(--accent); text-decoration: none; font-weight: 400; }
a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.wrap { max-width: 930px; margin: 0 auto; }

/* Top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 5; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 18px 0; }
.brand { font-size: 19px; font-weight: 400; color: var(--fg); text-decoration: none; padding-bottom: 14px; }
.brand:hover { color: var(--fg); text-decoration: none; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { font-size: 16px; font-weight: 400; text-decoration: none; color: var(--fg); padding: 6px 10px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
nav a:hover { color: var(--accent); text-decoration: none; }
nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* Views. Each view is a stack of full-width bands; the band carries the colour, the inner .wrap keeps the text column. */
.view { display: flex; flex-direction: column; min-width: 0; }
/* bands kept as plain page sections */
.band { margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 56px 64px; }
.band > .wrap { display: flex; flex-direction: column; gap: 36px; }
.band.last { padding-bottom: 96px; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); }
h1.title { font-size: 42px; font-weight: 300; line-height: 1.15; }
h1.title.sentence { font-size: 28px; line-height: 1.35; max-width: 30ch; }
h2 { font-size: 28px; font-weight: 300; line-height: 1.2; }
h3 { font-size: 18px; font-weight: 500; line-height: 1.35; }
.lede { font-size: 18px; color: var(--fg-2); }
.prose { display: flex; flex-direction: column; gap: 16px; max-width: 68ch; }
.prose p { font-size: 17px; color: var(--fg); line-height: 1.65; }
.muted { color: var(--fg-2); }
.small { font-size: 16px; }
section { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* About: name and one-line role, then the bio beside a small photo */
.hero { padding-block: 64px 48px; }
.hero > .wrap { gap: 36px; }
.hero-head { display: flex; flex-direction: column; gap: 10px; }
.hero-name { font-size: 46px; font-weight: 300; line-height: 1.1; }
.hero-name b { font-weight: 500; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; align-items: start; }
.hero-text { display: flex; flex-direction: column; gap: 20px; }
.hero-text p.bio { font-size: 17px; line-height: 1.7; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; }
.photo { width: 100%; height: auto; aspect-ratio: 4 / 5; max-width: 100%; background: var(--bg-2); object-fit: cover; object-position: 50% 20%; display: block; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.18); }

/* Areas of inquiry, one row per area */
.areas-band { padding-top: 0; }
.areas-band > .wrap { gap: 18px; }
.areas { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.area { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 8px 40px; padding-block: 26px; border-top: 1px solid var(--line); }
.area h3 { font-size: 20px; font-weight: 400; line-height: 1.3; color: var(--accent); }
.area ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.area li { font-size: 16px; line-height: 1.55; }

/* Work grid */
.work { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { border: 1px solid var(--line); border-radius: 4px; padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); min-width: 0; }
.card .kind { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); display: flex; justify-content: space-between; gap: 12px; }
.card .kind em { font-style: normal; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.card h3 { font-size: 21px; font-weight: 400; line-height: 1.3; }
.card p { font-size: 16px; line-height: 1.6; }
.card .org { font-size: 14px; color: var(--fg-2); font-style: italic; font-weight: 400; }
.card .go { margin-top: auto; font-size: 15px; padding-top: 8px; }
.card .outputs { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 8px; }
.card .outputs .go { margin-top: 0; padding-top: 0; }
.earlier { gap: 14px; padding-top: 8px; }
.pubs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.pubs li { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 4px 24px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 16px; align-items: baseline; }
.pubs .src { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); }
.pubs i { font-style: italic; }
@media (max-width: 600px) { .pubs li { grid-template-columns: 1fr; } }

/* CV. Sticky sidebar with sections, skills and languages; entries on a thin timeline. */
.cv-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; align-items: start; }
.cv-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 28px; }
.cv-side-block { display: flex; flex-direction: column; gap: 10px; }
.cv-side .title { font-size: 42px; line-height: 1; }
.dl { display: inline-block; align-self: flex-start; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--bg); background: var(--accent); border: 1px solid var(--accent); padding: 9px 16px; border-radius: 3px; margin-top: 6px; }
.dl:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--bg); text-decoration: none; }
.jump { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.jump a { text-decoration: none; color: var(--fg); }
.jump a:hover { color: var(--accent); }
.skills { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; font-weight: 400; color: var(--fg-2); line-height: 1.45; }
.skills li { padding-left: 14px; position: relative; }
.skills li::before { content: "·"; position: absolute; left: 1px; color: var(--fg-2); }
.skills.langs b { color: var(--fg); font-weight: 500; margin-right: 6px; }
.cv-main { display: flex; flex-direction: column; gap: 52px; min-width: 0; }
.cv section { scroll-margin-top: 96px; gap: 22px; }
.cv h2 { font-size: 26px; font-weight: 400; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tl { position: relative; display: flex; flex-direction: column; padding-left: 24px; }
.tl::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.entry { position: relative; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry::before { content: ""; position: absolute; left: -24px; top: 20px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--fg-2); }
.entry[open]::before { background: var(--fg-2); }
.entry summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 2px 16px; padding: 14px 0; align-items: start; }
.entry summary::-webkit-details-marker { display: none; }
.entry summary::after { content: ""; grid-column: 2; grid-row: 1; width: 8px; height: 8px; margin-top: 7px; border-right: 1.5px solid var(--fg-2); border-bottom: 1.5px solid var(--fg-2); transform: rotate(45deg); transition: transform .15s ease; justify-self: end; }
.entry[open] summary::after { transform: rotate(-135deg); margin-top: 11px; }
.entry summary:hover .role b { color: var(--accent); }
.entry .role { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 17px; line-height: 1.4; }
.entry .role b { font-weight: 500; color: var(--fg); }
.entry .role .org { color: var(--fg-2); font-size: 15px; font-style: italic; }
.entry .role .org::before { content: "·"; margin-right: 10px; font-style: normal; }
.entry .when { grid-column: 1; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.entry .body { padding: 0 36px 16px 0; }
.entry p.desc { font-size: 16px; color: var(--fg); max-width: 64ch; }
.entry ul b { font-weight: 500; color: var(--fg); }
.entry ul { margin: 0; padding-left: 18px; font-size: 16px; color: var(--fg); display: flex; flex-direction: column; gap: 5px; max-width: 64ch; }
.tag { display: inline-block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-2); border: 1px solid var(--line); border-radius: 2px; padding: 1px 7px; margin-left: 2px; vertical-align: 2px; font-weight: 500; font-family: var(--body); }

/* More */
.more-block { border-top: 1px solid var(--line); padding-top: 32px; gap: 22px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery img { width: 100%; height: auto; aspect-ratio: 3 / 4; max-width: 100%; object-fit: cover; display: block; background: var(--bg-2); }
@media (max-width: 480px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* Contact */
.contact-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.contact-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 28px; padding-block: 16px; border-bottom: 1px solid var(--line); align-items: baseline; }
.contact-row .k { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-2); }
.email { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 17px; }
.email .em { display: inline-flex; align-items: center; gap: 8px; }
.email .sep { color: var(--fg-2); }
button.copy { font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; background: none; border: 1px solid var(--line); color: var(--accent); padding: 5px 10px; border-radius: 2px; cursor: pointer; }
button.copy:hover { border-color: var(--accent); color: var(--fg); }

footer .wrap { border-top: 1px solid var(--line); padding-block: 20px 40px; font-size: 13px; color: var(--fg-2); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .photo { max-width: 300px; }
  .hero-name { font-size: 36px; }
  .area { grid-template-columns: 1fr; }
  .cv-layout { grid-template-columns: 1fr; gap: 40px; }
  .cv-side { position: static; }
  .jump { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
  .contact-row { grid-template-columns: 1fr; }
  h1.title { font-size: 32px; }
  h1.title.sentence { font-size: 24px; }
  .band { padding-block: 40px 48px; }
  .hero { padding-block: 40px 36px; }
  .band > .wrap { gap: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  a, button.copy { transition: color .15s ease, border-color .15s ease; }
}

/* Report page */
.report { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 36px; }
.report-head { display: flex; flex-direction: column; gap: 14px; }
.report-head .back { font-size: 15px; }
.report-head h1 { font-size: 40px; font-weight: 300; line-height: 1.18; }
.report-head .byline { font-size: 17px; color: var(--fg-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; font-size: 15px; font-weight: 500; border-radius: 3px; border: 1px solid var(--accent); background: var(--accent); color: var(--bg); text-decoration: none; }
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--bg); text-decoration: none; }
.btn.ghost { background: none; color: var(--accent); }
.btn.ghost:hover { background: none; color: var(--accent-ink); }
.cover { display: block; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; max-width: 460px; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }
.cover img { display: block; width: 100%; height: auto; }
.report .lede-text { font-size: 19px; line-height: 1.65; }
.report section { gap: 16px; }
.report section p { font-size: 17px; line-height: 1.7; }
.findings { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.findings li { padding-block: 20px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.7; }
.findings li:last-child { border-bottom: 1px solid var(--line); }
.findings b { font-weight: 500; }
.report .contact-row { grid-template-columns: 220px minmax(0, 1fr); font-size: 17px; }
.report .contact-row .k { letter-spacing: 0.08em; }
.report-foot { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; color: var(--fg-2); font-size: 16px; }
@media (max-width: 820px) {
  .report-head h1 { font-size: 30px; }
  .report .contact-row { grid-template-columns: 1fr; }
}
.card h3 a { color: var(--fg); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
