/* Variables */

:root {
  color-scheme: light dark;
  --body-color: light-dark(#222, #efefef);
  --body-selection: #00f;
  --link-background: url("../img/wavy.svg");
}

html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
html,
body,
h1,
p,
ul,
li,
dl,
dt,
dd {
  font: inherit;
  font-size: 100%;
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}

/* Global */

body {
  font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui,
    helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.4em;
  color: var(--body-color);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--body-color);
  text-decoration: none;
  background-image: var(--link-background);
  background-repeat: repeat-x;
  background-position: bottom;
  padding-bottom: 2px;

  &:hover {
    text-decoration: none;
    background-image: none;
  }

  &.clear {
    background-image: none;
  }
}

/* Selection */

::selection {
  color: #fff;
  background: var(--body-selection);
}

/* Sections and Paragraphs */

p {
  margin-bottom: 1.5em;
}

/* Container */

.container {
  display: flex;
  align-items: flex-start;
}

/* Nav */

.nav {
  max-width: 320px;
  padding: 20px;
  position: sticky;
  position: -webkit-sticky;
  top: 0;
}

.nav-list {
  min-height: 21px;
  margin: 0.88em 0;
}

/* Main Area */

.main {
  padding: 20px 20px 60px;
  position: relative;
}

#axis {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
}

#cv {
  min-height: 21px;
  margin-bottom: calc(3.4em + 6px);
}

.ltsp {
  letter-spacing: 1px;
}

/* Definition List */

dl {
  display: flex;
  max-width: 620px;
  flex-wrap: wrap;
}

dt {
  flex-basis: 150px;
}

dd {
  margin-bottom: 1.5em;
  flex-basis: 470px;

  &:last-child {
    margin-bottom: 0;
  }
}

/* SVG */

svg {
  display: block;
  fill: currentColor;
  margin: 1em 0;
}

/* Mobile */

@media (max-width: 500px) {
  body {
    font-size: 14px;
    line-height: 20px;
  }

  dd {
    min-width: 100%;
  }

  .nav {
    max-width: none;
    position: static;
  }

  #axis {
    display: none;
  }

  .container {
    display: flex;
    flex-direction: column;
  }
}
