/* Emilio Calvano — homepage replica
   Original: https://emiliocalvano.wixsite.com/emiliocalvano (Wix)
   Type: original uses DIN Next Light; Google Fonts substitute = Raleway (light). */

@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

:root {
  --ink: #2e2e2e;
  --muted: #9a9a9a;
  --maroon: #7a1f1f;
  --rule: #2e2e2e;
  --maxw: 980px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
  font-size: 16px;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #000; }

/* ---------- Navigation ---------- */
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 24px 10px;
}
.nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0 0 10px;
  padding: 0;
  font-size: 15px;
  letter-spacing: .2px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 400;
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); }
.nav .rule { border-bottom: 1px solid var(--rule); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 24px 90px;
}

h1, h2, h3 { font-weight: 300; line-height: 1.2; }

/* ---------- Home ---------- */
.hero {
  text-align: center;
  margin: 18px 0 26px;
}
.hero img { max-width: 100%; height: auto; }

.intro {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 10px 0 30px;
}
.intro .portrait { flex: 0 0 auto; }
.intro .portrait img { display: block; width: 250px; height: auto; }
.intro .who h1 {
  margin: 0 0 14px;
  font-size: 44px;
  font-weight: 300;
}
.intro .who p { margin: 6px 0; font-size: 16px; max-width: 460px; }

.section-title {
  font-size: 26px;
  font-weight: 300;
  margin: 40px 0 22px;
}

.appointments {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 16px;
}
.appt {
  width: 138px;
  text-align: left;
}
.appt a { text-decoration: none; }
.appt img {
  width: 138px;
  height: 74px;
  object-fit: contain;
  border: 1px solid #ececec;
  display: block;
  margin-bottom: 8px;
}
.appt .role { font-size: 13px; line-height: 1.35; }
.appt .role strong { font-weight: 500; }
.appt .role .sub { color: var(--muted); }

/* ---------- CV page ---------- */
.cv-grid { display: flex; gap: 60px; flex-wrap: wrap; }
.cv-main { flex: 1 1 420px; min-width: 300px; }
.cv-side { flex: 0 0 260px; padding-top: 6px; }
.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 8px 22px;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  margin: 0 0 10px;
  background: #fff;
}
.btn:hover { background: #f4f4f4; }
.btn-row { margin-bottom: 26px; }
.appt-list .item { margin: 0 0 18px; }
.appt-list .label { font-weight: 500; }
.appt-list .org { color: var(--maroon); }
.appt-list .org a { color: var(--maroon); }
.contact-block { color: var(--ink); font-size: 15px; line-height: 1.7; }
.x-follow {
  display: inline-block; margin-top: 20px; background:#000; color:#fff;
  text-decoration:none; font-size:13px; padding:6px 14px; border-radius:4px;
}

/* ---------- Research / Teaching content ---------- */
.content h2.group {
  font-size: 24px;
  font-weight: 300;
  margin: 46px 0 20px;
  border-bottom: 0;
}
.content .lead { max-width: 760px; }
.entry { margin: 0 0 22px; max-width: 820px; }
.entry .title { font-weight: 400; }
.entry .meta { color: var(--ink); }
.entry .venue { font-style: italic; }
.badge { vertical-align: middle; height: 26px; margin-left: 8px; }
.erc-logo { float: right; width: 110px; height: auto; margin: 0 0 10px 20px; }
.muted { color: var(--muted); }

.course { margin: 0 0 40px; max-width: 820px; }
.course h3 { font-size: 19px; font-weight: 400; margin: 0 0 2px; }
.course .sub { color: var(--ink); margin: 0; }
.course .upd { color: var(--muted); font-size: 14px; margin: 4px 0 10px; }
.course ul { margin: 8px 0; padding-left: 22px; }
.course li { margin: 5px 0; }
.highlight { background: #fff8a8; padding: 0 3px; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px 30px;
  border-top: 1px solid #ececec;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav { padding: 18px 16px 8px; }
  .nav ul { gap: 16px; flex-wrap: wrap; font-size: 14px; }
  .wrap { padding: 22px 16px 64px; }
  .intro { flex-direction: column; text-align: center; gap: 18px; }
  .intro .who h1 { font-size: 34px; }
  .intro .who p { margin-left: auto; margin-right: auto; }
  .appointments { justify-content: center; }
  .cv-grid { gap: 30px; }
  .erc-logo { float: none; display: block; margin: 0 0 16px; }
}
