@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');

:root {
  --page-width: 940px;
  --text: #242424;
  --muted: #616161;
  --line: #dedede;
  --link: #245c91;
  --nav-bg: #212121;
  --nav-text: #f7f7f7;
  --conference: #1c4587;       /* dark blue, matching the former site */
  --journal: #5b0f00;          /* darker red, matching the former site */
  --bookchapter: #5f4a6d;
  --thesis: #555555;
  --other: #555555;
  --invited: #435d46;
  --upcoming: #7a5a2f;
  --abstract-border: #d3d3d3;
  --font-family: 'Lato', Arial, Helvetica, sans-serif;
  --font-size: 14px;
  --line-height: 1.42;
}

* { box-sizing: border-box; }
html { background: #fff; }
body {
  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font-family);
  font-size: var(--font-size);
  line-height: var(--line-height);
  display: flex;
  flex-direction: column;
}

/* Shared top navigation */
#site-header { flex: 0 0 auto; }
.site-strip { width: 100%; background: var(--nav-bg); color: var(--nav-text); }
.site-strip-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 20px;
  min-height: 46px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
}
.site-brand {
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  font-size: 1.05rem;
  white-space: nowrap;
  padding: 11px 0;
}
.site-brand:hover { text-decoration: none; }
.site-nav { display: flex; align-items: stretch; flex-wrap: wrap; }
.site-nav a {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,.82);
  padding: 11px 10px 9px;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  font-size: .94rem;
}
.site-nav a:hover { color: #fff; text-decoration: none; }
.site-nav a.active { color: #fff; border-bottom-color: #d8cece; }

main.page {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 24px 20px 52px;
  flex: 1 0 auto;
}
h1 { font-size: 1.48rem; font-weight: 400; margin: 0 0 15px; }
h2.section-heading, h2.year-heading {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 23px 0 9px;
  padding-bottom: 4px;
  color: #303030;
  border-bottom: 2px solid #d5d5d5;
}
/* Subsection headings are intentionally more distinct than record titles. */
h3.group-heading {
  font-size: .94rem;
  font-weight: 700;
  margin: 17px 0 7px;
  padding: 2px 0 3px 8px;
  color: #40566a;
  border-left: 3px solid #93a6b8;
  border-bottom: 1px solid #e0e5e9;
  letter-spacing: .01em;
}
p { margin: 0 0 11px; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.status, .empty { color: var(--muted); padding: 6px 0; }
.error { color: #8b1e2d; padding: 6px 0; }
.subtle { color: var(--muted); }
.page-intro { color: var(--muted); margin: -5px 0 18px; }

/* Shared compact record layout */
.record { margin: 0 0 9px; padding: 0; }
.record-title { font-weight: 700; margin: 0; }
.record-meta, .record-detail { margin: 0; }
.record-meta { color: #333; }
.record-detail { color: #444; }
.record-links { margin-top: 1px; font-size: .92rem; }
.record-links a, .inline-control {
  color: var(--link); text-decoration: none; background: none; border: 0;
  padding: 0; margin: 0 7px 0 0; font: inherit; cursor: pointer;
}
.record-links a::before, .inline-control::before { content: '['; }
.record-links a::after, .inline-control::after { content: ']'; }
.record-links a:hover, .inline-control:hover { text-decoration: underline; }

/* Publications: subtle venue badges on the left + color-coded titles. */
.pub-grid {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  column-gap: 11px;
  align-items: start;
}
.venue-badge-col {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 1px;
}
.venue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 86px;
  min-height: 21px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: .70rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .01em;
  text-align: center;
  white-space: nowrap;
  border: 1px solid transparent;
}
.venue-badge.conference { background: #f2f6fb; color: #466786; border-color: #d7e2ed; }
.venue-badge.journal { background: #fbf3f2; color: #80514b; border-color: #ead9d6; }
.venue-badge.bookchapter { background: #f7f4f8; color: #75677d; border-color: #e4dce8; }
.venue-badge.thesis { background: #f6f6f6; color: #686868; border-color: #e2e2e2; }
.venue-badge-placeholder { visibility: hidden; pointer-events: none; }
.pub-content { min-width: 0; }
.toolbar { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin: 0 0 17px; }
.toolbar input, .toolbar select {
  font: inherit; font-size: .92rem; padding: 4px 6px; border: 1px solid #bdbdbd;
  border-radius: 2px; background: #fff;
}
.toolbar input { min-width: 235px; flex: 1; }
.pub.conference .record-title { color: #2f4d68; }
.pub.journal .record-title { color: #673b36; }
.pub.bookchapter .record-title { color: #514859; }
.pub.thesis .record-title { color: #3f3f3f; }
.pub.other .record-title { color: #3f3f3f; }
.venue-name { font-weight: 400; color: #333; }
.venue-extra { color: #454545; }
.author-link { color: inherit; text-decoration: none; }
.author-link:hover { color: var(--link); text-decoration: underline; }
.abstract {
  margin: 6px 0 0 8px;
  padding: 5px 0 5px 9px;
  border-left: 2px solid var(--abstract-border);
  color: #444;
  max-width: 840px;
  white-space: pre-line;
}
.abstract[hidden] { display: none; }

@media (max-width: 620px) {
  .pub-grid { grid-template-columns: 72px minmax(0, 1fr); column-gap: 8px; }
  .venue-badge { max-width: 70px; padding: 3px 5px; font-size: .65rem; }
}



/* Accessible headings/text that should not be visually displayed. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Home-page news: distinctive but deliberately quiet. */
.home-news { margin-top: 20px; }
.news-list { display: grid; gap: 7px; }
.news-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  background: #f7f9fb;
  border: 1px solid #e4e9ee;
  border-left: 3px solid #9db1c3;
  border-radius: 4px;
}
.news-date {
  color: #607486;
  font-size: .84rem;
  font-weight: 700;
  white-space: nowrap;
  padding-top: 1px;
}
.news-title { color: #293946; font-weight: 700; }
.news-description { color: #454545; margin-top: 1px; }
.news-link { margin-left: 6px; white-space: nowrap; }
@media (max-width: 620px) {
  .news-item { grid-template-columns: 1fr; gap: 2px; }
  .news-date { font-size: .8rem; }
}

/* Talks */
.talk { margin-bottom: 8px; }
.talk .record-title { font-weight: 700; }
.talk-type { font-size: .9rem; color: var(--muted); }
.talk-type.invited, .talk-type.keynote { color: var(--invited); }
.upcoming { color: var(--upcoming); font-size: .9rem; }

/* Team and teaching */
.person-name, .course-name, .qualification-name { font-weight: 700; }
.thesis-link { font-style: italic; }

/* Home page inspired by the user's existing Google Sites page. */
.home-page { padding-top: 30px; }
.home-hero {
  display: grid;
  grid-template-columns: 205px minmax(0,1fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 27px;
}
.home-photo {
  width: 205px;
  height: 220px;
  object-fit: cover;
  object-position: 50% 36%;
  border-radius: 2px;
  display: block;
}
.home-title { font-size: 2.15rem; font-weight: 300; line-height: 1.12; margin: 0 0 8px; }
.home-role { font-size: 1.1rem; color: #333; margin-bottom: 2px; }
.home-affiliation { color: var(--muted); margin-bottom: 13px; }
.home-links { margin: 3px 0 13px; }
.home-links a { margin-right: 14px; white-space: nowrap; }
.home-section { margin-top: 22px; }
.home-section h2 {
  font-size: 1.15rem; font-weight: 400; margin: 0 0 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.home-list { margin: 6px 0 0 18px; padding: 0; }
.home-list li { margin-bottom: 4px; }

/* Shared bottom strip */
.site-footer { flex: 0 0 auto; width: 100%; background: var(--nav-bg); color: rgba(255,255,255,.78); }
.site-footer-inner {
  max-width: var(--page-width); margin: 0 auto; min-height: 48px; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: .88rem;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 13px; }
.footer-links a { color: rgba(255,255,255,.86); text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 700px) {
  :root { --font-size: 13.5px; }
  .site-strip-inner { padding: 0 13px; display: block; }
  .site-brand { padding: 9px 0 2px; }
  .site-nav a { padding: 6px 8px 7px 0; margin-right: 10px; border-bottom-width: 2px; }
  main.page { padding: 18px 13px 40px; }
  .toolbar input { min-width: 100%; width: 100%; }
  .record { margin-bottom: 8px; }
  .home-page { padding-top: 21px; }
  .home-hero { grid-template-columns: 125px minmax(0,1fr); gap: 18px; align-items: start; }
  .home-photo { width: 125px; height: 142px; }
  .home-title { font-size: 1.65rem; }
  .home-role { font-size: 1rem; }
  .site-footer-inner { display: block; padding: 12px 13px; }
  .footer-links { justify-content: flex-start; margin-top: 6px; gap: 10px 13px; }
}

@media (max-width: 430px) {
  .home-hero { display: block; }
  .home-photo { width: 145px; height: 162px; margin-bottom: 14px; }
}


/* Miscellaneous */
.misc-item .record-title { font-weight: 700; }
.misc-item .record-detail { max-width: 800px; }

/* Contact */
.contact-card { line-height: 1.7; margin-top: 4px; }
.contact-mail { display: grid; grid-template-columns: 48px 1fr; align-items: start; margin-top: 2px; }
.contact-map { margin-top: 22px; border: 1px solid var(--line); max-width: 720px; height: 320px; }
.contact-map iframe { border: 0; width: 100%; height: 100%; display: block; }

/* Footer icon links */
.footer-icons { align-items: center; gap: 9px; }
.footer-icons a { display: inline-flex; align-items: center; gap: 5px; }
.footer-icons img { width: 19px; height: 19px; display: block; opacity: .9; object-fit: contain; }
.footer-icons img.dblp-icon { border-radius: 3px; }
.footer-icons a:hover img { opacity: 1; }
.footer-label { font-size: .82rem; }
@media (max-width: 540px) { .footer-label { display: none; } .footer-icons { gap: 12px; } .footer-icons img { width: 20px; height: 20px; } }


/* Service */
.service-group { margin-top: 25px; }
.service-item { margin-bottom: 7px; }
.service-item .record-title { font-weight: 700; }
.service-item .record-detail { max-width: 850px; color: var(--muted); }


/* Funding */
.funding-item { margin-bottom: 9px; }
.funding-item .record-title { font-weight: 700; }
.funding-item .record-detail { color: var(--muted); max-width: 850px; }


/* Markdown-rich publication abstracts */
.markdown-body p { margin: 0 0 .65em; }
.markdown-body p:last-child { margin-bottom: 0; }
.markdown-body ul, .markdown-body ol { margin: .35em 0 .65em 1.5em; padding: 0; }
.markdown-body li { margin: .15em 0; }
.markdown-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: #f3f3f3; padding: .05em .22em; border-radius: 3px; }
.markdown-body a { text-decoration: underline; text-underline-offset: 2px; }

/* Generic user-defined sections */
.section-description { margin: -.2rem 0 1.1rem; color: var(--muted); max-width: 760px; }
.custom-record { padding-bottom: .68rem; }
.custom-field { margin-top: .12rem; color: var(--muted); }
.custom-field-label { font-weight: 600; color: var(--text); }
.custom-field-long { margin-top: .32rem; }
.custom-field-long > .markdown-body { margin-top: .08rem; color: var(--text); }
.custom-home-links:empty { display:none; }
