@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/bricolage-grotesque-latin-opsz.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: #f4f2ec;
  --ink: #101a28;
  --muted: #5b6470;
  --rule: #d3d0c6;
  --accent: #005a9c;
  --on-accent: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1420;
    --ink: #eef0ee;
    --muted: #98a2ae;
    --rule: #27323f;
    --accent: #4da3e6;
    --on-accent: #08111b;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

main {
  width: min(100%, 36rem);
  margin: auto;
  padding: clamp(2.5rem, 8vh, 5rem) 1.25rem;
}

.kicker,
.handle,
footer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.identity {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.identity h1 {
  font-size: clamp(2rem, 10.5vw, 4.5rem);
  line-height: 1;
  white-space: nowrap;
}

.portrait {
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
}

.kicker {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(3.75rem, 19vw, 6.5rem);
  font-weight: 800;
  font-variation-settings: "opsz" 96;
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.lede {
  margin: 1.5rem 0 1.25rem;
  max-width: 26em;
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.35;
}

.about {
  margin-bottom: 2.75rem;
}

.about p {
  margin: 0 0 0.875rem;
}

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

.links {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.links li {
  border-bottom: 1px solid var(--rule);
}

.links a,
.links button {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.8125rem 0.5rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.12s ease, color 0.12s ease,
    padding-left 0.12s ease;
}

.links button {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nowrap {
  white-space: nowrap;
}

.label {
  flex: none;
  font-weight: 500;
}

.status {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.handle {
  margin-left: auto;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.12s ease;
}

/* The revealed address wraps to its own line rather than being cut off. */
#contact a {
  flex-wrap: wrap;
}

#contact a .handle {
  flex: none;
}

.arrow {
  flex: none;
  transition: transform 0.12s ease;
}

.links a:hover,
.links a:focus-visible,
.links button:hover,
.links button:focus-visible {
  padding-left: 0.875rem;
  background: var(--accent);
  color: var(--on-accent);
}

.links a:hover .handle,
.links a:focus-visible .handle,
.links button:hover .handle,
.links button:focus-visible .handle {
  color: inherit;
}

.links a:hover .arrow,
.links a:focus-visible .arrow {
  transform: translate(2px, -2px);
}

.links a:focus-visible,
.links button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  color: var(--muted);
}

footer a {
  color: inherit;
}

footer a:hover {
  color: var(--accent);
}

/* Long-form pages, such as the privacy policy. */
.doc h1 {
  font-size: clamp(2.5rem, 11vw, 3.5rem);
  line-height: 1;
}

.doc h2 {
  margin: 2.25rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.doc p,
.doc ul {
  margin: 0.75rem 0;
}

.doc ul {
  padding-left: 1.25rem;
}

.doc li + li {
  margin-top: 0.5rem;
}

.doc a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

.doc .books {
  margin: 1.75rem 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.doc .books li {
  margin: 0;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--rule);
}

.books a {
  margin-right: 0.5rem;
  font-weight: 500;
}

.author {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.doc .books p {
  margin: 0.25rem 0 0;
}

@media (max-width: 26rem) {
  .links .handle {
    font-size: 0.75rem;
    letter-spacing: 0;
  }
}

@media (max-width: 22.5rem) {
  #contact a .arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .links a,
  .links button,
  .handle,
  .arrow {
    transition: none;
  }
}
