/* -------- General -------- */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: #1a7f37;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.email {
  font-family: monospace;
}


/* -------- Navbar -------- */

nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: #0f3d1e;
  padding: 0.5rem 0;
  z-index: 100;
}

.navbar {
  display: flex;
  flex-wrap: nowrap;
  max-width: 75rem;
  margin: 0 auto;
  padding-left: 1em;
  height: auto;
  align-items: center;
}

#nav-links {
  display: flex;
}

.navbar a {
  color: #bbb;
  font-family: monospace;
  margin-right: 1.25em;
}

.navbar a:hover {
  color: #fff;
  text-decoration: none;
}

#nav-home {
  color: #fff;
  font-size: 1.2em;
  font-weight: bold;
  margin-right: 2em;
  flex-shrink: 0;
}

#nav-home:hover {
  color: #e0e0e0;
}

#nav-menu {
  display: none;
  font-size: 1.1rem;
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
}

#nav-menu:hover {
  color: #fff;
}

.nav-buttons {
  margin-left: auto;
  padding-right: 1rem;
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.nav-buttons button {
  width: 2rem;
}

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #bbb !important;
  font-size: 0.85rem;
  margin-right: 0.75rem;
}

.nav-github:hover {
  color: #fff !important;
}

@media (max-width: 850px) {
  .nav-github span { display: none; }
}

/* the section currently in view */
#nav-links a.active {
  color: #fff;
  font-weight: bold;
}

@media (max-width: 850px) {
  #nav-menu {
    display: block;
  }

  #nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: #0f3d1e;
  }

  #nav-links a {
    padding: 0.75em 1em;
  }

  #nav-links.active {
    display: flex;
  }

  .nav-buttons {
    margin-left: 1rem;
  }
}

main {
  max-width: 75rem;
  margin: 0 auto;
  padding: 4.5rem 1rem 0.25rem 1rem;
}


/* -------- Profile header -------- */

#profile {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  padding-bottom: 0.5rem;
}

/* the picture is as tall as the whole identity + affiliation column */
#profile .photo {
  box-sizing: border-box;
  width: 240px;
  flex: 0 0 240px;
  align-self: stretch;
  min-height: 240px;
  object-fit: cover;
  object-position: center top;
  padding: 0.25rem;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
}

#profile .content {
  flex: 1;
  min-width: 0;
}

#profile .identity-logos {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

#profile .identity { min-width: 0; }

#profile .name {
  margin: 0 0 0.2rem 0;
  font-size: 2rem;
}

#profile .position {
  margin: 0 0 0.75rem 0;
  font-size: 1.5rem;
}

/* big logos, top right, as on the reference site */
#profile .logos {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex: 0 0 auto;
  padding: 0.5rem 0 0 0;
}

#profile .logos .enseirb { height: 66px; width: auto; }
#profile .logos .ims { height: 72px; width: auto; }

/* a single row of small blocks: icon, then its label */
#profile .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#profile .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  background: #f8f9fa;
  color: #343a40;
  font-size: 0.9rem;
  text-decoration: none;
}

#profile .chip:hover {
  border-color: #1a7f37;
  color: #1a7f37;
  text-decoration: none;
}

#profile .chip i {
  color: #1a7f37;
  font-size: 0.95rem;
  width: 1.1em;
  text-align: center;
}

#profile .affiliations {
  display: flex;
  gap: 1.5em;
  margin-top: 1.1rem;
}

#profile .affiliation {
  flex: 1;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
  overflow: hidden;
  flex-direction: column;
}

#profile .affiliation .header {
  padding: 0.25rem 0.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  margin: 0;
  font-size: 1.2rem;
}

#profile .affiliation .header .icon {
  font-size: 1rem;
  margin-right: 0.75rem;
}

#profile .affiliation .content { padding: 0.75rem; }

