:root {
  --color-accent: oklch(65% 50% 0);
  color-scheme: light dark;
}

body {
  /* Set line height to 1.5 times the font size
         and use the OS’s UI font as the website font
       */
  font: 100%/1.5 system-ui;
  max-width: 100ch;
  margin-inline: auto;
  padding: 10px;
}

nav {
  display: flex;
  --border-color: oklch(50% 10% 200 / 40%);
  border-bottom-color: var(--border-color);
}

nav ul {
  display: contents;
}

nav li {
  display: contents;
}

nav a {
  flex: 1;
  text-decoration: none;
  color: inherit;
  text-align: center;
  padding: 0.5em;
  margin-bottom: 10px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: oklch(80% 3% 200);
}

nav a.current {
  border-bottom-width: 0.4em;
  padding-bottom: 5px;
  background-color: oklch(0.73 0 193);
}

a:hover {
  border-bottom-width: 0.4em;
  padding-bottom: 5px;
  border-bottom-color: var(--color-accent);
  background-color: color-mix(in oklch, var(--color-accent), canvas 85%);
}

article {
  border-style: dotted;
}

form {
  display: grid;
  gap: 1em;
}

form label {
  grid-column: 1 / -1;
}

form input {
  font: inherit;
  grid-column: 1 / -1;
  /* display: block;
  width: 100%;
  box-sizing: border-box; */
}

form button {
  grid-column: 1 / -1;
}

div.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
}

div.projects article {
  grid-template-rows: subgrid;
  grid-row: span 3;
  gap: 1em;
}

div.projects article h2 {
  margin: 0;
}

h1 {
  line-height: 1.1;
  font-size: 400%;
}

h2 {
  line-height: 1.1;
  font-size: 200%;
}

h3 {
  line-height: 1.1;
}

h4 {
  line-height: 1.1;
}

h5 {
  line-height: 1.1;
}

h6 {
  line-height: 1.1;
}

article.border {
  border-style: dotted;
  border-width: 2px;
  padding: 10px;
}

a.cvproject {
  text-decoration: none;
  color: blue;
}

label.color-scheme {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 80%;
  font-family: inherit;
}

option {
  font-size: 110%;
  font-family: inherit;
}

select {
  size: 80%;
}

dl.stats {
  display: grid;
  grid-template-columns: 4 / 1fr;
  font: inherit;
}

dt.stats {
  font: inherit;
  font-size: 150%;
  font-weight: 600;
  grid-row: 1 / span 1;
}

dd.stats {
  font: inherit;
  font-size: 125%;
  font-weight: 500;
  grid-row: 2 / span 1;
  margin-left: 0;
}

#projects-pie-plot {
  max-width: 20em;
  margin-block: 2em;

  overflow: visible;
}

span.swatch {
  display: inline-flex;
  height: 25px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  /* background-color: #e15759; */
}

ul.legend {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(auto-fill, minmax(8em, 1fr));
}

li.legend-items {
  display: flex;
  align-items: center;
  gap: 2px;
}

div.container {
  display: flex;
}

dt.stats2 {
  font: inherit;
  font-size: 100%;
  font-weight: 600;
  grid-row: 1 / span 1;
}

dd.stats2 {
  font: inherit;
  font-size: 100%;
  font-weight: 500;
  grid-row: 2 / span 1;
  margin-left: 0;
}

g.gridlines {
  opacity: 40%;
}

dl.info {
  display: grid;
  margin-top: 0;
  margin-bottom: 0;
}

dl#commit-tooltip {
  position: fixed;
  top: 1em;
  left: 1em;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: -10px -5px 15px rgb(141, 141, 141);
  border-radius: 5%;
  padding: 5px;
}

circle {
  transition: 200ms;
  transform-origin: center;
  transform-box: fill-box;
  @starting-style {
    r: 0;
  }
}

circle:hover {
  transform: scale(1.5);
}

dl.info {
  /* ... other styles ... */
  transition-duration: 500ms;
  transition-property: opacity, visibility;
}

dl.info[hidden]:not(:hover, :focus-within) {
  opacity: 0;
  visibility: hidden;
}

circle.selected {
  fill: #ff6b6b;
}

div#time-slide {
  flex: 1;
  align-items: baseline;
}

time#commit-time {
  margin-left: auto;
}

#files {
  display: grid;
  grid-template-columns: 1fr 4fr;

  > div {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
  }

  dt {
    grid-column: 1;
  }

  dd {
    grid-column: 2;
  }
}

.loc {
  display: flex;
  width: 0.5em;
  aspect-ratio: 1;
  background: var(--color);
  border-radius: 50%;
}

dd.dots {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  align-content: start;
  gap: 0.15em;
  padding-top: 0.6em;
  margin-left: 0;
}

#scrolly-1 {
  position: relative;
  display: flex;
  gap: 1rem;

  > * {
    flex: 1;
  }
}

#scatter-story {
  position: relative;
}

#scatter-plot {
  position: sticky;
  top: 0;
  left: 0;
  bottom: auto;
  height: 50vh;
  padding: 20px;
}

div.step {
  padding: 7px;
}
