img[alt="myPhoto"] {
  display: block;
  margin: 2em auto 1em auto;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 0;
  box-shadow: 0 2px 8px 0 oklch(90% 2% 200 / 0.15);
}
h1, h2, h3 {
  font-weight: bold;
}

body {
  background: oklch(99% 0 0);
}

main, .resume-main {
  max-width: 60ch;
  margin: 0 auto;
  background: canvas;
  color: canvastext;
  border-radius: 0.5em;
  box-shadow: 0 2px 8px 0 oklch(90% 2% 200 / 0.08);
  padding: 2em 2.5em;
}

header, section {
  margin-bottom: 2em;
}

section header {
  margin-bottom: 0.5em;
}

section {
  background: canvas;
  color: canvastext;
  border-radius: 0.4em;
  padding: 1.2em 1.5em;
  margin-bottom: 1.5em;
}

ul {
  margin-top: 0.3em;
  margin-bottom: 1em;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.3em;
}

@media (max-width: 700px) {
  main, .resume-main {
    padding: 1em 0.5em;
  }
  section {
    padding: 0.7em 0.5em;
  }
}

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

body {
  font: 100%/1.5 system-ui;
  max-width: 90ch;
  margin-inline: max(1em, (100% - 100ch) / 2);
  padding: 10ch;
  background: canvas;
  color: canvastext;
}

nav {
  --border-color: oklch(50% 10% 200 / 40%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: 1.5em;
  padding-bottom: 0.5em;
  margin-bottom: 2em;
  background: canvas;
  color: canvastext;
  z-index: 100;
}

nav a {
  text-decoration: none;
  color: inherit;
  padding: 0.2em 0.5em;
  border-radius: 0.3em;
  transition: background 0.2s;
}

nav a:active,
nav a:focus,
nav a:visited {
  text-decoration: none;
}

nav a.current {
  font-weight: bold;
}

nav a:hover {
  background-color: color-mix(in oklch, var(--color-accent), canvas 85%);
}

.color-scheme {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 80%;
  font-family: inherit;
  background: canvas;
  color: canvastext;
  padding: 0.3em 0.7em;
  border-radius: 0.4em;
  box-shadow: 0 2px 8px 0 oklch(90% 2% 200 / 0.08);
  z-index: 1000;
}

.color-scheme select {
  font-family: inherit;
  font-size: 100%;
  margin-left: 0.5em;
}


nav ul,
nav li {
  display: contents;
}

nav {
  display: flex;
  border-bottom: 1px solid oklch(80% 3% 200);
  margin-bottom: 2em;
}
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
  gap: 1em;
  margin-top: 2em;
}

.projects article {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  background: canvas;
  color: canvastext;
  border-radius: 0.5em;
  box-shadow: 0 2px 8px 0 oklch(90% 2% 200 / 0.1);
  padding: 1em;
}

.projects h2 {
  margin: 0;
}

.projects img {
  width: 100%;
  height: auto;
  display: block;
  margin-block: 1em;
}

.project-year {
  font-family: Baskerville, serif;
  font-variant-numeric: oldstyle-nums;
  color: oklch(50% 0 0);
  margin: 0.5em 0 0;
}

#projects-pie-plot {
  max-width: 20em;
  overflow: visible;

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

  &:has(path:hover) {
    path:not(:hover) {
      opacity: 0.5;
    }
  }
}

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

  &:is(path) {
    fill: var(--color);
  }
}

.container {
  display: flex;
  align-items: center;
  gap: 2em;
  margin-block: 2em;
}

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9em, 1fr));
  gap: 0.8em;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 1em;
  border: 1px solid oklch(80% 3% 200);
  border-radius: 0.5em;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4em;
  cursor: pointer;
}

.swatch {
  display: inline-block;
  width: 1em;
  aspect-ratio: 1 / 1;
  background-color: var(--color);
  border-radius: 3px;
  flex-shrink: 0;
}

.searchBar {
  display: block;
  width: 100%;
  padding: 0.5em 0.75em;
  font: inherit;
  border: 1px solid oklch(80% 3% 200);
  border-radius: 0.4em;
  margin-bottom: 1.5em;
  box-sizing: border-box;
}

h1 {
  font-size: 400%;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.1;
  text-wrap: balance;
}

nav a {
  flex: 1;
  text-decoration: none;
  color: inherit;
  text-align: center;
  padding: 0.5em;
}


nav a.current {
  border-bottom: none;
  padding-bottom: 0;
}

nav a:hover {
  border-bottom: 0.4em solid var(--color-accent);
  padding-bottom: 0.1em;
}

input,
textarea,
button {
  font: inherit;
}

form {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1em;
}

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

input,
textarea {
  width: 100%;
  box-sizing: border-box;
}

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

#profile-stats {
  background: canvas;
  color: canvastext;
  border-radius: 0.5em;
  box-shadow: 0 2px 8px 0 oklch(90% 2% 200 / 0.1);
  padding: 2em;
  margin: 2em 0;
}

#profile-stats dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5em;
  text-align: center;
}

#profile-stats dt {
  grid-row: 1;
  font-weight: bold;
  color: oklch(50% 0 0);
  font-size: 0.9em;
}

#profile-stats dd {
  grid-row: 2;
  margin: 0;
  font-size: 1.8em;
  font-weight: bold;
  color: var(--color-accent);
}

@media (max-width: 600px) {
  #profile-stats dl {
    grid-template-columns: repeat(2, 1fr);
    gap: 1em;
  }

  #profile-stats {
    padding: 1.5em;
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10em, 1fr));
  gap: 1.5em;
  background: canvas;
  color: canvastext;
  border-radius: 0.5em;
  box-shadow: 0 2px 8px 0 oklch(90% 2% 200 / 0.1);
  padding: 2em;
  margin: 2em 0;
}

.stats dt {
  font-weight: bold;
  color: oklch(50% 0 0);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25em;
}

.stats dd {
  margin: 0;
  font-size: 1.6em;
  font-weight: bold;
  color: var(--color-accent);
}

#chart svg {
  width: 100%;
  height: auto;
}

.gridlines line {
  stroke: oklch(70% 5% 200 / 30%);
  stroke-dasharray: 3 3;
}

.gridlines path,
.gridlines .domain {
  display: none;
}

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

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

dl.info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25em 1em;
  margin: 0;
  transition-duration: 500ms;
  transition-property: opacity, visibility;
}

dl.info dt {
  font-size: 0.8em;
  font-weight: bold;
  color: oklch(50% 0 0);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  align-self: center;
}

dl.info dd {
  margin: 0;
  align-self: center;
}

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

.tooltip {
  position: fixed;
  top: 1em;
  left: 1em;
  background: oklch(99% 0 0 / 90%);
  backdrop-filter: blur(6px);
  border-radius: 0.5em;
  box-shadow: 0 4px 16px oklch(0% 0 0 / 15%);
  padding: 0.75em 1em;
  pointer-events: none;
  z-index: 500;
  min-width: 16em;
}

@media (prefers-color-scheme: dark) {
  .tooltip {
    background: oklch(20% 2% 260 / 90%);
  }
}

circle.selected {
  fill: #ff6b6b;
}

@keyframes marching-ants {
  to {
    stroke-dashoffset: -8;
  }
}

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