/* Self-hosted fonts (OFL). No third-party requests. */
@font-face { font-family: "EB Garamond"; src: url("fonts/eb-garamond-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/eb-garamond-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("fonts/alegreya-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("fonts/alegreya-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("fonts/alegreya-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --line: #e2e2e2;
  --accent: #1c3d5a;
  --accent-soft: #eef2f6;
  --bg: #ffffff;
  --max: 780px;
  --font-body: "Alegreya", Georgia, "Times New Roman", serif;
  --font-display: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-ui: "Source Sans 3", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / nav */
header.site {
  border-bottom: 1px solid var(--line);
  padding: 22px 0 0;
}
header.site .wrap { display: flex; flex-direction: column; gap: 10px; }
.brand {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.2px;
}
.brand span { font-family: var(--font-ui); color: var(--muted); font-weight: 400; font-size: 14px; display: block; letter-spacing: 0; }
nav.main {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-family: var(--font-ui);
  font-size: 15px;
  padding: 6px 0 14px;
}
nav.main a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
nav.main a:hover { color: var(--accent); }
nav.main a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Main */
main { padding: 40px 0 70px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; }
h1 { font-size: 34px; line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: 26px; margin: 40px 0 12px; }
h3 { font-size: 19px; margin: 26px 0 6px; color: var(--accent); }
p { margin: 0 0 16px; }
a { color: var(--accent); }
.lede { font-family: var(--font-ui); font-size: 18px; font-weight: 400; color: var(--muted); margin-bottom: 26px; line-height: 1.5; }
.muted { color: var(--muted); }
hr { border: none; border-top: 1px solid var(--line); margin: 34px 0; }

ul.clean { padding-left: 20px; }
ul.clean li { margin-bottom: 8px; }

/* Home hero */
.hero-banner { margin: 0 0 26px; }
.hero-banner img {
  width: 100%; height: 300px; object-fit: cover; object-position: center 55%;
  border-radius: 8px; display: block;
}
.hero { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.hero .avatar {
  width: 150px; height: 150px; border-radius: 8px; object-fit: cover;
  flex: 0 0 auto;
}
.hero .intro { flex: 1 1 320px; }

@media (max-width: 560px) {
  .hero-banner img { height: 200px; }
}

/* Link chips */
.links {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0;
  font-family: var(--font-ui); font-size: 14px;
}
.links a {
  text-decoration: none; color: var(--accent);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; background: #fff;
}
.links a:hover { background: var(--accent-soft); }
.chips-label {
  font-family: var(--font-ui);
  font-size: 12px; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--muted); margin: 20px 0 0;
}
.chips-label + .links { margin-top: 8px; }

/* Publications */
.pub-controls {
  font-family: var(--font-ui); font-size: 14px;
  color: var(--muted); margin-bottom: 20px;
}
.pub-year { margin: 26px 0 8px; font-size: 15px; font-family: var(--font-ui); color: var(--accent); font-weight: 600; letter-spacing: 1px; }
.pub {
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.pub .t { font-weight: 700; }
.pub .meta { font-size: 15px; color: var(--muted); font-style: italic; }
.pub .type-tag {
  display: inline-block; font-family: var(--font-ui);
  font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 8px; border-radius: 3px; margin-right: 8px; font-style: normal;
}
.status { font-family: var(--font-ui); font-size: 14px; color: var(--muted); padding: 14px 0; }

/* CV blocks */
.cv-row { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cv-row .when { flex: 0 0 130px; font-family: var(--font-ui); color: var(--muted); font-size: 14px; }
.cv-row .what { flex: 1; }

/* Footer */
footer.site {
  border-top: 1px solid var(--line);
  padding: 24px 0; color: var(--muted);
  font-family: var(--font-ui); font-size: 13px;
}
footer.site a { color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 17px; }
  h1 { font-size: 28px; }
  h2 { font-size: 23px; }
}
