:root {
  --bg: #fafaf7;
  --text: #24292f;
  --muted: #6e7781;
  --rule: #e1e4e8;
  --accent: #116329;
  --link: #0550ae;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --text: #d6dbe1;
    --muted: #8b949e;
    --rule: #262c36;
    --accent: #7ee787;
    --link: #79c0ff;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --text: #d6dbe1;
  --muted: #8b949e;
  --rule: #262c36;
  --accent: #7ee787;
  --link: #79c0ff;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9375rem;
  line-height: 1.7;
}

main {
  max-width: 72ch;
  margin: 0 auto;
  padding: 4rem 1rem;
}

h1,
h2,
h3 {
  line-height: 1.3;
  margin: 0;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

h2::before {
  content: "## ";
  color: var(--muted);
}

h3 {
  font-size: 1rem;
}

p {
  margin: 0;
}

p + p {
  margin-top: 1rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

.prompt {
  color: var(--accent);
}

.prompt::before {
  content: "~ $ ";
  color: var(--muted);
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}

header {
  margin-bottom: 3rem;
}

header h1 {
  margin-top: 0.5rem;
}

.role {
  color: var(--muted);
  margin-top: 0.25rem;
}

.lede {
  margin-top: 1.25rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

nav a,
.theme-toggle {
  text-decoration: none;
}

nav a::before,
.theme-toggle::before {
  content: "[";
  color: var(--muted);
}

nav a::after,
.theme-toggle::after {
  content: "]";
  color: var(--muted);
}

nav a:hover,
.theme-toggle:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.theme-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  cursor: pointer;
  text-underline-offset: 0.2em;
}

.theme-toggle[hidden] {
  display: none;
}

section {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px dashed var(--rule);
}

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.items h3::before {
  content: "> ";
  color: var(--accent);
}

.items p {
  color: var(--muted);
  padding-left: 2ch;
}

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

.skills dt {
  color: var(--muted);
}

.skills dd {
  margin: 0;
}

@media (max-width: 30rem) {
  .skills {
    grid-template-columns: 1fr;
    gap: 0;
  }

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

footer {
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.875rem;
}