/* the graduation cap marks a defended thesis */
.defended { color: #1a7f37; }
body.dark .defended { color: #56d364; }

#profile .email {
  font-family: monospace;
  color: #1a7f37;
}

#profile .email:hover { text-decoration: underline; }

@media (max-width: 820px) {
  #profile { flex-direction: column; }
  #profile .photo { width: 200px; height: 200px; flex: 0 0 auto; align-self: flex-start; }
  #profile .identity-logos { flex-direction: column; }
  #profile .affiliations { flex-direction: column; }
}


/* -------- Travel map -------- */

#travel .travel-note {
  color: #555;
  font-size: 0.9rem;
}

#travel .map { margin-top: 0.75rem; }

#travel .map svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
}

#travel .world .land { fill: #e4e7ea; stroke: #ffffff; stroke-width: 0.5; }
#travel .world .vis  { fill: #1a7f37; stroke: #ffffff; stroke-width: 0.5; cursor: help; }
#travel .world .vis:hover { fill: #145c28; }

.map-tip {
  position: fixed;
  z-index: 200;
  display: none;
  background: #0f3d1e;
  color: #fff;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.2rem;
  pointer-events: none;
}


/* -------- Flags -------- */

.flag {
  width: 1.35em;
  height: 0.9em;
  vertical-align: -0.1em;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 1px;
}

#teaching .mobility .flag { margin-right: 0.2rem; }


/* -------- Sections -------- */

section {
  scroll-margin-top: 3.5rem;
  margin: 0 0.5rem 0.5rem;
}

section section {
  margin: 0;
}

section h2 {
  font-size: 1.75rem;
}

section h3 {
  font-size: 1.5rem;
}

section h4 {
  font-size: 1.25rem;
}


/* -------- About -------- */

#bio .timeline {
  padding-top: 1rem;
}

#bio .timeline .item {
  display: flex;
  margin-bottom: 1.5rem;
}

#bio .timeline .date {
  padding-right: 1rem;
  min-width: 10ch;
  text-align: right;
  white-space: nowrap;
}

#bio .timeline .icon {
  color: #1a7f37;
  margin-right: 0.25rem;
}


/* -------- Research topics -------- */

/* -------- Research axes -------- */

#research .axes {
  display: flex;
  gap: 1.5em;
  margin-top: 1rem;
}

#research .axis-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#research .axis-card:hover {
  border-color: #1a7f37;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

#research .axis-card.open {
  border-color: #1a7f37;
}

#research .axis-figure {
  display: block;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

#research .axis-figure img {
  display: block;
  width: 100%;
  height: 165px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.25s ease;
}

#research .axis-card:hover .axis-figure img {
  transform: scale(1.04);
}

#research .axis-label {
  display: block;
  padding: 0.7rem 0.75rem 0.7rem 0.75rem;
  font-weight: bold;
  font-size: 1.05rem;
  line-height: 1.35;
  flex: 1;
}

#research .axis-label .icon {
  color: #1a7f37;
  margin-right: 0.5rem;
}

#research .axis-toggle {
  display: block;
  text-align: right;
  padding: 0 0.75rem 0.6rem 0;
  color: #868e96;
  font-size: 0.8rem;
}

#research .axis-card[aria-expanded="true"] .axis-toggle i {
  transform: rotate(180deg);
}

#research .axis-toggle i {
  display: inline-block;
  transition: transform 0.2s;
}

#research .axis-panel {
  margin-top: 1rem;
  border: 1px solid #e9ecef;
  border-left: 3px solid #1a7f37;
  border-radius: 0.25rem;
}

#research .axis-panel-inner {
  padding: 1rem 1.25rem;
}

#research .axis-panel h3 {
  margin: 0 0 0.6rem 0;
  font-size: 1.3rem;
}

#research .axis-panel h3 .icon {
  color: #1a7f37;
  margin-right: 0.5rem;
}

#research .axis-panel p {
  margin: 0 0 0.6rem 0;
}

#research .axis-panel .works {
  list-style: none;
  margin: 0.75rem 0 0 0;
  padding: 0;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

