/* ==========================================================================
   Site palette + typography overrides ("Serif" look)
   Redefines the theme's CSS variables, so the sidebar and masthead follow too.
   ========================================================================== */

:root {
  --global-bg-color                 : #fffdfb;
  --global-text-color               : #2b2724;
  --global-text-color-light         : #918a83;
  --global-border-color             : #e6e1da;
  --global-link-color               : #8c2b1f;
  --global-link-color-hover         : #5e1c14;
  --global-link-color-visited       : #8c2b1f;
  --global-masthead-link-color      : #2b2724;
  --global-masthead-link-color-hover: #8c2b1f;
}

html[data-theme="dark"] {
  --global-link-color               : #e0897b;
  --global-link-color-hover         : #f0b2a7;
  --global-link-color-visited       : #e0897b;
}

html,
body,
.page__content,
.author__name,
.author__bio,
h1, h2, h3, h4, h5, h6 {
  font-family: "Source Serif 4", Charter, Georgia, "Times New Roman", serif;
}

.page__content {
  font-size: 1.02em;
  line-height: 1.7;
}

/* ==========================================================================
   Homepage custom styles (news list, publication entries, compact CV blocks)
   Colours are inherited from the site theme variables so that the light and
   dark themes both keep working.
   ========================================================================== */

/* ---------- links row under the intro ---------- */
.hp-links {
  margin: 0.6em 0 1.4em 0;
  font-size: 0.95em;
  line-height: 2.1;
}

.hp-links a {
  display: inline-block;
  padding: 0.18em 0.7em;
  margin-right: 0.4em;
  border: 1px solid var(--global-border-color);
  border-radius: 4px;
  text-decoration: none;
}

.hp-links a:hover {
  border-color: var(--global-link-color-hover);
}

/* ---------- availability note ---------- */
.hp-note {
  margin: -0.4em 0 1.6em 0;
  padding: 0.55em 0.9em;
  border-left: 3px solid var(--global-link-color);
  background: rgba(140, 43, 31, 0.05);
  border-radius: 0 4px 4px 0;
  font-size: 0.95em;
}

.hp-note i {
  margin-right: 0.9em;
  color: var(--global-link-color);
  font-size: 0.9em;
}

html[data-theme="dark"] .hp-note {
  background: rgba(224, 137, 123, 0.09);
}

/* ---------- news ---------- */
.hp-news {
  max-height: 16em;
  overflow-y: auto;
  padding-right: 0.6em;
  margin-bottom: 1em;
}

.hp-news ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-news li {
  display: flex;
  gap: 0.9em;
  padding: 0.3em 0;
  font-size: 0.92em;
  line-height: 1.5;
}

.hp-news .date {
  flex: 0 0 5.2em;
  color: var(--global-text-color-light);
  font-variant-numeric: tabular-nums;
}

/* ---------- publications ---------- */
.pub {
  display: flex;
  gap: 1.2em;
  align-items: flex-start;
  padding: 0.9em 0;
  border-bottom: 1px solid var(--global-border-color);
}

.pub:last-child {
  border-bottom: none;
}

.pub-teaser {
  flex: 0 0 250px;
}

.pub-teaser img {
  width: 100%;
  border: 1px solid var(--global-border-color);
  border-radius: 4px;
}

.pub-body {
  flex: 1 1 auto;
  min-width: 0;
}

.pub-title {
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.15em;
}

.pub-authors {
  font-size: 0.9em;
  line-height: 1.5;
  margin-bottom: 0.1em;
}

.pub-authors .me {
  font-weight: 700;
}

.pub-venue {
  font-size: 0.9em;
  color: var(--global-text-color-light);
  margin-bottom: 0.45em;
}

.pub-venue .tag {
  display: inline-block;
  padding: 0 0.45em;
  margin-right: 0.4em;
  border-radius: 3px;
  background: var(--global-link-color);
  color: #fff;
  font-size: 0.85em;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}

.pub-note {
  font-size: 0.9em;
  line-height: 1.5;
  margin-bottom: 0.45em;
}

.pub-links a {
  font-size: 0.85em;
  margin-right: 0.5em;
  padding: 0.05em 0.55em;
  border: 1px solid var(--global-border-color);
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
}

.pub-links a:hover {
  border-color: var(--global-link-color-hover);
}

/* link placeholder for a paper that is not public yet */
.pub-links a.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pub-links a.is-disabled:hover {
  border-color: var(--global-border-color);
}

