:root {
  --color-background: #ddd;
  --color-foreground: #444;
  --color-accent: #f6fa1a;
  --color-invert: #006F83;
  --color-highlight: #fff;
  --color-alternate: #00F4F9;
}

* {
  box-sizing: border-box;
}

a {
  box-shadow: inset 0 -10px 0 var(--color-alternate);
  color: var(--color-foreground);
  text-decoration: none;
}

a:hover,
a:active {
  background: var(--color-alternate);
}

body {
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  margin: 0;
  padding: 0;
}

.assets {
  height: 0;
  overflow: hidden;
  width: 0;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 20px 0;
  text-transform: none;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px 0;
}

h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 20px 0;
  text-transform: uppercase;
}

p {
  margin: 0 0 20px 0;
}

sup a {
  color: var(--color-foreground);
  font-size: 10px;
  font-weight: 600;
  text-decoration: underline;
}

.header {
  display: block;
  height: 150px;
  margin: 10px 20px 40px 20px;
  position: relative;
  width: auto;
}

.header .square {
  background: var(--color-accent);
  display: block;
  height: 100px;
  left: 0;
  position: absolute;
  top: 50%;
  transform: translate3d(0, -50%, 0);
  width: 100px;
  z-index: 1;
}

.header .text {
  left: 50%;
  margin: 0;
  position: absolute;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  z-index: 2;
}

.header h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: .9;
  margin: 0;
  text-transform: uppercase;
}