#research .axis-panel .works li {
  background: #f1f3f5;
  border: 1px solid #dee2e6;
  border-radius: 0.2rem;
  padding: 0.2rem 0.5rem;
}

#research .axis-more {
  margin: 0.9rem 0 0 0;
  font-size: 0.9rem;
}

.venue-tag {
  font-family: monospace;
  font-size: 0.75rem;
  color: #868e96;
  margin-left: 0.3rem;
  white-space: nowrap;
}

@media (max-width: 780px) {
  #software .sw-list li { flex-wrap: wrap; }
  #software .sw-name { flex: 0 0 auto; }
  #software .sw-list .venue-tag { min-width: 0; text-align: left; }
}

@media (max-width: 900px) {
  #research .axes { flex-direction: column; }
}


/* -------- Map -------- */

#travel .travel-note {
  color: #555;
  font-size: 0.9rem;
}

#travel .map {
  margin-top: 0.75rem;
}

#travel .map svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
}

#travel .world .land {
  fill: #e4e7ea;
  stroke: #ffffff;
  stroke-width: 0.5;
}

#travel .world .vis {
  fill: #1a7f37;
  stroke: #ffffff;
  stroke-width: 0.5;
  cursor: help;
}

#travel .world .vis:hover {
  fill: #145c28;
}

#travel .map-failed {
  display: none;
}

.map-tip {
  position: fixed;
  z-index: 200;
  display: none;
  background: #212529;
  color: #fff;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.2rem;
  pointer-events: none;
}


/* -------- Publications -------- */

#publications .header {
  display: flex;
  gap: 2rem;
  align-items: center;
}

#publications .header h3 {
  margin: 0.5rem 0 0.25rem 0;
}

#publications .switch-view {
  display: flex;
  gap: 0.5rem;
}

#publications .switch-view button {
  font-family: monospace;
  background: #fff;
  border: 1px solid #495057;
  border-radius: 0.25rem;
  overflow: hidden;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#publications .switch-view button.active {
  background: #495057;
  color: #fff;
}

#publications .switch-view button:hover:not(.active) {
  background: #eee;
}

#publications #by-year, #publications #by-type {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 1s ease, height 1s ease;
}

#publications #by-year.active, #publications #by-type.active {
  opacity: 1;
  height: auto;
}

.publication {
  display: flex;
  align-items: flex-start;
  padding: 0.5rem;
}

/* the colour swatch identifies the entry, the thumbnail follows it */
.publication .icon {
  flex: 0 0 12px;
  margin-top: 0.35rem;
}

.publication .thumb {
  flex: 0 0 110px;
  margin: 0 1.5rem 0 0.4rem;
  align-self: center;
  border: 1px solid #e9ecef;
  border-radius: 0.2rem;
  overflow: hidden;
  line-height: 0;
  background: #f8f9fa;
}

.publication .thumb img {
  display: block;
  width: 110px;
  height: 82px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.25s ease;
}

.publication .thumb:hover img {
  transform: scale(1.06);
}

.publication .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

.publication .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: monospace;
  font-size: 0.7rem;
  line-height: 1.6;
  color: #495057;
  background: #f1f3f5;
  border: 1px solid #dee2e6;
  border-radius: 0.2rem;
  padding: 0 0.4rem;
  text-decoration: none;
}

.publication .badge:hover {
  color: #1a7f37;
  background: #e9ecef;
  border-color: #1a7f37;
  text-decoration: none;
}

.publication .badge i {
  font-size: 0.7rem;
}

