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: 90ch;
  margin-inline: auto;
  padding-left: 2ch;
  padding-right: 2ch;
  padding-top: 3ch;
  padding-bottom: 3ch;
}
nav {
  /* border-bottom-color: var(--border-color); */
  margin-bottom: 2ch;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: oklch(80% 3% 200);
  border-width: 0.25em;
  padding-bottom: 0.25em;
  text-align: center;
  a {
    text-decoration: none;
    color: inherit;
    padding: 2em;
  }
  a:hover {
    /* becomes a:hover */
    background-color: color-mix(in oklch, #5c6bb88c, canvas 30%);
    /* background-color: #5c6bb88c; */
    border-bottom: var(--color-accent);
    border-width: 0.25em;
    border-bottom-style: solid;
    padding-bottom: 0.35em;
    padding-top: 0.4em;
  }
}
.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%;
}
.current {
  border-bottom: 1px solid #e8b4cc;
  font-weight: bold;
  border-width: 0.25em;
  padding-bottom: 0.1em;
  margin-bottom: 2ch;
  border-width: 0.5em;
}
:root {
  --color-accent: #2741c2;
  --border-color: oklch(50% 10% 200 / 40%);
}
form {
  label {
    display: contents;
    gap: 0.5em;
    display: grid;
    padding-top: 1em;
  }
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
}
.projects {
  article {
    h2 {
      margin: 0;
    }
    grid-row: span 3;
    grid-template-rows: subgrid;
    display: grid;
    gap: 2em;
    padding: 1em;
  }
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
}
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.1;
  text-wrap: balance;
}
.resume {
  section {
    padding: 0.6em;
  }
  section:hover {
    background-color: #999dcd6f;
  }
  img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
    float: left;
  }
  .res-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
  }
  h2 {
    border-bottom: 3px solid #e8b4cc;
  }
}

.color-scheme {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

#profile-stats dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

#profile-stats dt {
  grid-row: 1;
  font-size: 1.2em; /* Adjust the size as needed */
  font-weight: bold;
}

#profile-stats dd {
  grid-row: 2;
}

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

  overflow: visible;
}

.legend {
  display: grid;
  flex-direction: column;
  gap: 0.5em;
  grid-template-columns: repeat(auto-fill, minmax(9em, 1fr));
  border: 3px solid #f7dcdc; /* Add a border around the legend */
  padding: 2em;
  border-radius: 10px;
  flex: 1;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.legend .swatch {
  width: 1em; /* Adjust the size as needed */
  height: 1em; /* Adjust the size as needed */
  aspect-ratio: 1 / 1;
  background-color: var(--color); /* Use the appropriate color variable */
  border-radius: 0.25em; /* Slight rounding, adjust as needed */
  align-items: center;
}

/* Optional: Make the swatch a full circle */
.legend .swatch.circle {
  border-radius: 50%;
}

.container {
  display: flex;
  gap: 3em;
  align-items: center;
}

#projects-plot {
  &:has(path:hover) {
    path:not(:hover) {
      opacity: 0.5;
    }
  }
}

path {
  transition: 300ms;
  cursor: pointer;
}

.selected {
  --color: oklch(60% 45% 0) !important;

  &:is(path) {
    fill: var(--color);
    stroke: #fff8d8; /* Outline color */
    stroke-width: 2px;
  }
}

svg .gridlines {
  color: rgb(216, 174, 215);
}

/* Styles for dl.info */
dl.info {
  display: grid;
  grid-template-columns: 1fr 2fr; /* Two columns, one for dt and one for dd */
  gap: 0.5em;
}

dl.info dt {
  margin: 0; /* Remove default margin */
  font-weight: normal; /* Make labels less prominent */
  color: #666; /* Lighter color for labels */
}

dl.info dd {
  margin: 0; /* Remove default margin */
  font-weight: bold; /* Make values more prominent */
  color: #000; /* Darker color for values */
}

/* Styles for .tooltip */
.tooltip {
  position: fixed;
  top: 1em;
  left: 1em;
  background-color: #fff; /* Background color for the tooltip */
  padding: 0.5em; /* Padding inside the tooltip */
  border: 1px solid #ccc; /* Border for the tooltip */
  border-radius: 0.25em; /* Rounded corners for the tooltip */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Optional: Add a shadow for better visibility */
}

circle {
  transition: 200ms;
  transform-origin: center;
  transform-box: fill-box;
}

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

#commit-tooltip {
  background-color: white;
  box-shadow: 2px 1px 5px #d19fca;
  border-radius: 2em;
  backdrop-filter: blur(10em);
  padding: 1em;
}

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

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

@keyframes marching-ants {
  to {
    stroke-dashoffset: -8; /* 5 + 3 */
  }
}

.selection {
  fill-opacity: 0.1;
  stroke: black;
  stroke-opacity: 0.7;
  stroke-dasharray: 5 3;
  animation: marching-ants 2s linear infinite;
  fill: #d19fca;
}

circle.selected {
  fill: #ff6b6b;
}

#language-breakdown {
  display: grid;
  grid-template-columns: 2;
  gap: 1em;
}

.stats {
  display: grid;
  gap: 0.5em;
  grid-template-columns: 1fr 1fr; /* Two columns, one for dt and one for dd */
  grid-auto-rows: auto;
  outline: 3px solid;
  outline-offset: 4px;
  outline-color: #e8b4cc;
  padding: 1em;
  background-color: #f9f9f9;
  border-radius: 0.5em;
}

/* Specific styles for #language-breakdown */
#language-breakdown {
  margin-top: 2em;
  margin-bottom: 2em;
}

/* Styles for dt elements */
.stats dt {
  font-size: 1.2em; /* Adjust the size as needed */
  font-weight: bold;
  color: #333;
  outline: 1px solid;
  outline-offset: 4px;
  outline-color: #e8b4cc;
}

/* Styles for dd elements */
.stats dd {
  margin: 0;
  font-size: 1em;
  color: #666;
  outline: 1px solid;
  outline-offset: 4px;
  outline-color: #e8b4cc;
}

/* Hover effects for dt elements */
.stats dt:hover {
  background-color: #999dcd6f;
}

/* Hover effects for dd elements */
.stats dd:hover {
  background-color: #bda0b651;
}

#slider label {
  flex:1;
  align-items: baseline;
}