/* -------------------------------------------------
   EASY CUSTOMISATION
   Change these values first.
-------------------------------------------------- */
:root {
  --text: #222222;
  --muted: #6f6f6f;
  --link: #315f8c;
  --line: #dedede;
  --background: #ffffff;
  --soft: #f7f7f5;
  --content-width: 980px;
}

* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { opacity: 0.72; }

.page {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 72px auto 44px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 64px;
}

/* Sidebar */
.sidebar { min-width: 0; }
.name {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}
.portrait {
  display: block;
  width: 150px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: 22px;
  border-radius: 50%;
}
nav { display: flex; flex-direction: column; gap: 5px; }
nav a { width: fit-content; color: var(--text); text-decoration: none; }
nav a.active { font-weight: 700; }

/* Content */
.content { min-width: 0; }
.content h1 { margin: -8px 0 24px; font-size: 2rem; line-height: 1.2; font-weight: 500; }
.content h2 {
  margin: 42px 0 14px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
  font-size: 1.12rem;
  font-weight: 700;
}
.content h3 { margin: 0; font-size: 1rem; }
.content p { margin: 0 0 18px; }
.content ul { padding-left: 22px; }
.content li { margin-bottom: 8px; }
.item, .publication { margin-bottom: 28px; }
.meta { margin: 2px 0 8px !important; color: var(--muted); font-size: 0.92rem; }
.contact-list p { margin-bottom: 7px; }

.title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.button-link {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--soft);
  color: var(--text);
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
}
.button-link:hover { background: #eeeeeb; opacity: 1; }

.cv-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  margin-bottom: 26px;
}
.year { color: var(--muted); font-size: 0.92rem; }

.presentation {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.presentation:first-of-type { padding-top: 2px; }
.presentation p { margin-bottom: 4px; }

.publication {
  padding-left: 3em;
  text-indent: -3em;
  margin-bottom: 14px;
}

footer {
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 700px) {
  html { font-size: 16px; }
  .page { margin-top: 32px; grid-template-columns: 1fr; gap: 38px; }
  .portrait { width: 120px; }
  nav { flex-direction: row; flex-wrap: wrap; gap: 10px 18px; }
  .content h1 { margin-top: 0; }
  .title-row { align-items: flex-start; }
  .cv-row { grid-template-columns: 70px 1fr; }
  .presentation { grid-template-columns: 1fr; gap: 10px; }
  .presentation .button-link { width: fit-content; }
}