.pub {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.phd { background: #ffd500;}
.b   { background: #ef942d;}
.j   { background: #c32b72; }
.jn  { background: #e080a5; }
.c   { background: #196ca3; }
.cn  { background: #4d8fc3; }
.a   { background: #a3c8e0; }
.p   { background: #606b70; }

.publication .icon a {
  text-decoration: none;
  line-height: 0;
}

.publication .ref {
  font-family: monospace;
  font-size: 0.9rem;
  flex: 0 0 3.3rem;
  margin: 0.1rem 0 0 0.8rem;
  text-align: right;
}

.publication .content {
  flex: 1;
  min-width: 0;
}

.publication .title {
  font-weight: bold;
}

.publication .title a {
  color: inherit;
}

.publication .title a:hover {
  color: #1a7f37;
}

.publication .title .subtitle {
  font-weight: normal;
}

.publication .venue {
  font-style: italic;
}

#publications h4.year,
#publications h4.type {
  margin: 0;
  padding: 0 0 0.3rem 0;
  border-bottom: 1px solid #ced4da;
  font-size: 0.8rem;
  font-weight: normal;
  color: #868e96;
  letter-spacing: 0.04em;
}

#publications .publication:first-of-type { padding-top: 0.5rem; }

#publications .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e9ecef;
  font-size: 0.8rem;
  color: #555;
}

#publications .legend .legend-label {
  font-weight: bold;
  color: inherit;
}

#publications .legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}


/* -------- Tables -------- */

table {
  border-collapse: collapse;
}

th, td {
  padding: 0.5rem 1rem;
}

tr:nth-child(odd) {
  background: #f8f9fa;
}

tr:nth-child(even) {
  background: #ffffff;
}

tr  {
  border-bottom: 1px solid #ccc;
}

th {
  text-align: left;
  font-weight: bold;
  background: #fff;
}

table {
  table-layout: auto;
  width: 100%;
}


/* -------- Students and projects-------- */

#students h4 {
  margin-bottom: 0.5rem;
}

table.students col.name,
table.projects col.name,
table.software col.name {
  width: 24%;
}

table.students col.date,
table.projects col.date {
  width: 10%;
}

table.students col.level,
table.projects col.type,
table.software col.venue {
  width: 16%;
}

table.students col.school { width: 18%; }
table.projects col.pdesc,
table.software col.desc { width: auto; }
table.software col.code { width: 8%; }

table.students td:nth-child(2),
table.students th:nth-child(2),
table.projects td:nth-child(2),
table.projects th:nth-child(2) {
  white-space: nowrap;
  min-width: 8ch;
}

table.students td.level-cell,
table.software .sw-venue {
  white-space: nowrap;
}

table.projects .pdesc,
table.software td {
  color: #555;
  font-size: 0.9rem;
}

#students .table-note {
  color: #868e96;
  font-size: 0.85rem;
  margin: 0.5rem 0 0 0;
}

#students h4 {
  margin: 1.5rem 0 0.5rem 0;
}

/* Software: four peer sub-sections, each a compact one-line-per-item list so
   that publishing a code costs no more room than anything else */
#software .sw-block {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.35rem 0;
  color: #495057;
}

#software .sw-block:first-of-type { margin-top: 0.5rem; }

#software .sw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e9ecef;
}

#software .sw-list li {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.3rem 0.25rem;
  border-bottom: 1px solid #e9ecef;
}

#software .sw-name {
  font-weight: bold;
  flex: 0 0 12rem;
}

#software .sw-name a { font-weight: bold; }

#software .sw-desc {
  flex: 1 1 0;
  min-width: 0;
  color: #555;
  font-size: 0.9rem;
}

#software .sw-code {
  flex: 0 0 auto;
  margin-left: auto;
}

#software .sw-list .venue-tag {
  flex: 0 0 auto;
  min-width: 10rem;
  text-align: right;
}

body.dark #software .sw-block { color: #bbb; }
body.dark #software .sw-list li { border-bottom-color: #333; }
body.dark #software .sw-list { border-top-color: #333; }
body.dark #software .sw-desc { color: #bbb; }


/* -------- Teaching -------- */

#teaching h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

#teaching h4.dept {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.4rem 0;
  color: #495057;
}

table.teaching col.name { width: 52%; }
table.teaching col.level { width: 12%; }
table.teaching col.code  { width: 20%; }

table.teaching td a {
  font-weight: bold;
}

table.teaching .nfiles {
  font-family: monospace;
  font-size: 0.7rem;
  color: #868e96;
  margin-left: 0.4rem;
  white-space: nowrap;
}