.header h2 {
  font-size: 18px;
  font-weight: 300;
  line-height: .9;
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.intro {
  display: block;
  margin: 0 20px 120px 20px;
}

.intro h3 {
  font-size: 18px;
  font-weight: 300;
  text-transform: none;
}

.intro h3 strong {
  box-shadow: inset 0 -10px 0 0 var(--color-accent);
  font-weight: 600;
}

.overview,
.aboutme,
.timeline {
  display: block;
  margin: 0px 20px 40px 20px;
  position: relative;
}

.overview h2,
.aboutme h2,
.timeline h2 {
  background: var(--color-background);
  position: sticky;
  top: 0;
  z-index: 2;
}

.overview .map {
  margin-bottom: 40px;
}

.overview .progress svg {
  border: 1px solid var(--color-foreground);
  display: inline-block;
  margin: 0 5px;
  vertical-align: middle;
}

.timeline-item {
  margin-bottom: 80px;
  position: relative;
}

.timeline-date {
  background: var(--color-background);
  position: sticky;
  top: 38px;
  z-index: 1;
}

.timeline-event,
.timeline-chart,
.timeline-drugs,
.timeline-contacts {
  margin-bottom: 60px;
}

.overview p strong,
.aboutme p strong,
.timeline-event strong {
  box-shadow: inset 0 -10px 0 0 var(--color-accent);
  font-weight: 600;
}

/* Charts */

.timeline-chart {
  display: block;
}

.timeline-chart .chart {
  background: var(--color-highlight); /*var(--color-accent);*/
  display: block;
  margin: 20px 0 60px 0;
  position: relative;
  width: 100%;
}

.timeline-chart .chart-block {
  height: auto;
  position: absolute;
}

.timeline-chart .chart-block .normal,
.timeline-chart .chart-block .good,
.timeline-chart .chart-block .bad,
.timeline-chart .chart-block .worst {
  display: block;
  height: 100%;
  width: 100%;
}

.timeline-chart .chart-block svg {
  height: 100%;
  width: 100%;
}

.timeline-chart .chart-label {
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  font-weight: 400;
  position: absolute;
  text-align: left;
  text-shadow: 1px 1px 0 var(--color-accent);
  text-transform: uppercase;
  white-space: nowrap;
}

.timeline-chart .chart-label.label-0 {
  text-shadow: none;
}

.timeline-chart .chart-bar {
  background: var(--color-highlight); /*var(--color-accent);*/
  border-bottom: 1px solid var(--color-foreground);
  border-right: 1px solid var(--color-foreground);
  border-top: 1px solid var(--color-foreground);
  display: block;
  position: absolute;

  box-shadow: inset -1px 0 0 0 var(--color-accent),
    inset 0 -1px 0 0 var(--color-accent),
    inset 0 1px 0 0 var(--color-accent);
}

.timeline-chart .chart-legend {
  display: flex;
  height: 20px;
  line-height: 20px;
  position: absolute;
  right: 0;
  top: 100%;
  width: auto;
}

.timeline-chart .chart-legend span {
  flex: 0 0 50%;
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
}

.timeline-chart .chart-legend span:last-child {
  text-align: right;
}

/* Drugs */

.timeline-drugs ul,
.timeline-drugs li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-drugs li {
  margin-right: 5px;
}

.drug {
  background: var(--color-highlight);
  border-radius: 10px;
  display: inline-block;
  height: 20px;
  line-height: 20px;
  margin-right: 5px;
}

.drug span {
  display: block;
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  font-weight: 400;
  height: 20px;
  line-height: 20px;
  padding: 0 5px;
  position: relative;
  text-transform: uppercase;
}

.drug span::after {
  background: var(--color-accent);
  border-radius: 0 10px 10px 0;
  content: '';
  height: 20px;
  left: 50%;
  mix-blend-mode: multiply;
  position: absolute;
  right: 0;
  top: 0;
  width: auto;
}

.drug span::before {
  background: var(--color-background);
  content: '';
  height: 20px;
  left: 50%;
  mix-blend-mode: multiply;
  position: absolute;
  top: 0;
  transform: translate3d(-50%, 0, 0);
  width: 2px;
}

/* Contacts */

.timeline-contacts ul,
.timeline-contacts li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-contacts .contact {
  background: var(--color-highlight);
  border-radius: 10px;
  display: inline-block;
  height: 20px;
  line-height: 20px;
  margin-right: 5px;
}

.timeline-contacts .contact span {
  display: block;
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  font-weight: 400;
  height: 20px;
  line-height: 20px;
  padding: 0 0 0 5px;
  position: relative;
  text-transform: uppercase;
}

.timeline-contacts .contact em {
  background: var(--color-invert);
  border-radius: 10px;
  color: var(--color-highlight);
  display: inline-block;
  font-style: normal;
  padding: 0 5px;
  text-align: center;
  width: 20px;
}


/* Notes */

.notes {
  border-top: 1px dotted var(--color-foreground);
  display: block;
  font-size: 12px;
  margin: 0px 20px 40px 20px;
  padding-top: 40px;
}

.notes p {
  max-width: 600px;
}

/* Footer */

.page-footer {
  background: var(--color-foreground);
  color: var(--color-background);
}

.page-footer .footer--wrapper {
  padding: 40px 20px;
}

.page-footer.vn ul {
  margin-bottom: 20px;
}

.page-footer.vn a,
.page-footer.vn a:link,
.page-footer.vn a:visited,
.page-footer.vn a:hover,
.page-footer.vn a:active {
  background: var(--color-accent);
  border-radius: 1px;
  box-shadow: 0 0 0 2px var(--color-accent);
  color: var(--color-foreground);
  text-decoration: none;
}

.page-footer.vn h3 a,
.page-footer.vn h3 a:link,
.page-footer.vn h3 a:visited,
.page-footer.vn h3 a:hover,
.page-footer.vn h3 a:active {
  background: transparent;
  box-shadow: none;
  color: var(--color-background);
}

.page-footer.vn strong {
  font-weight: 600;
}


/* Heatmaps */

.heatmaps {
  display: block;
  height: auto;
  margin-bottom: 40px;
  position: relative;
  width: 100%;
}

.kpi-days .kpi-heatmap-cell {
  background: var(--color-background);
  flex: 0 0 25px;
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  font-weight: 400;
  height: 16px;
  line-height: 16px;
  text-align: center;
}

.heatmaps .kpis {
  display: block;
  left: 20px;
  position: absolute;
  top: 16px;
  width: 100px;
}

.heatmaps .kpi-label {
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  font-weight: 400;
  height: 30px;
  line-height: 30px;
  text-transform: uppercase;
}

.kpi-heatmap {
  display: flex;
  flex-wrap: nowrap;
}

.kpi-heatmap-cell {
  background: var(--color-highlight);
  display: block;
  flex: 0 0 25px;
  height: 30px;
  max-width: 25px;
  position: relative;
}

.kpi-heatmap-cell-inner {
  border: 1px solid var(--color-foreground);
  display: block;
  height: 28px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: 22px;
}

.kpi-heatmap-cell-inner svg {
  display: block;
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

.heatmaps-wrapper {
  display: block;
  margin-right: 20px;
  overflow: auto;
  width: auto;
}

.heatmaps .heatmaps-days {
  background: var(--color-background);
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  font-weight: 400;
  height: 16px;
  left: 20px;
  line-height: 16px;
  position: absolute;
  text-transform: uppercase;
  top: 0;
}

.heatmap-position {
  display: block;
  padding: 0 0 0 120px;
  position: relative;
}


/* Drugs */

.drugs {
  display: block;
  height: auto;
  margin-bottom: 40px;
  position: relative;
  width: 100%;
}

.drugs-position {
  display: block;
  margin: 0 20px;
  overflow: auto;
}

.drugs-wrapper {
  align-items: flex-end;
  display: flex;
  flex-wrap: nowrap;
}

.drugs-wrapper .drugs-day {
  flex: 0 0 86px;
}

.drugs-wrapper .drugs-day ul {
  margin: 0;
  padding: 0;
  text-align: center;
}

.drugs-wrapper .drugs-day li {
  display: inline-block;
  margin: 0 auto;
}

.drugs-wrapper .drugs-day > span {
  display: block;
  font-family: 'Source Code Pro', monospace;
  font-size: 10px;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
}