/* Fiorella Pizzolon — site stylesheet (shared by every page) */
:root {
  --bg: #ffffff; --ink: #1a1a1a; --muted: #616161; --rule: #e6e6e6;
  --accent: #0b3d6e; --accent-soft: #eef3f8;
  --navbg: #0b3d6e; --navink: #c9d7e6; --navhover: #ffffff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.15rem); line-height: 1.65;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(100% - 2.5rem, 42rem); margin: 0 auto; }

/* Navigation: scrolls sideways on phones instead of wrapping */
nav { background: var(--navbg); position: sticky; top: 0; z-index: 1; }
nav ul {
  list-style: none; margin: 0; padding: 0.8rem 0; display: flex; gap: 1.4rem;
  overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
nav ul::-webkit-scrollbar { display: none; }
nav a { color: var(--navink); text-decoration: none; font-size: 0.93rem; font-weight: 500; }
nav a:hover { color: var(--navhover); }
nav a[aria-current="page"] { color: var(--navhover); border-bottom: 2px solid #fff; padding-bottom: 2px; }

main { padding: 2.5rem 0 3rem; }
h1 { font-weight: 600; font-size: clamp(2rem, 1.5rem + 2.5vw, 2.9rem); line-height: 1.1; margin: 0 0 0.5rem; letter-spacing: -0.02em; }
.lede { margin: 0 0 1.5rem; color: var(--muted); }
h2 { font-size: 1.3rem; font-weight: 600; margin: 2.5rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--rule); }
h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 0.25rem; line-height: 1.35; }
.meta { margin: 0; color: var(--muted); font-size: 0.92rem; }
.note { color: var(--muted); font-size: 0.92rem; }

/* Home */
header.hero { padding: 0.5rem 0 1.5rem; display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 40rem) { header.hero { grid-template-columns: 1fr 9.5rem; gap: 2.5rem; } }
header.hero img { width: 7.5rem; aspect-ratio: 1/1; object-fit: cover; border-radius: 50%; }
@media (min-width: 40rem) { header.hero img { width: 100%; border-radius: 50%; order: 2; } }
.role { margin: 0; color: var(--muted); }
.bio { margin: 1.25rem 0 0; max-width: 34rem; }
.contact { margin: 1.5rem 0 0; color: var(--muted); font-size: 0.95rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.contact p { margin: 0.3rem 0; }

/* Collapsible abstracts (+ / −) */
details { margin: 0.5rem 0 0; }
summary {
  cursor: pointer; list-style: none; color: var(--accent); font-size: 0.95rem; padding: 0.3rem 0;
  display: inline-flex; align-items: center; gap: 0.5rem; -webkit-user-select: none; user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "+"; display: inline-block; width: 1.25rem; height: 1.25rem; line-height: 1.2rem;
  text-align: center; border: 1px solid currentColor; border-radius: 3px; font-size: 0.95rem;
}
details[open] summary::before { content: "\2212"; }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
details p { margin: 0.5rem 0 0.75rem; max-width: 38rem; font-size: 0.97rem; }
.presented { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.92rem; }

/* Numbered lists */
ol { padding-left: 1.4rem; margin: 0.75rem 0; }
ol li { margin: 0 0 0.85rem; }

/* Year / entry lists: year column on the left, stacked on phones */
dl { margin: 0.5rem 0 0; }
dl > div { display: grid; grid-template-columns: 7rem 1fr; gap: 0.25rem 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
dt { color: var(--muted); font-size: 0.92rem; margin: 0; padding-top: 0.1rem; }
dd { margin: 0; }
dd .inst { display: block; color: var(--muted); font-size: 0.93rem; }
dd .diss { margin: 0.75rem 0 0; padding-left: 0.85rem; border-left: 2px solid var(--rule); font-size: 0.97rem; }
dd .diss p { margin: 0.2rem 0; }
dd .diss .label { color: var(--muted); font-size: 0.9rem; }
dd .diss .title { font-weight: 600; }
dd .diss .title a { color: var(--ink); }
dd .diss .title a:hover { color: var(--accent); }
dd .diss .committee { white-space: nowrap; overflow-x: auto; }
@media (max-width: 30rem) { dl > div { grid-template-columns: 1fr; gap: 0.1rem; } }

/* Collapsible sections (Research positions): one row per employer, open with + */
details.section { margin: 0; border-bottom: 1px solid var(--rule); }
details.section:first-of-type { border-top: 1px solid var(--rule); }
details.section > summary { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.9rem 0; color: var(--ink); font-size: 1.05rem; font-weight: 600; }
details.section > summary span { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 0.88rem; white-space: nowrap; }
@media (max-width: 30rem) { details.section > summary span { display: none; } }
details.section > p { margin: 0 0 1rem 1.85rem; font-size: 0.97rem; }
dl.compact { margin: 0 0 0.75rem 1.85rem; }
ul.plain { margin: 0 0 1rem 1.85rem; padding-left: 1.1rem; font-size: 0.97rem; }
ul.plain li { margin: 0.25rem 0; }
@media (max-width: 30rem) { ul.plain { margin-left: 0; } }
dl.compact > div { grid-template-columns: 6.5rem 1fr; padding: 0.4rem 0; border-bottom: 0; font-size: 0.97rem; }
@media (max-width: 30rem) { dl.compact { margin-left: 0; } dl.compact > div { grid-template-columns: 1fr; } }

/* CV */
.cv-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0 1.5rem; }
.button { display: inline-block; padding: 0.55rem 1rem; border-radius: 4px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.button:hover { background: #082e53; }
.button.secondary { background: var(--accent-soft); color: var(--accent); }
.cv-embed { display: none; }
@media (min-width: 48rem) { .cv-embed { display: block; width: 100%; height: 80vh; border: 1px solid var(--rule); border-radius: 4px; } }
.cv-preview { max-width: 22rem; border: 1px solid var(--rule); border-radius: 4px; }
@media (min-width: 48rem) { .cv-preview { display: none; } }

/* Media page: thumbnail on the left, text on the right; stacked on phones */
.media-list { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.media-list li { display: grid; grid-template-columns: 1fr; gap: 0.75rem 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 36rem) { .media-list li { grid-template-columns: 11rem 1fr; align-items: start; } }
.media-list h3 { margin: 0 0 0.25rem; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: var(--rule); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .play { position: absolute; left: 50%; top: 50%; width: 2.6rem; height: 2.6rem; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(11,61,110,0.85); }
.thumb .play::after { content: ""; position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%); border-left: 0.9rem solid #fff; border-top: 0.55rem solid transparent; border-bottom: 0.55rem solid transparent; }
.thumb-text { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 500; text-align: center; font-size: 0.9rem; line-height: 1.3; }

/* Photo gallery (More page): one column on phones, two columns from tablets up */
.gallery { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: 1fr; gap: 1.75rem 1.5rem; }
@media (min-width: 36rem) { .gallery { grid-template-columns: 1fr 1fr; } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--rule); }
.gallery figcaption { margin-top: 0.5rem; font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
.gallery figcaption b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 0.1rem; }

footer { border-top: 1px solid var(--rule); padding: 1.25rem 0 2rem; font-size: 0.85rem; color: var(--muted); }
