:root {
  --bg: #fafaf9;
  --text: #3a3a38;
  --strong: #111;
  --muted: #8a8984;
  --rule: #e7e6e2;
  --accent: #0f8b8d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --text: #c9c8c4; --strong: #f3f2ee;
    --muted: #7d7c78; --rule: #262624; --accent: #4fd1c5;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --text: #c9c8c4; --strong: #f3f2ee;
  --muted: #7d7c78; --rule: #262624; --accent: #4fd1c5;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 640px; margin: 0 auto; padding: 72px 20px 40px; }

a { color: var(--strong); text-decoration: underline; text-decoration-color: var(--rule);
    text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

header { display: flex; align-items: center; gap: 18px; }
.who { flex: 1; }
.theme { align-self: flex-start; }
.avatar { flex: none; width: 112px; height: 112px; border-radius: 50%; overflow: hidden;
          border: 1px solid var(--rule); }
/* zoom in on the face and center it */
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
              transform: scale(1.8) translate(1.9%, 16%); }
h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--strong); }
.role { margin: 2px 0 0; color: var(--muted); }

.theme { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px;
         color: var(--muted); cursor: pointer; }
.theme:hover { color: var(--accent); }

.links { margin: 16px 0 0; font-size: 15px; }
.links a + a::before { content: "/"; color: var(--muted); margin: 0 10px; display: inline-block; }

/* section tabs */
.tabs { display: flex; gap: 24px; margin-top: 36px; border-bottom: 1px solid var(--rule); }
.tabs a {
  padding: 0 0 10px;
  margin-bottom: -1px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.tabs a:hover { color: var(--strong); }
.tabs a.active { color: var(--strong); border-bottom-color: var(--accent); }

section { margin-top: 40px; }
h2 {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}
section > p { margin: 0; }

dl { display: grid; grid-template-columns: 7.5em 1fr; gap: 20px 16px; margin: 0; }
dt { color: var(--muted); font-size: 14px; padding-top: 1px; font-variant-numeric: tabular-nums; }
dd { margin: 0; }
dd strong { color: var(--strong); font-weight: 500; }
dd p { margin: 2px 0 0; }

.shot { margin: 14px 0 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--rule); }
.shot figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }

.src { font-size: 13px; margin-left: 8px; }
.src a { color: var(--muted); }

/* GitHub heatmap */
.heat-wrap { overflow-x: auto; }
.heat {
  display: grid;
  grid-template-rows: repeat(7, 8px);
  grid-auto-flow: column;
  grid-auto-columns: 8px;
  gap: 3px;
  width: max-content;
}
.heat i { border-radius: 2px; background: var(--rule); }
.heat i.l1 { background: color-mix(in srgb, var(--accent) 30%, var(--rule)); }
.heat i.l2 { background: color-mix(in srgb, var(--accent) 55%, var(--rule)); }
.heat i.l3 { background: color-mix(in srgb, var(--accent) 80%, var(--rule)); }
.heat i.l4 { background: var(--accent); }
.heat-meta { margin-top: 10px !important; font-size: 13px; color: var(--muted); }
.heat-meta a { color: var(--muted); }

footer { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--rule);
         font-size: 13px; color: var(--muted); }

@media (max-width: 520px) {
  main { padding-top: 48px; padding-left: 16px; padding-right: 16px; }
  dl { grid-template-columns: 1fr; gap: 2px; }
  dd { margin-bottom: 16px; }
}