.pub-eq {
  font-size: 0.88em;
  color: var(--global-text-color-light);
}

/* ---------- compact two-column rows (experience / education / awards) ---------- */
.hp-rows {
  margin-bottom: 1em;
}

.hp-row {
  display: flex;
  gap: 1em;
  align-items: baseline;
  padding: 0.42em 0;
  border-bottom: 1px solid var(--global-border-color);
}

.hp-row:last-child {
  border-bottom: none;
}

.hp-row .what {
  flex: 1 1 auto;
  line-height: 1.5;
}

.hp-row .what .sub {
  display: block;
  font-size: 0.9em;
  color: var(--global-text-color-light);
}

.hp-row .when {
  flex: 0 0 auto;
  font-size: 0.88em;
  color: var(--global-text-color-light);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  .pub {
    flex-direction: column;
  }

  .pub-teaser {
    flex: 1 1 auto;
    width: 100%;
    max-width: 420px;
  }

  .hp-row {
    flex-direction: column;
    gap: 0.1em;
  }

  .hp-row .when {
    font-size: 0.85em;
  }
}

/* ---------- icons (Font Awesome 6 + Academicons, both bundled with the theme) ---------- */
.page__content h2 i {
  margin-right: 0.5em;
  font-size: 0.82em;
  color: var(--global-link-color);
  vertical-align: 1px;
}

.hp-links a i,
.pub-links a i {
  margin-right: 0.45em;
  font-size: 0.95em;
  opacity: 0.85;
}

/* ---------- chrome: site name in the top bar ---------- */
.masthead__menu-item--lg a {
  font-size: 1.45em;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ---------- sidebar / masthead / footer follow the same typeface ----------
   The theme sets font-family with nested selectors (.sidebar p, .sidebar .author__name,
   .author__urls-wrapper, .masthead__inner-wrap ...), so these have to match that
   specificity to win. Icon fonts are untouched: no rule here targets <i>. */
.sidebar,
.sidebar p,
.sidebar li,
.sidebar h2,
.sidebar h3,
.sidebar h4,
.sidebar h5,
.sidebar h6,
.sidebar .author__name,
.sidebar .author__bio,
.author__urls-wrapper,
.author__urls,
.author__urls li,
.author__urls a,
.masthead__inner-wrap,
.masthead__menu-item,
.masthead__menu-item a,
.greedy-nav a,
.page__title,
.page__meta,
.page__footer,
.page__footer p,
.page__footer li,
.page__footer a,
.page__footer-follow li {
  font-family: "Source Serif 4", Charter, Georgia, "Times New Roman", serif;
}

/* ---------- experience rows: logo | role + description | dates ---------- */
.exp {
  display: flex;
  gap: 1.4em;
  align-items: center;
  padding: 0.75em 0;
  border-bottom: 1px solid var(--global-border-color);
}

.exp:last-child {
  border-bottom: none;
}

.exp-logo {
  flex: 0 0 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp-logo img {
  max-width: 140px;
  max-height: 36px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.exp-body {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.5;
}

.exp-role {
  font-weight: 700;
}

.exp-desc {
  font-size: 0.9em;
  color: var(--global-text-color-light);
}

.exp-when {
  flex: 0 0 auto;
  font-size: 0.88em;
  color: var(--global-text-color-light);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* dark theme: most logos are dark-on-transparent, so give them a light chip */
html[data-theme="dark"] .exp-logo img {
  background: #fff;
  padding: 4px 7px;
  border-radius: 4px;
}

@media (max-width: 700px) {
  .exp {
    flex-wrap: wrap;
    gap: 0.6em 1em;
  }

  .exp-logo {
    flex: 0 0 110px;
    justify-content: flex-start;
  }

  .exp-body {
    flex: 1 1 100%;
    order: 3;
  }
}

/* ---------- type scale tweaks: bigger sidebar, calmer intro ---------- */
/* the full name is already in the top bar */
.sidebar .author__name {
  display: none;
}

/* with the name gone the avatar sat right on top of the icon rows */
@media (min-width: 1024px) {
  .sidebar .author__avatar {
    margin-bottom: 1.1em;
  }

  .sidebar .author__urls-wrapper {
    margin-top: 0.4em;
  }

  .author__urls li {
    padding: 0.18em 0;
  }
}


.sidebar p,
.sidebar li,
.author__urls li,
.author__urls a {
  font-size: 0.92em;
}

/* the long intro paragraphs sit a notch below the rest of the page */
.page__content > p {
  font-size: 0.95em;
}
