/* Minimal academic-homepage style: centered header, narrow reading column */

:root {
  --text: #222;
  --muted: #666;
  --link: #1a4f8b;
  --link-hover: #0b2c52;
  --rule: #e2e2e2;
  --bg: #fff;
  --measure: 40rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ---------- Header ---------- */
.site-header {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.25rem 0;
  text-align: center;
}

.portrait {
  width: 170px;
  height: 170px;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 50%;
  display: block;
  margin: 0 auto 1.25rem;
}

.site-header h1 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.site-header h1 a { color: var(--text); }
.site-header h1 a:hover { text-decoration: none; color: var(--link); }

.subtitle {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.contact {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Navigation ---------- */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
  margin-top: 1.6rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}
.main-nav a {
  color: var(--text);
  padding: 0.1rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--link);
  text-decoration: none;
  border-bottom-color: var(--link);
}

/* ---------- Main content ---------- */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.25rem 1rem;
}

main p { margin: 0 0 1.15rem; }

figure {
  margin: 2rem 0 0;
}
figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
figcaption {
  margin-top: 0.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Publication list ---------- */
main h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.pubs {
  margin: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.pubs details {
  border-bottom: 1px solid var(--rule);
}
.pubs summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1.85rem 2.25rem 1.85rem 0;
}
.pubs summary::-webkit-details-marker { display: none; }
.pubs summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 1.7rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
}
.pubs details[open] summary::after { content: "\2212"; }
.pubs summary:hover { color: var(--link); }
.pubs summary:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.pub-body {
  padding: 0 0 1.1rem;
  font-size: 0.97rem;
}
.pub-body p { margin: 0 0 0.75rem; }
.coauthors { color: var(--muted); }

/* Compact variant for a single dropdown inside a list */
.pubs.compact { margin: 0 0 0.7rem; border-top: 0; }
.pubs.compact details { border-bottom: 0; }
.pubs.compact summary { padding: 0 2.25rem 0 1.25rem; text-indent: -1.25rem; }
.pubs.compact summary::after { top: -0.15rem; }
.pubs.compact .pub-body { padding: 0.9rem 0 0.6rem 1.25rem; }

/* ---------- Teaching list ---------- */
.institution {
  margin: 2rem 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.institution:first-of-type { margin-top: 1.5rem; }

.teaching {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.teaching li {
  margin: 0 0 0.7rem;
  padding-left: 1.25rem;
  text-indent: -1.25rem;
}

/* ---------- Connect links ---------- */
.links {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.links li { margin: 0 0 0.6rem; }

/* ---------- CV viewer ---------- */
.cv-links {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
}
.cv-frame {
  width: 100%;
  height: 600px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.cv-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 480px) {
  .cv-frame { height: 420px; }
}

/* ---------- Footer ---------- */
footer {
  max-width: var(--measure);
  margin: 2rem auto 0;
  padding: 1.5rem 1.25rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--rule);
}
footer p { margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  body { font-size: 1rem; }
  .portrait { width: 140px; height: 140px; }
  .site-header h1 { font-size: 1.8rem; }
}
