/* Global */
:root {
  --white: #fff;
  --gray: #616d7e;
  --black: #000;
  --red: #eb4747;
  --baseline-step: 0.625em;
}
@font-face {
  font-family: "MAD Sans Fill";
  src: url("../fonts/mad-sans-fill-bold.woff2");
}
@font-face {
  font-family: "MAD Sans Fill Italic";
  src: url("../fonts/mad-sans-fill-bold-italic.ttf");
}
* {
  margin: 0;
  padding: 0;
}
body {
  font-family: "MAD Sans Fill";
  width: 100vw;
  height: auto;
  font-size: 1em;
  line-height: 1.25;
  background: var(--black);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(235, 71, 71, 0) 0,
    rgba(235, 71, 71, 0) calc(var(--baseline-step) - 1px),
    rgba(235, 71, 71, 0.45) calc(var(--baseline-step) - 1px),
    rgba(235, 71, 71, 0.45) var(--baseline-step)
  );
  transition: opacity 0.15s ease;
}

body.show-baseline-grid::before {
  opacity: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nowrap {
  white-space: nowrap;
}

/* Main container */
main {
  margin: 19px 20px auto 20px;
}

/* Menu */
nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-column-gap: 20px;
  width: 100%;
  height: auto;
  margin-top: -4px;
  margin-bottom: 20px;
}
.menu {
  position: absolute;
  width: 100%;
  text-align: right;
  right: 60px;
}

.menu a {
  display: inline-block;
  transform: translateY(3px);
}
/* .work-title {
    font-family: "MAD Sans Fill Italic";
    display: block;
    text-indent: 1.5em;
} */

#info,
#mail {
  margin-left: 12.375px;
}

/* Content */
.content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, min(60ch, calc((100% - 40px) / 2))));
  grid-column-gap: 40px;
  width: 100%;
  max-width: 1280px;
  margin-top: 40px;
  margin-bottom: 40px;
  color: var(--white);
  align-items: start;
}
.biography {
  margin-left: 40px;
}
.history {
  margin-right: 40px;
  color: var(--gray);
  min-height: 0;
}

.biography > p,
.desktop-footer,
.history > ul,
.mobile-footer {
  width: 100%;
  max-width: 100%;
}

.section-label {
  color: var(--white);
}

/* Links */
a:link,
a:hover,
a:visited {
  color: var(--white);
}
a:link,
a:visited {
  text-decoration: none;
}
a:link.active,
a:visited.active {
  color: var(--red);
}
a:link.inactive,
a:visited.inactive {
  color: var(--white);
}
a:hover.inactive {
  color: var(--gray);
}
a:link.external {
  color: var(--white);
  text-decoration: none;
}
a:hover.external {
  color: var(--gray);
  text-decoration: none;
}

li {
  list-style-type: none;
}

/* Footer */
.mobile-footer {
  display: none;
}
.desktop-footer {
  color: var(--white);
  background: var(--black);
  z-index: 1000;
  padding-top: 20px;
  padding-bottom: 22px;
}

/* Media Queries */
@media (min-width: 721px) {
  body {
    overflow: hidden;
  }

  .history {
    position: relative;
    height: var(--history-height, auto);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 720px) {
  :root {
    --baseline-step: 12px;
  }

  body {
    font-size: 1.125em;
    line-height: 1.375em;
    overflow: auto;
  }
  .content {
    grid-template-columns: 1fr;
    margin-right: 40px;
    margin-top: 0;
  }
  .history {
    grid-column: 1;
    max-height: none;
    overflow: visible;
    /* margin-left: 20px; */
  }
  .history:first-of-type {
    margin-top: 20px;
  }
  .desktop-footer {
    display: none;
  }
  .biography {
    margin-left: 0;
    margin-right: 20px;
  }
  nav {
    display: block;
    margin-bottom: 25px;
  }
  .menu {
    position: initial;
    text-align: left;
    padding-top: 2px;
    /* margin-left: 20px; */
  }
  #info,
  #mail {
    margin: 0;
  }
  .inactive,
  .active {
    display: block;
  }
  .content:first-of-type {
    position: initial;
    margin-top: 20px;
  }
  .mobile-footer {
    display: block;
    color: var(--white);
    /* margin-left: 20px; */
    margin-top: 48px;
    margin-bottom: 20px;
  }
  .history > ul:first-of-type {
    margin-top: 48px;
  }
  .menu a {
    display: block;
    width: max-content;
    padding: 0;
    line-height: calc(var(--baseline-step) * 2);
    transform: none;
  }

  .menu a + a {
    margin-top: 0;
  }
}
