:root {
  --bg: #fff;
  --text: #1e1a1a;
  --muted: #767676;
  --line: #ddd;
  --avatar-bg: #fff;
  --link: #06c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111;
    --text: #ddd;
    --muted: #888;
    --line: #333;
    --avatar-bg: #1c2029;
    --link: #6af;
  }
}

:root[data-theme="dark"] {
  --bg: #111;
  --text: #ddd;
  --muted: #888;
  --line: #333;
  --avatar-bg: #1c2029;
  --link: #6af;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  max-width: 54em;
  margin: 3rem auto;
  padding: 0 1.25rem;
  font:
    16px/1.6 system-ui,
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--link);
}

h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0;
}

h2 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 2.5rem 0 0.75rem;
}

p {
  margin: 0 0 0.75rem;
}

.theme-toggle {
  position: absolute;
  top: 0;
  right: 1.25rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

.sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sun {
    display: block;
  }

  :root:not([data-theme="light"]) .moon {
    display: none;
  }
}

:root[data-theme="dark"] .sun {
  display: block;
}

:root[data-theme="dark"] .moon {
  display: none;
}

.intro {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.avatar {
  flex: none;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: var(--avatar-bg);
  object-fit: cover;
  object-position: 50% 22%;
}

.tagline {
  margin: 0.25rem 0 0.75rem;
  color: var(--muted);
  font-style: italic;
}

.socials {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.entry {
  display: grid;
  grid-template-columns: 8.75rem 1fr;
  gap: 0 1.75rem;
  align-items: start;
}

.years {
  padding-top: 0.2rem;
  text-align: right;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--muted);
}

.body {
  position: relative;
  min-width: 0;
}

.body::before,
.body::after {
  content: "";
  position: absolute;
  background: var(--line);
}

.body::before {
  left: -0.875rem;
  top: -0.75rem;
  bottom: -0.75rem;
  width: 1px;
}

.body::after {
  left: -1.125rem;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.entry:first-child .body::before {
  top: 0.5rem;
}

.entry:last-child .body::before {
  top: -0.75rem;
  bottom: auto;
  height: 1.25rem;
}

.body p:last-child {
  margin-bottom: 0;
}

.about {
  margin-top: 2.5rem;
}

.about p {
  max-width: 38em;
  margin-bottom: 0;
}

.aside {
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.aside strong {
  color: var(--text);
  font-weight: 500;
}

.skills {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0;
}

.skills dt {
  font-size: 0.9375rem;
  color: var(--muted);
}

.skills dd {
  margin: 0;
}

@media (max-width: 34rem) {
  body {
    margin: 2rem auto;
  }

  .intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .entry {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 1.25rem;
  }

  .years {
    margin-bottom: 0.25rem;
    padding-top: 0;
    text-align: left;
  }

  .body::before {
    left: -1.25rem;
  }

  .body::after {
    left: -1.5rem;
    top: 0.4rem;
  }

  .skills {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .skills dd {
    margin-bottom: 0.75rem;
  }
}