table.teaching .tcode {
  font-family: monospace;
  font-size: 0.8rem;
  color: #868e96;
}

/* the whole past block is greyed out */
#teaching .past h3,
#teaching .past h4.dept,
table.teaching.past td a,
table.teaching.past .tcode {
  color: #adb5bd;
}

table.teaching.past td a {
  font-weight: normal;
}

table.teaching.past tr {
  background: transparent;
}

table.teaching.past tbody tr:nth-child(odd) { background: #fbfbfc; }
table.teaching.past tbody tr:nth-child(even) { background: #f4f5f6; }

body.dark table.teaching.past tbody tr:nth-child(odd) { background: #1a1a1a; }
body.dark table.teaching.past tbody tr:nth-child(even) { background: #151515; }
body.dark #teaching .past h3,
body.dark #teaching .past h4.dept,
body.dark table.teaching.past td a,
body.dark table.teaching.past .tcode { color: #6b757d; }


/* -------- Course materials page -------- */

.course-page main {
  max-width: 52rem;
}

.course-page .breadcrumb {
  font-size: 0.85rem;
  color: #868e96;
  margin-bottom: 0.75rem;
}

.course-page .course-title {
  font-size: 1.8rem;
  margin: 0 0 0.25rem 0;
}

.course-page .course-meta {
  font-family: monospace;
  font-size: 0.8rem;
  color: #868e96;
  margin: 0 0 0.75rem 0;
}

.course-page .course-blurb {
  color: #555;
  margin-bottom: 1.5rem;
}

.course-page .mat-group {
  font-size: 1rem;
  margin: 1.25rem 0 0.4rem 0;
  color: #495057;
}

.course-page .mat-group .icon {
  color: #1a7f37;
  margin-right: 0.5rem;
}

.course-page .mat-group .count {
  font-family: monospace;
  font-size: 0.75rem;
  color: #868e96;
}

.course-page .materials {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
  overflow: hidden;
}

.course-page .materials li:nth-child(odd) { background: #f8f9fa; }

.course-page .materials a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid #e9ecef;
  color: inherit;
  text-decoration: none;
}

.course-page .materials a:hover {
  background: #e9ecef;
  color: #1a7f37;
  text-decoration: none;
}

.course-page .materials .fname { flex: 1; }

.course-page .materials .fext {
  font-family: monospace;
  font-size: 0.7rem;
  color: #868e96;
  text-transform: uppercase;
}

.course-page .empty { color: #868e96; font-style: italic; }

.course-page .back {
  margin-top: 2rem;
  font-size: 0.9rem;
}

.course-page.past .course-title,
.course-page.past .mat-group { color: #868e96; }

body.dark .course-page .course-blurb,
body.dark .course-page .mat-group { color: #bbb; }
body.dark .course-page .materials { border-color: #484848; }
body.dark .course-page .materials li:nth-child(odd) { background: #1b1b1b; }
body.dark .course-page .materials a { border-bottom-color: #333; color: #ddd; }
body.dark .course-page .materials a:hover { background: #212529; color: #56d364; }


/* -------- Method pages -------- */

.method-page main {
  max-width: 60rem;
}

.method-page .method-body h3 {
  margin: 1.5rem 0 0.5rem 0;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #e9ecef;
}

.method-page .method-body h5 {
  margin: 1.1rem 0 0.3rem 0;
  font-size: 0.95rem;
  color: #495057;
}

.method-page .method-body ul {
  margin: 0.3rem 0 0.8rem 1.2rem;
}

.method-page .method-body li {
  margin-bottom: 0.25rem;
}

.method-page .method-body p {
  margin: 0.6rem 0;
}

.method-page .method-body .fig {
  margin: 0.9rem 0;
}

.method-page .method-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #e9ecef;
  border-radius: 0.2rem;
  background: #fff;
}

.method-page .method-body i {
  color: #555;
  font-size: 0.9rem;
}

body.dark .method-page .method-body h3 { border-bottom-color: #484848; }
body.dark .method-page .method-body h5 { color: #bbb; }
body.dark .method-page .method-body img {
  border-color: #484848;
  background: #1b1b1b;
}


/* -------- Dark mode -------- */

#btn-dark {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #bbb;
  padding: 0 1rem;
  transition: color 0.3s, transform 0.2s;
  margin-left: auto;
}

#btn-dark:hover {
  color: #fff;
}

body.dark {
  background: #121212;
  color: #e0e0e0;
}

body.dark a {
  color: #56d364;
}

body.dark #nav-home {
  color: #fff;
}

body.dark .navbar a {
  color: #bbb;
}

body.dark .navbar a:hover {
  color: #fff;
}

body.dark #nav-home:hover {
  color: #e0e0e0;
}

body.dark #profile .chip {
  background: #1b1b1b;
  border-color: #484848;
  color: #ddd;
}

body.dark #profile .chip:hover { border-color: #56d364; color: #56d364; }
body.dark #profile .chip.logos { background: #fff; color: inherit; }
body.dark #profile .chip .enseirb { filter: none; }
body.dark /* the graduation cap marks a defended thesis */
.defended { color: #1a7f37; }
body.dark .defended { color: #56d364; }

#profile .email { color: #56d364; }

body.dark #travel .world .land { fill: #2a2a2a; stroke: #121212; }
body.dark #travel .world .vis  { fill: #56d364; stroke: #121212; }
body.dark #travel .world .vis:hover { fill: #7ee89a; }
body.dark #travel .travel-note { color: #bbb; }

body.dark #profile .links a {
  color: #c0c0c0;
}

body.dark #profile .links a:hover {
  color: #56d364;
}

body.dark #profile .affiliation {
  border: 1px solid #484848;
}

body.dark #profile .affiliation .header {
  background: #212529;
  border-bottom: 1px solid #484848;
}

body.dark #bio .timeline .icon,
body.dark #research .topic .icon {
  color: #56d364;
}

body.dark #research .topic {
  border: 1px solid #484848;
}

body.dark #research .topic-figure,
body.dark .publication .thumb {
  background: #1b1b1b;
  border-color: #484848;
}

body.dark #research .topic .description {
  color: #bbb;
}

body.dark .publication .badge {
  color: #bbb;
  background: #1b1b1b;
  border-color: #484848;
}

body.dark .publication .badge:hover {
  color: #56d364;
  border-color: #56d364;
  background: #212529;
}

body.dark .publication .title a:hover {
  color: #56d364;
}

body.dark #research .axis {
  border-color: #484848;
}

body.dark #research .axis-figure {
  border-color: #484848;
  background: #1b1b1b;
}

body.dark #research .axis .works li {
  background: #1b1b1b;
  border-color: #484848;
  color: #ddd;
}

body.dark #research .axis h3 .icon {
  color: #56d364;
}

body.dark .venue-tag {
  color: #868e96;
}

body.dark #publications .legend {
  color: #bbb;
  border-top: 1px solid #484848;
}

body.dark #publications .switch-view button {
  border: 1px solid #484848;
}

body.dark #publications .switch-view button:not(.active) {
  background: #e0e0e0;
}

body.dark #publications .switch-view button:hover:not(.active) {
  background: #c0c0c0;
}

body.dark tr:nth-child(odd) {
  background: #1b1b1b;
}

body.dark tr:nth-child(even) {
  background: #121212;
}

body.dark tr  {
  border-bottom: 1px solid #484848;
}

body.dark th {
  background: #121212;
}


/* -------- Monospace mode -------- */

#btn-monospace {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #bbb;
  padding: 0 1rem;
  transition: color 0.3s, transform 0.2s;
}

#btn-monospace:hover {
  color: #fff;
}

body.monospace section {
  font-family: monospace;
}

body.monospace #profile .name {
  font-family: monospace;
}

body.monospace #profile .position {
  font-family: monospace;
}
